mux_ruby 1.4.0 → 1.5.0

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
- SHA1:
3
- metadata.gz: a82c3ff3d2f7a0856d87eeb12181161e46fd94b0
4
- data.tar.gz: b0bc8878a363818ebf49889ccf57739a1b7d4bc1
2
+ SHA256:
3
+ metadata.gz: deda4a3da46421f0c7e44873ed3d5bb828c0f324895adeb80df3dc70e1f5f35e
4
+ data.tar.gz: 147c244aa891da785e99fb398aa0879655cb3b4869a9ced998f17ba302495de4
5
5
  SHA512:
6
- metadata.gz: 4eb34200000fdb35dc50892d46ead7e99046cdacdd1639a88e209d398abf2b22302345a7fefc3e8524c0e09718ab48fbad3cfd84380e5ed67df1bfde85d1ade4
7
- data.tar.gz: 481d66f9f17b8ba653ed30d2bb2b6ed2c8aa194563820e99c39063554afaa00621d9b0555f2ffe63d214a6dfecf09417831e564264e8995800fc6e82d5d5921a
6
+ metadata.gz: 1b34f4e599ad296362367fc1635064c6e6b1716db194c3106347f57c403d9bf0adf3150057756db1c914c717bc425307f0cdc1d54b2205ae77ba64fe485f8754
7
+ data.tar.gz: 260c7782a1ee06f800094fb5eda723e728f6dc95501b5f264e457ecb0230f096887cca7bd569bfe31adffa623bf8d466b43659ace6030e976859b55ddfc514ee
data/Gemfile CHANGED
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem 'rake', '~> 12.0.0'
6
+ gem 'rake', '~> 12.3.3'
7
7
  gem 'pry-byebug'
8
+ gem 'solid_assert'
8
9
  end
data/Gemfile.lock CHANGED
@@ -1,58 +1,59 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mux_ruby (1.4.0)
4
+ mux_ruby (1.5.0)
5
5
  json (~> 2.1, >= 2.1.0)
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- ZenTest (4.11.1)
12
- addressable (2.5.2)
13
- public_suffix (>= 2.0.2, < 4.0)
11
+ ZenTest (4.12.0)
12
+ addressable (2.7.0)
13
+ public_suffix (>= 2.0.2, < 5.0)
14
14
  autotest (4.4.6)
15
15
  ZenTest (>= 4.4.1)
16
- autotest-fsevent (0.2.14)
16
+ autotest-fsevent (0.2.17)
17
17
  sys-uname
18
18
  autotest-growl (0.2.16)
19
19
  autotest-rails-pure (4.1.2)
20
- byebug (10.0.2)
20
+ byebug (11.1.1)
21
21
  coderay (1.1.2)
22
22
  crack (0.4.3)
23
23
  safe_yaml (~> 1.0.0)
24
24
  diff-lcs (1.3)
25
- ethon (0.11.0)
25
+ ethon (0.12.0)
26
26
  ffi (>= 1.3.0)
27
- ffi (1.9.25)
28
- hashdiff (0.3.7)
29
- json (2.1.0)
30
- method_source (0.9.0)
31
- pry (0.11.3)
32
- coderay (~> 1.1.0)
33
- method_source (~> 0.9.0)
34
- pry-byebug (3.6.0)
35
- byebug (~> 10.0)
36
- pry (~> 0.10)
37
- public_suffix (3.0.3)
38
- rake (12.0.0)
39
- rspec (3.8.0)
40
- rspec-core (~> 3.8.0)
41
- rspec-expectations (~> 3.8.0)
42
- rspec-mocks (~> 3.8.0)
43
- rspec-core (3.8.0)
44
- rspec-support (~> 3.8.0)
45
- rspec-expectations (3.8.1)
27
+ ffi (1.12.2)
28
+ hashdiff (1.0.1)
29
+ json (2.3.0)
30
+ method_source (1.0.0)
31
+ pry (0.13.1)
32
+ coderay (~> 1.1)
33
+ method_source (~> 1.0)
34
+ pry-byebug (3.9.0)
35
+ byebug (~> 11.0)
36
+ pry (~> 0.13.0)
37
+ public_suffix (4.0.4)
38
+ rake (12.3.3)
39
+ rspec (3.9.0)
40
+ rspec-core (~> 3.9.0)
41
+ rspec-expectations (~> 3.9.0)
42
+ rspec-mocks (~> 3.9.0)
43
+ rspec-core (3.9.1)
44
+ rspec-support (~> 3.9.1)
45
+ rspec-expectations (3.9.1)
46
46
  diff-lcs (>= 1.2.0, < 2.0)
47
- rspec-support (~> 3.8.0)
48
- rspec-mocks (3.8.0)
47
+ rspec-support (~> 3.9.0)
48
+ rspec-mocks (3.9.1)
49
49
  diff-lcs (>= 1.2.0, < 2.0)
50
- rspec-support (~> 3.8.0)
51
- rspec-support (3.8.0)
52
- safe_yaml (1.0.4)
53
- sys-uname (1.0.3)
50
+ rspec-support (~> 3.9.0)
51
+ rspec-support (3.9.2)
52
+ safe_yaml (1.0.5)
53
+ solid_assert (1.0.0)
54
+ sys-uname (1.2.1)
54
55
  ffi (>= 1.0.0)
55
- typhoeus (1.3.0)
56
+ typhoeus (1.3.1)
56
57
  ethon (>= 0.9.0)
