zencoder-flix_cloud-gem 0.5.2 → 0.5.3

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/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 5
4
- :patch: 2
4
+ :patch: 3
@@ -1,6 +1,6 @@
1
1
  class FlixCloud::File < FlixCloud::Record
2
2
 
3
- attr_accessor :url, :size, :width, :height, :duration
3
+ attr_accessor :url, :size, :width, :height, :duration, :cost
4
4
 
5
5
  record_column :parameters, 'Parameters'
6
6
 
@@ -20,6 +20,7 @@ class FlixCloud::NotificationTest < Test::Unit::TestCase
20
20
  <height>720</height>
21
21
  <size>1732204</size>
22
22
  <duration>900</duration>
23
+ <cost>0</cost>
23
24
  </input-media-file>
24
25
  <output-media-file>
25
26
  <url>s3://flixcloud-test/fsdfasdf.mov</url>
@@ -27,10 +28,12 @@ class FlixCloud::NotificationTest < Test::Unit::TestCase
27
28
  <height>176</height>
28
29
  <size>44126</size>
29
30
  <duration>700</duration>
31
+ <cost>123</cost>
30
32
  </output-media-file>
31
33
  <watermark-file>
32
34
  <url>http://dl.getdropbox.com/u/378873/zencoder_test.mov</url>
33
35
  <size>1234</size>
36
+ <cost>321</cost>
34
37
  </watermark-file>
35
38
  </job>})
36
39
  end
@@ -44,6 +47,22 @@ class FlixCloud::NotificationTest < Test::Unit::TestCase
44
47
  assert_not_nil @notification.recipe_id
45
48
  assert_not_nil @notification.state
46
49
  assert_not_nil @notification.error_message
50
+ assert_not_nil @notification.input_media_file
51
+ assert_not_nil @notification.input_media_file.size
52
+ assert_not_nil @notification.input_media_file.url
53
+ assert_not_nil @notification.input_media_file.height
54
+ assert_not_nil @notification.input_media_file.width
55
+ assert_not_nil @notification.input_media_file.cost
56
+ assert_not_nil @notification.output_media_file
57
+ assert_not_nil @notification.output_media_file.size
58
+ assert_not_nil @notification.output_media_file.url
59
+ assert_not_nil @notification.output_media_file.height
60
+ assert_not_nil @notification.output_media_file.width
61
+ assert_not_nil @notification.output_media_file.cost
62
+ assert_not_nil @notification.watermark_file
63
+ assert_not_nil @notification.watermark_file.size
64
+ assert_not_nil @notification.watermark_file.url
65
+ assert_not_nil @notification.watermark_file.cost
47
66
  end
48
67
  end
49
68
 
@@ -55,14 +74,17 @@ class FlixCloud::NotificationTest < Test::Unit::TestCase
55
74
  "url" => "s3://flixcloud-test/small.mov",
56
75
  "height" => "720",
57
76
  "duration" => "900",
58
- "width" => "1280"},
77
+ "width" => "1280",
78
+ "cost" => "321"},
59
79
  "watermark_file" => {"size" => "1234",
60
- "url" => "http://dl.getdropbox.com/u/378873/zencoder_test.mov"},
80
+ "url" => "http://dl.getdropbox.com/u/378873/zencoder_test.mov",
81
+ "cost" => "0"},
61
82
  "output_media_file" => {"size" => "44126",
62
83
  "url" => "s3://flixcloud-test/fsdfasdf.mov",
63
84
  "height" => "176",
64
85
  "duration" => "700",
65
- "width" => "320"},
86
+ "width" => "320",
87
+ "cost" => "123"},
66
88
  "id" => 1,
67
89
  "recipe_id" => 172,
68
90
  "error_message" => 'error message',
@@ -80,6 +102,22 @@ class FlixCloud::NotificationTest < Test::Unit::TestCase
80
102
  assert_not_nil @notification.recipe_id
81
103
  assert_not_nil @notification.state
82
104
  assert_not_nil @notification.error_message
105
+ assert_not_nil @notification.input_media_file
106
+ assert_not_nil @notification.input_media_file.size
107
+ assert_not_nil @notification.input_media_file.url
108
+ assert_not_nil @notification.input_media_file.height
109
+ assert_not_nil @notification.input_media_file.width
110
+ assert_not_nil @notification.input_media_file.cost
111
+ assert_not_nil @notification.output_media_file
112
+ assert_not_nil @notification.output_media_file.size
113
+ assert_not_nil @notification.output_media_file.url
114
+ assert_not_nil @notification.output_media_file.height
115
+ assert_not_nil @notification.output_media_file.width
116
+ assert_not_nil @notification.output_media_file.cost
117
+ assert_not_nil @notification.watermark_file
118
+ assert_not_nil @notification.watermark_file.size
119
+ assert_not_nil @notification.watermark_file.url
120
+ assert_not_nil @notification.watermark_file.cost
83
121
  end
84
122
  end
85
123
 
@@ -91,14 +129,17 @@ class FlixCloud::NotificationTest < Test::Unit::TestCase
91
129
  "url" => "s3://flixcloud-test/small.mov",
92
130
  "height" => "720",
