aruba 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +29 -8
  3. data/.rubocop_todo.yml +100 -146
  4. data/CHANGELOG.md +23 -1
  5. data/CONTRIBUTING.md +0 -8
  6. data/Gemfile +3 -1
  7. data/Rakefile +6 -4
  8. data/appveyor.yml +0 -1
  9. data/aruba.gemspec +7 -4
  10. data/fixtures/cli-app/cli-app.gemspec +3 -2
  11. data/fixtures/cli-app/spec/spec_helper.rb +2 -1
  12. data/fixtures/empty-app/cli-app.gemspec +3 -2
  13. data/lib/aruba/api/bundler.rb +1 -1
  14. data/lib/aruba/api/commands.rb +8 -11
  15. data/lib/aruba/api/core.rb +48 -33
  16. data/lib/aruba/api/environment.rb +12 -4
  17. data/lib/aruba/api/filesystem.rb +27 -23
  18. data/lib/aruba/api/text.rb +15 -3
  19. data/lib/aruba/basic_configuration.rb +5 -6
  20. data/lib/aruba/basic_configuration/option.rb +2 -2
  21. data/lib/aruba/cli.rb +4 -1
  22. data/lib/aruba/config_wrapper.rb +17 -2
  23. data/lib/aruba/configuration.rb +27 -12
  24. data/lib/aruba/console.rb +0 -2
  25. data/lib/aruba/console/help.rb +5 -2
  26. data/lib/aruba/contracts/absolute_path.rb +1 -1
  27. data/lib/aruba/contracts/is_power_of_two.rb +2 -2
  28. data/lib/aruba/contracts/relative_path.rb +1 -1
  29. data/lib/aruba/cucumber/command.rb +83 -64
  30. data/lib/aruba/cucumber/file.rb +42 -22
  31. data/lib/aruba/cucumber/hooks.rb +4 -1
  32. data/lib/aruba/cucumber/testing_frameworks.rb +14 -12
  33. data/lib/aruba/event_bus.rb +4 -2
  34. data/lib/aruba/event_bus/name_resolver.rb +9 -8
  35. data/lib/aruba/events.rb +2 -1
  36. data/lib/aruba/hooks.rb +2 -4
  37. data/lib/aruba/in_config_wrapper.rb +8 -5
  38. data/lib/aruba/initializer.rb +5 -3
  39. data/lib/aruba/matchers/base/base_matcher.rb +2 -11
  40. data/lib/aruba/matchers/base/object_formatter.rb +0 -3
  41. data/lib/aruba/matchers/collection/include_an_object.rb +4 -4
  42. data/lib/aruba/matchers/command/be_successfully_executed.rb +3 -1
  43. data/lib/aruba/matchers/command/have_exit_status.rb +3 -1
  44. data/lib/aruba/matchers/command/have_finished_in_time.rb +3 -1
  45. data/lib/aruba/matchers/command/have_output.rb +3 -1
  46. data/lib/aruba/matchers/command/have_output_on_stderr.rb +3 -1
  47. data/lib/aruba/matchers/command/have_output_on_stdout.rb +3 -1
  48. data/lib/aruba/matchers/directory/have_sub_directory.rb +8 -3
  49. data/lib/aruba/matchers/file/have_file_size.rb +4 -2
  50. data/lib/aruba/matchers/path/have_permissions.rb +4 -2
  51. data/lib/aruba/platforms/announcer.rb +18 -6
  52. data/lib/aruba/platforms/aruba_file_creator.rb +3 -1
  53. data/lib/aruba/platforms/aruba_fixed_size_file_creator.rb +7 -2
  54. data/lib/aruba/platforms/command_monitor.rb +3 -3
  55. data/lib/aruba/platforms/unix_environment_variables.rb +2 -4
  56. data/lib/aruba/platforms/unix_which.rb +1 -1
  57. data/lib/aruba/platforms/windows_environment_variables.rb +2 -1
  58. data/lib/aruba/platforms/windows_which.rb +6 -2
  59. data/lib/aruba/processes/debug_process.rb +4 -2
  60. data/lib/aruba/processes/in_process.rb +4 -2
  61. data/lib/aruba/processes/spawn_process.rb +18 -10
  62. data/lib/aruba/rspec.rb +25 -15
  63. data/lib/aruba/runtime.rb +11 -4
  64. data/lib/aruba/setup.rb +23 -10
  65. data/lib/aruba/tasks/docker_helpers.rb +3 -1
  66. data/lib/aruba/version.rb +1 -1
  67. metadata +22 -8
