recipes/devise.rb in rails_apps_composer-1.0.3 vs recipes/devise.rb in rails_apps_composer-1.0.4
- old
+ new
@@ -1,9 +1,15 @@
# Application template recipe for the rails_apps_composer. Check for a newer version here:
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/devise.rb
if config['devise']
- gem "devise", ">= 1.3.4"
+ 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.3.4'
+ end
else
recipes.delete('devise')
end
\ No newline at end of file