mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
Rename Platform.mac? to .mac_mri? for clarity.
This better reflects the fact that the method is expected to return false on non-MRI engines even on OS X.
This commit is contained in:
parent
0a34d940b0
commit
39ef456279
3 changed files with 6 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ module RestClient
|
|||
# be false for jruby even on OS X.
|
||||
#
|
||||
# @return [Boolean]
|
||||
def self.mac?
|
||||
def self.mac_mri?
|
||||
RUBY_PLATFORM.include?('darwin')
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ module RestClient
|
|||
|
||||
def print_verify_callback_warnings
|
||||
warned = false
|
||||
if RestClient::Platform.mac?
|
||||
if RestClient::Platform.mac_mri?
|
||||
warn('warning: ssl_verify_callback return code is ignored on OS X')
|
||||
warned = true
|
||||
end
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ describe RestClient::Request do
|
|||
#
|
||||
# On OS X, this test fails since Apple has patched OpenSSL to always fall
|
||||
# back on the system CA store.
|
||||
it "is unsuccessful with an incorrect ca_file", :unless => RestClient::Platform.mac? do
|
||||
it "is unsuccessful with an incorrect ca_file", :unless => RestClient::Platform.mac_mri? do
|
||||
request = RestClient::Request.new(
|
||||
:method => :get,
|
||||
:url => 'https://www.mozilla.org',
|
||||
|
|
@ -45,7 +45,7 @@ describe RestClient::Request do
|
|||
|
||||
# On OS X, this test fails since Apple has patched OpenSSL to always fall
|
||||
# back on the system CA store.
|
||||
it "is unsuccessful with an incorrect ca_path", :unless => RestClient::Platform.mac? do
|
||||
it "is unsuccessful with an incorrect ca_path", :unless => RestClient::Platform.mac_mri? do
|
||||
request = RestClient::Request.new(
|
||||
:method => :get,
|
||||
:url => 'https://www.mozilla.org',
|
||||
|
|
@ -79,7 +79,7 @@ describe RestClient::Request do
|
|||
end
|
||||
|
||||
it "fails verification when the callback returns false",
|
||||
:unless => RestClient::Platform.mac? do
|
||||
:unless => RestClient::Platform.mac_mri? do
|
||||
request = RestClient::Request.new(
|
||||
:method => :get,
|
||||
:url => 'https://www.mozilla.org',
|
||||
|
|
@ -90,7 +90,7 @@ describe RestClient::Request do
|
|||
end
|
||||
|
||||
it "succeeds verification when the callback returns true",
|
||||
:unless => RestClient::Platform.mac? do
|
||||
:unless => RestClient::Platform.mac_mri? do
|
||||
request = RestClient::Request.new(
|
||||
:method => :get,
|
||||
:url => 'https://www.mozilla.org',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue