aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2016-08-24 20:23:50 +0200
committerGitHub2016-08-24 20:23:50 +0200
commit72846fac47eb16e1f423b02637e11476e15752cd (patch)
tree3e41655ae6557e87180bfb8f1e636f9fd76c1aa6
parent4f6a46f4b1a35b96e3f801c1168538d2346c92a2 (diff)
parent50fee143583b129a86a56bdc21d1f4ff4b9f5812 (diff)
downloadbrew-72846fac47eb16e1f423b02637e11476e15752cd.tar.bz2
Merge pull request #803 from reitermarkus/heredoc-style
Unify heredoc style.
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb8
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/uninstall.rb4
-rw-r--r--Library/Homebrew/cask/lib/hbc/container/air.rb4
-rw-r--r--Library/Homebrew/cask/lib/hbc/system_command.rb8
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb8
-rw-r--r--Library/Homebrew/cask/test/cask/artifact/zap_test.rb8
-rw-r--r--Library/Homebrew/cask/test/cask/cli/cat_test.rb4
-rw-r--r--Library/Homebrew/cask/test/cask/cli/create_test.rb4
-rw-r--r--Library/Homebrew/cask/test/cask/cli/search_test.rb4
-rw-r--r--Library/Homebrew/cask/test/cask/cli/uninstall_test.rb8
-rw-r--r--Library/Homebrew/cask/test/cask/dsl_test.rb4
-rw-r--r--Library/Homebrew/cask/test/cask/url_checker_test.rb4
12 files changed, 34 insertions, 34 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index d1fb99108..1378176da 100644
--- a/Library/Homebrew/cask/lib/hbc/cli.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli.rb
@@ -187,10 +187,10 @@ class Hbc::CLI
end
opts.on("--binarydir=PATH") do
- opoo <<-EOF.undent
+ opoo <<-EOS.undent
Option --binarydir is obsolete!
Homebrew-Cask now uses the same location as your Homebrew installation for executable links.
- EOF
+ EOS
end
FLAGS.each do |flag, method|
@@ -246,11 +246,11 @@ class Hbc::CLI
end
def purpose
- puts <<-PURPOSE.undent
+ puts <<-EOS.undent
brew-cask provides a friendly homebrew-style CLI workflow for the
administration of macOS applications distributed as binaries.
- PURPOSE
+ EOS
end
def usage
diff --git a/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb b/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb
index cd98b6e61..ae15414b7 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/uninstall.rb
@@ -27,10 +27,10 @@ class Hbc::CLI::Uninstall < Hbc::CLI::Base
single = versions.count == 1
- puts <<-EOF.undent
+ puts <<-EOS.undent
#{cask_token} #{versions.join(', ')} #{single ? 'is' : 'are'} still installed.
Remove #{single ? 'it' : 'them all'} with `brew cask uninstall --force #{cask_token}`.
- EOF
+ EOS
end
end
diff --git a/Library/Homebrew/cask/lib/hbc/container/air.rb b/Library/Homebrew/cask/lib/hbc/container/air.rb
index e82b677e9..fc618db83 100644
--- a/Library/Homebrew/cask/lib/hbc/container/air.rb
+++ b/Library/Homebrew/cask/lib/hbc/container/air.rb
@@ -11,12 +11,12 @@ class Hbc::Container::Air < Hbc::Container::Base
def self.installer_cmd
return @installer_cmd ||= INSTALLER_PATHNAME if installer_exist?
- raise Hbc::CaskError, <<-ERRMSG.undent
+ raise Hbc::CaskError, <<-EOS.undent
Adobe AIR runtime not present, try installing it via
brew cask install adobe-air
- ERRMSG
+ EOS
end
def self.installer_exist?
diff --git a/Library/Homebrew/cask/lib/hbc/system_command.rb b/Library/Homebrew/cask/lib/hbc/system_command.rb
index 6fa8a901f..bb8d91504 100644
--- a/Library/Homebrew/cask/lib/hbc/system_command.rb
+++ b/Library/Homebrew/cask/lib/hbc/system_command.rb
@@ -150,17 +150,17 @@ class Hbc::SystemCommand::Result
_warn_plist_garbage(command, Regexp.last_match[2])
xml = Plist.parse_xml(output)
unless xml.respond_to?(:keys) && !xml.keys.empty?
- raise Hbc::CaskError, <<-ERRMSG
+ raise Hbc::CaskError, <<-EOS
Empty result parsing plist output from command.
command was:
#{command.utf8_inspect}
output we attempted to parse:
#{output}
- ERRMSG
+ EOS
end
xml
rescue Plist::ParseError => e
- raise Hbc::CaskError, <<-ERRMSG
+ raise Hbc::CaskError, <<-EOS
Error parsing plist output from command.
command was:
#{command.utf8_inspect}
@@ -168,6 +168,6 @@ Error parsing plist output from command.
#{e}
output we attempted to parse:
#{output}
- ERRMSG
+ EOS
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 4d6c5df1b..4ab2dc3d2 100644
--- a/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb
+++ b/Library/Homebrew/cask/test/cask/artifact/uninstall_test.rb
@@ -42,7 +42,7 @@ describe Hbc::Artifact::Uninstall do
let(:launchctl_remove_cmd) { %w[/bin/launchctl remove my.fancy.package.service] }
let(:unknown_response) { "launchctl list returned unknown response\n" }
let(:service_info) {
- <<-PLIST.undent
+ <<-EOS.undent
{
"LimitLoadToSessionType" = "Aqua";
"Label" = "my.fancy.package.service";
@@ -53,7 +53,7 @@ describe Hbc::Artifact::Uninstall do
"argument";
);
};
- PLIST
+ EOS
}
describe "when launchctl job is owned by user" do
@@ -124,7 +124,7 @@ describe Hbc::Artifact::Uninstall do
]
}
let(:pkg_info_plist) {
- <<-PLIST.undent
+ <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@@ -135,7 +135,7 @@ describe Hbc::Artifact::Uninstall do
<string>/</string>
</dict>
</plist>
- PLIST
+ EOS
}
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 8ffa1c5e3..489299eca 100644
--- a/Library/Homebrew/cask/test/cask/artifact/zap_test.rb
+++ b/Library/Homebrew/cask/test/cask/artifact/zap_test.rb
@@ -43,7 +43,7 @@ describe Hbc::Artifact::Zap do
let(:launchctl_remove_cmd) { %w[/bin/launchctl remove my.fancy.package.service] }
let(:unknown_response) { "launchctl list returned unknown response\n" }
let(:service_info) {
- <<-PLIST.undent
+ <<-EOS.undent
{
"LimitLoadToSessionType" = "Aqua";
"Label" = "my.fancy.package.service";
@@ -54,7 +54,7 @@ describe Hbc::Artifact::Zap do
"argument";
);
};
- PLIST
+ EOS
}
describe "when launchctl job is owned by user" do
@@ -125,7 +125,7 @@ describe Hbc::Artifact::Zap do
]
}
let(:pkg_info_plist) {
- <<-PLIST.undent
+ <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@@ -136,7 +136,7 @@ describe Hbc::Artifact::Zap do
<string>/</string>
</dict>
</plist>
- PLIST
+ EOS
}
it "can zap" do
diff --git a/Library/Homebrew/cask/test/cask/cli/cat_test.rb b/Library/Homebrew/cask/test/cask/cli/cat_test.rb
index f51fe4be0..df49efda0 100644
--- a/Library/Homebrew/cask/test/cask/cli/cat_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/cat_test.rb
@@ -3,7 +3,7 @@ require "test_helper"
describe Hbc::CLI::Cat do
describe "given a basic Cask" do
before do
- @expected_output = <<-CLIOUTPUT.undent
+ @expected_output = <<-EOS.undent
test_cask 'basic-cask' do
version '1.2.3'
sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
@@ -13,7 +13,7 @@ describe Hbc::CLI::Cat do
app 'TestCask.app'
end
- CLIOUTPUT
+ EOS
end
it "displays the Cask file content about the specified Cask" do
diff --git a/Library/Homebrew/cask/test/cask/cli/create_test.rb b/Library/Homebrew/cask/test/cask/cli/create_test.rb
index 85d888cfa..cf3cf28a3 100644
--- a/Library/Homebrew/cask/test/cask/cli/create_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/create_test.rb
@@ -37,7 +37,7 @@ describe Hbc::CLI::Create do
it "drops a template down for the specified Cask" do
Hbc::CLI::Create.run("new-cask")
template = File.read(Hbc.path("new-cask"))
- template.must_equal <<-TEMPLATE.undent
+ template.must_equal <<-EOS.undent
cask 'new-cask' do
version ''
sha256 ''
@@ -49,7 +49,7 @@ describe Hbc::CLI::Create do
app ''
end
- TEMPLATE
+ EOS
end
it "throws away additional Cask arguments and uses the first" do
diff --git a/Library/Homebrew/cask/test/cask/cli/search_test.rb b/Library/Homebrew/cask/test/cask/cli/search_test.rb
index a0365862e..4b15d8eab 100644
--- a/Library/Homebrew/cask/test/cask/cli/search_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/search_test.rb
@@ -4,11 +4,11 @@ describe Hbc::CLI::Search do
it "lists the available Casks that match the search term" do
lambda {
Hbc::CLI::Search.run("photoshop")
- }.must_output <<-OUTPUT.gsub(%r{^ *}, "")
+ }.must_output <<-EOS.undent
==> Partial matches
adobe-photoshop-cc
adobe-photoshop-lightroom
- OUTPUT
+ EOS
end
it "shows that there are no Casks matching a search term that did not result in anything" do
diff --git a/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb b/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb
index e2909873a..80d4576cd 100644
--- a/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/uninstall_test.rb
@@ -57,11 +57,11 @@ describe Hbc::CLI::Uninstall do
timestamped_versions.each do |timestamped_version|
caskroom_path.join(".metadata", *timestamped_version, "Casks").tap(&:mkpath)
.join("#{token}.rb").open("w") do |caskfile|
- caskfile.puts <<-EOF.undent
+ caskfile.puts <<-EOS.undent
cask '#{token}' do
version '#{timestamped_version[0]}'
end
- EOF
+ EOS
end
caskroom_path.join(timestamped_version[0]).mkpath
end
@@ -112,13 +112,13 @@ describe Hbc::CLI::Uninstall do
saved_caskfile.dirname.mkpath
- IO.write saved_caskfile, <<-EOF.undent
+ IO.write saved_caskfile, <<-EOS.undent
cask 'ive-been-renamed' do
version :latest
app 'ive-been-renamed.app'
end
- EOF
+ EOS
end
after do
diff --git a/Library/Homebrew/cask/test/cask/dsl_test.rb b/Library/Homebrew/cask/test/cask/dsl_test.rb
index 4cd30d241..ce57e0b07 100644
--- a/Library/Homebrew/cask/test/cask/dsl_test.rb
+++ b/Library/Homebrew/cask/test/cask/dsl_test.rb
@@ -20,7 +20,7 @@ describe Hbc::DSL do
end
it "prints a warning that it has encountered an unexpected method" do
- expected = Regexp.compile(<<-EOREGEX.undent.lines.map(&:chomp).join(""))
+ expected = Regexp.compile(<<-EOS.undent.lines.map(&:chomp).join(""))
(?m)
Warning:
.*
@@ -29,7 +29,7 @@ describe Hbc::DSL do
brew update; brew cleanup; brew cask cleanup
.*
https://github.com/caskroom/homebrew-cask#reporting-bugs
- EOREGEX
+ EOS
TestHelper.must_output(self, attempt_unknown_method, expected)
end
diff --git a/Library/Homebrew/cask/test/cask/url_checker_test.rb b/Library/Homebrew/cask/test/cask/url_checker_test.rb
index cb0e50d57..2dfed62d3 100644
--- a/Library/Homebrew/cask/test/cask/url_checker_test.rb
+++ b/Library/Homebrew/cask/test/cask/url_checker_test.rb
@@ -11,13 +11,13 @@ describe Hbc::UrlChecker do
end
it "properly populates the response code and headers from an http response" do
- TestHelper.fake_response_for(TestHelper.test_cask.url, <<-RESPONSE.gsub(%r{^ *}, ""))
+ TestHelper.fake_response_for(TestHelper.test_cask.url, <<-EOS.undent)
HTTP/1.1 200 OK
Content-Type: application/x-apple-diskimage
ETag: "b4208f3e84967be4b078ecaa03fba941"
Content-Length: 23726161
Last-Modified: Sun, 12 Aug 2012 21:17:21 GMT
- RESPONSE
+ EOS
checker = Hbc::UrlChecker.new(TestHelper.test_cask, TestHelper.fake_fetcher)
checker.run