evostream-event 2.0.0.pre.994170151 → 2.0.3.pre.1265756691

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
2
  SHA256:
3
- metadata.gz: 2ca27b848fcc51dbf980eb1a8972360cec5acbe076eb2c4fe76db38b9dbe1f4c
4
- data.tar.gz: 6cac737e9717a17e989c49d8ae06b639ba51e115b1b6de397f398b9c6bd5e893
3
+ metadata.gz: 397175ace88cd6195b3988cf188670c2420a177f333d8039e35f032be7f30e1f
4
+ data.tar.gz: 39b073a7a2b03e7526807519645d094574826f81d1169af581a9fc21e67b1469
5
5
  SHA512:
6
- metadata.gz: 0f277c38700384af11c8d854e5ab171c5a646dcb202e0649eb007c859f6538dd06c7d476ba20bc821732b5a90490ae42272834c9ba2109760da7f8771eb78233
7
- data.tar.gz: b4e68d3a8e208ac4c7c63d3d21dd60971081f2cf2acc3c3b2785c7bf421bdbee5de1ef50ac7801cc7a9f6ef6857311eaa1ba10188221a519426e5befbd05bab5
6
+ metadata.gz: f2b98af0e55bc9d8b7af791ea7ba204a55e0a9bbd4e732e16968d06c1f8438bf7033da0dca626539b2d1ae8185be0ee4a91bd3da7ef1815677f763233b3ff86b
7
+ data.tar.gz: 2eb3b5f6d1718db2bad2ee3f568f7fffbb638f2417dcb542441f0a061f0bf657f7fdd6b7b7f55a2b5a495d1674509264cfa1dacdcc26fc9e0f1708fa34f60fcb
@@ -3,9 +3,9 @@
3
3
  module Evostream
4
4
  # Concern all command sending to evoStream
5
5
  module Commands
6
- # Abstract class for create element
6
+ # Send command for destroy ressource to Evostream server
7
7
  class RemoveConfig < Command
8
- MANDATORY = %w[id].freeze
8
+ MANDATORY = %w[].freeze
9
9
 
10
10
  def initialize(commands = { group_name: 'null', remove_hls_hds_files: 1 })
11
11
  super(commands)
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Evostream
4
+ module Commands
5
+ # Send command transcode
6
+ # @see https://docs.evostream.com/2.0/transcode.html
7
+ class Transcode < Command
8
+ MANDATORY = %w[source destinations].freeze
9
+
10
+ def initialize(commands = {
11
+ source: 'null', destinations: 'null'
12
+ })
13
+ super(commands)
14
+ end
15
+
16
+ def cmd
17
+ super
18
+ "transcode?params=#{encode64}"
19
+ end
20
+
21
+ private
22
+
23
+ attr_reader :command
24
+
25
+ def source(param)
26
+ "source=#{param}"
27
+ end
28
+
29
+ def group_name(param)
30
+ "groupName=#{param}"
31
+ end
32
+
33
+ def video_bitrates(param)
34
+ "videoBitrates=#{param}"
35
+ end
36
+
37
+ def audio_bitrates(param)
38
+ "audioBitrates=#{param}"
39
+ end
40
+
41
+ def destinations(param = 'null')
42
+ "destinations=#{param}"
43
+ end
44
+ end
45
+ end
46
+ end
@@ -59,3 +59,4 @@ require 'evostream/event/commands/list_config'
59
59
  require 'evostream/event/commands/list_streams'
60
60
  require 'evostream/event/commands/push_stream'
61
61
  require 'evostream/event/commands/set_log_level'
62
+ require 'evostream/event/commands/transcode'
@@ -6,7 +6,7 @@
6
6
  # Define constant to gem.
7
7
  module Evostream
8
8
  # Define version to gem
9
- VERSION = '2.0.0'
9
+ VERSION = '2.0.3'
10
10
 
11
11
  # Name to gem
12
12
  GEM_NAME = 'evostream-event'
@@ -12,16 +12,14 @@ describe Evostream::Commands::Destroy do
12
12
  end
13
13
 
14
14
  context 'when remove_hls_hds_files' do
15
- let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
16
- let(:argument) { 'remove_hls_hds_files' }
15
+ let(:cmd) { { remove_hls_hds_files: Faker::Number.between(from: 0, to: 1).to_s } }
17
16
 
18
- include_examples 'command raise'
17
+ include_examples 'command'
19
18
  end
20
19
 
21
20
  context 'when group_name' do
22
- let(:arg_value) { Faker::Games::Pokemon.name }
23
- let(:argument) { 'group_name' }
21
+ let(:cmd) { { group_name: Faker::Games::Pokemon.name } }
24
22
 
25
- include_examples 'command raise'
23
+ include_examples 'command'
26
24
  end
27
25
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Evostream::Commands::Transcode do
6
+ let(:command) { described_class }
7
+
8
+ context 'when audio_bitrates' do
9
+ let(:arg_value) { Faker::Games::Pokemon.name }
10
+ let(:argument) { 'audio_bitrates' }
11
+
12
+ include_examples 'command raise'
13
+ end
14
+
15
+ context 'with mandatory argument(s)' do
16
+ let(:cmd) do
17
+ {
18
+ source: Faker::Coffee.variety,
19
+ destinations: Faker::Games::Pokemon.name
20
+ }
21
+ end
22
+
23
+ include_examples 'command'
24
+ end
25
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evostream-event
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.994170151
4
+ version: 2.0.3.pre.1265756691
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-02 00:00:00.000000000 Z
11
+ date: 2021-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faker
@@ -266,6 +266,7 @@ files:
266
266
  - lib/evostream/event/commands/list_streams.rb
267
267
  - lib/evostream/event/commands/push_stream.rb
268
268
  - lib/evostream/event/commands/set_log_level.rb
269
+ - lib/evostream/event/commands/transcode.rb
269
270
  - lib/evostream/event/event.rb
270
271
  - lib/evostream/event/event/events.rb
271
272
  - lib/evostream/event/event/events/in_stream_closed.rb
@@ -292,6 +293,7 @@ files:
292
293
  - spec/evostream/commands/get_stream_info_spec.rb
293
294
  - spec/evostream/commands/list_streams_spec.rb
294
295
  - spec/evostream/commands/set_log_level_spec.rb
296
+ - spec/evostream/commands/transcode_spec.rb
295
297
  - spec/evostream/events/events_spec.rb
296
298
  - spec/evostream/events/in_stream_closed_spec.rb
297
299
  - spec/evostream/events/in_stream_created_spec.rb