57
58
  vcr (3.0.3)
58
59
  webmock (1.24.6)
@@ -70,10 +71,11 @@ DEPENDENCIES
70
71
  autotest-rails-pure (~> 4.1, >= 4.1.2)
71
72
  mux_ruby!
72
73
  pry-byebug
73
- rake (~> 12.0.0)
74
+ rake (~> 12.3.3)
74
75
  rspec (~> 3.6, >= 3.6.0)
76
+ solid_assert
75
77
  vcr (~> 3.0, >= 3.0.1)
76
78
  webmock (~> 1.24, >= 1.24.3)
77
79
 
78
80
  BUNDLED WITH
79
- 1.16.1
81
+ 1.17.2
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ![Mux Ruby Banner](github-ruby-sdk.png)
2
2
 
3
+ ![](https://github.com/muxinc/mux-ruby/workflows/Integration%20Test/badge.svg)
4
+
3
5
  # Mux Ruby
4
6
 
5
7
  Official Mux API wrapper for ruby projects, supporting both Mux Data and Mux Video.
data/docs/Asset.md CHANGED
@@ -13,7 +13,6 @@ Name | Type | Description | Notes
13
13
  **aspect_ratio** | **String** | | [optional]
14
14
  **playback_ids** | [**Array&lt;PlaybackID&gt;**](PlaybackID.md) | | [optional]
15
15
  **tracks** | [**Array&lt;Track&gt;**](Track.md) | | [optional]
16
- **demo** | **BOOLEAN** | | [optional]
17
16
  **errors** | [**AssetErrors**](AssetErrors.md) | | [optional]
18
17
  **per_title_encode** | **BOOLEAN** | | [optional]
19
18
  **is_live** | **BOOLEAN** | | [optional]
@@ -24,5 +23,6 @@ Name | Type | Description | Notes
24
23
  **mp4_support** | **String** | | [optional] [default to &#39;none&#39;]
25
24
  **normalize_audio** | **BOOLEAN** | | [optional] [default to false]
26
25
  **static_renditions** | [**AssetStaticRenditions**](AssetStaticRenditions.md) | | [optional]
26
+ **test** | **BOOLEAN** | | [optional]
27
27
 
28
28
 
@@ -5,11 +5,11 @@ Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
6
  **input** | [**Array&lt;InputSettings&gt;**](InputSettings.md) | | [optional]
7
7
  **playback_policy** | [**Array&lt;PlaybackPolicy&gt;**](PlaybackPolicy.md) | | [optional]
8
- **demo** | **BOOLEAN** | | [optional]
9
8
  **per_title_encode** | **BOOLEAN** | | [optional]
10
9
  **passthrough** | **String** | | [optional]
11
10
  **mp4_support** | **String** | | [optional]
12
11
  **normalize_audio** | **BOOLEAN** | Normalize the audio track loudness level. This parameter is only applicable to on-demand (not live) assets. | [optional] [default to false]
13
12
  **master_access** | **String** | | [optional]
13
+ **test** | **BOOLEAN** | | [optional]
14
14
 
15
15
 
@@ -8,5 +8,6 @@ Name | Type | Description | Notes
8
8
  **reconnect_window** | **Float** | When live streaming software disconnects from Mux, either intentionally or due to a drop in the network, the Reconnect Window is the time in seconds that Mux should wait for the streaming software to reconnect before considering the live stream finished and completing the recorded asset. Defaults to 60 seconds on the API if not specified. | [optional]
9
9
  **passthrough** | **String** | | [optional]
10
10
  **reduced_latency** | **BOOLEAN** | Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/ | [optional]
11
+ **test** | **BOOLEAN** | | [optional]
11
12
 
12
13
 
@@ -6,5 +6,6 @@ Name | Type | Description | Notes
6
6
  **timeout** | **Integer** | Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked &#x60;timed_out&#x60; | [optional] [default to 3600]
7
7
  **cors_origin** | **String** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional]
8
8
  **new_asset_settings** | [**CreateAssetRequest**](CreateAssetRequest.md) | |
9
+ **test** | **BOOLEAN** | | [optional]
9
10
 
10
11
 
data/docs/LiveStream.md CHANGED
@@ -15,5 +15,6 @@ Name | Type | Description | Notes
15
15
  **reconnect_window** | **Float** | | [optional]
16
16
  **reduced_latency** | **BOOLEAN** | | [optional]
17
17
  **simulcast_targets** | [**Array&lt;SimulcastTarget&gt;**](SimulcastTarget.md) | | [optional]
18
+ **test** | **BOOLEAN** | | [optional]
18
19
 
19
20
 
data/docs/Upload.md CHANGED
@@ -11,5 +11,6 @@ Name | Type | Description | Notes
11
11
  **error** | [**UploadError**](UploadError.md) | | [optional]
12
12
  **cors_origin** | **String** | If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers. | [optional]
13
13
  **url** | **String** | The URL to upload the associated source media to. | [optional]
14
+ **test** | **BOOLEAN** | | [optional]
14
15
 
15
16
 
@@ -15,7 +15,7 @@ end
15
15
  errors_api = MuxRuby::ErrorsApi.new
16
16
 
17
17
  # ========== list-errors ==========
18
- errors = errors_api.list_errors(:filters => ['browser:Chrome'], :timeframe => ['7:days'])
18
+ errors = errors_api.list_errors(:filters => ['browser:Safari'], :timeframe => ['7:days'])
19
19
  assert errors != nil
20
20
  assert errors.data != nil
21
21
  assert errors.data.length > 0
@@ -27,8 +27,6 @@ module MuxRuby
27
27
 
28
28
  attr_accessor :tracks
29
29
 
30
- attr_accessor :demo
31
-
32
30
  attr_accessor :errors
33
31
 
34
32
  attr_accessor :per_title_encode
@@ -49,6 +47,8 @@ module MuxRuby
49
47
 
50
48
  attr_accessor :static_renditions
51
49
 
50
+ attr_accessor :test
51
+
52
52
  class EnumAttributeValidator
53
53
  attr_reader :datatype
54
54
  attr_reader :allowable_values
@@ -84,7 +84,6 @@ module MuxRuby
84
84
  :'aspect_ratio' => :'aspect_ratio',
85
85
  :'playback_ids' => :'playback_ids',
86
86
  :'tracks' => :'tracks',
87
- :'demo' => :'demo',
88
87
  :'errors' => :'errors',
89
88
  :'per_title_encode' => :'per_title_encode',
90
89
  :'is_live' => :'is_live',
@@ -94,7 +93,8 @@ module MuxRuby
94
93
  :'master_access' => :'master_access',
95
94
  :'mp4_support' => :'mp4_support',
96
95
  :'normalize_audio' => :'normalize_audio',
97
- :'static_renditions' => :'static_renditions'
96
+ :'static_renditions' => :'static_renditions',
97
+ :'test' => :'test'
98
98
  }
