state-machines / state_machines-activemodel

StateMachines ActiveModel Integration
MIT License
33 stars 33 forks source link

Test on Ruby 2.7 and fix a keyword argument warning #22

Closed casperisfine closed 4 years ago

casperisfine commented 4 years ago

Fix the following warning:

/tmp/bundle/ruby/2.7.0/gems/state_machines-activemodel-0.7.1/lib/state_machines/integrations/active_model.rb:383: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/tmp/bundle/ruby/2.7.0/bundler/gems/rails-9817d74f3be7/activemodel/lib/active_model/errors.rb:395: warning: The called method `add' is defined here

Note that options.merge(default_options) seem very weird to me. Without context I'd expect options to have precedence over default_options, but I opted for not changing the behavior.

casperisfine commented 4 years ago

Seems like 2.1 fail to build because of pry: https://travis-ci.org/github/state-machines/state_machines-activemodel/jobs/689585174

I chose to remove it from the matrix as testing 2.1 in 2020 is a bit ridiculous.

casperisfine commented 4 years ago

cc @rafaelfranca