Skip to content

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

Merged
merged 4 commits into from
Mar 28, 2018

Conversation

wwahammy
Copy link
Contributor

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.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 95.91% when pulling 820bbbf on ericschultz:loosen_activesupport_to_3 into 1bfa7f3 on ruby-grape:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 95.91% when pulling 820bbbf on ericschultz:loosen_activesupport_to_3 into 1bfa7f3 on ruby-grape:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.5%) to 95.91% when pulling 820bbbf on ericschultz:loosen_activesupport_to_3 into 1bfa7f3 on ruby-grape:master.

@coveralls
Copy link

coveralls commented Mar 28, 2018

Coverage Status

Coverage remained the same at 95.372% when pulling 1398075 on ericschultz:loosen_activesupport_to_3 into acef1f6 on ruby-grape:master.

require 'active_support/version'
require 'active_support/core_ext/hash' if ActiveSupport::VERSION &&
ActiveSupport::VERSION::MAJOR &&
ActiveSupport::VERSION::MAJOR < 4
Copy link
Member

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?

Copy link
Contributor Author

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+.

@@ -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'
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

@LeFnord
Copy link
Member

LeFnord commented Mar 28, 2018

thanks @EricSchultz

will rebase and mörge it, after this one #301, ok

@grape-bot
Copy link

grape-bot commented Mar 28, 2018

1 Warning
⚠️ Unless you’re refactoring existing code, please update CHANGELOG.md.
1 Message
📖 We really appreciate pull requests that demonstrate issues, even without a fix. That said, the next step is to try and fix the failing tests!

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

@LeFnord LeFnord merged commit c3bf50b into ruby-grape:master Mar 28, 2018
@wwahammy wwahammy deleted the loosen_activesupport_to_3 branch December 14, 2018 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants