Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ GEM
rspec-mocks (>= 3.13.0, < 5.0.0)
rspec-support (>= 3.13.0, < 5.0.0)
rspec-support (3.13.7)
rubocop (1.89.0)
json (~> 2.3)
rubocop (1.90.0)
json (>= 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (>= 1.10)
Expand Down
6 changes: 2 additions & 4 deletions lib/version_fu/version_fu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module ClassMethods

# rubocop:todo Metrics/PerceivedComplexity
# rubocop:todo Metrics/MethodLength
# rubocop:todo Metrics/AbcSize
# rubocop:todo-next Metrics/AbcSize
def version_fu(options = {}, &) # rubocop:todo Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/MethodLength, Metrics/PerceivedComplexity
return if include?(VersionFu::InstanceMethods)

Expand All @@ -21,9 +21,8 @@ def version_fu(options = {}, &) # rubocop:todo Metrics/CyclomaticComplexity, Met

self.versioned_class_name = options[:class_name] || 'Version'
self.versioned_foreign_key = options[:foreign_key] || to_s.foreign_key
# rubocop:todo Layout/LineLength
# rubocop:todo-next Layout/LineLength
self.versioned_table_name = options[:table_name] || "#{table_name_prefix}#{base_class.name.demodulize.underscore}_versions#{table_name_suffix}"
# rubocop:enable Layout/LineLength
self.version_column = options[:version_column] || 'version'

# Setup versions association
Expand Down Expand Up @@ -86,7 +85,6 @@ def next
ActiveRecord::Base.logger.warn 'Version Table not found'
end
end
# rubocop:enable Metrics/AbcSize
# rubocop:enable Metrics/MethodLength
# rubocop:enable Metrics/PerceivedComplexity

Expand Down
3 changes: 1 addition & 2 deletions version_fu.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ Gem::Specification.new do |gem|
gem.version = '1.6.6'
gem.required_ruby_version = '>= 3.2'
gem.authors = ['Jordan McKible']
# rubocop:todo Layout/LineLength
# rubocop:todo-next Layout/LineLength
gem.description = "version_fu helps version your ActiveRecord models. It is based on Rick Olson's acts_as_versioned and is compatible with Rails 3."
# rubocop:enable Layout/LineLength
gem.email = ''
gem.licenses = 'MIT'
gem.homepage = 'https://github.com/webtranslateit/version_fu'
Expand Down