{"push_id":1002133513,"size":4,"distinct_size":1,"ref":"refs/heads/master","head":"df29107b30e15dd483a409b7bc465aa49a73f865","before":"bf1f0575ecd8c3b5a5e82764e7e5276bbd6ace32","commits":[{"sha":"c40ddf64376ed76c065020aa36abf0ce582813c3","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Extract local variables to improve readability","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/c40ddf64376ed76c065020aa36abf0ce582813c3"},{"sha":"555dade849571b10db4a472cfc4f09d7c698fea3","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Supply source file path to eval of shared logic\n\nThis means any exception raised during the evaluation will report a sensible\nfile path and line number rather than the file path and line number of the\n`Flow#use_shared_logic` method.\n\nI recently ran into such an error and it wasn't immediately obvious where the\nsyntax error was occurring.\n\nI've added a unit test that checks for the new behaviour.\n\nBefore:\n\n```\nlib/smart_answer/flow.rb:27: syntax error, unexpected '=', expecting keyword_end\n  1 + 1 = 2 # => SyntaxError\n         ^\n```\n\nAfter:\n\n```\nlib/smart_answer_flows/shared_logic/test_flow_logic.rb:2: syntax error, unexpected '=', expecting keyword_end\n  1 + 1 = 2 # => SyntaxError\n         ^\n```","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/555dade849571b10db4a472cfc4f09d7c698fea3"},{"sha":"8b57075ab67f124f11bfd92a2e2e535f41ec5801","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Ignore rubocop violation\n\n```\nlib/smart_answer/flow.rb:27:7: W: Lint/Eval: The use of eval is a serious security risk.\n      eval File.read(path), binding, path.to_s\n      ^^^^\n```\n\nThis violation has only been triggered, because I've made a change to the line\nwhich includes the call `eval` - the call to `eval` was there already i.e. I\nhaven't made anything worse!\n\nI did experiment [1] with using `instance_eval` instead, but this caused\nproblems with constant lookup, so for the moment I think disabling the specific\nRubocop rule is the pragmatic solution.\n\n[1]: #2321","distinct":false,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/8b57075ab67f124f11bfd92a2e2e535f41ec5801"},{"sha":"df29107b30e15dd483a409b7bc465aa49a73f865","author":{"email":"474ba67bdb289c6263b36dfd8a7bed6c85b04943@floehopper.org","name":"James Mead"},"message":"Merge pull request #2328 from alphagov/improve-message-of-exceptions-raised-in-eval-of-shared-logic-v2\n\nImprove message of exceptions raised in eval of shared logic (v2)","distinct":true,"url":"https://api.github.com/repos/alphagov/smart-answers/commits/df29107b30e15dd483a409b7bc465aa49a73f865"}]}