This library will spit out several warnings when running under Ruby 2.7.1. This PR is an attempt to get those warnings sorted out in the best way so we ensure nothing breaks for Ruby 3.
There's still a couple of dep warnings on the dependency.rb file I'm not sure how to solve. Trying to understand if the problem is in the method definition or on the calls to that method. You can get them by running rspec under Ruby 2.7.1:
Injectable::Dependency instance
with keyword arguments
injectable/lib/injectable/dependency.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
injectable/spec/injectable/dependency_spec.rb:43: warning: The called method `initialize' is defined here
Injectable
with dependencies that have a with: keyword option
injectable/lib/injectable/dependency.rb:27: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
injectable/spec/injectable_spec.rb:139: warning: The called method `initialize' is defined here
passes it to the dependency #initialize method
with block dependencies that take dependencies
injectable/lib/injectable/dependency.rb:29: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
injectable/spec/injectable_spec.rb:453: warning: The called method `call' is defined here
This library will spit out several warnings when running under Ruby 2.7.1. This PR is an attempt to get those warnings sorted out in the best way so we ensure nothing breaks for Ruby 3.
There's still a couple of dep warnings on the dependency.rb file I'm not sure how to solve. Trying to understand if the problem is in the method definition or on the calls to that method. You can get them by running
rspec
under Ruby 2.7.1:In the meantime:
Reference:
Question
After the warnings are solved, a version bump will be in order. Should it be 2.1 or 2.0.1?