{"push_id":538694892,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"1094ba65aac1d37713f2cba71f9edad76b5ca274","before":"7946f681a9c19f6043ba62c892c25a16ffd5c720","commits":[{"sha":"8d9dd50e4aaad2ce6dcf7bb1fafb0d1d2c85bf44","author":{"email":"bad8ddf4f03c126f7c721b67e951d8de2f75ddc8@gmail.com","name":"Eugene Kenny"},"message":"Allow warden proxy to change with request in tests\n\nThe warden method in the Devise::TestHelpers module adds a Warden proxy\nobject to the request environment hash under the 'warden' key. Including\nthis module in your test case registers that method as a callback, which\nruns before every test:\nhttps://github.com/plataformatec/devise/blob/v3.4.1/lib/devise/test_helpers.rb#L12\n\nThe request object itself is created in a callback added by Rails:\nhttps://github.com/rails/rails/blob/v4.2.0/actionpack/lib/action_controller/test_case.rb#L687\n\nSo before each test runs, the Rails callback creates the request object,\nand then the Devise callback adds a Warden proxy object to it.\n\nI was using the rspec-retry gem (https://github.com/y310/rspec-retry),\nand noticed that my controller specs would always fail whenever they\nwere retried with this error:\n\nNoMethodError: undefined method `authenticate!' for nil:NilClass\n\nWhen rspec-retry re-runs a failed test, it runs the setup callbacks\nagain. The Rails callback creates a new request object, but because of\nthe memoization that was here before, the Devise callback wouldn't add a\nWarden proxy to it, which was causing the error.\n\nWith this change, the Warden setup code will still only run once as long\nas the request object stays the same, but if it changes a new Warden\nproxy will be added to the new request object.","distinct":true,"url":"https://api.github.com/repos/sideci-sample/sideci-sample-devise/commits/8d9dd50e4aaad2ce6dcf7bb1fafb0d1d2c85bf44"},{"sha":"1094ba65aac1d37713f2cba71f9edad76b5ca274","author":{"email":"0c2436ea76ed86e37cc05f66dea18d48ef390882@gmail.com","name":"José Valim"},"message":"Merge pull request #3400 from eugeneius/test_helper_memoize_warden_per_request\n\nAllow warden proxy to change with request in tests","distinct":true,"url":"https://api.github.com/repos/sideci-sample/sideci-sample-devise/commits/1094ba65aac1d37713f2cba71f9edad76b5ca274"}]}