{"push_id":867342387,"size":74,"distinct_size":7,"ref":"refs/heads/use-next-node-blocks-in-marriage-abroad","head":"451201b10bd4d1e63bdd4622f4aafecabd01d7bd","before":"4797c26a9756c6b08a040607013265cee664188b","commits":[{"sha":"7e26c554be106b2888f44bf92746e5fc7f6d819f","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Make SmartAnswer::I18nRenderer#value_for_interpolation private\n\nI want to be able to change the `SmartAnswer::QuestionPresenter` to use the\n`SmartAnswer::ErbRenderer` and so anything I can do to reduce the dependencies\non the `I18nRenderer` will make this easier.\n\nThis commit introduces a little duplication in the question presenter\nsub-classes. I plan to fix that in a later commit.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/7e26c554be106b2888f44bf92746e5fc7f6d819f"},{"sha":"761982750a08b7f7fe6ec8428f0a2d2afca0f4c6","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Avoid relying on I18nRenderer for #number_with_delimiter\n\nI want to be able to change the `SmartAnswer::QuestionPresenter` to use the\n`SmartAnswer::ErbRenderer` and so anything I can do to reduce the dependencies\non the `I18nRenderer` will make this easier.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/761982750a08b7f7fe6ec8428f0a2d2afca0f4c6"},{"sha":"346998703111490f6dd8c5f89a474f413445829a","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Rename OutcomeHelper to FormattingHelper\n\nI want to use this helper for formatting values in questions, so I've made the\nname more generic.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/346998703111490f6dd8c5f89a474f413445829a"},{"sha":"cc8debb7a0135d0b7f70b15d98737c2cfa089606","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Make SmartAnswer::FormattingHelper more self-contained\n\nThe `SmartAnswer::FormattingHelper` had an implicit dependency on\n`ActionView::Helpers::NumberHelper`.\n\nThis helper is currently only being used in the `SmartAnswer::ErbRenderer`\nwhich includes it and the `ActionView::Helpers::NumberHelper` into the view\nobject, thus satisfying the implicit dependency.\n\nI want to use this helper from within some of the sub-classes of\n`QuestionPresenter`. Including `ActionView::Helpers::NumberHelper` explicitly\nshould make this easier.\n\nI've left `ActionView::Helpers::NumberHelper` being included into the view,\nbecause there is code in some templates which use methods on this module\ndirectly i.e. not via `SmartAnswer::FormattingHelper`.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/cc8debb7a0135d0b7f70b15d98737c2cfa089606"},{"sha":"ee5dbdbb19b520221ff5336e906916116ce02655","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"DRY up formatting code in MoneyQuestionPresenter#response_label","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/ee5dbdbb19b520221ff5336e906916116ce02655"},{"sha":"1395259651d331e3b9a397bb909259d7174020a5","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Extract salary formatting into FormattingHelper#format_salary\n\nThis feels as if it makes the code a bit more consistent i.e. all formatting is\neither in `SmartAnswer::I18nRenderer#value_for_interpolation` or in methods on\n`SmartAnswer::FormattingHelper`.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/1395259651d331e3b9a397bb909259d7174020a5"},{"sha":"70f61c3c74db30eca1bb4572cca1b50d2a9566b2","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Merge pull request #2076 from alphagov/reduce-dependencies-on-i18n-renderer\n\nReduce dependencies on I18nRenderer","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/70f61c3c74db30eca1bb4572cca1b50d2a9566b2"},{"sha":"85374b9d4f32c1c84c3179d85334ca247b8153c6","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Remove flow-level options from i18n fixtures\n\nSince #2005, flow-level options are no longer used as a fallback, so we can\nsafely remove these.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/85374b9d4f32c1c84c3179d85334ca247b8153c6"},{"sha":"4f2d7d9d4a39d7940376950752a6e31147fd0085","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Merge pull request #2078 from alphagov/remove-flow-level-options-from-i18n-fixtures\n\nRemove flow-level options from i18n fixtures","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/4f2d7d9d4a39d7940376950752a6e31147fd0085"},{"sha":"70f680e85c9248691c38180cd38ae6c687074384","author":{"email":"505c84fc0d4eb0d7d674b5359732d24467a12f8e@gmail.com","name":"Erik Eide"},"message":"Update UK Visa Application Centre addresses for India, Nepal & Vietnam.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/70f680e85c9248691c38180cd38ae6c687074384"},{"sha":"26d046cd76455df6b93cbcc8c88b8a17c8e3fc66","author":{"email":"711c73f64afdce07b7e38039a96d2224209e9a6c@seagul.co.uk","name":"Chris Roos"},"message":"Merge pull request #2067 from alphagov/update_uk_visa_application_center_addresses_for_india_nepal_vietnam\n\nUpdate UK Visa Application Centre addresses for India, Nepal & Vietnam.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/26d046cd76455df6b93cbcc8c88b8a17c8e3fc66"},{"sha":"b456771e45e8c605b7580bb12dbcefff6dc04ec5","author":{"email":"711c73f64afdce07b7e38039a96d2224209e9a6c@seagul.co.uk","name":"Chris Roos"},"message":"Fix bug when dob_age is more than 2 days in future\n\nPartly fixes issue #2079.\n\nThis problem was introduced in f89112454eb899b8570c474f01db91cbd96862b2\n(part of PR #2061) when we switched to using `next_node` with a block in\nthe `:dob_age?` question.\n\nThe implementation before f89112454eb899b8570c474f01db91cbd96862b2\nrelied on the `validate` block preventing the\n`StatePensionAmountCalculator` being instantiated with a date of birth\nthat it couldn't handle (notably a date of birth more than two days in\nthe future). The switch to instantiating the calculator in the\n`next_node_calculation` block meant that it was created before the\n`validate` block is executed, which in turn meant that it could be\ncreated with an invalid date of birth. The fix in this commit is to\ninstantiate the calculator in the `next_node` block so that we once\nagain rely on the `validate` block to reject invalid dates.\n\nThe test I've added is for the unchanged `validate` behaviour but it\ngave me a failing test that I was able to use to drive the fix.\n\nThe problem ultimately stems from `StatePensionDateQuery#find_date`.\nWhen the date is more than two days in the future, no data can be found\nin either the static or dynamic pension data.\n\nNote. The last entry in the\n`StatePensionDateQuery#pension_dates_dynamic` array has an end date of\n`Date.today + 1`. This explains why the error only occurs when the date\nis more than two days in the future.\n\nNote. I've had to change the `and` to `&&` when assigning a value to the\n`near_pension_date` variable. Without this change, some of the\nintegration and regression tests for calculate-state-pension failed.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/b456771e45e8c605b7580bb12dbcefff6dc04ec5"},{"sha":"90e8f6c97f363a97ba5da7f85f35bb841fc060db","author":{"email":"711c73f64afdce07b7e38039a96d2224209e9a6c@seagul.co.uk","name":"Chris Roos"},"message":"Fix bug when dob_amount is more than 2 days in future\n\nPartly fixes issue #2079.\n\nThis problem was introduced in f89112454eb899b8570c474f01db91cbd96862b2\n(part of PR #2061) when we switched to using `next_node` with a block in\nthe `:dob_age?` question.\n\nThe implementation before f89112454eb899b8570c474f01db91cbd96862b2\nrelied on the `validate` block preventing the\n`StatePensionAmountCalculator` being instantiated with a date of birth\nthat it couldn't handle (notably a date of birth more than two days in\nthe future). The switch to instantiating the calculator in the\n`next_node_calculation` block meant that it was created before the\n`validate` block is executed, which in turn meant that it could be\ncreated with an invalid date of birth. The fix in this commit is to\ninstantiate the calculator in the `next_node` block so that we once\nagain rely on the `validate` block to reject invalid dates.\n\nThe test I've added is for the unchanged `validate` behaviour but it\ngave me a failing test that I was able to use to drive the fix.\n\nThe problem ultimately stems from `StatePensionDateQuery#find_date`.\nWhen the date is more than two days in the future, no data can be found\nin either the static or dynamic pension data.\n\nNote. The last entry in the\n`StatePensionDateQuery#pension_dates_dynamic` array has an end date of\n`Date.today + 1`. This explains why the error only occurs when the date\nis more than two days in the future.\n\nNote. I've had to change the `and` to `&&` when assigning a value to the\n`near_pension_date` variable. Without this change, some of the\nintegration and regression tests for calculate-state-pension failed.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/90e8f6c97f363a97ba5da7f85f35bb841fc060db"},{"sha":"8352b1a978330738c9e0c10179772a8d9f5ad1f6","author":{"email":"711c73f64afdce07b7e38039a96d2224209e9a6c@seagul.co.uk","name":"Chris Roos"},"message":"Update checksum data for calculate-state-pension","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/8352b1a978330738c9e0c10179772a8d9f5ad1f6"},{"sha":"a014cb1b50bc85ff277faca63fbc6810253bfeda","author":{"email":"711c73f64afdce07b7e38039a96d2224209e9a6c@seagul.co.uk","name":"Chris Roos"},"message":"Merge pull request #2080 from alphagov/fix-bug-in-calculate-state-pension\n\nFix bug in calculate-state-pension","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/a014cb1b50bc85ff277faca63fbc6810253bfeda"},{"sha":"a968526df5b16962184e4a930113fce41fc6bc13","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Remove title fallback for start nodes\n\nPreviously if not title was specified for a start node, we fell back to using\na human-friendly version of the node key. This was a carry over from code\noriginally in the `NodePresenter` and needlessly complicates the code.\n\nIdeally we'd fail fast if no title was found (as in #2075), but given that the\nregression tests render the title of the landing page for each flow, I think\nthis step is a safe one and it will make something else I'm working on easier.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/a968526df5b16962184e4a930113fce41fc6bc13"},{"sha":"990090420c15728458cc47d0f3c60895d37cfc0c","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Merge pull request #2085 from alphagov/remove-title-fallback-for-start-nodes\n\nRemove title fallback for start nodes","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/990090420c15728458cc47d0f3c60895d37cfc0c"},{"sha":"6a60bf32ea87f550fe7f85de99280a31ec7a21d4","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Improve unit tests for QuestionPresenter#error\n\nMy main objective here was to cover the behaviour when an\n`SmartAnswer::InvalidResponse` is raised with a text message and the default\nerror message in the i18n YAML file interpolates this error. Currently this\nbehaviour is only tested in the `InputValidationTest` integration test, but\nthere's so much going on in there it's hard to see the wood for the trees.\n\nI'm not convinced that this behaviour is very sensible nor do I think it is used\nanywhere in the published smart answer flows. However, it does appear as if\nthere are quite a few places where a custom String is set as the exception\nmessage rather than an error message key. Since I believe the mechanism\ndescribed above is the only way such messages could currently be displayed to\nthe user, I'm loathe to remove it without providing a replacement.\n\nI've also clarified that the final fallback error message is system-wide and not\njust for the question's flow.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/6a60bf32ea87f550fe7f85de99280a31ec7a21d4"},{"sha":"af8d7c8a79e7150a4139399f9022b7867c67ad02","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Merge pull request #2086 from alphagov/improve-unit-tests-for-question-presenter-error\n\nImprove unit tests for QuestionPresenter#error","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/af8d7c8a79e7150a4139399f9022b7867c67ad02"},{"sha":"fd89ab74b4567b015b272abe88f6d281612a2c87","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Remove deprecated Flow#section & #subsection_slug\n\nMost of the code relating to these methods was removed in 2012 in the\nfollowing two commits:\n\n* 8bee67ea43dc4de5e024342931c8028785d10f4d\n* d397d13352b3832d263867ba742f256955272374\n\nThe deprecation warnings were left in place in case any un-merged flows used\neither of the methods. I think it's safe to say that this danger has passed and\nit's now safe to removed these methods.","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/fd89ab74b4567b015b272abe88f6d281612a2c87"}]}