Skip to content

Commit

Permalink
Test against Ruby 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed May 22, 2020
1 parent 70ce867 commit 9bbe075
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@ services:
rvm:
- '2.5'
- '2.6'
- '2.7'

gemfile:
- gemfiles/Gemfile.activerecord52
- gemfiles/Gemfile.activerecord60

matrix:
exclude:
rvm: '2.7'
gemfile: gemfiles/Gemfile.activerecord52

before_script:
- mysql -e 'create database database_validations;'
2 changes: 1 addition & 1 deletion activerecord-databasevalidations.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency "activerecord", ">= 5.2"
spec.add_runtime_dependency "rejectu"

spec.add_development_dependency "bundler", "~> 1.5"
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "minitest"
spec.add_development_dependency "mysql2"
Expand Down
2 changes: 1 addition & 1 deletion lib/active_model/validations/basic_multilingual_plane.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def validate_each(record, attribute, value)
errors_options = options.except(:characters_outside_basic_multilingual_plane)
default_message = options[:characters_outside_basic_multilingual_plane]
errors_options[:message] ||= default_message if default_message
record.errors.add(attribute, :characters_outside_basic_multilingual_plane, errors_options)
record.errors.add(attribute, :characters_outside_basic_multilingual_plane, **errors_options)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/active_model/validations/bytesize.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def validate_each(record, attribute, value)
default_message = options[:too_many_bytes]
errors_options[:count] = options[:maximum]
errors_options[:message] ||= default_message if default_message
record.errors.add(attribute, :too_many_bytes, errors_options)
record.errors.add(attribute, :too_many_bytes, **errors_options)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/active_model/validations/not_null.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def validate_each(record, attribute, value)
errors_options = options.except(:must_be_set)
default_message = options[:must_be_set]
errors_options[:message] ||= default_message if default_message
record.errors.add(attribute, :must_be_set, errors_options)
record.errors.add(attribute, :must_be_set, **errors_options)
end
end
end
Expand Down

0 comments on commit 9bbe075

Please sign in to comment.