evostream-event 1.0.3 → 2.0.0.pre.856454391

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -2
  3. data/lib/evostream/cli/option/argument.rb +2 -0
  4. data/lib/evostream/cli/option/search.rb +2 -0
  5. data/lib/evostream/cli/runner.rb +1 -1
  6. data/lib/evostream/event/commands.rb +1 -1
  7. data/lib/evostream/event/commands/create/dash.rb +1 -1
  8. data/lib/evostream/event/commands/create/hls.rb +1 -1
  9. data/lib/evostream/event/commands/destroy.rb +1 -1
  10. data/lib/evostream/event/commands/get_stream_info.rb +1 -1
  11. data/lib/evostream/event/commands/list_streams.rb +1 -1
  12. data/lib/evostream/event/commands/push_stream.rb +1 -1
  13. data/lib/evostream/event/commands/set_log_level.rb +1 -1
  14. data/lib/evostream/event/event/events.rb +2 -2
  15. data/lib/evostream/event/event/events/in_stream_created.rb +2 -0
  16. data/lib/evostream/event/event/events/out_stream_created.rb +2 -2
  17. data/lib/evostream/event/info.rb +2 -2
  18. data/spec/evostream/{action/action_spec.rb → action_spec.rb} +11 -11
  19. data/spec/{cli → evostream/cli}/argument/command_spec.rb +2 -0
  20. data/spec/{cli → evostream/cli}/argument/config_spec.rb +2 -0
  21. data/spec/evostream/cli/argument/help_spec.rb +26 -0
  22. data/spec/{cli → evostream/cli}/argument/host_spec.rb +2 -0
  23. data/spec/{cli → evostream/cli}/argument/port_spec.rb +2 -0
  24. data/spec/{cli → evostream/cli}/argument/search_spec.rb +2 -0
  25. data/spec/{cli → evostream/cli}/argument/version_spec.rb +2 -0
  26. data/spec/evostream/commands/create_dash_spec.rb +3 -3
  27. data/spec/evostream/commands/create_hls_spec.rb +27 -27
  28. data/spec/evostream/commands/create_spec.rb +22 -22
  29. data/spec/evostream/commands/{push_stream_spec.rb → destroy_push_stream_spec.rb} +3 -3
  30. data/spec/evostream/commands/destroy_spec.rb +6 -6
  31. data/spec/evostream/commands/get_stream_info_spec.rb +4 -4
  32. data/spec/evostream/commands/{list_stream_spec.rb → list_streams_spec.rb} +2 -2
  33. data/spec/evostream/commands/set_log_level_spec.rb +3 -3
  34. data/spec/evostream/events/events_spec.rb +1 -1
  35. data/spec/evostream/events/in_stream_closed_spec.rb +82 -0
  36. data/spec/evostream/events/in_stream_created_spec.rb +75 -0
  37. data/spec/evostream/events/{request_out_stream_created_spec.rb → out_stream_created_spec.rb} +61 -67
  38. data/spec/features/push_stream_spec.rb +4 -2
  39. data/spec/features/remove_config_spec.rb +4 -2
  40. data/spec/spec_helper.rb +8 -8
  41. data/spec/support/examples_arguments.rb +5 -0
  42. data/spec/support/fake_evostream.rb +14 -18
  43. metadata +66 -85
  44. data/spec/cli/argument/help_spec.rb +0 -28
  45. data/spec/evostream/event/event_spec.rb +0 -0
  46. data/spec/evostream/events/request_in_stream_closed_spec.rb +0 -82
  47. data/spec/evostream/events/request_in_stream_created_spec.rb +0 -75
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0abab5facb9d027fa0f8f8a1f91ca30cab11fe7c5c3a08b106388b3a464c9b6
4
- data.tar.gz: a1b86f16a56a096552d32a065ecf9753dd6e09903b1641c538bb175a46cf12db
3
+ metadata.gz: '093eb3e07b2f523250a5a2e199a15b17562805e90c6b29755caddd30b75fce05'
4
+ data.tar.gz: e2b673ecd9c486a7399c3672c408e5062ae3088b0163d42f7ee3a113e6f93b79
5
5
  SHA512:
