evostream-event 2.0.2 → 2.0.3.pre.1265752332

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: 57882bb0af73b0f41502b80ff9d217a5edfa49b5dbe007e3b37d0c8d63e9912d
4
- data.tar.gz: ab88b156512ff13825bfbc04f9a879daa2c9c4c320b423cf1cee27f441cc2f04
3
+ metadata.gz: 52320cffa9d3d3d74f7466329d164d0f959f353aa8aa75f5afd30a85cd76b86c
4
+ data.tar.gz: 5cfcd6ff517b9c3366f1133a91498d4a6d8fef4cc9aa0caeb6268b26a91929c9
5
5
  SHA512:
6
- metadata.gz: d60527aecd686249c5a26c9d175721a632147895d77a119b047d246334b03f8a3dd1f0bb165f5aeb5b2ac83a851264aa6af744a19d51ac632fce7aadbddfd24c
7
- data.tar.gz: 6ff9fc01e9a2c2f3cbd61aafe02205b9612c8936f0546af5f363864cc2a8c8530f3b1fb519e77cdec81646e58e53b2f667e731cf3335905747b80fe6be026209
6
+ metadata.gz: 657beb8931934439e61551dfdaffa59637f63f1e92e1b94b7ee1b4ba57c517220f01596c426fe696076e778c54ecdc2dd1ebf1e8de28accef6d4221b6446cc3b
7
+ data.tar.gz: 9516f17e3544c077e26bf754e1592549a5563f6313ac4877b653aefc78af76e54da591c1446042ddb97f749c660b46fb665c5385f977858a4f6387e1107a8050
@@ -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
4
+ version: 2.0.3.pre.1265752332
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
@@ -344,9 +346,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
344
346
  version: 2.6.0
345
347
  required_rubygems_version: !ruby/object:Gem::Requirement
346
348
  requirements:
347
- - - ">="
349
+ - - ">"
348
350
  - !ruby/object:Gem::Version
349
- version: '0'
351
+ version: 1.3.1
350
352
  requirements: []
351
353
  rubygems_version: 3.0.3.1
352
354
  signing_key: