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

Bump rubocop and standard #4005

Merged
merged 1 commit into from
Jan 7, 2024
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
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ group :development, :test do
gem 'rubocop-performance'
gem "rubocop-rails", "~> 2.23.1"
# Default rules for Rubocop.
gem "standard", "~> 1.32"
gem "standard", "~> 1.33"
end

group :development do
Expand Down
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -517,15 +517,15 @@ GEM
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.12.1)
rubocop (1.57.2)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.28.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
Expand Down Expand Up @@ -592,12 +592,12 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
standard (1.32.1)
standard (1.33.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.57.2)
rubocop (~> 1.59.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.2)
standard-performance (~> 1.3)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
Expand Down Expand Up @@ -733,7 +733,7 @@ DEPENDENCIES
simple_form
simplecov
sprockets (~> 4.2.1)
standard (~> 1.32)
standard (~> 1.33)
stimulus-rails
strong_migrations (= 1.6.4)
terser
Expand Down
4 changes: 2 additions & 2 deletions app/models/barcode_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ class BarcodeItem < ApplicationRecord

# Because it's a polymorphic association, we have to do this join manually.
scope :by_item_partner_key, ->(partner_key) do
joins("INNER JOIN items ON items.id = barcode_items.barcodeable_id") \
joins("INNER JOIN items ON items.id = barcode_items.barcodeable_id")
.where(barcodeable_type: "Item", items: { partner_key: partner_key })
end

scope :by_base_item_partner_key, ->(partner_key) do
joins("INNER JOIN base_items ON base_items.id = barcode_items.barcodeable_id") \
joins("INNER JOIN base_items ON base_items.id = barcode_items.barcodeable_id")
.where(barcodeable_type: "BaseItem", base_items: { partner_key: partner_key })
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/partners/family_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class FamilyRequest
def initialize(params, partner: nil, initial_items: nil)
@items = [Item.new] * initial_items if initial_items
@partner = partner
super params
super(params)
end

def items_attributes=(attributes)
Expand Down
2 changes: 1 addition & 1 deletion app/services/profile_update_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def update(profile, params)
# @return params [ActionDispatch::Http::Parameters]
def filter_params(params, profile)
# should update the present params and the params that are already present in the profile database
params.select { |k, v| (v.present? || profile.send(k).present?) }
params.select { |k, v| v.present? || profile.send(k).present? }
end
end
end
4 changes: 2 additions & 2 deletions spec/factories/barcode_items.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

after(:build) do |instance, evaluator|
instance.barcodeable = evaluator.barcodeable || create(:item,
organization: (instance.organization || Organization.try(:first)),
base_item: (BaseItem.try(:first) || create(:base_item)))
organization: instance.organization || Organization.try(:first),
base_item: BaseItem.try(:first) || create(:base_item))
end
end
end
2 changes: 1 addition & 1 deletion spec/support/matchers/have_flash.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
end

[:error, :notice, :alert, :success].each do |type|
type_symbol = "have_#{type}".to_sym
type_symbol = :"have_#{type}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

fascinating


# Default case checks the presence of any message of the given type,
# but if no message exists, flash[type] is `nil`, which causes
Expand Down
Loading