Skip to content

Commit f421ab7

Browse files
authored
Merge pull request #247 from mvz/fix-rubocop-offenses
Update RuboCop configuration and fix new offenses
2 parents c9d67cb + 0c61fe0 commit f421ab7

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Metrics/ParameterLists:
4343
Max: 6
4444
MaxOptionalParameters: 4
4545

46-
Naming/PredicateName:
46+
Naming/PredicatePrefix:
4747
AllowedMethods:
4848
- 'has_one'
4949
- 'has_many'

.rubocop_todo.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config --no-offense-counts --no-auto-gen-timestamp`
3-
# using RuboCop version 1.63.4.
3+
# using RuboCop version 1.76.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -26,7 +26,7 @@ Metrics/MethodLength:
2626

2727
# Configuration parameters: CountComments, CountAsOne.
2828
Metrics/ModuleLength:
29-
Max: 175
29+
Max: 170
3030

3131
# Configuration parameters: AllowedMethods, AllowedPatterns.
3232
Metrics/PerceivedComplexity:

lib/happymapper.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,12 @@ def collect_writable_attributes
207207
next if value.nil? && !attribute.options[:state_when_nil]
208208

209209
attribute_namespace = attribute.options[:namespace]
210-
["#{attribute_namespace ? "#{attribute_namespace}:" : ""}#{attribute.tag}", value]
210+
attribute_name = if attribute_namespace
211+
"#{attribute_namespace}:#{attribute.tag}"
212+
else
213+
attribute.tag.to_s
214+
end
215+
[attribute_name, value]
211216
end
212217

213218
attributes.to_h

nokogiri-happymapper.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ Gem::Specification.new do |spec|
3535
spec.add_development_dependency "rake", "~> 13.0"
3636
spec.add_development_dependency "rake-manifest", "~> 0.2.0"
3737
spec.add_development_dependency "rspec", "~> 3.0"
38-
spec.add_development_dependency "rubocop", "~> 1.75"
38+
spec.add_development_dependency "rubocop", "~> 1.76"
3939
spec.add_development_dependency "rubocop-packaging", "~> 0.6.0"
4040
spec.add_development_dependency "rubocop-performance", "~> 1.25"
41-
spec.add_development_dependency "rubocop-rspec", "~> 3.5"
41+
spec.add_development_dependency "rubocop-rspec", "~> 3.6"
4242
spec.add_development_dependency "simplecov", "~> 0.22.0"
4343
end

0 commit comments

Comments
 (0)