Feature: Rosey Build Options Background: Given I have the environment variables: | ROSEY_SOURCE | dist/site | | ROSEY_DEST | dist/translated_site | Scenario: Rosey builds with custom source and dest Given I have a "happy/index.html" file with the content: """

Kiss From A Rose

""" And I have a "rosey/locales/emotion.json" file with the content: """ { "seal": "πŸ‘„πŸŒΉ" } """ When I run my program with the flags: | build | | --source "happy" | | --dest "sad" | Then I should see a selector 'title' in "sad/index.html" with the attributes: | innerText | Redirecting... | And I should see a selector 'a' in "sad/index.html" with the attributes: | href | /en/ | | innerText | Click here if you are not redirected. | And I should see a selector 'p' in "sad/en/index.html" with the attributes: | data-rosey | seal | | innerText | Kiss From A Rose | And I should see a selector 'p' in "sad/emotion/index.html" with the attributes: | data-rosey | seal | | innerText | πŸ‘„πŸŒΉ | Scenario: Rosey builds with custom separators Given I have a "dist/site/index.html" file with the content: """ Home header title

Home page title

Contact content

Footer content

""" And I have a "rosey/locales/cc.json" file with the content: """ { "home:meta~title": "πŸ₯©", "home:content~title": "🏚️", "home:contact~contact-us": "πŸ‡ΊπŸ‡Έ", "footer": "🦢" } """ When I run my program with the flags: | build | | --separator "~" | Then I should see a selector 'title' in "dist/translated_site/cc/index.html" with the attributes: | data-rosey | title | | innerText | πŸ₯© | And I should see a selector 'h1' in "dist/translated_site/cc/index.html" with the attributes: | data-rosey | title | | innerText | 🏚️ | And I should see a selector 'p' in "dist/translated_site/cc/index.html" with the attributes: | data-rosey | contact-us | | innerText | πŸ‡ΊπŸ‡Έ | And I should see a selector 'p' in "dist/translated_site/cc/index.html" with the attributes: | data-rosey | footer | | innerText | 🦢 | Scenario: Rosey builds from custom tags Given I have a "dist/site/index.html" file with the content: """ Home header title

Home page title

Contact content

Footer content

""" And I have a "rosey/locales/s-e.json" file with the content: """ { "home:meta:title": "πŸ₯©", "home:content:title": "🏚️", "home:contact:contact-us": "πŸ‡ΊπŸ‡Έ", "footer": "🦢" } """ When I run my program with the flags: | build | | --tag "something-else" | Then I should see a selector 'title' in "dist/translated_site/s-e/index.html" with the attributes: | something-else | title | | innerText | πŸ₯© | And I should see a selector 'h1' in "dist/translated_site/s-e/index.html" with the attributes: | something-else | title | | innerText | 🏚️ | And I should see a selector 'p' in "dist/translated_site/s-e/index.html" with the attributes: | something-else | contact-us | | innerText | πŸ‡ΊπŸ‡Έ | And I should see a selector 'p' in "dist/translated_site/s-e/index.html" with the attributes: | something-else | footer | | innerText | 🦢 | Scenario: Rosey builds from a custom locale source Given I have a "dist/site/index.html" file with the content: """

Kiss From A Rose

""" And I have a "cloud/cannon.json" file with the content: """ { "seal": "πŸ‘„πŸŒΉ" } """ When I run my program with the flags: | build | | --locales "cloud" | Then I should see a selector 'title' in "dist/translated_site/index.html" with the attributes: | innerText | Redirecting... | And I should see a selector 'a' in "dist/translated_site/index.html" with the attributes: | href | /en/ | | innerText | Click here if you are not redirected. | And I should see a selector 'p' in "dist/translated_site/en/index.html" with the attributes: | data-rosey | seal | | innerText | Kiss From A Rose | And I should see a selector 'p' in "dist/translated_site/cannon/index.html" with the attributes: | data-rosey | seal | | innerText | πŸ‘„πŸŒΉ | Scenario: Rosey builds with an alternate default language Given I have a "dist/site/index.html" file with the content: """

gander

""" And I have a "rosey/locales/em.json" file with the content: """ { "goose": "πŸ‘Ή" } """ When I run my program with the flags: | build | | --default-language "poultry" | Then I should see a selector 'title' in "dist/translated_site/index.html" with the attributes: | innerText | Redirecting... | And I should see a selector 'a' in "dist/translated_site/index.html" with the attributes: | href | /poultry/ | | innerText | Click here if you are not redirected. | And I should see a selector 'p' in "dist/translated_site/poultry/index.html" with the attributes: | data-rosey | goose | | innerText | gander | And I should see a selector 'p' in "dist/translated_site/em/index.html" with the attributes: | data-rosey | goose | | innerText | πŸ‘Ή |