From 962088f59c8dbd97801a4330eba2a5e1a5aadec2 Mon Sep 17 00:00:00 2001 From: Ofir Petrushka Date: Wed, 7 Oct 2020 11:58:06 +1100 Subject: [PATCH] style: rubocop Style/Encoding Fix Style/Encoding by rubocop Signed-off-by: Cody Coder --- Rakefile | 2 -- rake.d/helpers.rb | 2 -- rake.d/installer.rb | 2 -- rake.d/pch.rb | 1 - rake.d/po.rb | 2 -- rake.d/source_tests.rb | 2 -- tests/test-426extract_write_bom_only_once.rb | 2 -- tests/test-440chapter_display_language_default_value.rb | 2 -- tests/test-532chapter_generation_when_appending.rb | 2 -- tests/test-533chapter_generation_interval.rb | 2 -- tests/test-534chapter_generation_when_appending_audio_only.rb | 2 -- tests/test-535chapter_generation_interval_audio_only.rb | 2 -- .../test-552chapter_generation_appending_file_name_variables.rb | 2 -- tests/test-671emojis.rb | 2 -- tests/test.d/controller.rb | 1 - tools/development/add_icons.rb | 2 -- tools/development/modules/news.rb | 1 - tools/development/update_translations.rb | 2 -- 18 files changed, 33 deletions(-) diff --git a/Rakefile b/Rakefile index 010facd62..4297f35b6 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,3 @@ -# coding: utf-8 - $build_start = Time.now if Signal.list.key?('ALRM') diff --git a/rake.d/helpers.rb b/rake.d/helpers.rb index 9b9db7950..5bedfe4bd 100644 --- a/rake.d/helpers.rb +++ b/rake.d/helpers.rb @@ -1,5 +1,3 @@ -# coding: utf-8 - require "shellwords" $use_tempfile_for_run = defined?(RUBY_PLATFORM) && /mingw/i.match(RUBY_PLATFORM) diff --git a/rake.d/installer.rb b/rake.d/installer.rb index 04c588bda..e107bd831 100644 --- a/rake.d/installer.rb +++ b/rake.d/installer.rb @@ -1,5 +1,3 @@ -# coding: utf-8 - module Mtx::Installer def self.read_translation_file file_name # Local Variables: diff --git a/rake.d/pch.rb b/rake.d/pch.rb index 7d7a2dd95..c1655f05b 100644 --- a/rake.d/pch.rb +++ b/rake.d/pch.rb @@ -1,4 +1,3 @@ -# coding: utf-8 # # mkvtoolnix - programs for manipulating Matroska files # Copyright © 2003…2016 Moritz Bunkus diff --git a/rake.d/po.rb b/rake.d/po.rb index d64da2902..fa56c278f 100644 --- a/rake.d/po.rb +++ b/rake.d/po.rb @@ -1,5 +1,3 @@ -# coding: utf-8 - def format_string_for_po str return '"' + str.gsub(/"/, '\"') + '"' unless /\\n./.match(str) diff --git a/rake.d/source_tests.rb b/rake.d/source_tests.rb index 9825a2179..b8cc39cf9 100644 --- a/rake.d/source_tests.rb +++ b/rake.d/source_tests.rb @@ -1,5 +1,3 @@ -# coding: utf-8 - module Mtx::SourceTests def self.collect_header_files ui_file_names = FileList["src/**/*.ui"] diff --git a/tests/test-426extract_write_bom_only_once.rb b/tests/test-426extract_write_bom_only_once.rb index d9ce35267..8c2fb78b1 100755 --- a/tests/test-426extract_write_bom_only_once.rb +++ b/tests/test-426extract_write_bom_only_once.rb @@ -1,6 +1,4 @@ #!/usr/bin/ruby -w -# -*- coding: utf-8 -*- - # T_426extract_write_bom_only_once file = "data/mkv/complex.mkv" diff --git a/tests/test-440chapter_display_language_default_value.rb b/tests/test-440chapter_display_language_default_value.rb index a5c75249b..b065ab73e 100755 --- a/tests/test-440chapter_display_language_default_value.rb +++ b/tests/test-440chapter_display_language_default_value.rb @@ -1,6 +1,4 @@ #!/usr/bin/ruby -w -# -*- coding: utf-8 -*- - # T_440chapter_display_language_default_value describe "mkvmerge / Default value for »language« element in chapter XML files" test_merge "data/subtitles/srt/ven.srt", :args => "--chapters data/text/chaperts-no-language-element.xml" diff --git a/tests/test-532chapter_generation_when_appending.rb b/tests/test-532chapter_generation_when_appending.rb index afd012cf7..a36cf9c65 100755 --- a/tests/test-532chapter_generation_when_appending.rb +++ b/tests/test-532chapter_generation_when_appending.rb @@ -1,6 +1,4 @@ #!/usr/bin/ruby -w -# coding: utf-8 - file = "data/avi/v-h264-aac.avi" # T_532chapter_generation_when_appending diff --git a/tests/test-533chapter_generation_interval.rb b/tests/test-533chapter_generation_interval.rb index fe009334e..e584915a7 100755 --- a/tests/test-533chapter_generation_interval.rb +++ b/tests/test-533chapter_generation_interval.rb @@ -1,6 +1,4 @@ #!/usr/bin/ruby -w -# coding: utf-8 - file = "data/avi/v-h264-aac.avi" # T_533chapter_generation_interval diff --git a/tests/test-534chapter_generation_when_appending_audio_only.rb b/tests/test-534chapter_generation_when_appending_audio_only.rb index 239af89bd..2a3dbc7d3 100755 --- a/tests/test-534chapter_generation_when_appending_audio_only.rb +++ b/tests/test-534chapter_generation_when_appending_audio_only.rb @@ -1,6 +1,4 @@ #!/usr/bin/ruby -w -# coding: utf-8 - file = "data/simple/v.mp3" # T_534chapter_generation_when_appending_audio_only diff --git a/tests/test-535chapter_generation_interval_audio_only.rb b/tests/test-535chapter_generation_interval_audio_only.rb index 0b90ab165..7fa7270b6 100755 --- a/tests/test-535chapter_generation_interval_audio_only.rb +++ b/tests/test-535chapter_generation_interval_audio_only.rb @@ -1,6 +1,4 @@ #!/usr/bin/ruby -w -# coding: utf-8 - file = "data/simple/v.mp3" # T_535chapter_generation_interval_audio_only diff --git a/tests/test-552chapter_generation_appending_file_name_variables.rb b/tests/test-552chapter_generation_appending_file_name_variables.rb index 8396ddd22..c398a8588 100755 --- a/tests/test-552chapter_generation_appending_file_name_variables.rb +++ b/tests/test-552chapter_generation_appending_file_name_variables.rb @@ -1,6 +1,4 @@ #!/usr/bin/ruby -w -# coding: utf-8 - base = "data/simple/Datei didödeldü " # T_552chapter_generation_appending_file_name_variables diff --git a/tests/test-671emojis.rb b/tests/test-671emojis.rb index a3b917cb3..df9b61bd5 100755 --- a/tests/test-671emojis.rb +++ b/tests/test-671emojis.rb @@ -1,6 +1,4 @@ #!/usr/bin/ruby -w -# coding: utf-8 - # T_671emojis describe "mkvmerge / Emojis" diff --git a/tests/test.d/controller.rb b/tests/test.d/controller.rb index 0979b43fe..ab65b48f9 100644 --- a/tests/test.d/controller.rb +++ b/tests/test.d/controller.rb @@ -1,4 +1,3 @@ -# coding: utf-8 class Controller attr_accessor :test_failed, :test_new, :test_date_after, :teset_date_before, :update_failed, :num_failed, :record_duration attr_reader :num_threads, :results diff --git a/tools/development/add_icons.rb b/tools/development/add_icons.rb index 5b13f186c..89d7cf4a7 100755 --- a/tools/development/add_icons.rb +++ b/tools/development/add_icons.rb @@ -1,6 +1,4 @@ #!/usr/bin/env ruby -# coding: utf-8 - require "fastimage" require "fileutils" diff --git a/tools/development/modules/news.rb b/tools/development/modules/news.rb index 0114b228f..7c8a135d7 100644 --- a/tools/development/modules/news.rb +++ b/tools/development/modules/news.rb @@ -1,4 +1,3 @@ -# coding: utf-8 def parse_news file_name news = [] current_line = [] diff --git a/tools/development/update_translations.rb b/tools/development/update_translations.rb index d68bf3580..fc7e4d7e4 100755 --- a/tools/development/update_translations.rb +++ b/tools/development/update_translations.rb @@ -1,6 +1,4 @@ #!/usr/bin/env ruby -# coding: utf-8 - require "fileutils" require "pathname" require "rake"