Skip to content

Commit

Permalink
Update rubocop (#16)
Browse files Browse the repository at this point in the history
* Update to rubocop 0.52 to address security issue

* Test on latest rubies

* Update for new rubocop
  • Loading branch information
eheydrick authored Feb 21, 2018
1 parent d600a5d commit 3526ef3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
8 changes: 6 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Style/HashSyntax:
Style/RescueModifier:
Enabled: false

Style/AccessorMethodName:
Naming/AccessorMethodName:
Enabled: false

# allow larger modules
Expand All @@ -90,7 +90,7 @@ Lint/ParenthesesAsGroupedExpression:
# Enabled: false

# allow multiple spaces between methofs and first arg
Style/SpaceBeforeFirstArg:
Layout/SpaceBeforeFirstArg:
Enabled: false

# There are too many non-ruby files that run up against rubocop rules in a cookbook
Expand All @@ -105,3 +105,7 @@ Metrics/BlockLength:
# allow longer argument lists
Metrics/ParameterLists:
Max: 6

# allow using $stderr
Style/StderrPuts:
Enabled: false
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ before_install:
- gem install bundler

rvm:
- 2.3.3
- 2.4.1
- 2.3.6
- 2.4.3
- 2.5.0

script:
- bundle exec rake
2 changes: 1 addition & 1 deletion aws-cleaner.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Gem::Specification.new do |s|
s.add_development_dependency 'bundler', '~> 1.12'
s.add_development_dependency 'rake', '~> 12.0'
s.add_development_dependency 'rspec', '~> 3.5'
s.add_development_dependency 'rubocop', '~> 0.46.0'
s.add_development_dependency 'rubocop', '~> 0.52.1'

s.add_runtime_dependency 'aws-sdk-core', '~> 2.0'
s.add_runtime_dependency 'chef-api', '~> 0.5'
Expand Down
4 changes: 2 additions & 2 deletions lib/aws-cleaner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def self.remove_from_chef(node_name, chef, config)
client.destroy
node = chef.nodes.fetch(node_name)
node.destroy
rescue => e
rescue StandardError => e
puts "Failed to remove chef node: #{e}"
else
# puts "Removed #{node_name} from chef"
Expand All @@ -68,7 +68,7 @@ def self.in_sensu?(node_name, config)
)
rescue RestClient::ResourceNotFound
return false
rescue => e
rescue StandardError => e
puts "Sensu request failed: #{e}"
return false
else
Expand Down

0 comments on commit 3526ef3

Please sign in to comment.