mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
rubocop 0.89.1 (was 0.88.0)
This commit is contained in:
parent
42eff49117
commit
79316f89d1
4 changed files with 17 additions and 1 deletions
|
@ -183,6 +183,11 @@ Style/ModuleFunction:
|
|||
- 'lib/paper_trail/serializers/json.rb'
|
||||
- 'lib/paper_trail/serializers/yaml.rb'
|
||||
|
||||
# Too subtle to lint. Use `format` for multiple variables. For single variables,
|
||||
# use either interpolation or concatenation, whichever is easier to read.
|
||||
Style/StringConcatenation:
|
||||
Enabled: false
|
||||
|
||||
# The Ruby Style Guide does not prescribe a particular quote character, only
|
||||
# that a project should pick one and be consistent. The decision has no
|
||||
# performance implications. Double quotes are slightly easier to read.
|
||||
|
|
|
@ -39,6 +39,10 @@ RSpec/NestedGroups:
|
|||
Security/YAMLLoad:
|
||||
Enabled: false
|
||||
|
||||
Style/ExplicitBlockArgument:
|
||||
Exclude:
|
||||
- lib/paper_trail/events/base.rb
|
||||
|
||||
# We want this, but not until we drop support for ruby 2.4
|
||||
Style/HashTransformKeys:
|
||||
Enabled: false
|
||||
|
|
|
@ -145,6 +145,7 @@ module PaperTrail
|
|||
# Default: false.
|
||||
# @return `ActiveRecord::Relation`
|
||||
# @api public
|
||||
# rubocop:disable Style/OptionalBooleanParameter
|
||||
def preceding(obj, timestamp_arg = false)
|
||||
if timestamp_arg != true && primary_key_is_int?
|
||||
preceding_by_id(obj)
|
||||
|
@ -152,6 +153,7 @@ module PaperTrail
|
|||
preceding_by_timestamp(obj)
|
||||
end
|
||||
end
|
||||
# rubocop:enable Style/OptionalBooleanParameter
|
||||
|
||||
# Returns versions after `obj`.
|
||||
#
|
||||
|
@ -160,6 +162,7 @@ module PaperTrail
|
|||
# Default: false.
|
||||
# @return `ActiveRecord::Relation`
|
||||
# @api public
|
||||
# rubocop:disable Style/OptionalBooleanParameter
|
||||
def subsequent(obj, timestamp_arg = false)
|
||||
if timestamp_arg != true && primary_key_is_int?
|
||||
subsequent_by_id(obj)
|
||||
|
@ -167,6 +170,7 @@ module PaperTrail
|
|||
subsequent_by_timestamp(obj)
|
||||
end
|
||||
end
|
||||
# rubocop:enable Style/OptionalBooleanParameter
|
||||
|
||||
private
|
||||
|
||||
|
@ -248,12 +252,15 @@ module PaperTrail
|
|||
end
|
||||
alias version_author terminator
|
||||
|
||||
# @api private
|
||||
# rubocop:disable Style/OptionalBooleanParameter
|
||||
def sibling_versions(reload = false)
|
||||
if reload || !defined?(@sibling_versions) || @sibling_versions.nil?
|
||||
@sibling_versions = self.class.with_item_keys(item_type, item_id)
|
||||
end
|
||||
@sibling_versions
|
||||
end
|
||||
# rubocop:enable Style/OptionalBooleanParameter
|
||||
|
||||
def next
|
||||
@next ||= sibling_versions.subsequent(self).first
|
||||
|
|
|
@ -43,7 +43,7 @@ has been destroyed.
|
|||
s.add_development_dependency "memory_profiler", "~> 0.9.14"
|
||||
s.add_development_dependency "rake", "~> 13.0"
|
||||
s.add_development_dependency "rspec-rails", "~> 4.0"
|
||||
s.add_development_dependency "rubocop", "~> 0.88.0"
|
||||
s.add_development_dependency "rubocop", "~> 0.89.1"
|
||||
s.add_development_dependency "rubocop-performance", "~> 1.7.1"
|
||||
s.add_development_dependency "rubocop-rspec", "~> 1.42.0"
|
||||
|
||||
|
|
Loading…
Reference in a new issue