From b28b21fd7fec17e372f8bf0fe118c32318d44f84 Mon Sep 17 00:00:00 2001 From: Markus Reiter <me@reitermark.us> Date: Mon, 24 Oct 2016 17:27:20 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20use=20bare=20percent=20literals?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Library/Homebrew/dev-cmd/audit.rb | 8 ++++---- Library/Homebrew/test/test_diagnostic.rb | 2 +- Library/Homebrew/test/test_exceptions.rb | 2 +- Library/Homebrew/test/test_patch.rb | 2 +- Library/Homebrew/test/test_string.rb | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 12eaf9167e..a9bccf4549 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -716,11 +716,11 @@ class FormulaAuditor end if text =~ /system\s+['"]xcodebuild/ - problem %(use "xcodebuild *args" instead of "system 'xcodebuild', *args") + problem %q(use "xcodebuild *args" instead of "system 'xcodebuild', *args") end if text =~ /xcodebuild[ (]["'*]/ && !text.include?("SYMROOT=") - problem %(xcodebuild should be passed an explicit "SYMROOT") + problem 'xcodebuild should be passed an explicit "SYMROOT"' end if text.include? "Formula.factory(" @@ -1002,9 +1002,9 @@ class FormulaAuditor case condition when /if build\.include\? ['"]with-#{dep}['"]$/, /if build\.with\? ['"]#{dep}['"]$/ - problem %(Replace #{line.inspect} with "depends_on #{quoted_dep} => :optional") + problem %Q(Replace #{line.inspect} with "depends_on #{quoted_dep} => :optional") when /unless build\.include\? ['"]without-#{dep}['"]$/, /unless build\.without\? ['"]#{dep}['"]$/ - problem %(Replace #{line.inspect} with "depends_on #{quoted_dep} => :recommended") + problem %Q(Replace #{line.inspect} with "depends_on #{quoted_dep} => :recommended") end end diff --git a/Library/Homebrew/test/test_diagnostic.rb b/Library/Homebrew/test/test_diagnostic.rb index 33cf27b746..aa2e44cfc8 100644 --- a/Library/Homebrew/test/test_diagnostic.rb +++ b/Library/Homebrew/test/test_diagnostic.rb @@ -146,7 +146,7 @@ class DiagnosticChecksTest < Homebrew::TestCase FileUtils.chmod 0755, file ENV["PATH"] = "#{path}#{File::PATH_SEPARATOR}#{ENV["PATH"]}" - assert_match %("config" scripts exist), + assert_match '"config" scripts exist', @checks.check_for_config_scripts end end diff --git a/Library/Homebrew/test/test_exceptions.rb b/Library/Homebrew/test/test_exceptions.rb index 671b433e47..689531c6ee 100644 --- a/Library/Homebrew/test/test_exceptions.rb +++ b/Library/Homebrew/test/test_exceptions.rb @@ -13,7 +13,7 @@ class ExceptionsTest < Homebrew::TestCase end def test_formula_validation_error - assert_equal %(invalid attribute for formula 'foo': sha257 ("magic")), + assert_equal %q(invalid attribute for formula 'foo': sha257 ("magic")), FormulaValidationError.new("foo", "sha257", "magic").to_s end diff --git a/Library/Homebrew/test/test_patch.rb b/Library/Homebrew/test/test_patch.rb index 120f0a3a5b..62624720e8 100644 --- a/Library/Homebrew/test/test_patch.rb +++ b/Library/Homebrew/test/test_patch.rb @@ -119,7 +119,7 @@ class ExternalPatchTests < Homebrew::TestCase end def test_inspect - assert_equal %(#<ExternalPatch: :p1 "file:///my.patch">), @p.inspect + assert_equal '#<ExternalPatch: :p1 "file:///my.patch">', @p.inspect end def test_cached_download diff --git a/Library/Homebrew/test/test_string.rb b/Library/Homebrew/test/test_string.rb index d3f2bc268d..497c4badb1 100644 --- a/Library/Homebrew/test/test_string.rb +++ b/Library/Homebrew/test/test_string.rb @@ -35,6 +35,6 @@ I'm not indented def test_inreplace_sub_failure s = "foobar".extend StringInreplaceExtension s.sub! "not here", "test" - assert_equal [%(expected replacement of "not here" with "test")], s.errors + assert_equal ['expected replacement of "not here" with "test"'], s.errors end end -- GitLab