99
99
  end
100
100
 
@@ -111,7 +111,6 @@ module MuxRuby
111
111
  :'aspect_ratio' => :'String',
112
112
  :'playback_ids' => :'Array<PlaybackID>',
113
113
  :'tracks' => :'Array<Track>',
114
- :'demo' => :'BOOLEAN',
115
114
  :'errors' => :'AssetErrors',
116
115
  :'per_title_encode' => :'BOOLEAN',
117
116
  :'is_live' => :'BOOLEAN',
@@ -121,7 +120,8 @@ module MuxRuby
121
120
  :'master_access' => :'String',
122
121
  :'mp4_support' => :'String',
123
122
  :'normalize_audio' => :'BOOLEAN',
124
- :'static_renditions' => :'AssetStaticRenditions'
123
+ :'static_renditions' => :'AssetStaticRenditions',
124
+ :'test' => :'BOOLEAN'
125
125
  }
126
126
  end
127
127
 
@@ -177,10 +177,6 @@ module MuxRuby
177
177
  end
178
178
  end
179
179
 
180
- if attributes.has_key?(:'demo')
181
- self.demo = attributes[:'demo']
182
- end
183
-
184
180
  if attributes.has_key?(:'errors')
185
181
  self.errors = attributes[:'errors']
186
182
  end
@@ -226,6 +222,10 @@ module MuxRuby
226
222
  if attributes.has_key?(:'static_renditions')
227
223
  self.static_renditions = attributes[:'static_renditions']
228
224
  end
225
+
226
+ if attributes.has_key?(:'test')
227
+ self.test = attributes[:'test']
228
+ end
229
229
  end
230
230
 
231
231
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -280,7 +280,6 @@ module MuxRuby
280
280
  aspect_ratio == o.aspect_ratio &&
281
281
  playback_ids == o.playback_ids &&
282
282
  tracks == o.tracks &&
283
- demo == o.demo &&
284
283
  errors == o.errors &&
285
284
  per_title_encode == o.per_title_encode &&
286
285
  is_live == o.is_live &&
@@ -290,7 +289,8 @@ module MuxRuby
290
289
  master_access == o.master_access &&
291
290
  mp4_support == o.mp4_support &&
292
291
  normalize_audio == o.normalize_audio &&
293
- static_renditions == o.static_renditions
292
+ static_renditions == o.static_renditions &&
293
+ test == o.test
294
294
  end
295
295
 
296
296
  # @see the `==` method
@@ -302,7 +302,7 @@ module MuxRuby
302
302
  # Calculates hash code according to all attributes.
303
303
  # @return [Fixnum] Hash code
304
304
  def hash
305
- [id, created_at, deleted_at, status, duration, max_stored_resolution, max_stored_frame_rate, aspect_ratio, playback_ids, tracks, demo, errors, per_title_encode, is_live, passthrough, live_stream_id, master, master_access, mp4_support, normalize_audio, static_renditions].hash
305
+ [id, created_at, deleted_at, status, duration, max_stored_resolution, max_stored_frame_rate, aspect_ratio, playback_ids, tracks, errors, per_title_encode, is_live, passthrough, live_stream_id, master, master_access, mp4_support, normalize_audio, static_renditions, test].hash
306
306
  end
307
307
 
308
308
  # Builds the object from hash
@@ -11,8 +11,6 @@ module MuxRuby
11
11
 
12
12
  attr_accessor :playback_policy
13
13
 
14
- attr_accessor :demo
15
-
16
14
  attr_accessor :per_title_encode
17
15
 
18
16
  attr_accessor :passthrough
@@ -24,6 +22,8 @@ module MuxRuby
24
22
 
25
23
  attr_accessor :master_access
26
24
 
25
+ attr_accessor :test
26
+
27
27
  class EnumAttributeValidator
28
28
  attr_reader :datatype
29
29
  attr_reader :allowable_values
