recipes/devise.rb in rails_apps_composer-1.0.15 vs recipes/devise.rb in rails_apps_composer-1.0.16
- old
+ new
@@ -5,11 +5,11 @@
if recipes.include? 'rails 3.0'
# for Rails 3.0, use only gem versions we know that work
gem 'devise', '1.3.4'
else
# for Rails 3.1+, use optimistic versioning for gems
- gem 'devise', '>= 1.4.2'
+ gem 'devise', '>= 1.4.4'
end
else
recipes.delete('devise')
end
@@ -35,10 +35,10 @@
gsub_file 'config/application.rb', /:password/, ':password, :password_confirmation'
if recipes.include? 'cucumber'
# Cucumber wants to test GET requests not DELETE requests for destroy_user_session_path
# (see https://github.com/RailsApps/rails3-devise-rspec-cucumber/issues/3)
- gsub_file 'config/initializers/devise.rb', 'config.sign_out_via = :delete', 'config.sign_out_via = :get'
+ gsub_file 'config/initializers/devise.rb', 'config.sign_out_via = :delete', 'config.sign_out_via = Rails.env.test? ? :get : :delete'
end
end
after_everything do
\ No newline at end of file