aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMarkus Reiter2016-10-14 20:11:33 +0200
committerMarkus Reiter2016-10-23 14:32:03 +0200
commitae7b944238ca23aff13d29375e4c59b32ae9d436 (patch)
treea39baea6c0491fc1396821c5bb5df16300cd9c55 /Library
parent8e9eae695adff40df52e667db30dd4fc318615ef (diff)
downloadbrew-ae7b944238ca23aff13d29375e4c59b32ae9d436.tar.bz2
Align `end` with beginning of line where `if/unless` is.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb8
-rw-r--r--Library/Homebrew/cask/lib/hbc/cask.rb12
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/cleanup.rb16
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/doctor.rb4
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/style.rb12
-rw-r--r--Library/Homebrew/cask/lib/hbc/download.rb14
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb20
-rw-r--r--Library/Homebrew/cask/lib/hbc/installer.rb16
-rw-r--r--Library/Homebrew/cask/lib/hbc/locations.rb12
-rw-r--r--Library/Homebrew/cask/lib/hbc/verify/gpg.rb8
10 files changed, 61 insertions, 61 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb b/Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb
index 46dd42322..32d8d6840 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/symlinked.rb
@@ -61,10 +61,10 @@ module Hbc
"#{printable_target} -> #{target.readlink} (#{target.readlink.abv})"
else
string = if self.class.islink?(target)
- "#{printable_target} -> #{target.readlink}"
- else
- printable_target
- end
+ "#{printable_target} -> #{target.readlink}"
+ else
+ printable_target
+ end
Formatter.error(string, label: "Broken Link")
end
diff --git a/Library/Homebrew/cask/lib/hbc/cask.rb b/Library/Homebrew/cask/lib/hbc/cask.rb
index b66f16a8e..6f005c036 100644
--- a/Library/Homebrew/cask/lib/hbc/cask.rb
+++ b/Library/Homebrew/cask/lib/hbc/cask.rb
@@ -38,12 +38,12 @@ module Hbc
raise CaskError, "Cannot create metadata path when timestamp is :latest"
end
path = if timestamp == :latest
- Pathname.glob(metadata_versioned_container_path.join("*")).sort.last
- elsif timestamp == :now
- Utils.nowstamp_metadata_path(metadata_versioned_container_path)
- else
- metadata_versioned_container_path.join(timestamp)
- end
+ Pathname.glob(metadata_versioned_container_path.join("*")).sort.last
+ elsif timestamp == :now
+ Utils.nowstamp_metadata_path(metadata_versioned_container_path)
+ else
+ metadata_versioned_container_path.join(timestamp)
+ end
if create
odebug "Creating metadata directory #{path}"
FileUtils.mkdir_p path
diff --git a/Library/Homebrew/cask/lib/hbc/cli/cleanup.rb b/Library/Homebrew/cask/lib/hbc/cli/cleanup.rb
index 0296dc96d..e65ee422d 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/cleanup.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/cleanup.rb
@@ -72,14 +72,14 @@ module Hbc
ohai message
deletable_cache_files = if tokens.empty?
- cache_files
- else
- start_withs = tokens.map { |token| "#{token}--" }
-
- cache_files.select { |path|
- path.basename.to_s.start_with?(*start_withs)
- }
- end
+ cache_files
+ else
+ start_withs = tokens.map { |token| "#{token}--" }
+
+ cache_files.select { |path|
+ path.basename.to_s.start_with?(*start_withs)
+ }
+ end
delete_paths(deletable_cache_files)
end
diff --git a/Library/Homebrew/cask/lib/hbc/cli/doctor.rb b/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
index a41781a0c..f4262a62c 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
@@ -78,8 +78,8 @@ module Hbc
def self.homebrew_taps
@homebrew_taps ||= if homebrew_repository.respond_to?(:join)
- homebrew_repository.join("Library", "Taps")
- end
+ homebrew_repository.join("Library", "Taps")
+ end
end
def self.homebrew_constants(name)
diff --git a/Library/Homebrew/cask/lib/hbc/cli/style.rb b/Library/Homebrew/cask/lib/hbc/cli/style.rb
index fcb59230e..01ba39411 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/style.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/style.rb
@@ -37,12 +37,12 @@ module Hbc
def cask_paths
@cask_paths ||= if cask_tokens.empty?
- Hbc.all_tapped_cask_dirs
- elsif cask_tokens.any? { |file| File.exist?(file) }
- cask_tokens
- else
- cask_tokens.map { |token| Hbc.path(token) }
- end
+ Hbc.all_tapped_cask_dirs
+ elsif cask_tokens.any? { |file| File.exist?(file) }
+ cask_tokens
+ else
+ cask_tokens.map { |token| Hbc.path(token) }
+ end
end
def cask_tokens
diff --git a/Library/Homebrew/cask/lib/hbc/download.rb b/Library/Homebrew/cask/lib/hbc/download.rb
index 4166fc74d..43ccfb97e 100644
--- a/Library/Homebrew/cask/lib/hbc/download.rb
+++ b/Library/Homebrew/cask/lib/hbc/download.rb
@@ -23,13 +23,13 @@ module Hbc
def downloader
@downloader ||= case cask.url.using
- when :svn
- SubversionDownloadStrategy.new(cask)
- when :post
- CurlPostDownloadStrategy.new(cask)
- else
- CurlDownloadStrategy.new(cask)
- end
+ when :svn
+ SubversionDownloadStrategy.new(cask)
+ when :post
+ CurlPostDownloadStrategy.new(cask)
+ else
+ CurlDownloadStrategy.new(cask)
+ end
end
def clear_cache
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb b/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb
index f402c603c..6bd6445ff 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb
@@ -87,16 +87,16 @@ module Hbc
def macos=(*arg)
@macos ||= []
macos = if arg.count == 1 && arg.first =~ /^\s*(<|>|[=<>]=)\s*(\S+)\s*$/
- raise "'depends_on macos' comparison expressions cannot be combined" unless @macos.empty?
- operator = Regexp.last_match[1].to_sym
- release = self.class.coerce_os_release(Regexp.last_match[2])
- [[operator, release]]
- else
- raise "'depends_on macos' comparison expressions cannot be combined" if @macos.first.is_a?(Symbol)
- Array(*arg).map { |elt|
- self.class.coerce_os_release(elt)
- }.sort
- end
+ raise "'depends_on macos' comparison expressions cannot be combined" unless @macos.empty?
+ operator = Regexp.last_match[1].to_sym
+ release = self.class.coerce_os_release(Regexp.last_match[2])
+ [[operator, release]]
+ else
+ raise "'depends_on macos' comparison expressions cannot be combined" if @macos.first.is_a?(Symbol)
+ Array(*arg).map { |elt|
+ self.class.coerce_os_release(elt)
+ }.sort
+ end
@macos.concat(macos)
end
diff --git a/Library/Homebrew/cask/lib/hbc/installer.rb b/Library/Homebrew/cask/lib/hbc/installer.rb
index 12d79132b..5a26c0791 100644
--- a/Library/Homebrew/cask/lib/hbc/installer.rb
+++ b/Library/Homebrew/cask/lib/hbc/installer.rb
@@ -84,10 +84,10 @@ module Hbc
def summary
s = if MacOS.version >= :lion && !ENV["HOMEBREW_NO_EMOJI"]
- (ENV["HOMEBREW_INSTALL_BADGE"] || "\xf0\x9f\x8d\xba") + " "
- else
- Formatter.headline("Success! ", color: :blue)
- end
+ (ENV["HOMEBREW_INSTALL_BADGE"] || "\xf0\x9f\x8d\xba") + " "
+ else
+ Formatter.headline("Success! ", color: :blue)
+ end
s << "#{@cask} was successfully installed!"
end
@@ -113,10 +113,10 @@ module Hbc
odebug "Extracting primary container"
FileUtils.mkdir_p @cask.staged_path
container = if @cask.container && @cask.container.type
- Container.from_type(@cask.container.type)
- else
- Container.for_path(@downloaded_path, @command)
- end
+ Container.from_type(@cask.container.type)
+ else
+ Container.for_path(@downloaded_path, @command)
+ end
unless container
raise CaskError, "Uh oh, could not figure out how to unpack '#{@downloaded_path}'"
end
diff --git a/Library/Homebrew/cask/lib/hbc/locations.rb b/Library/Homebrew/cask/lib/hbc/locations.rb
index 099caf665..a7757aea4 100644
--- a/Library/Homebrew/cask/lib/hbc/locations.rb
+++ b/Library/Homebrew/cask/lib/hbc/locations.rb
@@ -139,12 +139,12 @@ module Hbc
query_without_extension = query.sub(/\.rb$/i, "")
token_with_tap = if query =~ %r{\A[^/]+/[^/]+/[^/]+\Z}
- query_without_extension
- else
- all_tokens.detect { |tap_and_token|
- tap_and_token.split("/")[2] == query_without_extension
- }
- end
+ query_without_extension
+ else
+ all_tokens.detect { |tap_and_token|
+ tap_and_token.split("/")[2] == query_without_extension
+ }
+ end
if token_with_tap
user, repo, token = token_with_tap.split("/")
diff --git a/Library/Homebrew/cask/lib/hbc/verify/gpg.rb b/Library/Homebrew/cask/lib/hbc/verify/gpg.rb
index 6eb5fc23b..dbb537756 100644
--- a/Library/Homebrew/cask/lib/hbc/verify/gpg.rb
+++ b/Library/Homebrew/cask/lib/hbc/verify/gpg.rb
@@ -40,10 +40,10 @@ module Hbc
def import_key
args = if cask.gpg.key_id
- ["--recv-keys", cask.gpg.key_id]
- elsif cask.gpg.key_url
- ["--fetch-key", cask.gpg.key_url.to_s]
- end
+ ["--recv-keys", cask.gpg.key_id]
+ elsif cask.gpg.key_url
+ ["--fetch-key", cask.gpg.key_url.to_s]
+ end
@command.run!("gpg", args: args)
end