mirror of
https://github.com/wahyd4/ruby-sdk.git
synced 2026-08-09 04:46:10 +10:00
fixed rescue for ruby 1.8
This commit is contained in:
@@ -70,7 +70,13 @@ module Qiniu
|
||||
else
|
||||
code, data = Auth.call_with_signature(url, data, 0, options)
|
||||
end
|
||||
rescue [MissingAccessToken, MissingRefreshToken, MissingUsernameOrPassword] => e
|
||||
rescue MissingAccessToken => e
|
||||
Log.logger.error e
|
||||
code, data = 401, {}
|
||||
rescue MissingRefreshToken => e
|
||||
Log.logger.error e
|
||||
code, data = 401, {}
|
||||
rescue MissingUsernameOrPassword => e
|
||||
Log.logger.error e
|
||||
code, data = 401, {}
|
||||
end
|
||||
|
||||
+2
-2
@@ -6,8 +6,8 @@ require 'rspec'
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.before :all do
|
||||
Qiniu::RS.establish_connection! :access_key => "bE21M6FW9V7zAFrBY5psgKOKJQLiBj12qMWTpc57",
|
||||
:secret_key => "uMo7Nyq_eDK_CuQ8_FYCxoTHQZqjiaPh-cbiKO7L",
|
||||
Qiniu::RS.establish_connection! :access_key => "dFX_wMGVrRzwdWaraW-Qe5ZCDT-kcSmIAGKQOkXh",
|
||||
:secret_key => "VllxxDfkn_h2ZIqeKYTnHJiN4LVODfDBlJHy_KsW",
|
||||
:auth_url => "http://m1.qbox.me:13001/oauth2/token",
|
||||
:rs_host => "http://m1.qbox.me:13003",
|
||||
:io_host => "http://m1.qbox.me:13004",
|
||||
|
||||
Reference in New Issue
Block a user