Remove utf8_inspect method.
This commit is contained in:
parent
3b4ee58c49
commit
2703646b10
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user