Skip to content

Commit

Permalink
Merge pull request #1537 from Floppy/dependabot/bundler/rubocop-rails…
Browse files Browse the repository at this point in the history
…-2.21.2
  • Loading branch information
dependabot[bot] authored Oct 10, 2023
2 parents 643c070 + 7953479 commit 27e857e
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ GEM
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.0)
rubocop (1.56.3)
rubocop (1.56.4)
base64 (~> 0.1.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
Expand All @@ -385,7 +385,7 @@ GEM
rubocop-performance (1.19.1)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.20.2)
rubocop-rails (2.21.2)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
Expand Down Expand Up @@ -453,7 +453,7 @@ GEM
concurrent-ruby (~> 1.0)
tzinfo-data (1.2023.2)
tzinfo (>= 1.0.0)
unicode-display_width (2.4.2)
unicode-display_width (2.5.0)
view_component (3.6.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/model_filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def get_filters
end

def process_filters_init
@models = Model.all.includes(:tags, :preview_file, :creator, :collection)
@models = Model.includes(:tags, :preview_file, :creator, :collection)
end

def process_filters_tags_fetchall
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/libraries_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def scan_all
if params[:type] === "check"
Scan::CheckAllJob.perform_later
else
Library.all.each do |library|
Library.find_each do |library|
Scan::DetectFilesystemChangesJob.perform_later(library.id)
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/jobs/scan/check_all_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Scan::CheckAllJob < ApplicationJob

def perform
# Run integrity check on all models
Model.all.each do |model|
Model.find_each do |model|
Scan::CheckModelIntegrityJob.perform_later(model.id)
# Run analysis job on individual files
model.model_files.each do |file|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def up
"object_colour" => "#cccccc",
"render_style" => "normals"
}
User.all.each do |user|
User.find_each do |user|
user.update(
renderer_settings: defaults.merge(user.renderer_settings)
)
Expand Down
2 changes: 1 addition & 1 deletion db/data/20221220223040_move_printed_to_favorites.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def up
# If there's more than one, this might be a bad choice,
# but it's better than nothing
user = User.first
ModelFile.where(printed: true).each do |file|
ModelFile.where(printed: true).find_each do |file|
user.favorite(file, scope: :printed)
end
end
Expand Down
2 changes: 1 addition & 1 deletion db/data/20230221174212_move_scale_factor_into_note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class MoveScaleFactorIntoNote < ActiveRecord::Migration[7.0]
def up
Model.all.each do |model|
Model.find_each do |model|
if defined?(model.scale_factor) && (model.scale_factor != 100)
model.update!(notes: [
model.notes,
Expand Down
2 changes: 1 addition & 1 deletion db/data/20230308006000_move_collection_tag_into_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class MoveCollectionTagIntoObject < ActiveRecord::Migration[7.0]
def up
Model.all.each do |model|
Model.find_each do |model|
if defined?(model.collections) && !model.collection
model.collections.each do |collection|
newcol = Collection.find_or_create_by name: collection.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class RemoveLeadingSeparatorsFromModelFilenames < ActiveRecord::Migration[7.0]
def up
Model.all.each do |model|
Model.find_each do |model|
model.update! path: model.path&.trim_path_separators
rescue ActiveRecord::RecordInvalid
# If the path is invalid as it's already taken, this is a duplicate, so destroy it.
Expand Down
6 changes: 3 additions & 3 deletions db/data/20230617222353_generate_slugs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

class GenerateSlugs < ActiveRecord::Migration[7.0]
def up
Model.where(slug: nil).each do |model|
Model.where(slug: nil).find_each do |model|
model.send(:slugify_name)
model.save!(validate: false)
end
Creator.where(slug: nil).each do |creator|
Creator.where(slug: nil).find_each do |creator|
creator.send(:slugify_name)
creator.save!(validate: false)
end
Collection.where(slug: nil).each do |collection|
Collection.where(slug: nil).find_each do |collection|
collection.send(:slugify_name)
collection.save!(validate: false)
end
Expand Down

0 comments on commit 27e857e

Please sign in to comment.