ku6vms_sdk 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/grand_cloud/version.rb +1 -1
- data/lib/grand_cloud/video.rb +3 -2
- data/spec/grand_cloud/video_spec.rb +3 -1
- metadata +2 -2
data/lib/grand_cloud/version.rb
CHANGED
data/lib/grand_cloud/video.rb
CHANGED
@@ -91,7 +91,8 @@ module GrandCloud
|
|
91
91
|
:videoUrl => CGI::escape(download_url),
|
92
92
|
:uploadUrl => rep['uploadUrl'],
|
93
93
|
:accessKey => Base.snda_access_key_id,
|
94
|
-
:secretKey => Base.secret_access_key
|
94
|
+
:secretKey => Base.secret_access_key,
|
95
|
+
:oneway => true
|
95
96
|
},
|
96
97
|
:timeout => {
|
97
98
|
:inactivity_timeout => 0
|
@@ -210,7 +211,7 @@ module GrandCloud
|
|
210
211
|
def callback req, func=nil, additional_attributes=nil
|
211
212
|
response = EM::DefaultDeferrable.new
|
212
213
|
req.callback do
|
213
|
-
rep = JSON.parse(req.response)
|
214
|
+
rep = req.response.blank? ? {'code' => req.response_header.status} : JSON.parse(req.response)
|
214
215
|
if rep['errors']
|
215
216
|
response.fail(rep)
|
216
217
|
else
|
@@ -25,7 +25,9 @@ module GrandCloud
|
|
25
25
|
it "should pulled by ku6vms" do
|
26
26
|
@video.run do
|
27
27
|
@video.pull_by_vms('spec_pull_video', 'http://storage-huadong-1.sdcloud.cn/images.jiaoxuebang.com/MOV_0399.mp4?SNDAAccessKeyId=BH297OBMKFV0T2LO9MC189P2J&Expires=1377147099&Signature=JpbNOKlBc7SD4%2FYKIiPz8HJDHf4%3D'){ |rep|
|
28
|
-
rep
|
28
|
+
puts rep
|
29
|
+
debugger
|
30
|
+
rep['code'].should == 202
|
29
31
|
}
|
30
32
|
end
|
31
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ku6vms_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: em-http-request
|