Class: RuboCop::Cop::Chef::Ruby::RequireNetHttps
- Extended by:
- AutoCorrector
- Defined in:
- lib/rubocop/cop/chefstyle/ruby/require_net_https.rb
Overview
net/https is deprecated and just includes net/http and openssl. We should include those directly instead.
Constant Summary collapse
- MSG =
'net/https is deprecated and just includes net/http and openssl. We should include those directly instead.'
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#on_send(node) ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/rubocop/cop/chefstyle/ruby/require_net_https.rb', line 43 def on_send(node) require_net_https?(node) do add_offense(node.loc.expression, message: MSG, severity: :refactor) do |corrector| corrector.replace(node, %(require "net/http"\nrequire "openssl")) end end end |