Add Ruby 3.0 compatibility

- Double splat `values` parameter when calling DateTimeValue
This commit is contained in:
Geremia Taglialatela 2021-01-01 12:33:10 +01:00
parent a0adda3eb2
commit f25ab5671c
No known key found for this signature in database
GPG Key ID: 4A6344430AD4E29F
3 changed files with 9 additions and 1 deletions

View File

@ -16,6 +16,7 @@ rvm:
- "2.5.8" - "2.5.8"
- "2.6.6" - "2.6.6"
- "2.7.2" - "2.7.2"
- "3.0.0"
- ruby-head - ruby-head
jobs: jobs:
@ -33,6 +34,12 @@ jobs:
gemfile: gemfiles/rails_5_1.gemfile gemfile: gemfiles/rails_5_1.gemfile
- rvm: 2.7.2 - rvm: 2.7.2
gemfile: gemfiles/rails_5_2.gemfile gemfile: gemfiles/rails_5_2.gemfile
- rvm: 3.0.0
gemfile: gemfiles/rails_5_0.gemfile
- rvm: 3.0.0
gemfile: gemfiles/rails_5_1.gemfile
- rvm: 3.0.0
gemfile: gemfiles/rails_5_2.gemfile
- rvm: ruby-head - rvm: ruby-head
gemfile: gemfiles/rails_5_0.gemfile gemfile: gemfiles/rails_5_0.gemfile
- rvm: ruby-head - rvm: ruby-head

View File

@ -5,6 +5,7 @@
in a request. in a request.
* Add initializer to ensure Timeliness v0.4+ ambiguous date config is set * Add initializer to ensure Timeliness v0.4+ ambiguous date config is set
correctly when using `use_euro_formats` or `remove_use_formats'. correctly when using `use_euro_formats` or `remove_use_formats'.
* Add Ruby 3 compatibility
* Add Rails 6.1 compatibility * Add Rails 6.1 compatibility
Breaking Changes Breaking Changes

View File

@ -43,7 +43,7 @@ module ValidatesTimeliness
values[POSITION.key(position.to_i)] = value.to_i values[POSITION.key(position.to_i)] = value.to_i
end end
DateTimeValue.new(values) DateTimeValue.new(**values)
end end
end end
end end