From 93b406be3608f977a8fbe0196b15f95f11827552 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sat, 14 Sep 2024 13:03:54 +0200 Subject: [PATCH] Add frozen string literal to non-production code --- spec/heathen/convert_spec.rb | 6 ++++-- spec/heathen/filename_spec.rb | 2 ++ spec/heathen/processor_methods/convert_image_spec.rb | 2 ++ spec/heathen/processor_methods/htmltotext_spec.rb | 2 ++ spec/heathen/processor_methods/libreoffice_spec.rb | 2 ++ spec/heathen/processor_methods/pdftotext_spec.rb | 2 ++ spec/heathen/processor_methods/tesseract_spec.rb | 2 ++ spec/heathen/processor_methods/wkhtmltopdf_spec.rb | 2 ++ spec/helpers/storage.rb | 2 ++ spec/integration/callback.rb | 2 ++ spec/integration/standard_tasks_spec.rb | 2 ++ spec/lib/app_spec.rb | 2 ++ spec/lib/autoheathen/config_spec.rb | 2 ++ spec/lib/autoheathen/email_processor_spec.rb | 2 ++ spec/lib/config_spec.rb | 2 ++ spec/lib/converter_spec.rb | 2 ++ spec/lib/doc_key_spec.rb | 2 ++ spec/lib/document_spec.rb | 2 ++ spec/lib/legacy_converter_spec.rb | 2 ++ spec/lib/sidekiq_workers_spec.rb | 2 ++ spec/lib/utils_spec.rb | 2 ++ spec/spec_helper.rb | 2 +- 22 files changed, 45 insertions(+), 3 deletions(-) diff --git a/spec/heathen/convert_spec.rb b/spec/heathen/convert_spec.rb index b8823e3..e4067da 100644 --- a/spec/heathen/convert_spec.rb +++ b/spec/heathen/convert_spec.rb @@ -1,13 +1,15 @@ +# frozen_string_literal: true + require 'spec_helper' require 'heathen' class Heathen::Processor def valid_step_1 - job.content << ",step 1" + job.content += ",step 1" end def valid_step_2 - job.content << ",step 2" + job.content += ",step 2" end def failing_step_1 diff --git a/spec/heathen/filename_spec.rb b/spec/heathen/filename_spec.rb index e1fee44..ec51ee1 100644 --- a/spec/heathen/filename_spec.rb +++ b/spec/heathen/filename_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' require 'filemagic/ext' diff --git a/spec/heathen/processor_methods/convert_image_spec.rb b/spec/heathen/processor_methods/convert_image_spec.rb index 3877517..d2e9b49 100644 --- a/spec/heathen/processor_methods/convert_image_spec.rb +++ b/spec/heathen/processor_methods/convert_image_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' RSpec.describe Heathen::Processor do diff --git a/spec/heathen/processor_methods/htmltotext_spec.rb b/spec/heathen/processor_methods/htmltotext_spec.rb index 574099a..c43e35c 100644 --- a/spec/heathen/processor_methods/htmltotext_spec.rb +++ b/spec/heathen/processor_methods/htmltotext_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' RSpec.describe Heathen::Processor do diff --git a/spec/heathen/processor_methods/libreoffice_spec.rb b/spec/heathen/processor_methods/libreoffice_spec.rb index 8585452..dbf6118 100644 --- a/spec/heathen/processor_methods/libreoffice_spec.rb +++ b/spec/heathen/processor_methods/libreoffice_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' RSpec.describe Heathen::Processor do diff --git a/spec/heathen/processor_methods/pdftotext_spec.rb b/spec/heathen/processor_methods/pdftotext_spec.rb index 0a39181..e8b32c2 100644 --- a/spec/heathen/processor_methods/pdftotext_spec.rb +++ b/spec/heathen/processor_methods/pdftotext_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' RSpec.describe Heathen::Processor do diff --git a/spec/heathen/processor_methods/tesseract_spec.rb b/spec/heathen/processor_methods/tesseract_spec.rb index 65f198d..7c8640b 100644 --- a/spec/heathen/processor_methods/tesseract_spec.rb +++ b/spec/heathen/processor_methods/tesseract_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' RSpec.describe Heathen::Processor do diff --git a/spec/heathen/processor_methods/wkhtmltopdf_spec.rb b/spec/heathen/processor_methods/wkhtmltopdf_spec.rb index 7aceebb..cf40f07 100644 --- a/spec/heathen/processor_methods/wkhtmltopdf_spec.rb +++ b/spec/heathen/processor_methods/wkhtmltopdf_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' RSpec.describe Heathen::Processor do diff --git a/spec/helpers/storage.rb b/spec/helpers/storage.rb index fd288e8..5427f8c 100644 --- a/spec/helpers/storage.rb +++ b/spec/helpers/storage.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'fileutils' def tmp_storage_dir diff --git a/spec/integration/callback.rb b/spec/integration/callback.rb index eb2d31b..eff7cf9 100755 --- a/spec/integration/callback.rb +++ b/spec/integration/callback.rb @@ -1,4 +1,6 @@ #!/usr/bin/env ruby +# frozen_string_literal: true + # # Simple sinatra app to receive and display callbacks # diff --git a/spec/integration/standard_tasks_spec.rb b/spec/integration/standard_tasks_spec.rb index 933cba1..2120111 100644 --- a/spec/integration/standard_tasks_spec.rb +++ b/spec/integration/standard_tasks_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' RSpec.describe 'Standard Heathen tasks:' do diff --git a/spec/lib/app_spec.rb b/spec/lib/app_spec.rb index 0a7847c..d6ac71e 100644 --- a/spec/lib/app_spec.rb +++ b/spec/lib/app_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' require 'app' diff --git a/spec/lib/autoheathen/config_spec.rb b/spec/lib/autoheathen/config_spec.rb index 6979ce2..5ab94f1 100644 --- a/spec/lib/autoheathen/config_spec.rb +++ b/spec/lib/autoheathen/config_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' require 'autoheathen' require 'tempfile' diff --git a/spec/lib/autoheathen/email_processor_spec.rb b/spec/lib/autoheathen/email_processor_spec.rb index 4bb4eab..953e672 100644 --- a/spec/lib/autoheathen/email_processor_spec.rb +++ b/spec/lib/autoheathen/email_processor_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' require 'autoheathen' diff --git a/spec/lib/config_spec.rb b/spec/lib/config_spec.rb index f452e90..761fba7 100644 --- a/spec/lib/config_spec.rb +++ b/spec/lib/config_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' require 'config' diff --git a/spec/lib/converter_spec.rb b/spec/lib/converter_spec.rb index 421e412..2098637 100644 --- a/spec/lib/converter_spec.rb +++ b/spec/lib/converter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' RSpec.describe Colore::Converter do diff --git a/spec/lib/doc_key_spec.rb b/spec/lib/doc_key_spec.rb index d56e34b..a6478a4 100644 --- a/spec/lib/doc_key_spec.rb +++ b/spec/lib/doc_key_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' RSpec.describe Colore::DocKey do diff --git a/spec/lib/document_spec.rb b/spec/lib/document_spec.rb index c4c19f8..d642c56 100644 --- a/spec/lib/document_spec.rb +++ b/spec/lib/document_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' require 'colore' diff --git a/spec/lib/legacy_converter_spec.rb b/spec/lib/legacy_converter_spec.rb index bb217ae..ca4bb32 100644 --- a/spec/lib/legacy_converter_spec.rb +++ b/spec/lib/legacy_converter_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' RSpec.describe Colore::LegacyConverter do diff --git a/spec/lib/sidekiq_workers_spec.rb b/spec/lib/sidekiq_workers_spec.rb index dec8157..0e027be 100644 --- a/spec/lib/sidekiq_workers_spec.rb +++ b/spec/lib/sidekiq_workers_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' require 'rest_client' diff --git a/spec/lib/utils_spec.rb b/spec/lib/utils_spec.rb index 7766910..096bbc5 100644 --- a/spec/lib/utils_spec.rb +++ b/spec/lib/utils_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' require 'utils' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 1ddba2a..adde752 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,4 @@ -# frozen_string_literals: true +# frozen_string_literal: true if ENV['COVERAGE'] || ENV['CI'] require 'simplecov'