@@ -51,12 +51,12 @@ module MuxRuby
51
51
  {
52
52
  :'input' => :'input',
53
53
  :'playback_policy' => :'playback_policy',
54
- :'demo' => :'demo',
55
54
  :'per_title_encode' => :'per_title_encode',
56
55
  :'passthrough' => :'passthrough',
57
56
  :'mp4_support' => :'mp4_support',
58
57
  :'normalize_audio' => :'normalize_audio',
59
- :'master_access' => :'master_access'
58
+ :'master_access' => :'master_access',
59
+ :'test' => :'test'
60
60
  }
61
61
  end
62
62
 
@@ -65,12 +65,12 @@ module MuxRuby
65
65
  {
66
66
  :'input' => :'Array<InputSettings>',
67
67
  :'playback_policy' => :'Array<PlaybackPolicy>',
68
- :'demo' => :'BOOLEAN',
69
68
  :'per_title_encode' => :'BOOLEAN',
70
69
  :'passthrough' => :'String',
71
70
  :'mp4_support' => :'String',
72
71
  :'normalize_audio' => :'BOOLEAN',
73
- :'master_access' => :'String'
72
+ :'master_access' => :'String',
73
+ :'test' => :'BOOLEAN'
74
74
  }
75
75
  end
76
76
 
@@ -94,10 +94,6 @@ module MuxRuby
94
94
  end
95
95
  end
96
96
 
97
- if attributes.has_key?(:'demo')
98
- self.demo = attributes[:'demo']
99
- end
100
-
101
97
  if attributes.has_key?(:'per_title_encode')
102
98
  self.per_title_encode = attributes[:'per_title_encode']
103
99
  end
@@ -119,6 +115,10 @@ module MuxRuby
119
115
  if attributes.has_key?(:'master_access')
120
116
  self.master_access = attributes[:'master_access']
121
117
  end
118
+
119
+ if attributes.has_key?(:'test')
120
+ self.test = attributes[:'test']
121
+ end
122
122
  end
123
123
 
124
124
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -165,12 +165,12 @@ module MuxRuby
165
165
  self.class == o.class &&
166
166
  input == o.input &&
167
167
  playback_policy == o.playback_policy &&
168
- demo == o.demo &&
169
168
  per_title_encode == o.per_title_encode &&
170
169
  passthrough == o.passthrough &&
171
170
  mp4_support == o.mp4_support &&
172
171
  normalize_audio == o.normalize_audio &&
173
- master_access == o.master_access
172
+ master_access == o.master_access &&
173
+ test == o.test
174
174
  end
175
175
 
176
176
  # @see the `==` method
@@ -182,7 +182,7 @@ module MuxRuby
182
182
  # Calculates hash code according to all attributes.
183
183
  # @return [Fixnum] Hash code
184
184
  def hash
185
- [input, playback_policy, demo, per_title_encode, passthrough, mp4_support, normalize_audio, master_access].hash
185
+ [input, playback_policy, per_title_encode, passthrough, mp4_support, normalize_audio, master_access, test].hash
186
186
  end
187
187
 
188
188
  # Builds the object from hash
@@ -19,6 +19,8 @@ module MuxRuby
19
19
  # Latency is the time from when the streamer does something in real life to when you see it happen in the player. Set this if you want lower latency for your live stream. Note: Reconnect windows are incompatible with Reduced Latency and will always be set to zero (0) seconds. Read more here: https://mux.com/blog/reduced-latency-for-mux-live-streaming-now-available/
20
20
  attr_accessor :reduced_latency
21
21
 
22
+ attr_accessor :test
23
+
22
24
  # Attribute mapping from ruby-style variable name to JSON key.
23
25
  def self.attribute_map
24
26
  {
@@ -26,7 +28,8 @@ module MuxRuby
26
28
  :'new_asset_settings' => :'new_asset_settings',
27
29
  :'reconnect_window' => :'reconnect_window',
28
30
  :'passthrough' => :'passthrough',
29
- :'reduced_latency' => :'reduced_latency'
31
+ :'reduced_latency' => :'reduced_latency',
32
+ :'test' => :'test'
30
33
  }
31
34
  end
32
35
 
@@ -37,7 +40,8 @@ module MuxRuby
37
40
  :'new_asset_settings' => :'CreateAssetRequest',
38
41
  :'reconnect_window' => :'Float',
39
42
  :'passthrough' => :'String',
40
- :'reduced_latency' => :'BOOLEAN'
43
+ :'reduced_latency' => :'BOOLEAN',
44
+ :'test' => :'BOOLEAN'
41
45
  }
42
46
  end
43
47
 
@@ -70,6 +74,10 @@ module MuxRuby
70
74
  if attributes.has_key?(:'reduced_latency')
71
75
  self.reduced_latency = attributes[:'reduced_latency']
72
76
  end
77
+
78
+ if attributes.has_key?(:'test')
79
+ self.test = attributes[:'test']
80
+ end
73
81
  end
74
82
 
75
83
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -118,7 +126,8 @@ module MuxRuby
118
126
  new_asset_settings == o.new_asset_settings &&
119
127
  reconnect_window == o.reconnect_window &&
120
128
  passthrough == o.passthrough &&
121
- reduced_latency == o.reduced_latency
129
+ reduced_latency == o.reduced_latency &&
130
+ test == o.test
122
131
  end
123
132
 
124
133
  # @see the `==` method
@@ -130,7 +139,7 @@ module MuxRuby
130
139
  # Calculates hash code according to all attributes.
131
140
  # @return [Fixnum] Hash code
132
141
  def hash
