Skip to content

Commit

Permalink
Upgrade rubocop, and auto correct, before we upgrade ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBriggsAckama committed Jan 8, 2025
1 parent 4aa259c commit 9a92e40
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 18 deletions.
33 changes: 18 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ GEM
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.5.1)
json (2.9.1)
language_server-protocol (3.17.0.3)
launchy (2.5.0)
addressable (~> 2.7)
letter_opener (1.7.0)
Expand Down Expand Up @@ -258,9 +259,10 @@ GEM
mime-types
mimemagic (~> 0.3.0)
terrapin (~> 0.6.0)
parallel (1.22.1)
parser (3.1.3.0)
parallel (1.26.3)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
percy-capybara (4.3.3)
pg (1.2.3)
pry (0.13.1)
Expand Down Expand Up @@ -324,15 +326,14 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
rb-readline (0.5.5)
regexp_parser (2.6.1)
regexp_parser (2.10.0)
request_store (1.5.0)
rack (>= 1.4)
rerun (0.13.1)
listen (~> 3.0)
responders (3.1.0)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.3.9)
rspec-core (3.10.1)
rspec-support (~> 3.10.0)
rspec-expectations (3.10.1)
Expand All @@ -350,26 +351,26 @@ GEM
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.10.2)
rubocop (1.41.1)
rubocop (1.69.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.1.2.1)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.23.0, < 2.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.24.0)
parser (>= 3.1.1.0)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
rubocop-performance (1.15.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.17.3)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
ruby-progressbar (1.11.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.0)
sass (3.7.4)
Expand Down Expand Up @@ -418,7 +419,9 @@ GEM
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.3.0)
unicode-display_width (3.1.3)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
videojs_rails (4.12.15)
warden (1.2.9)
rack (>= 2.0.9)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/items_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def destroy
@item = @sheet.destroy_item(params[:id])

if @item
flash[:vocab_bar_notice] = if @sheet.items.length.zero?
flash[:vocab_bar_notice] = if @sheet.items.empty?
t('vocab_sheet.delete_success')
else
t('vocab_sheet.item.remove_success')
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/vocab_sheet_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module VocabSheetHelper
def vocab_sheet?
return nil if @sheet.blank? # rubocop:disable Rails/HelperInstanceVariable
return nil if @sheet.items.length.zero? # rubocop:disable Rails/HelperInstanceVariable
return nil if @sheet.items.empty? # rubocop:disable Rails/HelperInstanceVariable
return nil if params[:controller] == 'vocab_sheets'

'vocab_sheet_background'
Expand Down
2 changes: 1 addition & 1 deletion app/services/pdf_rendering_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def mutate_html_by_inserting_base_tag
#
# We add the <base ... /> tag just after <head> - it must be added before
# any <style> or <script></script> tags.
@html.sub!(/#{Regexp.quote("<head>")}/, "<head>#{base_tag}")
@html.sub!(/#{Regexp.quote('<head>')}/, "<head>#{base_tag}")
end

def base_tag
Expand Down
1 change: 1 addition & 0 deletions config/initializers/backtrace_silencers.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Be sure to restart your server when you modify this file.

# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
Expand Down
1 change: 1 addition & 0 deletions config/initializers/inflections.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Be sure to restart your server when you modify this file.

# Add new inflection rules using the following format. Inflections
Expand Down
1 change: 1 addition & 0 deletions config/initializers/mime_types.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true

# Be sure to restart your server when you modify this file.

# Add new mime types for use in respond_to blocks:
Expand Down

0 comments on commit 9a92e40

Please sign in to comment.