Skip to content

Commit

Permalink
Fix rubocop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nepalez committed Apr 3, 2021
1 parent 9f982f0 commit 50aee33
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
StyleGuideCopsOnly: true
TargetRubyVersion: 2.3
TargetRubyVersion: 2.4
NewCops: enable

Layout/LineLength:
AllowHeredoc: true
AllowURI: true
URISchemes:
- http
- https


Lint/ConstantDefinitionInBlock:
Exclude:
- spec/**/*.*

Style/ClassAndModuleChildren:
Enabled: false

Expand Down
2 changes: 1 addition & 1 deletion lib/fixturama/changes/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Base
# @return [Fixturama::Changes::Base]
def merge(other)
# By default just take the other change if applicable
other.class == self.class && other.key == key ? other : self
other.instance_of?(self.class) && other.key == key ? other : self
end

# @abstract
Expand Down
2 changes: 1 addition & 1 deletion lib/fixturama/changes/chain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def key
end

def merge(other)
return self unless other.class == self.class && other.key == key
return self unless other.instance_of?(self.class) && other.key == key

tap { @arguments = (other.arguments | arguments).sort_by(&:order) }
end
Expand Down

0 comments on commit 50aee33

Please sign in to comment.