rom-rb / rom-factory

Data generator with support for persistence backends
MIT License
83 stars 42 forks source link

Ruby 2.7 deprecations #57

Closed nickpellant closed 4 years ago

nickpellant commented 4 years ago

Describe the bug

rom-factory causes deprecation warnings when used with Ruby 2.7.

To Reproduce

Example

ruby/2.7.0/lib/ruby/gems/2.7.0/gems/rom-factory-0.10.1/lib/rom/factory/dsl.rb:18: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call

Expected behavior

It should not cause deprecation warnings.

Your environment

flash-gordon commented 4 years ago

@nickpellant please provide code that emits a warning

nickpellant commented 4 years ago

@flash-gordon In my codebase, this has to do with the usage of calls to fake in factories, i.e:

Factory.define(:entity) do |f|
  f.entity_number { fake(:number, :within, range: -20..20) }
end
flash-gordon commented 4 years ago

Thanks for reporting, fixed in 0.10.2