133
- [playback_policy, new_asset_settings, reconnect_window, passthrough, reduced_latency].hash
142
+ [playback_policy, new_asset_settings, reconnect_window, passthrough, reduced_latency, test].hash
134
143
  end
135
144
 
136
145
  # Builds the object from hash
@@ -15,12 +15,15 @@ module MuxRuby
15
15
 
16
16
  attr_accessor :new_asset_settings
17
17
 
18
+ attr_accessor :test
19
+
18
20
  # Attribute mapping from ruby-style variable name to JSON key.
19
21
  def self.attribute_map
20
22
  {
21
23
  :'timeout' => :'timeout',
22
24
  :'cors_origin' => :'cors_origin',
23
- :'new_asset_settings' => :'new_asset_settings'
25
+ :'new_asset_settings' => :'new_asset_settings',
26
+ :'test' => :'test'
24
27
  }
25
28
  end
26
29
 
@@ -29,7 +32,8 @@ module MuxRuby
29
32
  {
30
33
  :'timeout' => :'Integer',
31
34
  :'cors_origin' => :'String',
32
- :'new_asset_settings' => :'CreateAssetRequest'
35
+ :'new_asset_settings' => :'CreateAssetRequest',
36
+ :'test' => :'BOOLEAN'
33
37
  }
34
38
  end
35
39
 
@@ -54,6 +58,10 @@ module MuxRuby
54
58
  if attributes.has_key?(:'new_asset_settings')
55
59
  self.new_asset_settings = attributes[:'new_asset_settings']
56
60
  end
61
+
62
+ if attributes.has_key?(:'test')
63
+ self.test = attributes[:'test']
64
+ end
57
65
  end
58
66
 
59
67
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -105,7 +113,8 @@ module MuxRuby
105
113
  self.class == o.class &&
106
114
  timeout == o.timeout &&
107
115
  cors_origin == o.cors_origin &&
108
- new_asset_settings == o.new_asset_settings
116
+ new_asset_settings == o.new_asset_settings &&
117
+ test == o.test
109
118
  end
110
119
 
111
120
  # @see the `==` method
@@ -117,7 +126,7 @@ module MuxRuby
117
126
  # Calculates hash code according to all attributes.
118
127
  # @return [Fixnum] Hash code
119
128
  def hash
120
- [timeout, cors_origin, new_asset_settings].hash
129
+ [timeout, cors_origin, new_asset_settings, test].hash
121
130
  end
122
131
 
123
132
  # Builds the object from hash
@@ -21,6 +21,28 @@ module MuxRuby
21
21
 
22
22
  attr_accessor :opacity
23
23
 
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
24
46
  # Attribute mapping from ruby-style variable name to JSON key.
25
47
  def self.attribute_map
26
48
  {
@@ -94,9 +116,33 @@ module MuxRuby
94
116
  # Check to see if the all the properties in the model are valid
95
117
  # @return true if the model is valid
96
118
  def valid?
119
+ vertical_align_validator = EnumAttributeValidator.new('String', ['top', 'middle', 'bottom'])
120
+ return false unless vertical_align_validator.valid?(@vertical_align)
121
+ horizontal_align_validator = EnumAttributeValidator.new('String', ['left', 'center', 'right'])
122
+ return false unless horizontal_align_validator.valid?(@horizontal_align)
97
123
  true
98
124
  end
99
125
 
126
+ # Custom attribute writer method checking allowed values (enum).
127
+ # @param [Object] vertical_align Object to be assigned
128
+ def vertical_align=(vertical_align)
129
+ validator = EnumAttributeValidator.new('String', ['top', 'middle', 'bottom'])
130
+ unless validator.valid?(vertical_align)
131
+ fail ArgumentError, 'invalid value for "vertical_align", must be one of #{validator.allowable_values}.'
132
+ end
133
+ @vertical_align = vertical_align
134
+ end
135
+
136
+ # Custom attribute writer method checking allowed values (enum).
137
+ # @param [Object] horizontal_align Object to be assigned
138
+ def horizontal_align=(horizontal_align)
139
+ validator = EnumAttributeValidator.new('String', ['left', 'center', 'right'])
140
+ unless validator.valid?(horizontal_align)
141
+ fail ArgumentError, 'invalid value for "horizontal_align", must be one of #{validator.allowable_values}.'
142
+ end
143
+ @horizontal_align = horizontal_align
144
+ end
145
+
100
146
  # Checks equality by comparing each attribute.
101
147
  # @param [Object] Object to be compared
102
148
  def ==(o)
@@ -31,6 +31,8 @@ module MuxRuby
31
31
 
32
32
  attr_accessor :simulcast_targets
33
33
 
34
+ attr_accessor :test
35
+
34
36
  # Attribute mapping from ruby-style variable name to JSON key.
35
37
  def self.attribute_map
36
38
  {
@@ -45,7 +47,8 @@ module MuxRuby
45
47
  :'passthrough' => :'passthrough',
46
48
  :'reconnect_window' => :'reconnect_window',
47
49
  :'reduced_latency' => :'reduced_latency',
48
- :'simulcast_targets' => :'simulcast_targets'
50
+ :'simulcast_targets' => :'simulcast_targets',
51
+ :'test' => :'test'
49
52
  }
50
53
  end
51
54
 
@@ -63,7 +66,8 @@ module MuxRuby
63
66
  :'passthrough' => :'String',
64
67
  :'reconnect_window' => :'Float',
65
68
  :'reduced_latency' => :'BOOLEAN',
66
- :'simulcast_targets' => :'Array<SimulcastTarget>'
69
+ :'simulcast_targets' => :'Array<SimulcastTarget>',
70
+ :'test' => :'BOOLEAN'
67
71
  }
