-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Setup appraisal #1134
Setup appraisal #1134
Conversation
Awesome!! thanks |
I'll take a look at failing Rails 4.2 migrations later. |
Now I know, why v0.1.43 doesn't work in my project on Rails 4. ;P The gem doesn't work on Rails 4. |
I would propose to split this PR into 2:
|
Sounds good! You can remove rails 4 appraisal from this PR. But it should work in Rails 4 |
01d47ca
to
b56a58a
Compare
b56a58a
to
e16e3f7
Compare
@MaicolBen removed! I need this gem to work on Rails 4.2. Do you know if there is a way to make Rails 5 get/post/patch/delete work with Rails 4.2? The have changed the signature of those methods. get '/demo/members_only_group', params: {}, headers: @resource_auth_headers Rails 4 get '/demo/members_only_group', {}, @resource_auth_headers |
module Rails
module Controller
module Testing
module Integration
%w[get post patch put head delete get_via_redirect post_via_redirect].each do |method|
define_method(method) do |path, **args|
if Rails::VERSION::MAJOR >= 5
super path, args
else
super path, args[:params], args[:headers]
end
end
end
end
end
end
end |
@krzysiek1507 Does it work? it looks great! |
@MaicolBen it works but I need to fix some more specs. Could you please merge this PR? I'll create a new one with Rails 4. |
We try to have 2 approvals in each PR, adding more reviewers |
@krzysiek1507 Approved and merged! Looking forward to the next PR with the Rails 4 appraisal. Thanks! |
Hey, this merge is causing failing tests in travis...
Not sure why the merged code fails on the
|
@Evan-M mocha 1.5.0 was released about merge time. 😄They have changed something. |
I haven't used mocha but I can take a look at this tomorrow. |
@krzysiek1507: I don't think the failure is specific to your code. In fact, Travis Build #1185 (which is for #1004) is experiencing the same failure from Mocha. Looking over the code they added to the new release of Mocha 1.5.0, any attempt to use Mocha outside the context of a test or example will result in a Mocha::NotInitializedError being raised. UPDATE: I created a new issue (#1137) for the Mocha failure. |
@Evan-M I know that the problem is not specific to my code because I didn't change any line of code here. |
Hey @krzysiek1507: I know that I already merged this PR, and I just added PR #1139 (which resolves #1137), but I'm curious as to why the Specifically, these files:
The standard |
Hi @Evan-M. The question is: why do we want to control Answer 1: We want gem versions to be the same everywhere. Answer 2: We want to test using specified versions of gems. For me, |
@krzysiek1507: That is indeed a great way to think of it! I've wondered for a while why there isn't more specificity of major/minor/patch versions in the Therefore, I think I kinda misphrased my question... Unlike an application, it is best practice for a Gem to not include the There is an additional comment in the Lines 8 to 11 in 7df8960
To be fair, I really only brought the issue of |
When you install a gem, bundler doesn't use There are 3 ways to solve this problem:
|
Setup Appraisal so we can see if everything works on supported Rails versions.