qiniu-rs 3.4.7 → 3.4.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddf083b2df630fdf57286a4c9395f2cb029ee0d4
4
- data.tar.gz: 4a7c0cf9a120bd8c7da77387347915e49c25d5b9
3
+ metadata.gz: 2f87f2956e22e85cef5c2e7048d8f8fd82bd5ea5
4
+ data.tar.gz: 2ba960e3f82c940a35c8a4b1ff5eb9c9ab66d18e
5
5
  SHA512:
6
- metadata.gz: cec69bf917c779f6694bb03e9ad0b8a5a61fe1c5ecffcd696a229535f3f694421d8506aa670ca3a517e0cfaa19a18ddce0f00c251c723954559dc9023b81992a
7
- data.tar.gz: 358319b26b7e9cdc619c2c38dc08465966abf721ad44bdb6cffaf02fd3b747d506c97f6399b4e9345a013b33db08dd91ca64201d23514041aca1e7da25e5ea04
6
+ metadata.gz: 8959845cd4be8e3e10dc9e551ccf73923cbd8a5069b2b65fec71ee4eaab89612658cd992c5c68c5f39f5ed7c76f431848024b74a4601190892b5104498ce104c
7
+ data.tar.gz: 9451573a36352d11318e74f26b9636eed0184aed048d04f03245a1f325b21b8e08c36e779dc1f18f4669f4cbe6a4e32516671093ae8b7e98608487c2db06c041
@@ -1,5 +1,13 @@
1
1
  ## CHANGE LOG
2
2
 
