proteus_client 0.0.3 → 0.0.4
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.
- data/lib/proteus_client/proxy.rb +3 -5
- data/spec/proteus_client_spec.rb +8 -12
- metadata +2 -2
data/lib/proteus_client/proxy.rb
CHANGED
@@ -104,11 +104,9 @@ module ProteusClient
|
|
104
104
|
end
|
105
105
|
|
106
106
|
def format_video_allocation(video_allocation)
|
107
|
-
urls = []
|
108
|
-
|
109
|
-
|
110
|
-
urls << { type: 'stream', url: video_allocation['url_stream'] }
|
111
|
-
urls << { type: 'upload', url: video_allocation['url_upload'] }
|
107
|
+
urls = { direct: video_allocation['url_direct'] ,
|
108
|
+
stream: video_allocation['url_stream'] ,
|
109
|
+
upload: video_allocation['url_upload'] }
|
112
110
|
|
113
111
|
{ video_allocation_id: video_allocation['_id'], urls: urls }
|
114
112
|
end
|
data/spec/proteus_client_spec.rb
CHANGED
@@ -52,12 +52,10 @@ describe ProteusClient::Proxy do
|
|
52
52
|
end
|
53
53
|
|
54
54
|
it "returns urls" do
|
55
|
-
@response[:urls]
|
56
|
-
{
|
57
|
-
|
58
|
-
|
59
|
-
@response[:urls][2].should ==
|
60
|
-
{ type: 'upload', url: 'upload/4fe0f752831a9d08bb000010.flv' }
|
55
|
+
@response[:urls].should ==
|
56
|
+
{ direct: 'direct/4fe0f752831a9d08bb000010.flv',
|
57
|
+
stream: 'stream/4fe0f752831a9d08bb000010.flv',
|
58
|
+
upload: 'upload/4fe0f752831a9d08bb000010.flv' }
|
61
59
|
end
|
62
60
|
|
63
61
|
end
|
@@ -80,12 +78,10 @@ describe ProteusClient::Proxy do
|
|
80
78
|
end
|
81
79
|
|
82
80
|
it "returns urls" do
|
83
|
-
@response[0][:urls]
|
84
|
-
{
|
85
|
-
|
86
|
-
|
87
|
-
@response[0][:urls][2].should ==
|
88
|
-
{ type: 'upload', url: 'upload/4fe0f752831a9d08bb000010.flv' }
|
81
|
+
@response[0][:urls].should ==
|
82
|
+
{ direct: 'direct/4fe0f752831a9d08bb000010.flv',
|
83
|
+
stream: 'stream/4fe0f752831a9d08bb000010.flv',
|
84
|
+
upload: 'upload/4fe0f752831a9d08bb000010.flv' }
|
89
85
|
end
|
90
86
|
|
91
87
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: proteus_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
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: 2012-07-
|
12
|
+
date: 2012-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|