@@ -12,8 +12,6 @@ module Aruba
12
12
  prepare_for_inspection(object).inspect
13
13
  end
14
14
 
15
- # rubocop:disable Metrics/CyclomaticComplexity
16
-
17
15
  # @private
18
16
  # Prepares the provided object to be formatted by wrapping it as needed
19
17
  # in something that, when `inspect` is called on it, will produce the
@@ -46,7 +44,6 @@ module Aruba
46
44
 
47
45
  InspectableItem.new(inspection)
48
46
  end
49
- # rubocop:enable Metrics/CyclomaticComplexity
50
47
 
51
48
  # @private
52
49
  def self.prepare_hash(input)
@@ -29,9 +29,7 @@ module Aruba
29
29
  # @api private
30
30
  # @return [String]
31
31
  def failure_message
32
- unless iterable?
33
- return "#{improve_hash_formatting(super)}, but was not iterable"
34
- end
32
+ return "#{improve_hash_formatting(super)}, but was not iterable" unless iterable?
35
33
 
36
34
  return failed_objects.first if failed_objects.size == 1
37
35
 
@@ -91,7 +89,9 @@ module Aruba
91
89
 
92
90
  def failure_message_for_item(index, failure_message)
93
91
  failure_message = indent_multiline_message(add_new_line_if_needed(failure_message))
94
- indent_multiline_message("object at index #{index} failed to match:#{failure_message}")
92
+ indent_multiline_message(
93
+ "object at index #{index} failed to match:#{failure_message}"
94
+ )
95
95
  end
96
96
 
97
97
  def add_new_line_if_needed(message)
@@ -29,7 +29,9 @@ RSpec::Matchers.define :be_successfully_executed do
29
29
  end
30
30
 
31
31
  failure_message do |_actual|
32
- "Expected `#{@actual}` to succeed but got non-zero exit status and the following output:\n\n#{@old_actual.output}\n"
32
+ "Expected `#{@actual}` to succeed" \
33
+ ' but got non-zero exit status and the following output:' \
34
+ "\n\n#{@old_actual.output}\n"
33
35
  end
34
36
  end
35
37
 
@@ -23,7 +23,9 @@ RSpec::Matchers.define :have_exit_status do |expected|
23
23
  @old_actual.stop
24
24
  @actual = actual.exit_status
25
25
 
26
- raise "Expected #{@old_actual} to respond to #exit_status" unless @old_actual.respond_to? :exit_status
26
+ unless @old_actual.respond_to? :exit_status
27
+ raise "Expected #{@old_actual} to respond to #exit_status"
28
+ end
27
29
 
28
30
  values_match? expected, @actual
29
31
  end
@@ -24,7 +24,9 @@ RSpec::Matchers.define :have_finished_in_time do
24
24
  @old_actual = actual
25
25
  @actual = @old_actual.commandline
26
26
 
27
- raise "Expected #{@old_actual} to respond to #timed_out?" unless @old_actual.respond_to? :timed_out?
27
+ unless @old_actual.respond_to? :timed_out?
28
+ raise "Expected #{@old_actual} to respond to #timed_out?"
29
+ end
28
30
 
29
31
  @old_actual.stop
30
32
 
@@ -19,7 +19,9 @@ RSpec::Matchers.define :have_output do |expected|
19
19
  match do |actual|
20
20
  @old_actual = actual
21
21
 
