Compare commits

...
10 Commits
Author SHA1 Message Date
xushiwei 4f9ca6e468 Merge pull request #16 from why404/master
publish v3.0.4 for hotfix
2012-09-03 03:58:02 -07:00
404 93a78047c1 v3.0.5 2012-09-03 18:18:21 +08:00
404 c2a30d5a01 version 3.0.5 2012-09-03 18:14:42 +08:00
404 1d50e3aa54 Merge branch 'hotfix/v3.0.5' 2012-09-03 18:12:00 +08:00
404 13e1051b87 fixed rescue for ruby 1.8 2012-09-03 18:10:58 +08:00
404 7b628281d3 changed test env 2012-08-19 02:03:23 +08:00
404 2dfd3da781 Merge remote-tracking branch 'qiniu/master' 2012-08-19 01:59:03 +08:00
xushiwei 1af173d04f Merge pull request #15 from huobazi/master
修正 Qiniu::RS.generate_upload_toke 对参数处理和文档描述不一致
2012-08-18 10:25:03 -07:00
huobazi b176c7a604 文档中描述 Qiniu::RS.generate_upload_toke的参数为可选,默认值为3600,但代码中实际的处理并没有考虑参数未传值时取默认值
ref: http://docs.qiniutek.com/v3/sdk/ruby/#upload
2012-08-18 23:22:37 +08:00
404 e8a1343328 Merge branch 'hotfix/v3.0.3' 2012-08-18 00:00:01 +08:00
7 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
PATH
remote: .
specs:
qiniu-rs (3.0.3)
json (~> 1.7.3)
qiniu-rs (3.0.5)
json (~> 1.7.5)
mime-types (~> 1.19)
rest-client (~> 1.6.7)
ruby-hmac (~> 0.4.0)
@@ -12,7 +12,7 @@ GEM
specs:
diff-lcs (1.1.3)
fakeweb (1.3.0)
json (1.7.4)
json (1.7.5)
mime-types (1.19)
rake (0.9.2.2)
rest-client (1.6.7)
+7 -1
View File
@@ -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
+1 -1
View File
@@ -2,6 +2,6 @@
module Qiniu
module RS
VERSION = "3.0.3"
VERSION = "3.0.5"
end
end
+1 -1
View File
@@ -14,7 +14,7 @@ module Qiniu
def initialize(opts = {})
@scope = opts[:scope]
@expires_in = opts[:expires_in]
@expires_in = opts[:expires_in] || 3600
@callback_url = opts[:callback_url]
@callback_body_type = opts[:callback_body_type]
@customer = opts[:customer]
+1 -1
View File
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency "rake", "~> 0.9"
gem.add_development_dependency "rspec", "~> 2.11"
gem.add_development_dependency "fakeweb", "~> 1.3.0"
gem.add_runtime_dependency "json", "~> 1.7.3"
gem.add_runtime_dependency "json", "~> 1.7.5"
gem.add_runtime_dependency "rest-client", "~> 1.6.7"
gem.add_runtime_dependency "mime-types", "~> 1.19"
gem.add_runtime_dependency "ruby-hmac", "~> 0.4.0"
+1 -1
View File
@@ -115,7 +115,7 @@ module Qiniu
context ".upload_file" do
it "should works" do
uptoken_opts = {:scope => @bucket, :expires_in => 3600}
uptoken_opts = {:scope => @bucket}
upload_opts = {
:uptoken => Qiniu::RS.generate_upload_token(uptoken_opts),
:file => __FILE__,
+2 -8
View File
@@ -6,19 +6,13 @@ require 'rspec'
RSpec.configure do |config|
config.before :all do
#=begin
Qiniu::RS.establish_connection! :access_key => "3fPHl_SLkPXdioqI_A8_NGngPWVJhlDk2ktRjogH",
:secret_key => "bXTPMDJrVYRJUiSDRFtFYwycVD_mjXxYWrCYlDHy",
#=end
=begin
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",
:up_host => "http://m1.qbox.me:13019",
:pub_host => "http://m1.qbox.me:13012",
:eu_host => "http://m1.qbox.me:13050"
=end
end
end