Skip to content

Commit

Permalink
Update rubocop and adjust its configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Envek committed Feb 26, 2020
1 parent 098e71f commit 9e80c96
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@ Metrics/BlockLength:
- "Gemfile"
- "spec/**/*"

Metrics/LineLength:
Layout/LineLength:
Max: 120

Style/BracesAroundHashParameters:
EnforcedStyle: context_dependent

Style/StringLiterals:
EnforcedStyle: double_quotes

Expand Down Expand Up @@ -47,3 +44,11 @@ Style/TrailingCommaInHashLiteral:
Enabled: true
EnforcedStyleForMultiline: consistent_comma

Style/HashEachMethods:
Enabled: true

Style/HashTransformKeys:
Enabled: true

Style/HashTransformValues:
Enabled: true
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ group :development, :test do
gem "pry"
gem "pry-byebug", platform: :mri

gem "rubocop"
gem "rubocop", "~> 0.80.0"
gem "rubocop-rspec"
end
4 changes: 2 additions & 2 deletions spec/yabeda/dsl/class_methods_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
RSpec.describe Yabeda::DSL::ClassMethods do
after do
if Yabeda.instance_variable_defined?(:@groups)
Yabeda.instance_variable_get(:@groups).keys.each do |group|
Yabeda.instance_variable_get(:@groups).each_key do |group|
Yabeda.singleton_class.send(:remove_method, group)
end
Yabeda.remove_instance_variable(:@groups)
end

if Yabeda.instance_variable_defined?(:@metrics)
Yabeda.instance_variable_get(:@metrics).keys.each do |metric|
Yabeda.instance_variable_get(:@metrics).each_key do |metric|
Yabeda.singleton_class.send(:remove_method, metric)
end
Yabeda.remove_instance_variable(:@metrics)
Expand Down

0 comments on commit 9e80c96

Please sign in to comment.