-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert benefits-cap-calculator to use ERB templates for questions #2113
Merged
floehopper
merged 4 commits into
master
from
convert-benefits-cap-calculator-to-use-erb-templates-for-questions
Nov 18, 2015
Merged
Convert benefits-cap-calculator to use ERB templates for questions #2113
floehopper
merged 4 commits into
master
from
convert-benefits-cap-calculator-to-use-erb-templates-for-questions
Nov 18, 2015
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apart from my comment about the indenting of content in |
4241a9b
to
1446115
Compare
Since #2116 has been merged, I've rebased this against master, re-run the new version of the script, updated the checksums, and force-pushed. You can see the body with fixed indentation in this commit. |
I ran the following command: $ rails r script/convert-question-i18-yaml-to-erb-templates.rb lib/smart_answer_flows/benefits-cap-calculator Writing template: receive_housing_benefit.govspeak.erb Writing template: working_tax_credit.govspeak.erb Writing template: receiving_exemption_benefits.govspeak.erb Writing template: receiving_non_exemption_benefits.govspeak.erb Writing template: bereavement_amount.govspeak.erb Writing template: carers_amount.govspeak.erb Writing template: child_benefit_amount.govspeak.erb Writing template: child_tax_amount.govspeak.erb Writing template: esa_amount.govspeak.erb Writing template: guardian_amount.govspeak.erb Writing template: incapacity_amount.govspeak.erb Writing template: income_support_amount.govspeak.erb Writing template: jsa_amount.govspeak.erb Writing template: maternity_amount.govspeak.erb Writing template: sda_amount.govspeak.erb Writing template: widowed_mother_amount.govspeak.erb Writing template: widowed_parent_amount.govspeak.erb Writing template: widow_pension_amount.govspeak.erb Writing template: widows_aged_amount.govspeak.erb Writing template: housing_benefit_amount.govspeak.erb Writing template: single_couple_lone_parent.govspeak.erb Deleting i18n YAML: benefit-cap-calculator.yml Now insert `use_erb_templates_for_questions` at top of flow: benefit-cap-calculator.rb
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have not been HTML-escaped. Now that we are rendering question content via this renderer, we need to update the regression test artefacts for question pages accordingly. I ran the following commands to do this: $ find test/artefacts/benefit-cap-calculator -name '*.html' | xargs sed -i .bak "s/'/'/g" $ git clean -fd test/artefacts/benefit-cap-calculator/**/*.bak
The change to ERB templates has introduced a few extra newlines in the question page HTML, but none of them affect the content viewable by the user. I verified that the changes were all only blank lines using the following command: $ git diff --ignore-blank-lines
Re-generating the checksums has removed the i18n YAML file and added the new question templates as I expected.
1446115
to
ac3c73d
Compare
floehopper
added a commit
that referenced
this pull request
Nov 18, 2015
…r-to-use-erb-templates-for-questions Convert benefits-cap-calculator to use ERB templates for questions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.