Class: RuboCop::Cop::Gusto::DiscouragedGem
- Inherits:
-
Base
- Object
- Base
- RuboCop::Cop::Gusto::DiscouragedGem
- Defined in:
- lib/rubocop/cop/gusto/discouraged_gem.rb
Overview
Flag installation of discouraged gems (e.g. timecop) in Gemfiles and gemspecs. The discouraged gems an advice about alternatives are configured under ‘Gems:`; intended to be enabled in Rails projects via config/rails.yml.
Constant Summary collapse
- MSG =
"Avoid using the '%{gem}' gem. %{advice}"- RESTRICT_ON_SEND =
%i(gem add_dependency add_development_dependency).freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
21 22 23 |
# File 'lib/rubocop/cop/gusto/discouraged_gem.rb', line 21 def on_send(node) check_gem_usage(node) end |