68
72
  end
69
73
 
@@ -128,6 +132,10 @@ module MuxRuby
128
132
  self.simulcast_targets = value
129
133
  end
130
134
  end
135
+
136
+ if attributes.has_key?(:'test')
137
+ self.test = attributes[:'test']
138
+ end
131
139
  end
132
140
 
133
141
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -159,7 +167,8 @@ module MuxRuby
159
167
  passthrough == o.passthrough &&
160
168
  reconnect_window == o.reconnect_window &&
161
169
  reduced_latency == o.reduced_latency &&
162
- simulcast_targets == o.simulcast_targets
170
+ simulcast_targets == o.simulcast_targets &&
171
+ test == o.test
163
172
  end
164
173
 
165
174
  # @see the `==` method
@@ -171,7 +180,7 @@ module MuxRuby
171
180
  # Calculates hash code according to all attributes.
172
181
  # @return [Fixnum] Hash code
173
182
  def hash
174
- [id, created_at, stream_key, active_asset_id, recent_asset_ids, status, playback_ids, new_asset_settings, passthrough, reconnect_window, reduced_latency, simulcast_targets].hash
183
+ [id, created_at, stream_key, active_asset_id, recent_asset_ids, status, playback_ids, new_asset_settings, passthrough, reconnect_window, reduced_latency, simulcast_targets, test].hash
175
184
  end
176
185
 
177
186
  # Builds the object from hash
@@ -27,6 +27,8 @@ module MuxRuby
27
27
  # The URL to upload the associated source media to.
28
28
  attr_accessor :url
29
29
 
30
+ attr_accessor :test
31
+
30
32
  class EnumAttributeValidator
31
33
  attr_reader :datatype
32
34
  attr_reader :allowable_values
@@ -59,7 +61,8 @@ module MuxRuby
59
61
  :'asset_id' => :'asset_id',
60
62
  :'error' => :'error',
61
63
  :'cors_origin' => :'cors_origin',
62
- :'url' => :'url'
64
+ :'url' => :'url',
65
+ :'test' => :'test'
63
66
  }
64
67
  end
65
68
 
@@ -73,7 +76,8 @@ module MuxRuby
73
76
  :'asset_id' => :'String',
74
77
  :'error' => :'UploadError',
75
78
  :'cors_origin' => :'String',
76
- :'url' => :'String'
79
+ :'url' => :'String',
80
+ :'test' => :'BOOLEAN'
77
81
  }
78
82
  end
79
83
 
@@ -118,6 +122,10 @@ module MuxRuby
118
122
  if attributes.has_key?(:'url')
119
123
  self.url = attributes[:'url']
120
124
  end
125
+
126
+ if attributes.has_key?(:'test')
127
+ self.test = attributes[:'test']
128
+ end
121
129
  end
122
130
 
123
131
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -181,7 +189,8 @@ module MuxRuby
181
189
  asset_id == o.asset_id &&
182
190
  error == o.error &&
183
191
  cors_origin == o.cors_origin &&
184
- url == o.url
192
+ url == o.url &&
193
+ test == o.test
185
194
  end
186
195
 
187
196
  # @see the `==` method
@@ -193,7 +202,7 @@ module MuxRuby
193
202
  # Calculates hash code according to all attributes.
194
203
  # @return [Fixnum] Hash code
195
204
  def hash
196
- [id, timeout, status, new_asset_settings, asset_id, error, cors_origin, url].hash
205
+ [id, timeout, status, new_asset_settings, asset_id, error, cors_origin, url, test].hash
197
206
  end
198
207
 
199
208
  # Builds the object from hash
@@ -4,5 +4,5 @@
4
4
  =end
5
5
 
6
6
  module MuxRuby
7
- VERSION = '1.4.0'
7
+ VERSION = '1.5.0'
8
8
  end
@@ -85,12 +85,6 @@ describe 'Asset' do
85
85
  end
86
86
  end
87
87
 
88
- describe 'test attribute "demo"' do
89
- it 'should work' do
90
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
91
- end
92
- end
93
-
94
88
  describe 'test attribute "errors"' do
95
89
  it 'should work' do
96
90
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -159,4 +153,10 @@ describe 'Asset' do
159
153
  end
160
154
  end
161
155
 
156
+ describe 'test attribute "test"' do
157
+ it 'should work' do
158
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
159
+ end
160
+ end
161
+
162
162
  end
@@ -37,12 +37,6 @@ describe 'CreateAssetRequest' do
37
37
  end
38
38
  end
39
39
 
40
- describe 'test attribute "demo"' do
41
- it 'should work' do
42
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
- end
44
- end
45
-
46
40
  describe 'test attribute "per_title_encode"' do
47
41
  it 'should work' do
48
42
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
@@ -81,4 +75,10 @@ describe 'CreateAssetRequest' do
81
75
  end
82
76
  end
83
77
 
78
+ describe 'test attribute "test"' do
79
+ it 'should work' do
80
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
81
+ end
82
+ end
83
+
84
84
  end
@@ -55,4 +55,10 @@ describe 'CreateLiveStreamRequest' do
55
55
  end
56
56
  end
57
57
 
58
+ describe 'test attribute "test"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
61
+ end
62
+ end
63
+
58
64
  end
