aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2016-10-14 20:08:05 +0200
committerMarkus Reiter2016-10-23 14:32:03 +0200
commit8e9eae695adff40df52e667db30dd4fc318615ef (patch)
tree416e080ab6b639042991812f2c6c75a3ab98e4fd
parent1a0f8b8a02cfe8795e2128fb294e97bb67fb03f0 (diff)
downloadbrew-8e9eae695adff40df52e667db30dd4fc318615ef.tar.bz2
Use `()` as delimiters for `%Q` and `%q` literals.
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/relocated.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb10
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/doctor.rb4
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/edit.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/exceptions.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/installer.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/utils/hash_validator.rb2
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb6
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/zap_test.rb6
10 files changed, 19 insertions, 19 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb b/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb
index 335d7e2fc..aa12dfa4a 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/relocated.rb
@@ -31,7 +31,7 @@ module Hbc
print_stderr: false).stdout.sub(/\A\((.*)\)\Z/, '\1')
odebug "Existing metadata is: '#{altnames}'"
altnames.concat(", ") unless altnames.empty?
- altnames.concat(%Q{"#{altname}"})
+ altnames.concat(%Q("#{altname}"))
altnames = "(#{altnames})"
# Some packges are shipped as u=rx (e.g. Bitcoin Core)
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb b/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb
index b871cbc45..68eb7b93c 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb
@@ -87,7 +87,7 @@ module Hbc
def warn_for_unknown_directives(directives)
unknown_keys = directives.keys - ORDERED_DIRECTIVES
return if unknown_keys.empty?
- opoo %Q{Unknown arguments to #{stanza} -- #{unknown_keys.inspect}. Running "brew update; brew cleanup; brew cask cleanup" will likely fix it.}
+ opoo %Q(Unknown arguments to #{stanza} -- #{unknown_keys.inspect}. Running "brew update; brew cleanup; brew cask cleanup" will likely fix it.)
end
# Preserve prior functionality of script which runs first. Should rarely be needed.
@@ -129,7 +129,7 @@ module Hbc
ohai "Quitting application ID #{id}"
num_running = count_running_processes(id)
next unless num_running > 0
- @command.run!("/usr/bin/osascript", args: ["-e", %Q{tell application id "#{id}" to quit}], sudo: true)
+ @command.run!("/usr/bin/osascript", args: ["-e", %Q(tell application id "#{id}" to quit)], sudo: true)
sleep 3
end
end
@@ -156,13 +156,13 @@ module Hbc
def count_running_processes(bundle_id)
@command.run!("/usr/bin/osascript",
- args: ["-e", %Q{tell application "System Events" to count processes whose bundle identifier is "#{bundle_id}"}],
+ args: ["-e", %Q(tell application "System Events" to count processes whose bundle identifier is "#{bundle_id}")],
sudo: true).stdout.to_i
end
def get_unix_pids(bundle_id)
pid_string = @command.run!("/usr/bin/osascript",
- args: ["-e", %Q{tell application "System Events" to get the unix id of every process whose bundle identifier is "#{bundle_id}"}],
+ args: ["-e", %Q(tell application "System Events" to get the unix id of every process whose bundle identifier is "#{bundle_id}")],
sudo: true).stdout.chomp
return [] unless pid_string =~ /\A\d+(?:\s*,\s*\d+)*\Z/ # sanity check
pid_string.split(/\s*,\s*/).map(&:strip).map(&:to_i)
@@ -172,7 +172,7 @@ module Hbc
Array(directives[:login_item]).each do |name|
ohai "Removing login item #{name}"
@command.run!("/usr/bin/osascript",
- args: ["-e", %Q{tell application "System Events" to delete every login item whose name is "#{name}"}],
+ args: ["-e", %Q(tell application "System Events" to delete every login item whose name is "#{name}")],
sudo: false)
sleep 1
end
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index cd12ab086..b3b799d49 100644
--- a/Library/Homebrew/cask/lib/hbc/cli.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli.rb
@@ -266,7 +266,7 @@ module Hbc
next unless klass.visible
puts " #{klass.command_name.ljust(max_command_len)} #{_help_for(klass)}"
end
- puts %Q{\nSee also "man brew-cask"}
+ puts %Q(\nSee also "man brew-cask")
end
def help
diff --git a/Library/Homebrew/cask/lib/hbc/cli/doctor.rb b/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
index 873ca47fd..a41781a0c 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
@@ -104,7 +104,7 @@ module Hbc
end
def self.locale_variables
- ENV.keys.grep(/^(?:LC_\S+|LANG|LANGUAGE)\Z/).collect { |v| %Q{#{v}="#{ENV[v]}"} }.sort.join("\n")
+ ENV.keys.grep(/^(?:LC_\S+|LANG|LANGUAGE)\Z/).collect { |v| %Q(#{v}="#{ENV[v]}") }.sort.join("\n")
end
def self.privileged_uid
@@ -154,7 +154,7 @@ module Hbc
def self.render_env_var(var)
if ENV.key?(var)
- %Q{#{var}="#{ENV[var]}"}
+ %Q(#{var}="#{ENV[var]}")
else
none_string
end
diff --git a/Library/Homebrew/cask/lib/hbc/cli/edit.rb b/Library/Homebrew/cask/lib/hbc/cli/edit.rb
index a6ff34234..a6cb9e209 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/edit.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/edit.rb
@@ -9,7 +9,7 @@ module Hbc
cask_path = Hbc.path(cask_token)
odebug "Opening editor for Cask #{cask_token}"
unless cask_path.exist?
- raise CaskUnavailableError, %Q{#{cask_token}, run "brew cask create #{cask_token}" to create a new Cask}
+ raise CaskUnavailableError, %Q(#{cask_token}, run "brew cask create #{cask_token}" to create a new Cask)
end
exec_editor cask_path
end
diff --git a/Library/Homebrew/cask/lib/hbc/exceptions.rb b/Library/Homebrew/cask/lib/hbc/exceptions.rb
index 31310aea5..c323f6c4c 100644
--- a/Library/Homebrew/cask/lib/hbc/exceptions.rb
+++ b/Library/Homebrew/cask/lib/hbc/exceptions.rb
@@ -23,7 +23,7 @@ module Hbc
class CaskAlreadyCreatedError < AbstractCaskErrorWithToken
def to_s
- %Q{A Cask for #{token} already exists. Run "brew cask cat #{token}" to see it.}
+ %Q(A Cask for #{token} already exists. Run "brew cask cat #{token}" to see it.)
end
end
diff --git a/Library/Homebrew/cask/lib/hbc/installer.rb b/Library/Homebrew/cask/lib/hbc/installer.rb
index 9575aa181..12d79132b 100644
--- a/Library/Homebrew/cask/lib/hbc/installer.rb
+++ b/Library/Homebrew/cask/lib/hbc/installer.rb
@@ -302,7 +302,7 @@ module Hbc
end
def zap
- ohai %Q{Implied "brew cask uninstall #{@cask}"}
+ ohai %Q(Implied "brew cask uninstall #{@cask}")
uninstall_artifacts
if Artifact::Zap.me?(@cask)
ohai "Dispatching zap stanza"
diff --git a/Library/Homebrew/cask/lib/hbc/utils/hash_validator.rb b/Library/Homebrew/cask/lib/hbc/utils/hash_validator.rb
index b9e11720d..6c8f95c3a 100644
--- a/Library/Homebrew/cask/lib/hbc/utils/hash_validator.rb
+++ b/Library/Homebrew/cask/lib/hbc/utils/hash_validator.rb
@@ -2,6 +2,6 @@ module HashValidator
def assert_valid_keys(*valid_keys)
unknown_keys = keys - valid_keys
return if unknown_keys.empty?
- raise CaskError, %Q{Unknown keys: #{unknown_keys.inspect}. Running "#{UPDATE_CMD}" will likely fix it.}
+ raise CaskError, %Q(Unknown keys: #{unknown_keys.inspect}. Running "#{UPDATE_CMD}" will likely fix it.)
end
end
diff --git a/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb b/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb
index 4ab2dc3d2..08c179a53 100644
--- a/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb
+++ b/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb
@@ -201,10 +201,10 @@ describe Hbc::Artifact::Uninstall do
let(:bundle_id) { "my.fancy.package.app" }
let(:count_processes_script) {
'tell application "System Events" to count processes ' +
- %Q{whose bundle identifier is "#{bundle_id}"}
+ %Q(whose bundle identifier is "#{bundle_id}")
}
let(:quit_application_script) {
- %Q{tell application id "#{bundle_id}" to quit}
+ %Q(tell application id "#{bundle_id}" to quit)
}
it "can uninstall" do
@@ -227,7 +227,7 @@ describe Hbc::Artifact::Uninstall do
let(:unix_pids) { [12_345, 67_890] }
let(:get_unix_pids_script) {
'tell application "System Events" to get the unix id of every process ' +
- %Q{whose bundle identifier is "#{bundle_id}"}
+ %Q(whose bundle identifier is "#{bundle_id}")
}
it "can uninstall" do
diff --git a/Library/Homebrew/cask/test/cask/artifact/zap_test.rb b/Library/Homebrew/cask/test/cask/artifact/zap_test.rb
index 489299eca..da80f7bde 100644
--- a/Library/Homebrew/cask/test/cask/artifact/zap_test.rb
+++ b/Library/Homebrew/cask/test/cask/artifact/zap_test.rb
@@ -202,10 +202,10 @@ describe Hbc::Artifact::Zap do
let(:bundle_id) { "my.fancy.package.app" }
let(:count_processes_script) {
'tell application "System Events" to count processes ' +
- %Q{whose bundle identifier is "#{bundle_id}"}
+ %Q(whose bundle identifier is "#{bundle_id}")
}
let(:quit_application_script) {
- %Q{tell application id "#{bundle_id}" to quit}
+ %Q(tell application id "#{bundle_id}" to quit)
}
it "can zap" do
@@ -228,7 +228,7 @@ describe Hbc::Artifact::Zap do
let(:unix_pids) { [12_345, 67_890] }
let(:get_unix_pids_script) {
'tell application "System Events" to get the unix id of every process ' +
- %Q{whose bundle identifier is "#{bundle_id}"}
+ %Q(whose bundle identifier is "#{bundle_id}")
}
it "can zap" do