aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/download_strategy.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/system_command.rb6
-rw-r--r--Library/Homebrew/cask/lib/hbc/url_checker.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/utils.rb9
4 files changed, 5 insertions, 14 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/download_strategy.rb b/Library/Homebrew/cask/lib/hbc/download_strategy.rb
index 5b32b4840..28ae704ee 100644
--- a/Library/Homebrew/cask/lib/hbc/download_strategy.rb
+++ b/Library/Homebrew/cask/lib/hbc/download_strategy.rb
@@ -100,7 +100,7 @@ module Hbc
end
def _fetch
- odebug "Calling curl with args #{cask_curl_args.utf8_inspect}"
+ odebug "Calling curl with args #{cask_curl_args}"
curl(*cask_curl_args)
end
diff --git a/Library/Homebrew/cask/lib/hbc/system_command.rb b/Library/Homebrew/cask/lib/hbc/system_command.rb
index 6414a9e80..901617b71 100644
--- a/Library/Homebrew/cask/lib/hbc/system_command.rb
+++ b/Library/Homebrew/cask/lib/hbc/system_command.rb
@@ -20,7 +20,7 @@ module Hbc
def run!
@processed_output = { stdout: "", stderr: "" }
- odebug "Executing: #{expanded_command.utf8_inspect}"
+ odebug "Executing: #{expanded_command}"
each_output_line do |type, line|
case type
@@ -62,7 +62,7 @@ module Hbc
def assert_success
return if processed_status && processed_status.success?
- raise CaskCommandFailedError.new(command.utf8_inspect, processed_output[:stdout], processed_output[:stderr], processed_status)
+ raise CaskCommandFailedError.new(command, processed_output[:stdout], processed_output[:stderr], processed_status)
end
def expanded_command
@@ -162,7 +162,7 @@ module Hbc
raise CaskError, <<-EOS
Empty result parsing plist output from command.
command was:
- #{command.utf8_inspect}
+ #{command}
output we attempted to parse:
#{output}
EOS
diff --git a/Library/Homebrew/cask/lib/hbc/url_checker.rb b/Library/Homebrew/cask/lib/hbc/url_checker.rb
index 60a15ca2f..7076b13c5 100644
--- a/Library/Homebrew/cask/lib/hbc/url_checker.rb
+++ b/Library/Homebrew/cask/lib/hbc/url_checker.rb
@@ -38,7 +38,7 @@ module Hbc
def _check_response_status
ok = OK_RESPONSES[cask.url.scheme]
return if ok.include?(@response_status)
- add_error "unexpected http response, expecting #{ok.map(&:utf8_inspect).join(" or ")}, got #{@response_status.utf8_inspect}"
+ add_error "unexpected http response, expecting #{ok.map(&:to_s).join(" or ")}, got #{@response_status}"
end
def _get_data_from_request
diff --git a/Library/Homebrew/cask/lib/hbc/utils.rb b/Library/Homebrew/cask/lib/hbc/utils.rb
index f23ce059c..22f826e74 100644
--- a/Library/Homebrew/cask/lib/hbc/utils.rb
+++ b/Library/Homebrew/cask/lib/hbc/utils.rb
@@ -4,15 +4,6 @@ require "stringio"
BUG_REPORTS_URL = "https://github.com/caskroom/homebrew-cask#reporting-bugs".freeze
-# monkeypatch Object - not a great idea
-class Object
- def utf8_inspect
- return inspect unless defined?(Encoding)
- return map(&:utf8_inspect) if respond_to?(:map)
- inspect.force_encoding("UTF-8").sub(/\A"(.*)"\Z/, '\1')
- end
-end
-
class Buffer < StringIO
extend Predicable