diff --git a/.rubocop.yml b/.rubocop.yml index d107eb5..50e290a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -10,12 +10,9 @@ Metrics/BlockLength: - "Gemfile" - "spec/**/*" -Metrics/LineLength: +Layout/LineLength: Max: 120 -Style/BracesAroundHashParameters: - EnforcedStyle: context_dependent - Style/StringLiterals: EnforcedStyle: double_quotes @@ -47,3 +44,11 @@ Style/TrailingCommaInHashLiteral: Enabled: true EnforcedStyleForMultiline: consistent_comma +Style/HashEachMethods: + Enabled: true + +Style/HashTransformKeys: + Enabled: true + +Style/HashTransformValues: + Enabled: true diff --git a/Gemfile b/Gemfile index 33dff31..d9f2b6e 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/spec/yabeda/dsl/class_methods_spec.rb b/spec/yabeda/dsl/class_methods_spec.rb index 678a2d1..791ada8 100644 --- a/spec/yabeda/dsl/class_methods_spec.rb +++ b/spec/yabeda/dsl/class_methods_spec.rb @@ -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)