22
- raise "Expected #{@old_actual} to respond to #output" unless @old_actual.respond_to? :output
22
+ unless @old_actual.respond_to? :output
23
+ raise "Expected #{@old_actual} to respond to #output"
24
+ end
23
25
 
24
26
  @old_actual.stop
25
27
 
@@ -17,7 +17,9 @@ RSpec::Matchers.define :have_output_on_stderr do |expected|
17
17
  match do |actual|
18
18
  @old_actual = actual
19
19
 
20
- raise "Expected #{@old_actual} to respond to #stderr" unless @old_actual.respond_to? :stderr
20
+ unless @old_actual.respond_to? :stderr
21
+ raise "Expected #{@old_actual} to respond to #stderr"
22
+ end
21
23
 
22
24
  @old_actual.stop
23
25
 
@@ -17,7 +17,9 @@ RSpec::Matchers.define :have_output_on_stdout do |expected|
17
17
  match do |actual|
18
18
  @old_actual = actual
19
19
 
20
- raise "Expected #{@old_actual} to respond to #stdout" unless @old_actual.respond_to? :stdout
20
+ unless @old_actual.respond_to? :stdout
21
+ raise "Expected #{@old_actual} to respond to #stdout"
22
+ end
21
23
 
22
24
  @old_actual.stop
23
25
 
@@ -23,7 +23,8 @@ require 'rspec/expectations/version'
23
23
  #
24
24
  # RSpec.describe do
25
25
  # it { expect('dir1.d').to have_sub_directory(['subdir.1.d', 'subdir.2.d']) }
26
- # it { expect(directories).to include a_directory_with_sub_directory(['subdir.1.d', 'subdir.2.d']) }
26
+ # it { expect(directories)
27
+ # . to include a_directory_with_sub_directory(['subdir.1.d', 'subdir.2.d']) }
27
28
  # end
28
29
  RSpec::Matchers.define :have_sub_directory do |expected|
29
30
  match do |actual|
@@ -40,11 +41,15 @@ RSpec::Matchers.define :have_sub_directory do |expected|
40
41
  diffable
41
42
 
42
43
  failure_message do |actual|
43
- format('expected that directory "%s" has the following sub-directories: %s.', actual.join(', '), expected)
44
+ format('expected that directory "%s" has the following sub-directories: %s.',
45
+ actual.join(', '),
46
+ expected)
44
47
  end
45
48
 
46
49
  failure_message_when_negated do |actual|
47
- format('expected that directory "%s" does not have the following sub-directories: %s.', actual.join(', '), expected)
50
+ format('expected that directory "%s" does not have the following sub-directories: %s.',
51
+ actual.join(', '),
52
+ expected)
48
53
  end
49
54
  end
50
55
 
@@ -34,11 +34,13 @@ RSpec::Matchers.define :have_file_size do |expected|
34
34
  end
35
35
 
36
36
  failure_message do |_actual|
37
- format('expected that file "%s" has size "%s", but has "%s"', @old_actual, @actual, @expected)
37
+ format('expected that file "%s" has size "%s", but has "%s"',
38
+ @old_actual, @actual, @expected)
38
39
  end
39
40
 
40
41
  failure_message_when_negated do |_actual|
41
- format('expected that file "%s" does not have size "%s", but has "%s"', @old_actual, @actual, @expected)
42
+ format('expected that file "%s" does not have size "%s", but has "%s"',
43
+ @old_actual, @actual, @expected)
42
44
  end
43
45
  end
44
46
 
@@ -51,11 +51,13 @@ RSpec::Matchers.define :have_permissions do |expected|
51
51
  end
52
52
 
53
53
  failure_message do |_actual|
54
- format('expected that path "%s" has permissions "%s", but has "%s".', @old_actual, @expected, @actual)
54
+ format('expected that path "%s" has permissions "%s", but has "%s".',
55
+ @old_actual, @expected, @actual)
55
56
  end
56
57
 