3
+ ### v3.4.9
4
+
5
+ - 去掉publish和unpublish接口的封装函数。 [https://github.com/qiniu/ruby-sdk/pull/89](https://github.com/qiniu/ruby-sdk/pull/89) (#8143)
6
+
7
+ ### v3.4.8
8
+
9
+ - 修复断点续上传功能中一直重试上传出错片的Bug。[https://github.com/qiniu/ruby-sdk/pull/87](https://github.com/qiniu/ruby-sdk/pull/87) (#7205)
10
+
3
11
  ### v3.4.7
4
12
 
5
13
  - 停止追加新功能,仅进行Bug修正维护。
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- qiniu-rs (3.4.7)
4
+ qiniu-rs (3.4.9)
5
5
  json (~> 1.7)
6
6
  mime-types (~> 1.19)
7
7
  rest-client (~> 1.6)
@@ -12,7 +12,7 @@ GEM
12
12
  specs:
13
13
  diff-lcs (1.1.3)
14
14
  fakeweb (1.3.0)
15
- json (1.7.7)
15
+ json (1.8.1)
16
16
  mime-types (1.23)
17
17
  rake (10.0.3)
18
18
  rest-client (1.6.7)
@@ -204,16 +204,6 @@ module Qiniu
204
204
  code == StatusOK ? data : false
205
205
  end
206
206
 
207
- def publish(domain, bucket)
208
- code, data = RS.publish(domain, bucket)
209
- code == StatusOK
210
- end
211
-
212
- def unpublish(domain)
213
- code, data = RS.unpublish(domain)
214
- code == StatusOK
215
- end
216
-
217
207
  def drop(bucket)
218
208
  code, data = RS.drop(bucket)
219
209
  code == StatusOK
@@ -40,16 +40,6 @@ module Qiniu
40
40
  Auth.request Config.settings[:rs_host] + '/delete/' + encode_entry_uri(bucket, key)
41
41
  end
42
42
 
43
- def publish(domain, bucket)
44
- encoded_domain = Utils.urlsafe_base64_encode(domain)
45
- Auth.request Config.settings[:rs_host] + "/publish/#{encoded_domain}/from/#{bucket}"
46
- end
47
-
48
- def unpublish(domain)
49
- encoded_domain = Utils.urlsafe_base64_encode(domain)
50
- Auth.request Config.settings[:rs_host] + "/unpublish/#{encoded_domain}"
51
- end
52
-
53
43
  def drop(bucket)
54
44
  Auth.request Config.settings[:rs_host] + "/drop/#{bucket}"
55
45
  end
@@ -200,6 +200,8 @@ module Qiniu
200
200
  break
201
201
  elsif i == retry_times && data["crc32"] != body_crc32
202
202
  Log.logger.error %Q(Uploading block error. Expected crc32: #{body_crc32}, but got: #{data["crc32"]})
203
+ # 上传重试达到上限,直接返回错误
204
+ return [code, data]
203
205
  end
204
206
  end
205
207
  elsif progress[:offset] + progress[:restsize] != block_size
@@ -230,6 +232,8 @@ module Qiniu
230
232
  break
231
233
  elsif i == retry_times && data["crc32"] != body_crc32
232
234
  Log.logger.error %Q(Uploading block error. Expected crc32: #{body_crc32}, but got: #{data["crc32"]})
235
+ # 上传重试达到上限,直接返回错误
236
+ return [code, data]
233
237
  end
234
238
  end
235
239
  end
@@ -5,7 +5,7 @@ module Qiniu
5
5
  module Version
6
6
  MAJOR = 3
7
7
  MINOR = 4
8
- PATCH = 7
8
+ PATCH = 10
9
9
  # Returns a version string by joining <tt>MAJOR</tt>, <tt>MINOR</tt>, and <tt>PATCH</tt> with <tt>'.'</tt>
10
10
  #
11
11
  # Example
@@ -4,9 +4,9 @@ require File.expand_path('../lib/qiniu/rs/version', __FILE__)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.authors = ["why404"]
7
- gem.email = ["why404@gmail.com"]
8
- gem.description = %q{Qiniu Resource (Cloud) Storage SDK for Ruby. See: http://developer.qiniu.com/docs/v6/sdk/ruby-sdk.html}
9
- gem.summary = %q{Qiniu Resource (Cloud) Storage SDK for Ruby}
7
+ gem.email = ["sdk@qiniu.com"]
8
+ gem.description = %q{Deprecated Qiniu Resource (Cloud) Storage SDK for Ruby. Please use new SDK https://rubygems.org/gems/qiniu}
9
+ gem.summary = %q{Deprecated Qiniu Resource (Cloud) Storage SDK for Ruby}
10
10
  gem.homepage = "https://github.com/qiniu/ruby-sdk/tree/qiniu-rs"
11
11
 
12
12
  gem.files = `git ls-files`.split($\)
@@ -123,24 +123,6 @@ module Qiniu
123
123
  end
124
124
  end
125
125
 
126
- =begin
127
- context ".publish" do
128
- it "should works" do
129
- code, data = Qiniu::RS::RS.publish(@domain, @bucket)
130
- code.should == 200
131
- puts data.inspect
132
- end
133
- end
134
-
135
- context ".unpublish" do
136
- it "should works" do
137
- code, data = Qiniu::RS::RS.unpublish(@domain)
138
- code.should == 200
139
- puts data.inspect
140
- end
141
- end
142
- =end
143
-
144
126
  context ".move" do
145
127
  it "should works" do
146
128
  code, data = Qiniu::RS::RS.move(@bucket, @key, @bucket, @key2)
@@ -32,9 +32,6 @@ module Qiniu
32
32
  end
33
33
 
34
34
  after :all do
35
- #result = Qiniu::RS.unpublish(@domain)
36
- #result.should_not be_false
37
-
38
35
  result1 = Qiniu::RS.drop(@bucket)
39
36
  puts result1.inspect
40
37
  result1.should_not be_false
@@ -278,24 +275,6 @@ module Qiniu
278
275
  end
279
276
  end
280
277
 
281
- =begin
282
- context ".publish" do
283
- it "should works" do
284
- result = Qiniu::RS.publish(@domain, @bucket)
285
- result.should_not be_false
286
- end
287
- end
288
- =end
289
-
290
- =begin
291
- context ".unpublish" do
292
- it "should works" do
293
- result = Qiniu::RS.unpublish(@domain)
294
- result.should_not be_false
295
- end
296
- end
297
- =end
298
-
299
278
  context ".batch_copy" do
300
279
  it "should works" do
301
280
  result = Qiniu::RS.batch_copy @bucket, @key, @bucket, @key2
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiniu-rs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.7
4
+ version: 3.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - why404
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-13 00:00:00.000000000 Z
11
+ date: 2014-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -108,9 +108,10 @@ dependencies:
108
108
  - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.4'
111
- description: 'Qiniu Resource (Cloud) Storage SDK for Ruby. See: http://developer.qiniu.com/docs/v6/sdk/ruby-sdk.html'
111
+ description: Deprecated Qiniu Resource (Cloud) Storage SDK for Ruby. Please use new
112
+ SDK https://rubygems.org/gems/qiniu
112
113
  email:
113
- - why404@gmail.com
114
+ - sdk@qiniu.com
114
115
  executables: []
115
116
  extensions: []
116
117
  extra_rdoc_files: []
@@ -177,10 +178,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
177
178
  version: '0'
178
179
  requirements: []
179
180
  rubyforge_project:
180
- rubygems_version: 2.0.3
181
+ rubygems_version: 2.0.14
181
182
  signing_key:
182
183
  specification_version: 4
183
- summary: Qiniu Resource (Cloud) Storage SDK for Ruby
184
+ summary: Deprecated Qiniu Resource (Cloud) Storage SDK for Ruby
184
185
  test_files:
185
186
  - spec/qiniu/rs/abstract_spec.rb
186
187
  - spec/qiniu/rs/eu_spec.rb