carrierwave-aliyun-oss 0.4.5 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e944bbf10b763ffcef990f1300a43fa4a0a3675
4
- data.tar.gz: bb657e7782d233b03610a74a48fdc2187a94d9ba
3
+ metadata.gz: 5297c05d9c5cbeb0251bc7c54081a6607bafcc28
4
+ data.tar.gz: 4193d7f0ad7045fb487634cdc2c5296746fa3b8e
5
5
  SHA512:
6
- metadata.gz: 1e91ba61740efdb211001e24679ea84b68518f347ae61eaa571fc6d3928c7ec9ab0cc9779a1df2d1672f1db9613de720039d5dac1497204d06be43726d2897c9
7
- data.tar.gz: 2efb5ec1f6c01193405d7e53f8371d08a15c43cd23ceb491c2a7e09fa0511e1b380931f542091b2755f78387430930f1730e4c45faf961391902decba66c5e8f
6
+ metadata.gz: a8cfd8778a486ebe5cc4545f83085ea6228df34112c4135fb7716c46aca1e6d75aaef6c41dd66d450eac379ab6fb8ad73827f19feab80129c93a41390ce85b6b
7
+ data.tar.gz: 9c0702135254757ecc9527e83fb4af9be29e634055c2ef2b121b360c8aa3e69b18774f3a60226c178ecc4e36acbb7b6e1e207ea88092ed47baa20cec8a90c3a4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- carrierwave-aliyun-oss (0.4.4)
4
+ carrierwave-aliyun-oss (0.4.5)
5
5
  aliyun-sdk (>= 0.4.0)
6
6
  carrierwave (>= 0.5.7)
7
7
 
@@ -1,5 +1,5 @@
1
1
  module CarrierWave
2
2
  module Aliyun
3
- VERSION = '0.4.5'
3
+ VERSION = '0.4.6'
4
4
  end
5
5
  end
@@ -158,7 +158,7 @@ module CarrierWave
158
158
  #
159
159
  def read
160
160
  body = ""
161
- object = oss_connection.get(@path){|chunk| body = chunk}
161
+ object = oss_connection.get(@path){|chunk| body << chunk}
162
162
  @headers = object.headers
163
163
  body
164
164
  end
@@ -25,10 +25,9 @@ describe "Aliyun" do
25
25
 
26
26
  it "should get" do
27
27
  content = ""
28
- obj = @connection.get("a/a.jpg"){|chunk| content = chunk}
29
- expect(content.length).to be >0
30
- expect(obj.size).to be >0
31
- expect(obj.headers).not_to be_empty
28
+ obj = @connection.get("a/a.jpg"){|chunk| content << chunk}
29
+ expect(content.length).to eq(obj.size)
30
+ expect(open(@connection.path_to_url("a/a.jpg")){|f| f.read}).to eq(content)
32
31
  end
33
32
 
34
33
  it "should put with / prefix" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-aliyun-oss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee