-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Test against Rails 5 #229
Test against Rails 5 #229
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
source "http://rubygems.org" | ||
|
||
gem 'appraisal' | ||
source "https://rubygems.org" | ||
|
||
gemspec | ||
|
||
gem "appraisal" | ||
gem "rspec-rails", "~> 3.2" | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,22 +4,22 @@ PATH | |
high_voltage (2.4.0) | ||
|
||
GEM | ||
remote: http://rubygems.org/ | ||
remote: https://rubygems.org/ | ||
specs: | ||
actionpack (4.2.0) | ||
actionview (= 4.2.0) | ||
activesupport (= 4.2.0) | ||
rack (~> 1.6.0) | ||
actionpack (4.2.5.2) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should Gemfile.lock be ignored? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting, what's the reasoning behind ignoring the lock file? I haven't seen it ignored in any of our other open source libraries like Clearance or shoulda-matchers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd rather have tests and development environment install all the latest allowed versions for the dependencies, to make sure they are properly declared. Is there a reason why we'd prefer to keep it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In clearance I've kept Gemfile.lock checked in. It represents a known state that should work for anyone cloning the project. The gemfile.lock files created by appraisal are not checked in, so CI runs against latest allowed (and I can run against latest allowed with |
||
actionview (= 4.2.5.2) | ||
activesupport (= 4.2.5.2) | ||
rack (~> 1.6) | ||
rack-test (~> 0.6.2) | ||
rails-dom-testing (~> 1.0, >= 1.0.5) | ||
rails-html-sanitizer (~> 1.0, >= 1.0.1) | ||
actionview (4.2.0) | ||
activesupport (= 4.2.0) | ||
rails-html-sanitizer (~> 1.0, >= 1.0.2) | ||
actionview (4.2.5.2) | ||
activesupport (= 4.2.5.2) | ||
builder (~> 3.1) | ||
erubis (~> 2.7.0) | ||
rails-dom-testing (~> 1.0, >= 1.0.5) | ||
rails-html-sanitizer (~> 1.0, >= 1.0.1) | ||
activesupport (4.2.0) | ||
rails-html-sanitizer (~> 1.0, >= 1.0.2) | ||
activesupport (4.2.5.2) | ||
i18n (~> 0.7) | ||
json (~> 1.7, >= 1.7.7) | ||
minitest (~> 5.1) | ||
|
@@ -34,55 +34,55 @@ GEM | |
diff-lcs (1.2.5) | ||
erubis (2.7.0) | ||
i18n (0.7.0) | ||
json (1.8.2) | ||
loofah (2.0.1) | ||
json (1.8.3) | ||
loofah (2.0.3) | ||
nokogiri (>= 1.5.9) | ||
method_source (0.8.2) | ||
mini_portile (0.6.2) | ||
minitest (5.5.1) | ||
nokogiri (1.6.6.2) | ||
mini_portile (~> 0.6.0) | ||
mini_portile2 (2.0.0) | ||
minitest (5.8.4) | ||
nokogiri (1.6.7.2) | ||
mini_portile2 (~> 2.0.0.rc2) | ||
pry (0.10.1) | ||
coderay (~> 1.1.0) | ||
method_source (~> 0.8.1) | ||
slop (~> 3.4) | ||
rack (1.6.0) | ||
rack (1.6.4) | ||
rack-test (0.6.3) | ||
rack (>= 1.0) | ||
rails-deprecated_sanitizer (1.0.3) | ||
activesupport (>= 4.2.0.alpha) | ||
rails-dom-testing (1.0.5) | ||
rails-dom-testing (1.0.7) | ||
activesupport (>= 4.2.0.beta, < 5.0) | ||
nokogiri (~> 1.6.0) | ||
rails-deprecated_sanitizer (>= 1.0.1) | ||
rails-html-sanitizer (1.0.1) | ||
rails-html-sanitizer (1.0.3) | ||
loofah (~> 2.0) | ||
railties (4.2.0) | ||
actionpack (= 4.2.0) | ||
activesupport (= 4.2.0) | ||
railties (4.2.5.2) | ||
actionpack (= 4.2.5.2) | ||
activesupport (= 4.2.5.2) | ||
rake (>= 0.8.7) | ||
thor (>= 0.18.1, < 2.0) | ||
rake (10.4.2) | ||
rspec-core (3.2.1) | ||
rspec-support (~> 3.2.0) | ||
rspec-expectations (3.2.0) | ||
rake (10.5.0) | ||
rspec-core (3.4.3) | ||
rspec-support (~> 3.4.0) | ||
rspec-expectations (3.4.0) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.2.0) | ||
rspec-mocks (3.2.1) | ||
rspec-support (~> 3.4.0) | ||
rspec-mocks (3.4.1) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.2.0) | ||
rspec-rails (3.2.1) | ||
rspec-support (~> 3.4.0) | ||
rspec-rails (3.4.2) | ||
actionpack (>= 3.0, < 4.3) | ||
activesupport (>= 3.0, < 4.3) | ||
railties (>= 3.0, < 4.3) | ||
rspec-core (~> 3.2.0) | ||
rspec-expectations (~> 3.2.0) | ||
rspec-mocks (~> 3.2.0) | ||
rspec-support (~> 3.2.0) | ||
rspec-support (3.2.2) | ||
rspec-core (~> 3.4.0) | ||
rspec-expectations (~> 3.4.0) | ||
rspec-mocks (~> 3.4.0) | ||
rspec-support (~> 3.4.0) | ||
rspec-support (3.4.1) | ||
slop (3.6.0) | ||
thor (0.19.1) | ||
thread_safe (0.3.4) | ||
thread_safe (0.3.5) | ||
tzinfo (1.2.2) | ||
thread_safe (~> 0.1) | ||
|
||
|
@@ -94,7 +94,7 @@ DEPENDENCIES | |
appraisal | ||
high_voltage! | ||
pry | ||
rspec-rails (~> 3.2.0) | ||
rspec-rails (~> 3.2) | ||
|
||
BUNDLED WITH | ||
1.10.0 | ||
1.11.2 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "http://rubygems.org" | ||
source "https://rubygems.org" | ||
|
||
gem "appraisal" | ||
gem "rspec-rails", "~> 3.2" | ||
gem "rails", "~> 4.0.0" | ||
|
||
gemspec :path => "../" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "http://rubygems.org" | ||
source "https://rubygems.org" | ||
|
||
gem "appraisal" | ||
gem "rspec-rails", "~> 3.2" | ||
gem "rails", "~> 4.1.0" | ||
|
||
gemspec :path => "../" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "http://rubygems.org" | ||
source "https://rubygems.org" | ||
|
||
gem "appraisal" | ||
gem "rspec-rails", "~> 3.2" | ||
gem "rails", "~> 4.2.0" | ||
|
||
gemspec :path => "../" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "appraisal" | ||
gem "rspec-rails", "3.5.0.beta1" | ||
gem "rails", "~> 5.0.0.beta3" | ||
gem "rails-controller-testing" | ||
|
||
gemspec :path => "../" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Rails 5 deprecates calling HTTP action methods with positional arguments | ||
# in favor of keyword arguments. However, the keyword argument form is only | ||
# supported in Rails 5+. Since we support back to 4, we need some sort of shim | ||
# to avoid super noisy deprecations when running tests. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool! Will get this into doorkeeper. Thank you! :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't take credit, got this from @derekprior and Clearance. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, thank you Derek, too! 👍 |
||
module HTTPMethodShim | ||
def get(path, params = nil, headers = nil) | ||
super(path, params: params, headers: headers) | ||
end | ||
end | ||
|
||
if Rails::VERSION::MAJOR >= 5 | ||
RSpec.configure do |config| | ||
config.include HTTPMethodShim, type: :controller | ||
end | ||
end |
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.
Should this go as development dependencies in the gemspec?
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.
No, because they differ with appraisals. 👍