57
58
  failure_message_when_negated do |_actual|
58
- format('expected that path "%s" does not have permissions "%s", but has "%s".', @old_actual, @expected, @actual)
59
+ format('expected that path "%s" does not have permissions "%s", but has "%s".',
60
+ @old_actual, @expected, @actual)
59
61
  end
60
62
  end
61
63
 
@@ -21,7 +21,9 @@ module Aruba
21
21
  #
22
22
  # before do
23
23
  # current_example = context.example
24
- # aruba.announcer.activate :my_channel if current_example.metadata[:announce_my_channel]
24
+ # if current_example.metadata[:announce_my_channel]
25
+ # aruba.announcer.activate :my_channel
26
+ # end
25
27
  # end
26
28
  #
27
29
  # Aruba.announcer.announce(:my_channel, 'my message')
@@ -80,16 +82,26 @@ module Aruba
80
82
 
81
83
  def after_init
82
84
  output_format :changed_configuration, proc { |n, v| format('# %s = %s', n, v) }
83
- output_format :changed_environment, proc { |n, v| format('$ export %s=%s', n, Shellwords.escape(v)) }
85
+ output_format :changed_environment,
86
+ proc { |n, v| format('$ export %s=%s', n, Shellwords.escape(v)) }
84
87
  output_format :command, '$ %s'
85
88
  output_format :directory, '$ cd %s'
86
- output_format :environment, proc { |n, v| format('$ export %s=%s', n, Shellwords.escape(v)) }
87
- output_format :full_environment, proc { |h| format("<<-ENVIRONMENT\n%s\nENVIRONMENT", Aruba.platform.simple_table(h)) }
88
- output_format :modified_environment, proc { |n, v| format('$ export %s=%s', n, Shellwords.escape(v)) }
89
+ output_format :environment,
90
+ proc { |n, v| format('$ export %s=%s', n, Shellwords.escape(v)) }
91
+ output_format :full_environment,
92
+ proc { |h|
93
+ format("<<-ENVIRONMENT\n%s\nENVIRONMENT",
94
+ Aruba.platform.simple_table(h))
95
+ }
96
+ output_format :modified_environment,
97
+ proc { |n, v| format('$ export %s=%s', n, Shellwords.escape(v)) }
89
98
  output_format :stderr, "<<-STDERR\n%s\nSTDERR"
90
99
  output_format :stdout, "<<-STDOUT\n%s\nSTDOUT"
91
100
  output_format :command_content, "<<-COMMAND\n%s\nCOMMAND"
92
- output_format :stop_signal, proc { |p, s| format('Command will be stopped with `kill -%s %s`', s, p) }
101
+ output_format :stop_signal,
102
+ proc { |p, s|
103
+ format('Command will be stopped with `kill -%s %s`', s, p)
104
+ }
93
105
  output_format :timeout, '# %s-timeout: %s seconds'
94
106
  output_format :wait_time, '# %s: %s seconds'
95
107
  output_format :command_filesystem_status,
@@ -18,7 +18,9 @@ module Aruba
18
18
  # @param [Boolean] check_presence (false)
19
19
  # Check if file exist
20
20
  def call(path, content, check_presence = false)
21
- fail "Expected #{path} to be present" if check_presence && !Aruba.platform.file?(path)
21
+ if check_presence && !Aruba.platform.file?(path)
22
+ raise "Expected #{path} to be present"
23
+ end
22
24
 
23
25
  Aruba.platform.mkdir(File.dirname(path))
24
26
 
@@ -22,11 +22,16 @@ module Aruba
22
22
  # @param [Boolean] check_presence (false)
23
23
  # Check if file exist
24
24
  def call(path, size, check_presence)
25
- fail "Expected #{path} to be present" if check_presence && !Aruba.platform.file?(path)
25
+ if check_presence && !Aruba.platform.file?(path)
26
+ raise "Expected #{path} to be present"
27
+ end
26
28
 
27
29
  Aruba.platform.mkdir(File.dirname(path))