6
- metadata.gz: 73ec677fb1ca3695ed02e2a5ee12476a4a0c56345830a7cb7ea15d5989c79aeea9a288be329d6a394e9a1060c03389e5b1378fba3e5951f5b66dc933a22c0736
7
- data.tar.gz: ddc809746ba2cc871c05239b3c4b01d9691808235634dea18c64c7443cc54b0cd80ee559b23590fa4153545925b85b26516542fcbb39782e8deda4daaae3fa80
6
+ metadata.gz: 23ad6389147da6541fde00db04881f39d88f242fb955b4b5023e90cc0d51366c6aba12595d2df8132010453cbcda5b3333f7d1617bd9e74327721ba95c67e42d
7
+ data.tar.gz: e1558f307267ec8d76054dfefdc7e3f4c2f5ce5d09f38cd3143d9175706d6a256337ddb906606fa13f39d27865e6926ac95fa4d5956c4944ee31187f00dc60c9
data/README.md CHANGED
@@ -1,4 +1,11 @@
1
- # Evostream::Event | [![Build Status](https://travis-ci.org/Dev-Crea/evostream-event.svg?branch=master)](https://travis-ci.org/Dev-Crea/evostream-event) [![Gem Version](https://badge.fury.io/rb/evostream-event.svg)](https://badge.fury.io/rb/evostream-event) [![inline docs](https://inch-ci.org/github/Dev-Crea/evostream-event.svg)](https://inch-ci.org/github/Dev-Crea/evostream-event) [![Maintainability](https://api.codeclimate.com/v1/badges/8fc5d78d80473fd9ae3e/maintainability)](https://codeclimate.com/github/Dev-Crea/cli-evostream/maintainability)
1
+ # Evostream::Event
2
+ [![RSpec](https://github.com/dazzl-tv/evostream-event/actions/workflows/rspec.yml/badge.svg?branch=develop&event=pull_request)](https://github.com/dazzl-tv/evostream-event/actions/workflows/rspec.yml)
3
+ [![Linter](https://github.com/dazzl-tv/evostream-event/actions/workflows/linter.yml/badge.svg)](https://github.com/dazzl-tv/evostream-event/actions/workflows/linter.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/evostream-event.svg)](https://badge.fury.io/rb/evostream-event)
5
+ [![Docs](https://inch-ci.org/github/dazzl-tv/evostream-event.svg)](https://inch-ci.org/github/dazzl-tv/evostream-event)
6
+ [![Maintainability](https://api.codeclimate.com/v1/badges/e3096c50f57e0cb1b83a/maintainability)](https://codeclimate.com/github/dazzl-tv/evostream-event/maintainability)
7
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/e3096c50f57e0cb1b83a/test_coverage)](https://codeclimate.com/github/dazzl-tv/evostream-event/test_coverage)
8
+ [![Known Vulnerabilities](https://snyk.io/test/github/dazzl-tv/evostream-event/badge.svg)](https://snyk.io/test/github/dazzl-tv/evostream-event)
2
9
 
3
10
  Evostream Event listen event to Evostream and execute task.
4
11
 
@@ -116,6 +123,6 @@ git commits and tags, and push the `.gem` file to
116
123
  ## Contributing
117
124
 
118
125
  Bug reports and pull requests are welcome on GitHub at
119
- https://github.com/Dev-Crea/evostream-event. This project is intended to be a
126
+ https://github.com/dazzl-tv/evostream-event. This project is intended to be a
120
127
  safe, welcoming space for collaboration, and contributors are expected to adhere
121
128
  to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # :reek:UtilityFunction
4
+
3
5
  module Evostream
4
6
  module CLI
5
7
  module Argument
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # :reek:UtilityFunction
4
+
3
5
  module Evostream
4
6
  module CLI
5
7
  module Argument
@@ -5,7 +5,6 @@ require 'colorize'
5
5
  require 'timeout'
6
6
  require 'socket'
7
7
  require 'yaml'
8
- require 'yaml/dbm'
9
8
 
10
9
  $LOAD_PATH.unshift(__dir__)
11
10
  require 'option'
@@ -20,6 +19,7 @@ require 'event'
20
19
  # :reek:TooManyStatements
21
20
  # :reek:DuplicateMethodCall
22
21
  # :reek:NilCheck
22
+ # :reek:UtilityFunction
23
23
 
24
24
  module Evostream
25
25
  # Execute CLI with this gem
@@ -30,7 +30,7 @@ module Evostream
30
30
  private
31
31
 
32
32
  # Encode commands in base 64 with space between each command
33
- def encode_64
33
+ def encode64
34
34
  Base64.strict_encode64(@command.join(' '))
35
35
  end
36
36
 
@@ -15,7 +15,7 @@ module Evostream
15
15
 
16
16
  def cmd
17
17
  super
18
- "createDASHStream?params=#{encode_64}"
18
+ "createDASHStream?params=#{encode64}"
19
19
  end
20
20
 
21
21
  private
@@ -17,7 +17,7 @@ module Evostream
17
17
 
18
18
  def cmd
19
19
  super
20
- "createHLSStream?params=#{encode_64}"
20
+ "createHLSStream?params=#{encode64}"
21
21
  end
22
22
 
23
23
  private
@@ -13,7 +13,7 @@ module Evostream
13
13
 
14
14
  def cmd
15
15
  super
16
- "removeConfig?params=#{encode_64}"
16
+ "removeConfig?params=#{encode64}"
17
17
  end
18
18
 
19
19
  private
@@ -12,7 +12,7 @@ module Evostream
12
12
 
13
13
  def cmd
14
14
  super
15
- "getStreamInfo?params=#{encode_64}"
15
+ "getStreamInfo?params=#{encode64}"
16
16
  end
17
17
 
18
18
  private
@@ -12,7 +12,7 @@ module Evostream
12
12
 
13
13
  def cmd
14
14
  super
15
- "listStreams?params=#{encode_64}"
15
+ "listStreams?params=#{encode64}"
16
16
  end
17
17
 
18
18
  private
@@ -14,7 +14,7 @@ module Evostream
14
14
 
15
15
  def cmd
16
16
  super
17
- "pushStream?params=#{encode_64}"
17
+ "pushStream?params=#{encode64}"
18
18
  end
19
19
 
20
20
  private
@@ -12,7 +12,7 @@ module Evostream
12
12
 
13
13
  def cmd
14
14
  super
15
- "setLogLevel?params=#{encode_64}"
15
+ "setLogLevel?params=#{encode64}"
16
16
  end
17
17
 
18
18
  private
@@ -12,9 +12,9 @@ module Evostream
12
12
  @result = nil
13
13
  end
14
14
 
15
- def execute(type_flux = %w[hls dash])
15
+ def execute(type_flux = %w[hls dash], &block)
16
16
  Evostream.logger "Execute action for event #{class_name}"
17
- type_flux.each { |flux| yield(flux) } if block_given?
17
+ type_flux.each(&block) if block
18
18
  @result
19
19
  end
20
20
 
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # :reek:UtilityFunction
4
+
3
5
  module Evostream
4
6
  module Events
5
7
  # Action inStreamCreated
@@ -42,8 +42,8 @@ module Evostream
42
42
  end
43
43
 
44
44
  def ex_flux
45
- Evostream::Service.uri_out + '/' + name_settings['groupName'] + '/' +
46
- @request['name'] + '/' + name_settings[name_flux]
45
+ "#{Evostream::Service.uri_out}/#{name_settings['groupName']}" \
46
+ "/#{@request['name']}/#{name_settings[name_flux]}"
47
47
  end
48
48
 
49
49
  def select_key_setting
@@ -6,7 +6,7 @@
6
6
  # Define constant to gem.
7
7
  module Evostream
8
8
  # Define version to gem
9
- VERSION = '1.0.3'
9
+ VERSION = '2.0.0'
10
10
 
11
11
  # Name to gem
12
12
  GEM_NAME = 'evostream-event'
@@ -29,7 +29,7 @@ module Evostream
29
29
  DESC
30
30
 
31
31
  # Define homepage
32
- HOMEPAGE = 'https://github.com/Dev-Crea/evostream-event'
32
+ HOMEPAGE = 'https://github.com/dazzl-tv/evostream-event'
33
33
 
34
34
  # Define a post install message
35
35
  POST_INSTALL = \
@@ -3,14 +3,14 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe Evostream::Action, type: :request do
6
- let(:action) { Evostream::Action.new(payload) }
6
+ let(:action) { described_class.new(payload) }
7
7
  let(:payload) { {} }
8
8
 
9
- it 'should be a hash' do
9
+ it 'is a hash' do
10
10
  expect(action.instance_variable_get(:@payload)).to be_kind_of(Hash)
11
11
  end
12
12
 
13
- describe 'push_stream' do
13
+ describe 'when push_stream' do
14
14
  let(:action_name) { 'pushStream' }
15
15
  let(:payload) do
16
16
  {
@@ -20,27 +20,27 @@ describe Evostream::Action, type: :request do
20
20
  }
21
21
  end
22
22
 
23
- context 'global Evostream variable' do
23
+ context 'with global Evostream variable' do
24
24
  include_examples 'test request action'
25
25
  end
26
26
 
27
- context 'local Evostream variable' do
28
- let(:action) { Evostream::Action.new(payload, 'evostream.dazzl.local') }
27
+ context 'with local Evostream variable' do
28
+ let(:action) { described_class.new(payload, 'evostream.dazzl.local') }
29
29
 
30
30
  include_examples 'test request action'
31
31
  end
32
32
  end
33
33
 
34
- describe 'remove_config' do
34
+ describe 'when remove_config' do
35
35
  let(:action_name) { 'removeConfig' }
36
- let(:payload) { { id: Faker::Number.between(1, 999_999) } }
36
+ let(:payload) { { id: Faker::Number.between(from: 1, to: 999_999) } }
37
37
 
38
- context 'global Evostream variable' do
38
+ context 'with global Evostream variable' do
39
39
  include_examples 'test request action'
40
40
  end
41
41
 
42
- context 'local Evostream variable' do
43
- let(:action) { Evostream::Action.new(payload, 'evostream.dazzl.local') }
42
+ context 'with local Evostream variable' do
43
+ let(:action) { described_class.new(payload, 'evostream.dazzl.local') }
44
44
 
45
45
  include_examples 'test request action'
46
46
  end
@@ -9,6 +9,7 @@ describe Evostream::CLI::Argument::Command do
9
9
 
10
10
  context 'when short argument' do
11
11
  before { ARGV.push('-c') }
12
+
12
13
  after { ARGV.pop }
13
14
 
14
15
  include_examples 'argument exit'
@@ -17,6 +18,7 @@ describe Evostream::CLI::Argument::Command do
17
18
 
18
19
  context 'when long argument' do
19
20
  before { ARGV.push('--commands') }
21
+
20
22
  after { ARGV.pop }
21
23
 
22
24
  include_examples 'argument exit'
@@ -4,6 +4,7 @@ require 'spec_helper'
4
4
 
5
5
  describe Evostream::CLI::Argument::Config do
6
6
  before { ARGV.push('--config') }
7
+
7
8
  after { ARGV.pop }
8
9
 
9
10
  let(:runner) { Evostream::Runner.new }
@@ -18,6 +19,7 @@ describe Evostream::CLI::Argument::Config do
18
19
 
19
20
  context 'when argument with exit file', broken: true do
20
21
  before { ARGV.push('.travis/evostream-configuration.yml') }
22
+
21
23
  after { ARGV.pop }
22
24
 
23
25
  let(:out) { /Connection to Evostream REFUSED !!/ }
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe Evostream::CLI::Argument::Help do
6
+ after { ARGV.pop }
7
+
8
+ let(:runner) { Evostream::Runner.new }
9
+ let(:out) do
10
+ File.read(File.join(__dir__, '..', '..', '..', '..',
11
+ 'lib', 'evostream', 'cli', 'option', 'help'))
12
+ end
13
+ let(:code) { 0 }
14
+
15
+ context 'when short argument' do
16
+ before { ARGV.push('-h') }
17
+
18
+ include_examples 'argument help'
19
+ end
20
+
21
+ context 'when long argument' do
22
+ before { ARGV.push('--help') }
23
+
24
+ include_examples 'argument help'
25
+ end
26
+ end
@@ -4,6 +4,7 @@ require 'spec_helper'
4
4
 
5
5
  describe Evostream::CLI::Argument::Host, type: :cli do
6
6
  before { ARGV.push('--server') }
7
+
7
8
  after { ARGV.pop }
8
9
 
9
10
  let(:runner) { Evostream::Runner.new }
@@ -18,6 +19,7 @@ describe Evostream::CLI::Argument::Host, type: :cli do
18
19
 
19
20
  context 'when argument with host given', broken: true do
20
21
  before { ARGV.push('127.0.0.1') }
22
+
21
23
  after { ARGV.pop }
22
24
 
23
25
  let(:out) { /Connection to Evostream REFUSED !!/ }
@@ -4,6 +4,7 @@ require 'spec_helper'
4
4
 
5
5
  describe Evostream::CLI::Argument::Port, type: :cli do
6
6
  before { ARGV.push('--port') }
7
+
7
8
  after { ARGV.pop }
8
9
 
9
10
  let(:runner) { Evostream::Runner.new }
@@ -18,6 +19,7 @@ describe Evostream::CLI::Argument::Port, type: :cli do
18
19
 
19
20
  context 'when argumentw with port given', broken: true do
20
21
  before { ARGV.push(5489) }
22
+
21
23
  after { ARGV.pop }
22
24
 
23
25
  let(:out) { /No command executed !! No command precise\./ }
@@ -7,6 +7,7 @@ describe Evostream::CLI::Argument::Search, broken: true do
7
7
 
8
8
  context 'when short argument' do
9
9
  before { ARGV.push('--search') }
10
+
10
11
  after { ARGV.pop }
11
12
 
12
13
  context 'when argument with no search data' do
@@ -19,6 +20,7 @@ describe Evostream::CLI::Argument::Search, broken: true do
19
20
 
20
21
  context 'when argument with search data', broken: true do
21
22
  before { ARGV.push('id: 4') }
23
+
22
24
  after { ARGV.pop }
23
25
 
24
26
  let(:out) { /Connection to Evostream REFUSED !!/ }
@@ -9,6 +9,7 @@ describe Evostream::CLI::Argument::Version do
9
9
 
10
10
  context 'when short argument' do
11
11
  before { ARGV.push('-v') }
12
+
12
13
  after { ARGV.pop }
13
14
 
14
15
  include_examples 'argument exit'
@@ -17,6 +18,7 @@ describe Evostream::CLI::Argument::Version do
17
18
 
18
19
  context 'when long argument' do
19
20
  before { ARGV.push('--version') }
21
+
20
22
  after { ARGV.pop }
21
23
 
22
24
  include_examples 'argument exit'
@@ -3,9 +3,9 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe Evostream::Commands::CreateDASH do
6
- let(:command) { Evostream::Commands::CreateDASH }
6
+ let(:command) { described_class }
7
7
 
8
- context 'manifest_name' do
8
+ context 'when manifest_name' do
9
9
  let(:arg_value) { Faker::Games::Pokemon.name }
10
10
  let(:argument) { 'manifest_name' }
11
11
 
@@ -16,7 +16,7 @@ describe Evostream::Commands::CreateDASH do
16
16
  let(:cmd) do
17
17
  {
18
18
  local_stream_names: Faker::Games::Pokemon.name,
19
- target_folder: Faker::File.file_name('/path/to')
19
+ target_folder: Faker::File.file_name(dir: '/path/to')
20
20
  }
21
21
  end
22
22
 
@@ -3,101 +3,101 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe Evostream::Commands::CreateHLS do
6
- let(:command) { Evostream::Commands::CreateHLS }
6
+ let(:command) { described_class }
7
7
 
8
- context 'create_master_playlist' do
9
- let(:arg_value) { Faker::Number.between(0, 1) }
8
+ context 'when create_master_playlist' do
9
+ let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
10
10
  let(:argument) { 'create_master_playlist' }
11
11
 
12
12
  include_examples 'command raise'
13
13
  end
14
14
 
15
- context 'playlist_name' do
15
+ context 'when playlist_name' do
16
16
  let(:arg_value) { Faker::Games::Pokemon.name }
17
17
  let(:argument) { 'playlist_name' }
18
18
 
19
19
  include_examples 'command raise'
20
20
  end
21
21
 
22
- context 'max_chunk_length' do
23
- let(:arg_value) { Faker::Number.between(0, 1) }
22
+ context 'when max_chunk_length' do
23
+ let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
24
24
  let(:argument) { 'max_chunk_length' }
25
25
 
26
26
  include_examples 'command raise'
27
27
  end
28
28
 
29
- context 'chunk_base_name' do
29
+ context 'when chunk_base_name' do
30
30
  let(:arg_value) { Faker::Games::Pokemon.name }
31
31
  let(:argument) { 'chunk_base_name' }
32
32
 
33
33
  include_examples 'command raise'
34
34
  end
35
35
 
36
- context 'drm_type' do
36
+ context 'when drm_type' do
37
37
  let(:arg_value) { Faker::Games::Pokemon.name }
38
38
  let(:argument) { 'drm_type' }
39
39
 
40
40
  include_examples 'command raise'
41
41
  end
42
42
 
43
- context 'aes_key_count', broken: true do
44
- let(:arg_value) { Faker::Number.between(1, 99) }
43
+ context 'when aes_key_count', broken: true do
44
+ let(:arg_value) { Faker::Number.between(from: 1, to: 99) }
45
45
  let(:argument) { 'aes_key_count' }
46
46
 
47
47
  include_examples 'command raise'
48
48
  end
49
49
 
50
- context 'audio_only' do
51
- let(:arg_value) { Faker::Number.between(0, 1) }
50
+ context 'when audio_only' do
51
+ let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
52
52
  let(:argument) { 'audio_only' }
53
53
 
54
54
  include_examples 'command raise'
55
55
  end
56
56
 
57
- context 'hls_resume' do
58
- let(:arg_value) { Faker::Number.between(0, 1) }
57
+ context 'when hls_resume' do
58
+ let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
59
59
  let(:argument) { 'hls_resume' }
60
60
 
61
61
  include_examples 'command raise'
62
62
  end
63
63
 
64
- context 'cleanup_on_close' do
65
- let(:arg_value) { Faker::Number.between(0, 1) }
64
+ context 'when cleanup_on_close' do
65
+ let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
66
66
  let(:argument) { 'cleanup_on_close' }
67
67
 
68
68
  include_examples 'command raise'
69
69
  end
70
70
 
71
- context 'use_byte_range' do
72
- let(:arg_value) { Faker::Number.between(0, 1) }
71
+ context 'when use_byte_range' do
72
+ let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
73
73
  let(:argument) { 'use_byte_range' }
74
74
 
75
75
  include_examples 'command raise'
76
76
  end
77
77
 
78
- context 'file_length' do
79
- let(:arg_value) { Faker::Number.between(0, 1) }
78
+ context 'when file_length' do
79
+ let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
80
80
  let(:argument) { 'file_length' }
81
81
 
82
82
  include_examples 'command raise'
83
83
  end
84
84
 
85
- context 'use_system_time' do
86
- let(:arg_value) { Faker::Number.between(0, 1) }
85
+ context 'when use_system_time' do
86
+ let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
87
87
  let(:argument) { 'use_system_time' }
88
88
 
89
89
  include_examples 'command raise'
90
90
  end
91
91
 
92
- context 'offset_time' do
93
- let(:arg_value) { Faker::Number.between(0, 1) }
92
+ context 'when offset_time' do
93
+ let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
94
94
  let(:argument) { 'offset_time' }
95
95
 
96
96
  include_examples 'command raise'
97
97
  end
98
98
 
99
- context 'start_offset' do
100
- let(:arg_value) { Faker::Number.between(0, 1) }
99
+ context 'when start_offset' do
100
+ let(:arg_value) { Faker::Number.between(from: 0, to: 1) }
101
101
  let(:argument) { 'start_offset' }
102
102
 
103
103
  include_examples 'command raise'
@@ -107,7 +107,7 @@ describe Evostream::Commands::CreateHLS do
107
107
  let(:cmd) do
108
108
  {
109
109
  local_stream_names: Faker::Games::Pokemon.name,
110
- target_folder: Faker::File.file_name('/path/to')
110
+ target_folder: Faker::File.file_name(dir: '/path/to')
111
111
  }
112
112
  end
113
113