Skip to content

Commit

Permalink
Merge pull request #711 from cucumber/update-rubocop-dependency
Browse files Browse the repository at this point in the history
Update RuboCop and correct new offenses
  • Loading branch information
mvz authored May 17, 2020
2 parents 39e1135 + ea25f4e commit 3b78325
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ Style/FrozenStringLiteralComment:
Layout/LineLength:
Max: 94

# Enable new cops from RuboCop 0.80, 0.81 and 0.82
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Style/ExponentialNotation:
Enabled: true
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true

# We only permit it in this one area which is internal code testing. Never exposed to users
Security/Eval:
Exclude:
Expand Down
2 changes: 1 addition & 1 deletion aruba.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'pry-doc', '~> 1.0'
spec.add_development_dependency 'rake', '~> 13.0'
spec.add_development_dependency 'rspec', '~> 3.6'
spec.add_development_dependency 'rubocop', '~> 0.79.0'
spec.add_development_dependency 'rubocop', '~> 0.82.0'
spec.add_development_dependency 'rubocop-performance', '~> 1.5'
spec.add_development_dependency 'simplecov', '~> 0.18.0'
spec.add_development_dependency 'yard-junk', '~> 0.0.7'
Expand Down
2 changes: 1 addition & 1 deletion lib/aruba/platforms/unix_environment_variables.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class UpdateAction
attr_reader :other_env, :block

def initialize(other_env, &block)
@other_env = other_env.to_h.each_with_object({}) { |(k, v), a| a[k] = v.to_s }
@other_env = other_env.to_h.transform_values(&:to_s)

@block = (block if block_given?)
end
Expand Down
4 changes: 2 additions & 2 deletions spec/aruba/api/filesystem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ def actual_permissions
expect(full_content).to match(/foo/)
expect(full_content).not_to match(/zoo/)
end
end . not_to raise_error
end.not_to raise_error
end

it "raises ExpectationNotMetError when the inner expectations don't match" do
Expand All @@ -550,7 +550,7 @@ def actual_permissions
expect(full_content).to match(/zoo/)
expect(full_content).not_to match(/foo/)
end
end . to raise_error RSpec::Expectations::ExpectationNotMetError
end.to raise_error RSpec::Expectations::ExpectationNotMetError
end
end
end
Expand Down

0 comments on commit 3b78325

Please sign in to comment.