28
30
 
29
- File.open(path, 'wb') { |f| f.seek(size - 1); f.write("\0") }
31
+ File.open(path, 'wb') do |f|
32
+ f.seek(size - 1)
33
+ f.write("\0")
34
+ end
30
35
 
31
36
  self
32
37
  end
@@ -20,7 +20,7 @@ module Aruba
20
20
  end
21
21
 
22
22
  def method_missing(*)
23
- fail NoCommandHasBeenStoppedError, 'No last command stopped available'
23
+ raise NoCommandHasBeenStoppedError, 'No last command stopped available'
24
24
  end
25
25
 
26
26
  def respond_to_missing?(*)
@@ -34,7 +34,7 @@ module Aruba
34
34
  end
35
35
 
36
36
  def method_missing(*)
37
- fail NoCommandHasBeenStartedError, 'No last command started available'
37
+ raise NoCommandHasBeenStartedError, 'No last command started available'
38
38
  end
39
39
 
40
40
  def respond_to_missing?(*)
@@ -78,7 +78,7 @@ module Aruba
78
78
  cmd = cmd.commandline if cmd.respond_to? :commandline
79
79
  command = registered_commands.reverse.find { |c| c.commandline == cmd }
80
80
 
81
- fail CommandNotFoundError, "No command named '#{cmd}' has been started" if command.nil?
81
+ raise CommandNotFoundError, "No command named '#{cmd}' has been started" if command.nil?
82
82
 
83
83
  command
84
84
  end
@@ -9,11 +9,9 @@ module Aruba
9
9
  attr_reader :other_env, :block
10
10
 
11
11
  def initialize(other_env, &block)
12
- @other_env = other_env.to_h.each_with_object({}) { |(k, v), a| a[k] = v.to_s }
12
+ @other_env = other_env.to_h.transform_values(&:to_s)
13
13
 
14
- @block = if block_given?
15
- block
16
- end
14
+ @block = (block if block_given?)
17
15
  end
18
16
 
19
17
  def call(env)
@@ -13,7 +13,7 @@ module Aruba
13
13
  end
14
14
 
15
15
  def call(program, path)
16
- fail %(Invalid input program "#{program}" and/or path "#{path}".)
16
+ raise %(Invalid input program "#{program}" and/or path "#{path}".)
17
17
  end
18
18
  end
19
19
 
@@ -16,7 +16,8 @@ module Aruba
16
16
  # C:>set PATH
17
17
  # C:>Path=.;.\bin;c:\rubys\ruby-2.1.6-p336\bin;
18
18
  #
19
- # @example If you access environment variables through ENV, you can access values no matter the case of the key:
19
+ # @example If you access environment variables through ENV, you can access
20
+ # values no matter the case of the key:
20
21
  # ENV["Path"] # => ".;.\bin;c:\rubys\ruby-2.1.6-p336\bin;"
21
22
  # ENV["PATH"] # => ".;.\bin;c:\rubys\ruby-2.1.6-p336\bin;"
22
23
  #
@@ -13,7 +13,7 @@ module Aruba
13
13
  end
14
14
 
15
15
  def call(program, path)
16
- fail %(Invalid input program "#{program}" and/or path "#{path}".)
16
+ raise %(Invalid input program "#{program}" and/or path "#{path}".)
17
17
  end
18
18
  end
19
19
 
@@ -96,7 +96,11 @@ module Aruba
96
96
  private
97
97
 
98
98
  def windows_executable_extentions
99
- ENV['PATHEXT'] ? format('.{%s}', ENV['PATHEXT'].tr(';', ',').tr('.', '')).downcase : '.{exe,com,bat}'
99
+ if ENV['PATHEXT']
100
+ format('.{%s}', ENV['PATHEXT'].tr(';', ',').tr('.', '')).downcase
101
+ else
102
+ '.{exe,com,bat}'
103
+ end
100
104
  end
101
105
  end
102
106
  end
