Feature: Rosey Generate v1 Background: Given I have the environment variables: | ROSEY_SOURCE | dist/site | | ROSEY_DEST | dist/translated_site | Scenario: Rosey generates base.json files Given I have a "dist/site/index.html" file with the content: """

Kiss From A Rose

""" When I run my program with the flags: | generate | | --version 1 | Then I should see "rosey/base.json" containing the values: | seal | Kiss From A Rose | Scenario: Rosey generates base.json files with attrs Given I have a "dist/site/index.html" file with the content: """

Home page title

""" When I run my program with the flags: | generate | | --version 1 | Then I should see "rosey/base.json" containing the values: | title | Home page title | | title\.content | Content attribute | | title\.alt | alt attribute | Scenario: Rosey generates base.json files with explicit attrs Given I have a "dist/site/index.html" file with the content: """

Home page title

""" When I run my program with the flags: | generate | | --version 1 | Then I should see "rosey/base.json" containing the values: | content-tag | Content attribute | | alt-tag | alt attribute | Scenario: Rosey generates base.json files with namespaces Given I have a "dist/site/index.html" file with the content: """
Slot A
Slot B
Slot C
Slot D
""" When I run my program with the flags: | generate | | --version 1 | Then I should see "rosey/base.json" containing the values: | about:faq:row-0:col-0:title | Slot A | | about:faq:row-1:col-0:title | Slot B | | about:benefits:row-0:col-0:title | Slot C | | about:benefits:row-1:col-0:title | Slot D | Scenario: Rosey generates base.json files with roots Given I have a "dist/site/index.html" file with the content: """ Home header title

Home page title

Contact content

Footer content

""" When I run my program with the flags: | generate | | --version 1 | Then I should see "rosey/base.json" containing the values: | home:meta:title | Home header title | | home:content:title | Home page title | | home:contact:contact-us | Contact content | | footer | Footer content |