-
Notifications
You must be signed in to change notification settings - Fork 152
Loosens ActiveSupport to 3 #300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loosens ActiveSupport to 3 #300
Conversation
2 similar comments
require 'active_support/version' | ||
require 'active_support/core_ext/hash' if ActiveSupport::VERSION && | ||
ActiveSupport::VERSION::MAJOR && | ||
ActiveSupport::VERSION::MAJOR < 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is ActiveSupport.version.to_s < '4'
the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ActiveSupport 3 has a different API for version (https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/version.rb). It's closer to 'activesupport/gem_version' in 4+.
grape-entity.gemspec
Outdated
@@ -18,8 +18,7 @@ Gem::Specification.new do |s| | |||
|
|||
s.rubyforge_project = 'grape-entity' | |||
|
|||
s.add_runtime_dependency 'activesupport', '>=4.0' | |||
# FIXME: remove dependecy | |||
s.add_runtime_dependency 'activesupport', '>= 3.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please can you change the lines, FIXME
should be above multi_json
, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do.
thanks @EricSchultz … will rebase and mörge it, after this one #301, ok |
Here's an example of a CHANGELOG.md entry: * [#300](https://github.com/ruby-grape/grape-entity/pull/300): Loosens activesupport to 3 - [@ericschultz](https://github.com/ericschultz). Generated by 🚫 danger |
This is a fix for #289 and a second attempt (original pull request at #290)
The spec_helper now loads the needed hash extensions for ActiveSupport < 4. In ActiveSupport >=4, there's no change other than the ActiveSupport version info being loaded, which has no effect test functioning.