@@ -41,7 +41,8 @@ module Aruba
41
41
  # @return [String]
42
42
  # A predefined string to make users aware they are using the DebugProcess
43
43
  def stdout(*)
44
- 'This is the debug launcher on STDOUT. If this output is unexpected, please check your setup.'
44
+ 'This is the debug launcher on STDOUT.' \
45
+ ' If this output is unexpected, please check your setup.'
45
46
  end
46
47
 
47
48
  # Return stderr
@@ -49,7 +50,8 @@ module Aruba
49
50
  # @return [String]
50
51
  # A predefined string to make users aware they are using the DebugProcess
51
52
  def stderr(*)
52
- 'This is the debug launcher on STDERR. If this output is unexpected, please check your setup.'
53
+ 'This is the debug launcher on STDERR.' \
54
+ ' If this output is unexpected, please check your setup.'
53
55
  end
54
56
 
55
57
  # Write to nothing
@@ -61,7 +61,7 @@ module Aruba
61
61
 
62
62
  # Start command
63
63
  def start
64
- fail 'You need to call aruba.config.main_class = YourMainClass' unless main_class
64
+ raise 'You need to call aruba.config.main_class = YourMainClass' unless main_class
65
65
 
66
66
  @started = true
67
67
 
@@ -109,7 +109,9 @@ module Aruba
109
109
 
110
110
  # Close io
111
111
  def close_io(name)
112
- fail ArgumentError, 'Only stdin stdout and stderr are allowed to close' unless [:stdin, :stdout, :stderr].include? name
112
+ unless [:stdin, :stdout, :stderr].include? name
113
+ raise ArgumentError, 'Only stdin stdout and stderr are allowed to close'
114
+ end
113
115
 
114
116
  get_instance_variable(name.to_sym).close
115
117
  end
@@ -63,16 +63,15 @@ module Aruba
63
63
  # @yield [SpawnProcess]
64
64
  # Run code for process which was started
65
65
  #
66
- # rubocop:disable Metrics/MethodLength
67
66
  def start
68
- # rubocop:disable Layout/LineLength
69
67
  if started?
