-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add Rails master appraisals in preparation for Rails 5 #1976
Changes from all commits
caa7c22
393aac2
49faabb
93c34e7
799845e
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,12 +1,26 @@ | ||
rvm: | ||
- 2.1 | ||
- 2.2 | ||
- 2.2.2 | ||
|
||
script: "bundle exec rake clean spec cucumber" | ||
|
||
gemfile: | ||
- gemfiles/4.2.awsv2.1.gemfile | ||
- gemfiles/4.2.awsv2.0.gemfile | ||
- gemfiles/4.2.awsv2.1.gemfile | ||
- gemfiles/5.0.awsv2.0.gemfile | ||
- gemfiles/5.0.awsv2.1.gemfile | ||
|
||
matrix: | ||
fast_finish: true | ||
exclude: | ||
- gemfile: gemfiles/5.0.awsv2.0.gemfile | ||
rvm: 2.0 | ||
- gemfile: gemfiles/5.0.awsv2.1.gemfile | ||
rvm: 2.0 | ||
- gemfile: gemfiles/5.0.awsv2.0.gemfile | ||
rvm: 2.1 | ||
- gemfile: gemfiles/5.0.awsv2.1.gemfile | ||
rvm: 2.1 | ||
|
||
sudo: false | ||
cache: bundler |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 +2,16 @@ | |
|
||
source "https://rubygems.org" | ||
|
||
gem "sqlite3", "~> 1.3.8", platforms: :ruby | ||
gem "sqlite3", "~> 1.3.8", :platforms => :ruby | ||
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. Shouldn't we keep the Ruby 2 hash syntax? 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. This is autogenerated by Appraisals :( 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. Which makes sense for a testing library (thoughtbot/appraisal#105 (comment)). Thanks! |
||
gem "pry" | ||
gem "rails", "~> 4.2.0" | ||
gem "aws-sdk", "~> 2.0.0" | ||
|
||
group :development, :test do | ||
gem "activerecord-import" | ||
gem "mime-types", ">= 1.16", "< 4" | ||
gem "mime-types" | ||
gem "builder" | ||
gem "rubocop", :require => false | ||
end | ||
|
||
gemspec path: "../" | ||
gemspec :path => "../" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "sqlite3", "~> 1.3.8", :platforms => :ruby | ||
gem "jruby-openssl", :platforms => :jruby | ||
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby | ||
gem "rubysl", :platforms => :rbx | ||
gem "racc", :platforms => :rbx | ||
gem "pry" | ||
gem "rails", "~> 4.2.0" | ||
gem "aws-sdk", "~> 2.0" | ||
|
||
group :development, :test do | ||
gem "mime-types", "~> 1.16" | ||
gem "builder" | ||
gem "rubocop", :require => false | ||
end | ||
|
||
gemspec :path => "../" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "sqlite3", "~> 1.3.8", :platforms => :ruby | ||
gem "pry" | ||
gem "rails", "5.0.0.beta3" | ||
gem "aws-sdk", "~> 2.0.0" | ||
|
||
group :development, :test do | ||
gem "activerecord-import" | ||
gem "mime-types", ">= 1.16", "< 4" | ||
gem "builder" | ||
gem "rubocop", :require => false | ||
end | ||
|
||
gemspec :path => "../" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "sqlite3", "~> 1.3.8", :platforms => :ruby | ||
gem "pry" | ||
gem "rails", "5.0.0.beta3" | ||
gem "aws-sdk", "~> 2.1.0" | ||
|
||
group :development, :test do | ||
gem "activerecord-import" | ||
gem "mime-types" | ||
gem "builder" | ||
gem "rubocop", :require => false | ||
end | ||
|
||
gemspec :path => "../" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This file was generated by Appraisal | ||
|
||
source "https://rubygems.org" | ||
|
||
gem "sqlite3", "~> 1.3.8", :platforms => :ruby | ||
gem "jruby-openssl", :platforms => :jruby | ||
gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby | ||
gem "rubysl", :platforms => :rbx | ||
gem "racc", :platforms => :rbx | ||
gem "pry" | ||
gem "rails", :github => "rails/rails" | ||
gem "sprockets-rails", :github => "rails/sprockets-rails" | ||
gem "sprockets", :github => "rails/sprockets" | ||
gem "sass-rails", :github => "rails/sass-rails" | ||
gem "arel", :github => "rails/arel" | ||
gem "rack", :github => "rack/rack" | ||
gem "aws-sdk", "~> 2.0" | ||
|
||
group :development, :test do | ||
gem "mime-types", "~> 1.16" | ||
gem "builder" | ||
gem "rubocop", :require => false | ||
end | ||
|
||
gemspec :path => "../" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -501,7 +501,7 @@ def post_process(*style_args) #:nodoc: | |
|
||
instance.run_paperclip_callbacks(:post_process) do | ||
instance.run_paperclip_callbacks(:"#{name}_post_process") do | ||
unless @options[:check_validity_before_processing] && instance.errors.any? | ||
if !@options[:check_validity_before_processing] || !instance.errors.any? | ||
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. Line is too long. [82/80] |
||
post_process_styles(*style_args) | ||
end | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ def self.included(base) | |
|
||
module Defining | ||
def define_paperclip_callbacks(*callbacks) | ||
define_callbacks(*[callbacks, {:terminator => callback_terminator}].flatten) | ||
define_callbacks(*[callbacks, { terminator: hasta_la_vista_baby }].flatten) | ||
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. Line is too long. [83/80] |
||
callbacks.each do |callback| | ||
eval <<-end_callbacks | ||
def before_#{callback}(*args, &blk) | ||
|
@@ -22,11 +22,13 @@ def after_#{callback}(*args, &blk) | |
|
||
private | ||
|
||
def callback_terminator | ||
if ::ActiveSupport::VERSION::STRING >= '4.1' | ||
lambda { |target, result| result == false } | ||
else | ||
'result == false' | ||
def hasta_la_vista_baby | ||
lambda do |_, result| | ||
if result.respond_to?(:call) | ||
result.call == false | ||
else | ||
result == false | ||
end | ||
end | ||
end | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,12 +64,11 @@ | |
assert_raises(RuntimeError){ dummy.valid? } | ||
end | ||
|
||
it 'allows you to attach a file that does not violates these validations' do | ||
it 'allows you to attach a file that does not violate these validations' do | ||
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. Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping. |
||
dummy = Dummy.new(avatar: File.new(fixture_file('rotated.jpg'))) | ||
expect(dummy.errors.keys).to match_array [] | ||
expect(dummy.errors.full_messages).to be_empty | ||
assert dummy.valid? | ||
end | ||
|
||
end | ||
|
||
context "using the helper with a conditional" do | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Reporting | ||
def silence_stream(stream) | ||
old_stream = stream.dup | ||
stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null') | ||
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. Line is too long. [86/80] |
||
stream.sync = true | ||
yield | ||
ensure | ||
stream.reopen(old_stream) | ||
old_stream.close | ||
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.
Do we need to take this combination into account? When is AWS v1 end of life?
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.
Not sure about v1 support (this would be another big breaking change deprecation), but I can look into this.