diff --git a/Gemfile.lock b/Gemfile.lock index 2e3a673..4d6d9d5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,12 +7,12 @@ PATH GEM remote: https://rubygems.org/ specs: - activemodel (6.1.4.1) - activesupport (= 6.1.4.1) - activerecord (6.1.4.1) - activemodel (= 6.1.4.1) - activesupport (= 6.1.4.1) - activesupport (6.1.4.1) + activemodel (6.1.6.1) + activesupport (= 6.1.6.1) + activerecord (6.1.6.1) + activemodel (= 6.1.6.1) + activesupport (= 6.1.6.1) + activesupport (6.1.6.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -24,13 +24,13 @@ GEM thor (>= 0.14.0) ast (2.4.2) coderay (1.1.3) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) diff-lcs (1.4.4) docile (1.4.0) - i18n (1.8.11) + i18n (1.11.0) concurrent-ruby (~> 1.0) method_source (1.0.0) - minitest (5.14.4) + minitest (5.15.0) mysql2 (0.5.3) parallel (1.21.0) parser (3.0.3.2) @@ -83,7 +83,7 @@ GEM tzinfo (2.0.4) concurrent-ruby (~> 1.0) unicode-display_width (2.1.0) - zeitwerk (2.5.1) + zeitwerk (2.6.0) PLATFORMS ruby diff --git a/lib/active_record_data_loader/active_record/model_data_generator.rb b/lib/active_record_data_loader/active_record/model_data_generator.rb index 3f5078f..0462f96 100644 --- a/lib/active_record_data_loader/active_record/model_data_generator.rb +++ b/lib/active_record_data_loader/active_record/model_data_generator.rb @@ -49,14 +49,14 @@ def generate_row_with_retries(row_number) MSG @logger.warn( - "[ActiveRecordDataLoader] "\ + "[ActiveRecordDataLoader] " \ "Exhausted retries looking for unique values. Skipping row #{row_number} for '#{table}'." ) return nil else @logger.info( - "[ActiveRecordDataLoader] "\ - "Retrying row #{row_number} for '#{table}' looking for unique values compliant with indexes. "\ + "[ActiveRecordDataLoader] " \ + "Retrying row #{row_number} for '#{table}' looking for unique values compliant with indexes. " \ "Retry number #{retries}." ) end diff --git a/lib/active_record_data_loader/configuration.rb b/lib/active_record_data_loader/configuration.rb index 36fe2b6..6c92cab 100644 --- a/lib/active_record_data_loader/configuration.rb +++ b/lib/active_record_data_loader/configuration.rb @@ -38,7 +38,7 @@ def validate_output(output) elsif output.is_a?(String) output else - raise "The output configuration parameter must be a filename meant to be the "\ + raise "The output configuration parameter must be a filename meant to be the " \ "target for the SQL script" end end diff --git a/lib/active_record_data_loader/table_loader.rb b/lib/active_record_data_loader/table_loader.rb index 24550bc..f08f14b 100644 --- a/lib/active_record_data_loader/table_loader.rb +++ b/lib/active_record_data_loader/table_loader.rb @@ -25,16 +25,16 @@ def load_data(batch_size, total_rows) batch_count = (total_rows / batch_size.to_f).ceil logger.info( - "[ActiveRecordDataLoader] "\ - "Loading #{total_rows} row(s) into '#{strategy.table_name}' via #{strategy.name}. "\ + "[ActiveRecordDataLoader] " \ + "Loading #{total_rows} row(s) into '#{strategy.table_name}' via #{strategy.name}. " \ "#{batch_size} row(s) per batch, #{batch_count} batch(es)." ) total_time = Benchmark.realtime do load_in_batches(batch_size, total_rows, batch_count) end logger.info( - "[ActiveRecordDataLoader] "\ - "Completed loading #{total_rows} row(s) into '#{strategy.table_name}' "\ + "[ActiveRecordDataLoader] " \ + "Completed loading #{total_rows} row(s) into '#{strategy.table_name}' " \ "in #{total_time} seconds." ) end @@ -49,7 +49,7 @@ def load_in_batches(batch_size, total_rows, batch_count) time = Benchmark.realtime { strategy.load_batch(row_numbers, connection) } logger.debug( - "[ActiveRecordDataLoader] "\ + "[ActiveRecordDataLoader] " \ "Completed batch #{i + 1}/#{batch_count}, #{row_numbers.count} row(s) in #{time} seconds" ) end