Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates Rubocop Gems #1254

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .rubocop_todo.yml
Expand Up @@ -10,7 +10,7 @@ Metrics/AbcSize:
Max: 20 # Goal: 15

Metrics/CyclomaticComplexity:
Max: 7 # Goal: 6
Max: 8 # Goal: 7

Metrics/PerceivedComplexity:
Max: 9 # Goal: 7
Expand Down
3 changes: 1 addition & 2 deletions lib/paper_trail/events/base.rb
Expand Up @@ -247,8 +247,7 @@ def object_attrs_for_paper_trail(is_touch)
# @api private
def prepare_object_changes(changes)
changes = serialize_object_changes(changes)
changes = recordable_object_changes(changes)
changes
recordable_object_changes(changes)
end

# Returns an object which can be assigned to the `object_changes`
Expand Down
6 changes: 3 additions & 3 deletions paper_trail.gemspec
Expand Up @@ -44,9 +44,9 @@ has been destroyed.
s.add_development_dependency "paper_trail-association_tracking", "~> 2.0.0"
s.add_development_dependency "rake", "~> 13.0"
s.add_development_dependency "rspec-rails", "~> 4.0"
s.add_development_dependency "rubocop", "~> 0.85.1"
s.add_development_dependency "rubocop-performance", "~> 1.4"
s.add_development_dependency "rubocop-rspec", "~> 1.35"
s.add_development_dependency "rubocop", "~> 0.88.0"
s.add_development_dependency "rubocop-performance", "~> 1.7.1"
s.add_development_dependency "rubocop-rspec", "~> 1.42.0"

# ## Database Adapters
#
Expand Down
2 changes: 1 addition & 1 deletion spec/dummy_app/config.ru
Expand Up @@ -2,5 +2,5 @@

# This file is used by Rack-based servers to start the application.

require ::File.expand_path("../config/environment", __FILE__)
require ::File.expand_path("config/environment", __dir__)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubocop reported this. I'm not familiar with this but I'm assuming it's a safe change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's alright.

run Dummy::Application
4 changes: 2 additions & 2 deletions spec/models/version_spec.rb
Expand Up @@ -12,7 +12,7 @@ module PaperTrail
specify { expect(PaperTrail.serializer).to be PaperTrail::Serializers::YAML }

it "store out as a plain hash" do
expect(value =~ /HashWithIndifferentAccess/).to be_nil
expect(value).not_to include("HashWithIndifferentAccess")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubocop reported and it's easy to fix

end
end

Expand Down Expand Up @@ -46,7 +46,7 @@ module PaperTrail
end

it "store out as a plain hash" do
expect(value =~ /HashWithIndifferentAccess/).to be_nil
expect(value).not_to include("HashWithIndifferentAccess")
end

after do
Expand Down