93
131
  "duration" => "900",
94
- "width" => "1280"},
132
+ "width" => "1280",
133
+ "cost" => "321"},
95
134
  "watermark_file" => {"size" => "1234",
96
- "url" => "http://dl.getdropbox.com/u/378873/zencoder_test.mov"},
135
+ "url" => "http://dl.getdropbox.com/u/378873/zencoder_test.mov",
136
+ "cost" => "321"},
97
137
  "output_media_file" => {"size" => "44126",
98
138
  "url" => "s3://flixcloud-test/fsdfasdf.mov",
99
139
  "height" => "176",
100
140
  "duration" => "700",
101
- "width" => "320"},
141
+ "width" => "320",
142
+ "cost" => "321"},
102
143
  "id" => 1,
103
144
  "recipe_id" => 172,
104
145
  "error_message" => 'error message',
@@ -116,7 +157,57 @@ class FlixCloud::NotificationTest < Test::Unit::TestCase
116
157
  assert_not_nil @notification.recipe_id
117
158
  assert_not_nil @notification.state
118
159
  assert_not_nil @notification.error_message
160
+ assert_not_nil @notification.input_media_file
161
+ assert_not_nil @notification.input_media_file.size
162
+ assert_not_nil @notification.input_media_file.url
163
+ assert_not_nil @notification.input_media_file.height
164
+ assert_not_nil @notification.input_media_file.width
165
+ assert_not_nil @notification.input_media_file.cost
166
+ assert_not_nil @notification.output_media_file
167
+ assert_not_nil @notification.output_media_file.size
168
+ assert_not_nil @notification.output_media_file.url
169
+ assert_not_nil @notification.output_media_file.height
170
+ assert_not_nil @notification.output_media_file.width
171
+ assert_not_nil @notification.output_media_file.cost
172
+ assert_not_nil @notification.watermark_file
173
+ assert_not_nil @notification.watermark_file.size
174
+ assert_not_nil @notification.watermark_file.url
175
+ assert_not_nil @notification.watermark_file.cost
119
176
  end
120
177
  end
121
178
 
179
+
180
+ context "With a notification where the state is 'successful_job'" do
181
+ setup do
182
+ @notification = FlixCloud::Notification.new("state" => "successful_job")
183
+ end
184
+
185
+ should "be successful" do
186
+ assert @notification.successful?
187
+ end
188
+ end
189
+
190
+
191
+ context "With a notification where the state is 'failed_job'" do
192
+ setup do
193
+ @notification = FlixCloud::Notification.new("state" => "failed_job")
194
+ end
195
+
196
+ should "be failed" do
197
+ assert @notification.failed?
198
+ end
199
+ end
200
+
201
+
202
+ context "With a notification where the state is 'cancelled_job'" do
203
+ setup do
204
+ @notification = FlixCloud::Notification.new("state" => "cancelled_job")
205
+ end
206
+
207
+ should "be cancelled" do
208
+ assert @notification.cancelled?
209
+ end
210
+ end
211
+
212
+
122
213
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zencoder-flix_cloud-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Sutton
@@ -68,14 +68,11 @@ files:
68
68
  - lib/flix_cloud/response.rb
69
69
  - test/flix_cloud/file_locations_test.rb
70
70
  - test/flix_cloud/file_test.rb
71
- - test/flix_cloud/input_file_test.rb
72
71
  - test/flix_cloud/job_test.rb
73
72
  - test/flix_cloud/notification_test.rb
74
- - test/flix_cloud/output_files_test.rb
75
73
  - test/flix_cloud/parameters_test.rb
76
74
  - test/flix_cloud/record_test.rb
77
75
  - test/flix_cloud/response_test.rb
78
- - test/flix_cloud/watermark_file_test.rb
79
76
  - test/test_helper.rb
80
77
  has_rdoc: true
81
78
  homepage: http://github.com/zencoder/flix_cloud-gem
@@ -106,12 +103,9 @@ summary: Gem for integrating with http://flixcloud.com
106
103
  test_files:
107
104
  - test/flix_cloud/file_locations_test.rb
108
105
  - test/flix_cloud/file_test.rb
109
- - test/flix_cloud/input_file_test.rb
110
106
  - test/flix_cloud/job_test.rb
111
107
  - test/flix_cloud/notification_test.rb
112
- - test/flix_cloud/output_files_test.rb
113
108
  - test/flix_cloud/parameters_test.rb
114
109
  - test/flix_cloud/record_test.rb
115
110
  - test/flix_cloud/response_test.rb
116
- - test/flix_cloud/watermark_file_test.rb
117
111
  - test/test_helper.rb
@@ -1,6 +0,0 @@
1
- require 'test_helper'
2
-
3
- class FlixCloud::InputFileTest < Test::Unit::TestCase
4
- should "do something unique, eventually" do
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- require 'test_helper'
2
-
3
- class FlixCloud::OutputFileTest < Test::Unit::TestCase
4
- should "do something unique, eventually" do
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- require 'test_helper'
2
-
3
- class FlixCloud::WatermarkFileTest < Test::Unit::TestCase
4
- should "do something unique, eventually" do
5
- end
6
- end