diff --git a/Gemfile b/Gemfile index 292f631b..e2521b0a 100644 --- a/Gemfile +++ b/Gemfile @@ -80,7 +80,7 @@ group :development, :test do gem 'rspec-its' gem 'rspec-rails' gem 'rubocop', '~> 1.56', require: false - gem 'rubocop-rails', '~> 2.20', require: false + gem 'rubocop-rails', '~> 2.21', require: false gem 'rubocop-rspec', require: false gem 'simplecov', require: false gem 'vcr', '~> 6.2' diff --git a/Gemfile.lock b/Gemfile.lock index 3e052e08..9d3bcf1e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -284,7 +284,7 @@ GEM rubocop (~> 1.41) rubocop-factory_bot (2.23.1) rubocop (~> 1.33) - rubocop-rails (2.20.2) + rubocop-rails (2.21.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) @@ -390,7 +390,7 @@ DEPENDENCIES rspec-its rspec-rails rubocop (~> 1.56) - rubocop-rails (~> 2.20) + rubocop-rails (~> 2.21) rubocop-rspec selenium-webdriver shakapacker (~> 7.0) diff --git a/app/services/printer_scanner.rb b/app/services/printer_scanner.rb index 47f6e5ee..8d7f468d 100644 --- a/app/services/printer_scanner.rb +++ b/app/services/printer_scanner.rb @@ -6,7 +6,7 @@ class PrinterScanner # rubocop:enable Layout/LineLength def call - uris = Printer.all.pluck(:octoprint_uri) + uris = Printer.pluck(:octoprint_uri) ips = use_cache do all_network_ips.select { |ip| octoprint?(ip) } end diff --git a/lib/spooler.rb b/lib/spooler.rb index 1780c6d3..62a0e333 100644 --- a/lib/spooler.rb +++ b/lib/spooler.rb @@ -10,7 +10,7 @@ class Spooler def initialize @workers = {} - Printer.all.each do |printer| + Printer.find_each do |printer| @workers[printer.id] = Spool.new(printer) end end