@@ -43,4 +43,10 @@ describe 'CreateUploadRequest' do
43
43
  end
44
44
  end
45
45
 
46
+ describe 'test attribute "test"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
46
52
  end
@@ -28,6 +28,10 @@ describe 'InputSettingsOverlaySettings' do
28
28
  describe 'test attribute "vertical_align"' do
29
29
  it 'should work' do
30
30
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["top", "middle", "bottom"])
32
+ # validator.allowable_values.each do |value|
33
+ # expect { @instance.vertical_align = value }.not_to raise_error
34
+ # end
31
35
  end
32
36
  end
33
37
 
@@ -40,6 +44,10 @@ describe 'InputSettingsOverlaySettings' do
40
44
  describe 'test attribute "horizontal_align"' do
41
45
  it 'should work' do
42
46
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
47
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["left", "center", "right"])
48
+ # validator.allowable_values.each do |value|
49
+ # expect { @instance.horizontal_align = value }.not_to raise_error
50
+ # end
43
51
  end
44
52
  end
45
53
 
@@ -97,4 +97,10 @@ describe 'LiveStream' do
97
97
  end
98
98
  end
99
99
 
100
+ describe 'test attribute "test"' do
101
+ it 'should work' do
102
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
103
+ end
104
+ end
105
+
100
106
  end
@@ -77,4 +77,10 @@ describe 'Upload' do
77
77
  end
78
78
  end
79
79
 
80
+ describe 'test attribute "test"' do
81
+ it 'should work' do
82
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
83
+ end
84
+ end
85
+
80
86
  end
data/test.sh ADDED
@@ -0,0 +1,28 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+
4
+ if [ -z "${MUX_TOKEN_ID:-}" ]
5
+ then
6
+ echo "MUX_TOKEN_ID not set"
7
+ exit 255
8
+ fi
9
+
10
+ if [ -z "${MUX_TOKEN_SECRET:-}" ]
11
+ then
12
+ echo "MUX_TOKEN_SECRET not set"
13
+ exit 255
14
+ fi
15
+
16
+ VIDEO_TESTS=./examples/video/exercise*.rb
17
+ for f in $VIDEO_TESTS
18
+ do
19
+ echo "========== Running $f =========="
20
+ ruby -I lib $f
21
+ done
22
+
23
+ DATA_TESTS=./examples/data/exercise*.rb
24
+ for f in $DATA_TESTS
25
+ do
26
+ echo "========== Running $f =========="
27
+ ruby -I lib $f
28
+ done
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mux_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mux SDK Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-12 00:00:00.000000000 Z
11
+ date: 2020-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -447,6 +447,7 @@ files:
447
447
  - spec/models/video_view_response_spec.rb
448
448
  - spec/models/video_view_spec.rb
449
449
  - spec/spec_helper.rb
450
+ - test.sh
450
451
  homepage: https://mux.com
451
452
  licenses:
452
453
  - MIT
@@ -466,86 +467,85 @@ required_rubygems_version: !ruby/object:Gem::Requirement
466
467
  - !ruby/object:Gem::Version
467
468
  version: '0'
468
469
  requirements: []
469
- rubyforge_project:
470
- rubygems_version: 2.5.2.3
470
+ rubygems_version: 3.1.3
471
471
  signing_key:
472
472
  specification_version: 4
473
473
  summary: Ruby API wrapper for Mux
474
474
  test_files:
475
- - spec/api/metrics_api_spec.rb
476
- - spec/api/video_views_api_spec.rb
477
475
  - spec/api/url_signing_keys_api_spec.rb
478
- - spec/api/assets_api_spec.rb
479
- - spec/api/errors_api_spec.rb
476
+ - spec/api/exports_api_spec.rb
477
+ - spec/api/video_views_api_spec.rb
478
+ - spec/api/filters_api_spec.rb
480
479
  - spec/api/delivery_usage_api_spec.rb
480
+ - spec/api/assets_api_spec.rb
481
481
  - spec/api/direct_uploads_api_spec.rb
482
- - spec/api/filters_api_spec.rb
482
+ - spec/api/errors_api_spec.rb
483
483
  - spec/api/live_streams_api_spec.rb
484
- - spec/api/exports_api_spec.rb
484
+ - spec/api/metrics_api_spec.rb
485
485
  - spec/api_client_spec.rb
486
486
  - spec/configuration_spec.rb
487
- - spec/models/error_spec.rb
488
- - spec/models/list_breakdown_values_response_spec.rb
489
- - spec/models/update_asset_mp4_support_request_spec.rb
490
- - spec/models/create_track_response_spec.rb
491
- - spec/models/list_filters_response_spec.rb
487
+ - spec/models/list_errors_response_spec.rb
488
+ - spec/models/create_track_request_spec.rb
489
+ - spec/models/asset_master_spec.rb
490
+ - spec/models/upload_spec.rb
491
+ - spec/models/create_simulcast_target_request_spec.rb
492
+ - spec/models/list_uploads_response_spec.rb
492
493
  - spec/models/playback_policy_spec.rb
493
- - spec/models/signing_key_response_spec.rb
494
- - spec/models/input_info_spec.rb
495
- - spec/models/signal_live_stream_complete_response_spec.rb
496
- - spec/models/create_playback_id_request_spec.rb
494
+ - spec/models/update_asset_mp4_support_request_spec.rb
495
+ - spec/models/input_file_spec.rb
496
+ - spec/models/create_live_stream_request_spec.rb
497
+ - spec/models/metric_spec.rb
498
+ - spec/models/playback_id_spec.rb
499
+ - spec/models/simulcast_target_response_spec.rb
497
500
  - spec/models/live_stream_response_spec.rb