70
- error_message = %(Command "#{commandline}" has already been started. Please `#stop` the command first and `#start` it again. Alternatively use `#restart`.\n#{caller.join("\n")})
71
- fail CommandAlreadyStartedError, error_message
68
+ error_message =
69
+ "Command \"#{commandline}\" has already been started." \
70
+ ' Please `#stop` the command first and `#start` it again.' \
71
+ ' Alternatively use `#restart`.'
72
+ raise CommandAlreadyStartedError, error_message
72
73
  end
73
74
 
74
- # rubocop:enable Layout/LineLength
75
-
76
75
  @started = true
77
76
 
78
77
  @process = ChildProcess.build(*command_string.to_a)
@@ -113,7 +112,6 @@ module Aruba
113
112
 
114
113
  yield self if block_given?
115
114
  end
116
- # rubocop:enable Metrics/MethodLength
117
115
 
118
116
  # Access to stdin of process
119
117
  def stdin
@@ -236,7 +234,7 @@ module Aruba
236
234
  # The signal, i.e. 'TERM'
237
235
  def send_signal(signal)
238
236
  error_message = %(Command "#{commandline}" with PID "#{pid}" has already stopped.)
239
- fail CommandAlreadyStoppedError, error_message if @process.exited?
237
+ raise CommandAlreadyStoppedError, error_message if @process.exited?
240
238
 
241
239
  Process.kill signal, pid
242
240
  rescue Errno::ESRCH
@@ -267,13 +265,23 @@ module Aruba
267
265
  private
268
266
 
269
267
  def command_string
270
- fail LaunchError, %(Command "#{command}" not found in PATH-variable "#{environment['PATH']}".) if command_path.nil?
268
+ if command_path.nil?
269
+ raise LaunchError,
270
+ %(Command "#{command}" not found in PATH-variable "#{environment['PATH']}".)
271
+ end
271
272
 
272
273
  Aruba.platform.command_string.new(command_path, *arguments)
273
274
  end
274
275
 
275
276
  def command_path
276
- @command_path ||= (Aruba.platform.builtin_shell_commands.include?(command) ? command : Aruba.platform.which(command, environment['PATH']))
277
+ @command_path ||=
278
+ begin
279
+ if Aruba.platform.builtin_shell_commands.include?(command)
280
+ command
281
+ else
282
+ Aruba.platform.which(command, environment['PATH'])
283
+ end
284
+ end
277
285
  end
278
286
 
279
287
  def wait_for_io(time_to_wait)
@@ -13,8 +13,10 @@ RSpec.configure do |config|
13
13
  setup_aruba
14
14
 
15
15
  # Modify PATH to include project/bin
16
- prepend_environment_variable 'PATH',
17
- aruba.config.command_search_paths.join(File::PATH_SEPARATOR) + File::PATH_SEPARATOR
16
+ prepend_environment_variable(
17
+ 'PATH',
18
+ aruba.config.command_search_paths.join(File::PATH_SEPARATOR) + File::PATH_SEPARATOR
19
+ )
18
20
 
19
21
  # Use configured home directory as HOME
20
22
  set_environment_variable 'HOME', aruba.config.home_directory
@@ -47,19 +49,27 @@ RSpec.configure do |config|
47
49
  config.before :each do |example|
48
50
  next unless self.class.include?(Aruba::Api)
49
51
 
50
- aruba.announcer.activate(:full_environment) if example.metadata[:announce_full_environment]
51
- aruba.announcer.activate(:changed_environment) if example.metadata[:announce_changed_environment]
52
-
53
- aruba.announcer.activate(:command) if example.metadata[:announce_command]
54
- aruba.announcer.activate(:directory) if example.metadata[:announce_directory]
55
- aruba.announcer.activate(:full_environment) if example.metadata[:announce_full_environment]
56
- aruba.announcer.activate(:stderr) if example.metadata[:announce_stderr]
57
- aruba.announcer.activate(:stdout) if example.metadata[:announce_stdout]
58
- aruba.announcer.activate(:stop_signal) if example.metadata[:announce_stop_signal]
59
- aruba.announcer.activate(:timeout) if example.metadata[:announce_timeout]
60
- aruba.announcer.activate(:wait_time) if example.metadata[:announce_wait_time]
61
- aruba.announcer.activate(:command_content) if example.metadata[:announce_command_content]
62
- aruba.announcer.activate(:command_filesystem_status) if example.metadata[:announce_command_filesystem_status]
52
+ if example.metadata[:announce_full_environment]
53
+ aruba.announcer.activate(:full_environment)
54
+ end
55
+ if example.metadata[:announce_changed_environment]
56
+ aruba.announcer.activate(:changed_environment)
57
+ end
58
+
59
+ aruba.announcer.activate(:command) if example.metadata[:announce_command]
60
+ aruba.announcer.activate(:directory) if example.metadata[:announce_directory]
61
+ if example.metadata[:announce_full_environment]
62
+ aruba.announcer.activate(:full_environment)
63
+ end
64
+ aruba.announcer.activate(:stderr) if example.metadata[:announce_stderr]
65
+ aruba.announcer.activate(:stdout) if example.metadata[:announce_stdout]
66
+ aruba.announcer.activate(:stop_signal) if example.metadata[:announce_stop_signal]
67
+ aruba.announcer.activate(:timeout) if example.metadata[:announce_timeout]
68
+ aruba.announcer.activate(:wait_time) if example.metadata[:announce_wait_time]
69
+ aruba.announcer.activate(:command_content) if example.metadata[:announce_command_content]
70
+ if example.metadata[:announce_command_filesystem_status]
71
+ aruba.announcer.activate(:command_filesystem_status)
72
+ end
63
73
 
64
74
  if example.metadata[:announce_output]
65
75
  aruba.announcer.activate(:stderr)