Shopify / deprecation_toolkit

⚒Eliminate deprecations from your codebase ⚒
MIT License
460 stars 40 forks source link

Ensures ActiveSupport is required #50

Closed Schwad closed 2 years ago

Schwad commented 3 years ago

When using the toolkit outside of Rails against MiniTest users will receive the following error:

deprecation_toolkit/lib/deprecation_toolkit.rb:20:in
`add_notify_behavior': uninitialized constant
ActiveSupport::Deprecation (NameError)

This will raise even when not using ActiveSupport::Deprecation (i.e. warn 'Deprecated: this is my deprecation') as all deprecations are then passed through ActiveSupport::Deprecation in the gem.

This PR requires the ActiveSupport dependency if not already defined to cover off these cases.

Signed-off-by: Nick Schwaderer nschwaderer@chef.io

Schwad commented 3 years ago

To me it appears that the rubocop complaints might be from an upstream inheritance'd issue? 🤔