501
+ - spec/models/list_video_views_response_spec.rb
502
+ - spec/models/asset_static_renditions_spec.rb
503
+ - spec/models/create_track_response_spec.rb
498
504
  - spec/models/get_overall_values_response_spec.rb
499
- - spec/models/list_signing_keys_response_spec.rb
500
- - spec/models/video_view_response_spec.rb
501
- - spec/models/video_view_spec.rb
502
505
  - spec/models/insight_spec.rb
503
- - spec/models/list_delivery_usage_response_spec.rb
504
- - spec/models/list_errors_response_spec.rb
505
- - spec/models/create_upload_request_spec.rb
506
- - spec/models/simulcast_target_response_spec.rb
507
506
  - spec/models/list_filters_response_data_spec.rb
508
- - spec/models/signing_key_spec.rb
509
- - spec/models/get_metric_timeseries_data_response_spec.rb
510
- - spec/models/track_spec.rb
507
+ - spec/models/list_all_metric_values_response_spec.rb
511
508
  - spec/models/get_asset_playback_id_response_spec.rb
512
- - spec/models/score_spec.rb
509
+ - spec/models/signing_key_response_spec.rb
513
510
  - spec/models/breakdown_value_spec.rb
511
+ - spec/models/video_view_event_spec.rb
512
+ - spec/models/asset_static_renditions_files_spec.rb
513
+ - spec/models/create_playback_id_request_spec.rb
514
514
  - spec/models/list_live_streams_response_spec.rb
515
- - spec/models/list_all_metric_values_response_spec.rb
516
- - spec/models/update_asset_master_access_request_spec.rb
517
- - spec/models/input_file_spec.rb
518
- - spec/models/abridged_video_view_spec.rb
519
- - spec/models/overall_values_spec.rb
520
- - spec/models/list_insights_response_spec.rb
521
- - spec/models/list_uploads_response_spec.rb
522
- - spec/models/input_settings_overlay_settings_spec.rb
523
515
  - spec/models/asset_errors_spec.rb
524
- - spec/models/asset_static_renditions_files_spec.rb
525
- - spec/models/list_exports_response_spec.rb
516
+ - spec/models/abridged_video_view_spec.rb
517
+ - spec/models/list_filter_values_response_spec.rb
518
+ - spec/models/upload_error_spec.rb
519
+ - spec/models/list_breakdown_values_response_spec.rb
520
+ - spec/models/filter_value_spec.rb
521
+ - spec/models/create_playback_id_response_spec.rb
522
+ - spec/models/update_asset_master_access_request_spec.rb
526
523
  - spec/models/upload_response_spec.rb
524
+ - spec/models/input_settings_spec.rb
525
+ - spec/models/video_view_response_spec.rb
526
+ - spec/models/get_asset_input_info_response_spec.rb
527
527
  - spec/models/simulcast_target_spec.rb
528
+ - spec/models/error_spec.rb
529
+ - spec/models/list_exports_response_spec.rb
530
+ - spec/models/delivery_report_spec.rb
531
+ - spec/models/list_insights_response_spec.rb
532
+ - spec/models/signal_live_stream_complete_response_spec.rb
528
533
  - spec/models/list_assets_response_spec.rb
534
+ - spec/models/overall_values_spec.rb
535
+ - spec/models/create_upload_request_spec.rb
529
536
  - spec/models/asset_response_spec.rb
530
- - spec/models/filter_value_spec.rb
531
- - spec/models/create_live_stream_request_spec.rb
532
- - spec/models/list_filter_values_response_spec.rb
533
- - spec/models/upload_spec.rb
534
- - spec/models/create_asset_request_spec.rb
535
- - spec/models/get_asset_input_info_response_spec.rb
536
- - spec/models/create_simulcast_target_request_spec.rb
537
- - spec/models/create_playback_id_response_spec.rb
538
- - spec/models/list_video_views_response_spec.rb
539
537
  - spec/models/asset_spec.rb
540
- - spec/models/metric_spec.rb
541
- - spec/models/upload_error_spec.rb
542
- - spec/models/create_track_request_spec.rb
543
- - spec/models/playback_id_spec.rb
544
- - spec/models/live_stream_spec.rb
545
- - spec/models/input_settings_spec.rb
546
- - spec/models/delivery_report_spec.rb
547
- - spec/models/asset_static_renditions_spec.rb
538
+ - spec/models/list_filters_response_spec.rb
539
+ - spec/models/list_signing_keys_response_spec.rb
548
540
  - spec/models/input_track_spec.rb
549
- - spec/models/asset_master_spec.rb
550
- - spec/models/video_view_event_spec.rb
541
+ - spec/models/live_stream_spec.rb
542
+ - spec/models/signing_key_spec.rb
543
+ - spec/models/list_delivery_usage_response_spec.rb
544
+ - spec/models/track_spec.rb
545
+ - spec/models/video_view_spec.rb
546
+ - spec/models/input_settings_overlay_settings_spec.rb
547
+ - spec/models/input_info_spec.rb
548
+ - spec/models/get_metric_timeseries_data_response_spec.rb
549
+ - spec/models/create_asset_request_spec.rb
550
+ - spec/models/score_spec.rb
551
551
  - spec/spec_helper.rb