evostream-event 2.0.2.pre.994185738 → 2.0.3.pre.1265906291

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: 98affe08733c00e50b5771f59db5a2d68959080577951f55dad445f21d5ebcb2
4
- data.tar.gz: cd03b3e5fc877bb6033409514af4b812fe8beb03c8e603d8425587aed0eb79a5
3
+ metadata.gz: d64da07d24e0a0422fe3c21eedb0001b7e031dd7c4958b4f6ed714cf42d30467
4
+ data.tar.gz: 97de03901dc5980bee3bb873f9859b7f95380ee836ee260a4627c41f346ee016
5
5
  SHA512:
6
- metadata.gz: 45897e6c1aa70d8e959c23cd1baca3e45efcab1d61472e5771775e44cfb09b9b9d669a97236b82df2214b5186f1fa23f3c9bc05f923209c8d2f2e290a42aa3c1
7
- data.tar.gz: 64c213ad6679cc4ed23436007b72cd25ba8d293255a435b6be09689aac12e60d83aa7bb390d13251886d3c7e7fa56784dacfa8506d05ff89386d788327a348d4
6
+ metadata.gz: a259b788e794644eb9638a8932cd8427734178ad51fea7f877f5e34d9e74c7bcd4091e1231055ad55ec8c9e4197bf9f148f07ee620239e7fed70c1746e1d0636
7
+ data.tar.gz: 44c519765f21b11be0223baad5b5031aba6a67ee8bb69cf27ee45113d12e31bbaf60fecaad5b31ef01a634cf01838c250e7bf15da72283a2ead11a09511c4dd5
@@ -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.2'
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.2.pre.994185738
4
+ version: 2.0.3.pre.1265906291
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