aruba 1.0.1 → 1.1.1

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 (143) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +56 -1
  3. data/CONTRIBUTING.md +11 -23
  4. data/README.md +1 -2
  5. data/exe/aruba +2 -2
  6. data/lib/aruba.rb +1 -1
  7. data/lib/aruba/api.rb +11 -12
  8. data/lib/aruba/api/bundler.rb +18 -3
  9. data/lib/aruba/api/commands.rb +11 -11
  10. data/lib/aruba/api/core.rb +27 -25
  11. data/lib/aruba/api/environment.rb +2 -2
  12. data/lib/aruba/api/filesystem.rb +42 -16
  13. data/lib/aruba/api/text.rb +4 -4
  14. data/lib/aruba/aruba_path.rb +3 -4
  15. data/lib/aruba/basic_configuration.rb +51 -69
  16. data/lib/aruba/cli.rb +7 -7
  17. data/lib/aruba/command.rb +4 -4
  18. data/lib/aruba/config/jruby.rb +9 -9
  19. data/lib/aruba/config_wrapper.rb +2 -2
  20. data/lib/aruba/configuration.rb +36 -46
  21. data/lib/aruba/console.rb +11 -11
  22. data/lib/aruba/console/help.rb +7 -7
  23. data/lib/aruba/contracts/absolute_path.rb +1 -1
  24. data/lib/aruba/contracts/enum.rb +1 -1
  25. data/lib/aruba/contracts/is_power_of_two.rb +1 -1
  26. data/lib/aruba/contracts/relative_path.rb +1 -1
  27. data/lib/aruba/cucumber.rb +7 -7
  28. data/lib/aruba/cucumber/command.rb +41 -49
  29. data/lib/aruba/cucumber/environment.rb +7 -7
  30. data/lib/aruba/cucumber/file.rb +8 -4
  31. data/lib/aruba/cucumber/hooks.rb +29 -29
  32. data/lib/aruba/cucumber/testing_frameworks.rb +18 -18
  33. data/lib/aruba/event_bus.rb +4 -4
  34. data/lib/aruba/event_bus/name_resolver.rb +4 -4
  35. data/lib/aruba/file_size.rb +1 -1
  36. data/lib/aruba/generators/script_file.rb +2 -2
  37. data/lib/aruba/in_config_wrapper.rb +1 -1
  38. data/lib/aruba/initializer.rb +10 -10
  39. data/lib/aruba/matchers/base/base_matcher.rb +1 -1
  40. data/lib/aruba/matchers/base/message_indenter.rb +2 -2
  41. data/lib/aruba/matchers/base/object_formatter.rb +2 -2
  42. data/lib/aruba/matchers/collection.rb +1 -1
  43. data/lib/aruba/matchers/collection/all.rb +1 -1
  44. data/lib/aruba/matchers/collection/include_an_object.rb +2 -2
  45. data/lib/aruba/matchers/command.rb +1 -1
  46. data/lib/aruba/matchers/command/be_successfully_executed.rb +4 -4
  47. data/lib/aruba/matchers/command/have_finished_in_time.rb +1 -1
  48. data/lib/aruba/matchers/command/have_output.rb +1 -1
  49. data/lib/aruba/matchers/directory.rb +1 -1
  50. data/lib/aruba/matchers/directory/be_an_existing_directory.rb +2 -2
  51. data/lib/aruba/matchers/directory/have_sub_directory.rb +3 -3
  52. data/lib/aruba/matchers/environment.rb +1 -1
  53. data/lib/aruba/matchers/file.rb +1 -1
  54. data/lib/aruba/matchers/file/be_a_command_found_in_path.rb +1 -1
  55. data/lib/aruba/matchers/file/be_an_existing_executable.rb +2 -2
  56. data/lib/aruba/matchers/file/be_an_existing_file.rb +2 -2
  57. data/lib/aruba/matchers/file/have_file_content.rb +1 -1
  58. data/lib/aruba/matchers/file/have_file_size.rb +1 -1
  59. data/lib/aruba/matchers/file/have_same_file_content.rb +2 -2
  60. data/lib/aruba/matchers/path.rb +1 -1
  61. data/lib/aruba/matchers/path/a_path_matching_pattern.rb +1 -1
  62. data/lib/aruba/matchers/path/be_an_absolute_path.rb +1 -1
  63. data/lib/aruba/matchers/path/be_an_existing_path.rb +1 -1
  64. data/lib/aruba/matchers/path/have_permissions.rb +5 -4
  65. data/lib/aruba/matchers/string.rb +1 -1
  66. data/lib/aruba/matchers/string/include_output_string.rb +1 -1
  67. data/lib/aruba/matchers/string/match_output_string.rb +1 -1
  68. data/lib/aruba/matchers/string/output_string_eq.rb +1 -1
  69. data/lib/aruba/platform.rb +2 -2
  70. data/lib/aruba/platforms/announcer.rb +15 -15
  71. data/lib/aruba/platforms/aruba_fixed_size_file_creator.rb +1 -1
  72. data/lib/aruba/platforms/aruba_logger.rb +11 -10
  73. data/lib/aruba/platforms/command_monitor.rb +6 -8
  74. data/lib/aruba/platforms/determine_disk_usage.rb +2 -4
  75. data/lib/aruba/platforms/filesystem_status.rb +20 -14
  76. data/lib/aruba/platforms/simple_table.rb +3 -3
  77. data/lib/aruba/platforms/unix_command_string.rb +2 -2
  78. data/lib/aruba/platforms/unix_environment_variables.rb +1 -1
  79. data/lib/aruba/platforms/unix_platform.rb +23 -23
  80. data/lib/aruba/platforms/unix_which.rb +1 -1
  81. data/lib/aruba/platforms/windows_command_string.rb +2 -2
  82. data/lib/aruba/platforms/windows_environment_variables.rb +1 -1
  83. data/lib/aruba/platforms/windows_platform.rb +7 -7
  84. data/lib/aruba/platforms/windows_which.rb +5 -5
  85. data/lib/aruba/processes/basic_process.rb +4 -4
  86. data/lib/aruba/processes/debug_process.rb +5 -5
  87. data/lib/aruba/processes/in_process.rb +8 -8
  88. data/lib/aruba/processes/spawn_process.rb +18 -23
  89. data/lib/aruba/rspec.rb +6 -6
  90. data/lib/aruba/runtime.rb +6 -6
  91. data/lib/aruba/setup.rb +3 -3
  92. data/lib/aruba/version.rb +1 -1
  93. metadata +75 -94
  94. data/.cucumberproignore +0 -3
  95. data/.document +0 -5
  96. data/.github/ISSUE_TEMPLATE.md +0 -48
  97. data/.github/PULL_REQUEST_TEMPLATE.md +0 -41
  98. data/.gitignore +0 -38
  99. data/.rspec +0 -3
  100. data/.rubocop.yml +0 -52
  101. data/.rubocop_todo.yml +0 -216
  102. data/.simplecov +0 -36
  103. data/.travis.yml +0 -62
  104. data/.yardopts +0 -11
  105. data/Dockerfile +0 -67
  106. data/Gemfile +0 -14
  107. data/Rakefile +0 -82
  108. data/TODO.md +0 -13
  109. data/appveyor.yml +0 -28
  110. data/aruba.gemspec +0 -57
  111. data/bin/console +0 -7
  112. data/bin/test +0 -9
  113. data/config/.gitignore +0 -1
  114. data/cucumber.yml +0 -6
  115. data/docker-compose.yml +0 -26
  116. data/fixtures/cli-app/.gitignore +0 -9
  117. data/fixtures/cli-app/.rspec +0 -2
  118. data/fixtures/cli-app/README.md +0 -39
  119. data/fixtures/cli-app/Rakefile +0 -1
  120. data/fixtures/cli-app/bin/aruba-test-cli +0 -6
  121. data/fixtures/cli-app/cli-app.gemspec +0 -26
  122. data/fixtures/cli-app/features/support/aruba.rb +0 -1
  123. data/fixtures/cli-app/features/support/env.rb +0 -1
  124. data/fixtures/cli-app/lib/cli/app.rb +0 -9
  125. data/fixtures/cli-app/lib/cli/app/suppress_simple_cov_output.rb +0 -15
  126. data/fixtures/cli-app/lib/cli/app/version.rb +0 -5
  127. data/fixtures/cli-app/script/console +0 -14
  128. data/fixtures/cli-app/spec/spec_helper.rb +0 -8
  129. data/fixtures/cli-app/spec/support/aruba.rb +0 -1
  130. data/fixtures/copy/file.txt +0 -1
  131. data/fixtures/empty-app/.gitignore +0 -9
  132. data/fixtures/empty-app/.rspec +0 -2
  133. data/fixtures/empty-app/README.md +0 -24
  134. data/fixtures/empty-app/Rakefile +0 -1
  135. data/fixtures/empty-app/cli-app.gemspec +0 -26
  136. data/fixtures/empty-app/lib/cli/app.rb +0 -7
  137. data/fixtures/empty-app/lib/cli/app/version.rb +0 -5
  138. data/fixtures/getting-started-app/.gitignore +0 -4
  139. data/fixtures/getting-started-app/Gemfile +0 -4
  140. data/fixtures/getting-started-app/README.md +0 -3
  141. data/fixtures/getting-started-app/features/support/env.rb +0 -1
  142. data/lib/aruba/extensions/string/strip.rb +0 -25
  143. data/lib/aruba/tasks/docker_helpers.rb +0 -156
@@ -1,15 +1,15 @@
1
- require 'contracts'
1
+ require "contracts"
2
2
 
3
- require 'aruba/version'
4
- require 'aruba/basic_configuration'
5
- require 'aruba/in_config_wrapper'
6
- require 'aruba/hooks'
3
+ require "aruba/version"
4
+ require "aruba/basic_configuration"
5
+ require "aruba/in_config_wrapper"
6
+ require "aruba/hooks"
7
7
 
8
- require 'aruba/contracts/relative_path'
9
- require 'aruba/contracts/absolute_path'
10
- require 'aruba/contracts/enum'
8
+ require "aruba/contracts/relative_path"
9
+ require "aruba/contracts/absolute_path"
10
+ require "aruba/contracts/enum"
11
11
 
12
- require 'aruba/contracts/is_power_of_two'
12
+ require "aruba/contracts/is_power_of_two"
13
13
 
14
14
  # Aruba
15
15
  module Aruba
@@ -17,69 +17,59 @@ module Aruba
17
17
  #
18
18
  # This defines the configuration options of aruba
19
19
  class Configuration < BasicConfiguration
20
- option_reader :root_directory, contract: { None => String }, default: Dir.getwd
20
+ option_reader :root_directory, type: String, default: Dir.getwd
21
21
 
22
22
  option_accessor :working_directory,
23
- contract: { Aruba::Contracts::RelativePath =>
24
- Aruba::Contracts::RelativePath },
25
- default: 'tmp/aruba'
23
+ type: Aruba::Contracts::RelativePath,
24
+ default: "tmp/aruba"
26
25
 
27
- option_reader :fixtures_path_prefix, contract: { None => String }, default: '%'
26
+ option_reader :fixtures_path_prefix, type: String, default: "%"
28
27
 
29
- option_accessor :exit_timeout, contract: { Num => Num }, default: 15
30
- option_accessor :stop_signal, contract: { Maybe[String] => Maybe[String] }, default: nil
31
- option_accessor :io_wait_timeout, contract: { Num => Num }, default: 0.1
32
- option_accessor :startup_wait_time, contract: { Num => Num }, default: 0
28
+ option_accessor :exit_timeout, type: Num, default: 15
29
+ option_accessor :stop_signal, type: Maybe[String], default: nil
30
+ option_accessor :io_wait_timeout, type: Num, default: 0.1
31
+ option_accessor :startup_wait_time, type: Num, default: 0
33
32
  option_accessor :fixtures_directories,
34
- contract: { Array => ArrayOf[String] },
33
+ type: ArrayOf[String],
35
34
  default: %w(features/fixtures spec/fixtures test/fixtures fixtures)
36
35
 
37
- option_accessor :command_runtime_environment, contract: { Hash => Hash }, default: {}
36
+ option_accessor :command_runtime_environment, type: Hash, default: {}
38
37
  option_accessor :command_search_paths,
39
- contract: { ArrayOf[String] => ArrayOf[String] } do |config|
40
- [File.join(config.root_directory.value, 'bin'),
41
- File.join(config.root_directory.value, 'exe')]
38
+ type: ArrayOf[String] do |config|
39
+ [File.join(config.root_directory.value, "bin"),
40
+ File.join(config.root_directory.value, "exe")]
42
41
  end
43
- option_accessor :remove_ansi_escape_sequences, contract: { Bool => Bool }, default: true
42
+ option_accessor :remove_ansi_escape_sequences, type: Bool, default: true
44
43
  option_accessor :command_launcher,
45
- contract: {
46
- Aruba::Contracts::Enum[:in_process, :spawn, :debug] =>
47
- Aruba::Contracts::Enum[:in_process, :spawn, :debug]
48
- },
44
+ type: Aruba::Contracts::Enum[:in_process, :spawn, :debug],
49
45
  default: :spawn
50
- option_accessor :main_class, contract: { Class => Maybe[Class] }, default: nil
46
+ option_accessor :main_class, type: Maybe[Class], default: nil
51
47
 
52
48
  option_accessor :home_directory,
53
- contract: {
54
- Or[Aruba::Contracts::AbsolutePath, Aruba::Contracts::RelativePath] =>
55
- Or[Aruba::Contracts::AbsolutePath, Aruba::Contracts::RelativePath]
56
- } do |config|
57
- File.join(config.root_directory.value, config.working_directory.value)
58
- end
49
+ type: Or[Aruba::Contracts::AbsolutePath,
50
+ Aruba::Contracts::RelativePath] do |config|
51
+ File.join(config.root_directory.value, config.working_directory.value)
52
+ end
59
53
 
60
54
  option_accessor :log_level,
61
- contract: {
62
- Aruba::Contracts::Enum[:fatal, :warn, :debug, :info,
63
- :error, :unknown, :silent] =>
55
+ type:
64
56
  Aruba::Contracts::Enum[:fatal, :warn, :debug, :info,
65
- :error, :unknown, :silent]
66
- },
57
+ :error, :unknown, :silent],
67
58
  default: :info
68
59
 
69
60
  # TODO: deprecate this value and replace with "filesystem allocation unit"
70
61
  # equal to 4096 by default. "filesystem allocation unit" would represent
71
62
  # the actual MINIMUM space taken in bytes by a 1-byte file
72
63
  option_accessor :physical_block_size,
73
- contract: { Aruba::Contracts::IsPowerOfTwo =>
74
- Aruba::Contracts::IsPowerOfTwo },
64
+ type: Aruba::Contracts::IsPowerOfTwo,
75
65
  default: 512
76
- option_accessor :console_history_file, contract: { String => String },
77
- default: '~/.aruba_history'
66
+ option_accessor :console_history_file, type: String,
67
+ default: "~/.aruba_history"
78
68
 
79
69
  option_accessor :activate_announcer_on_command_failure,
80
- contract: { ArrayOf[Symbol] => ArrayOf[Symbol] },
70
+ type: ArrayOf[Symbol],
81
71
  default: []
82
- option_accessor :allow_absolute_paths, contract: { Bool => Bool }, default: false
72
+ option_accessor :allow_absolute_paths, type: Bool, default: false
83
73
  end
84
74
  end
85
75
 
data/lib/aruba/console.rb CHANGED
@@ -1,7 +1,7 @@
1
- require 'irb'
1
+ require "irb"
2
2
 
3
- require 'aruba/api'
4
- require 'aruba/console/help'
3
+ require "aruba/api"
4
+ require "aruba/console/help"
5
5
 
6
6
  # Aruba
7
7
  module Aruba
@@ -15,21 +15,21 @@ module Aruba
15
15
  ARGV.clear
16
16
  IRB.setup nil
17
17
 
18
- IRB.conf[:IRB_NAME] = 'aruba'
18
+ IRB.conf[:IRB_NAME] = "aruba"
19
19
 
20
20
  IRB.conf[:PROMPT] = {}
21
21
  IRB.conf[:PROMPT][:ARUBA] = {
22
- PROMPT_I: '%N:%03n:%i> ',
23
- PROMPT_S: '%N:%03n:%i%l ',
24
- PROMPT_C: '%N:%03n:%i* ',
22
+ PROMPT_I: "%N:%03n:%i> ",
23
+ PROMPT_S: "%N:%03n:%i%l ",
24
+ PROMPT_C: "%N:%03n:%i* ",
25
25
  RETURN: "# => %s\n"
26
26
  }
27
27
  IRB.conf[:PROMPT_MODE] = :ARUBA
28
28
 
29
29
  IRB.conf[:RC] = false
30
30
 
31
- require 'irb/completion'
32
- require 'irb/ext/save-history'
31
+ require "irb/completion"
32
+ require "irb/ext/save-history"
33
33
  IRB.conf[:READLINE] = true
34
34
  IRB.conf[:SAVE_HISTORY] = 1000
35
35
  IRB.conf[:HISTORY_FILE] = Aruba.config.console_history_file
@@ -43,14 +43,14 @@ module Aruba
43
43
  end
44
44
 
45
45
  def inspect
46
- 'nil'
46
+ "nil"
47
47
  end
48
48
  end
49
49
 
50
50
  irb = IRB::Irb.new(IRB::WorkSpace.new(context.new))
51
51
  IRB.conf[:MAIN_CONTEXT] = irb.context
52
52
 
53
- trap('SIGINT') do
53
+ trap("SIGINT") do
54
54
  irb.signal_handle
55
55
  end
56
56
 
@@ -1,4 +1,4 @@
1
- require 'aruba/api'
1
+ require "aruba/api"
2
2
 
3
3
  # Aruba
4
4
  module Aruba
@@ -8,10 +8,10 @@ module Aruba
8
8
  module Help
9
9
  # Output help information
10
10
  def aruba_help
11
- puts 'Aruba Version: ' + Aruba::VERSION
12
- puts 'Issue Tracker: ' + 'https://github.com/cucumber/aruba/issues'
13
- puts 'Documentation:'
14
- puts '* http://www.rubydoc.info/gems/aruba'
11
+ puts "Aruba Version: #{Aruba::VERSION}"
12
+ puts "Issue Tracker: https://github.com/cucumber/aruba/issues"
13
+ puts "Documentation:"
14
+ puts "* http://www.rubydoc.info/gems/aruba"
15
15
  puts
16
16
 
17
17
  nil
@@ -20,10 +20,10 @@ module Aruba
20
20
  # List available methods in aruba
21
21
  def aruba_methods
22
22
  ms = (Aruba::Api.instance_methods - Module.instance_methods)
23
- .each_with_object([]) { |e, a| a << format('* %s', e) }
23
+ .each_with_object([]) { |e, a| a << format("* %s", e) }
24
24
  .sort
25
25
 
26
- puts "Available Methods:\n" + ms.join("\n")
26
+ puts "Available Methods:\n#{ms.join("\n")}"
27
27
 
28
28
  nil
29
29
  end
@@ -1,4 +1,4 @@
1
- require 'aruba/platform'
1
+ require "aruba/platform"
2
2
 
3
3
  # Aruba
4
4
  module Aruba
@@ -1,4 +1,4 @@
1
- require 'contracts'
1
+ require "contracts"
2
2
 
3
3
  # Aruba
4
4
  module Aruba
@@ -1,4 +1,4 @@
1
- require 'aruba/aruba_path'
1
+ require "aruba/aruba_path"
2
2
 
3
3
  # Aruba
4
4
  module Aruba
@@ -1,4 +1,4 @@
1
- require 'aruba/platform'
1
+ require "aruba/platform"
2
2
 
3
3
  # Aruba
4
4
  module Aruba
@@ -1,8 +1,8 @@
1
- require 'aruba/version'
1
+ require "aruba/version"
2
2
 
3
- require 'aruba/api'
4
- require 'aruba/cucumber/hooks'
5
- require 'aruba/cucumber/command'
6
- require 'aruba/cucumber/environment'
7
- require 'aruba/cucumber/file'
8
- require 'aruba/cucumber/testing_frameworks'
3
+ require "aruba/api"
4
+ require "aruba/cucumber/hooks"
5
+ require "aruba/cucumber/command"
6
+ require "aruba/cucumber/environment"
7
+ require "aruba/cucumber/file"
8
+ require "aruba/cucumber/testing_frameworks"
@@ -1,4 +1,4 @@
1
- require 'aruba/generators/script_file'
1
+ require "aruba/generators/script_file"
2
2
 
3
3
  When(/^I run `([^`]*)`$/) do |cmd|
4
4
  cmd = sanitize_text(cmd)
@@ -14,9 +14,9 @@ end
14
14
 
15
15
  When(/^I run the following (?:commands|script)(?: (?:with|in) `([^`]+)`)?:$/) \
16
16
  do |shell, commands|
17
- full_path = expand_path('bin/myscript')
17
+ full_path = expand_path("bin/myscript")
18
18
 
19
- Aruba.platform.mkdir(expand_path('bin'))
19
+ Aruba.platform.mkdir(expand_path("bin"))
20
20
  shell ||= Aruba.platform.default_shell
21
21
 
22
22
  Aruba::ScriptFile.new(interpreter: shell, content: commands, path: full_path).call
@@ -55,7 +55,7 @@ When(/^I (terminate|stop) the command (?:"([^"]*)"|(?:started last))$/) do |sign
55
55
  last_command_started
56
56
  end
57
57
 
58
- if signal == 'terminate'
58
+ if signal == "terminate"
59
59
  cmd.terminate
60
60
  else
61
61
  cmd.stop
@@ -88,30 +88,22 @@ end
88
88
 
89
89
  When(/^I wait for (?:output|stdout) to contain:$/) do |expected|
90
90
  Timeout.timeout(aruba.config.exit_timeout) do
91
- loop do
92
- begin
93
- expect(last_command_started).to have_output an_output_string_including(expected)
94
- rescue ExpectationError
95
- sleep 0.1
96
- retry
97
- end
98
-
99
- break
91
+ begin
92
+ expect(last_command_started).to have_output an_output_string_including(expected)
93
+ rescue ExpectationError
94
+ sleep 0.1
95
+ retry
100
96
  end
101
97
  end
102
98
  end
103
99
 
104
100
  When(/^I wait for (?:output|stdout) to contain "([^"]*)"$/) do |expected|
105
101
  Timeout.timeout(aruba.config.exit_timeout) do
106
- loop do
107
- begin
108
- expect(last_command_started).to have_output an_output_string_including(expected)
109
- rescue ExpectationError
110
- sleep 0.1
111
- retry
112
- end
113
-
114
- break
102
+ begin
103
+ expect(last_command_started).to have_output an_output_string_including(expected)
104
+ rescue ExpectationError
105
+ sleep 0.1
106
+ retry
115
107
  end
116
108
  end
117
109
  end
@@ -143,9 +135,9 @@ Then(
143
135
  /^(?:the )?(output|stderr|stdout) from "([^"]*)" should contain( exactly)? "([^"]*)"$/
144
136
  ) do |channel, cmd, exactly, expected|
145
137
  matcher = case channel
146
- when 'output'; then :have_output
147
- when 'stderr'; then :have_output_on_stderr
148
- when 'stdout'; then :have_output_on_stdout
138
+ when "output"; then :have_output
139
+ when "stderr"; then :have_output_on_stderr
140
+ when "stdout"; then :have_output_on_stdout
149
141
  end
150
142
 
151
143
  command = aruba.command_monitor.find(Aruba.platform.detect_ruby(cmd))
@@ -164,9 +156,9 @@ Then(
164
156
  /^(?:the )?(output|stderr|stdout) from "([^"]*)" should not contain( exactly)? "([^"]*)"$/
165
157
  ) do |channel, cmd, exactly, expected|
166
158
  matcher = case channel
167
- when 'output'; then :have_output
168
- when 'stderr'; then :have_output_on_stderr
169
- when 'stdout'; then :have_output_on_stdout
159
+ when "output"; then :have_output
160
+ when "stderr"; then :have_output_on_stderr
161
+ when "stdout"; then :have_output_on_stdout
170
162
  end
171
163
 
172
164
  command = aruba.command_monitor.find(Aruba.platform.detect_ruby(cmd))
@@ -212,9 +204,9 @@ end
212
204
  Then(/^(?:the )?(output|stderr|stdout) from "([^"]*)" should not contain( exactly)?:$/) \
213
205
  do |channel, cmd, exactly, expected|
214
206
  matcher = case channel
215
- when 'output'; then :have_output
216
- when 'stderr'; then :have_output_on_stderr
217
- when 'stdout'; then :have_output_on_stdout
207
+ when "output"; then :have_output
208
+ when "stderr"; then :have_output_on_stderr
209
+ when "stdout"; then :have_output_on_stdout
218
210
  end
219
211
 
220
212
  command = aruba.command_monitor.find(Aruba.platform.detect_ruby(cmd))
@@ -232,9 +224,9 @@ end
232
224
  Then(/^(?:the )?(output|stderr|stdout) from "([^"]*)" should contain( exactly)?:$/) \
233
225
  do |channel, cmd, exactly, expected|
234
226
  matcher = case channel
235
- when 'output'; then :have_output
236
- when 'stderr'; then :have_output_on_stderr
237
- when 'stdout'; then :have_output_on_stdout
227
+ when "output"; then :have_output
228
+ when "stderr"; then :have_output_on_stderr
229
+ when "stdout"; then :have_output_on_stdout
238
230
  end
239
231
 
240
232
  command = aruba.command_monitor.find(Aruba.platform.detect_ruby(cmd))
@@ -295,7 +287,7 @@ end
295
287
  Then(/^it should not (pass|fail) with "(.*?)"$/) do |pass_fail, expected|
296
288
  last_command_started.stop
297
289
 
298
- if pass_fail == 'pass'
290
+ if pass_fail == "pass"
299
291
  expect(last_command_stopped).to be_successfully_executed
300
292
  else
301
293
  expect(last_command_stopped).not_to be_successfully_executed
@@ -307,7 +299,7 @@ end
307
299
  Then(/^it should (pass|fail) with "(.*?)"$/) do |pass_fail, expected|
308
300
  last_command_started.stop
309
301
 
310
- if pass_fail == 'pass'
302
+ if pass_fail == "pass"
311
303
  expect(last_command_stopped).to be_successfully_executed
312
304
  else
313
305
  expect(last_command_stopped).not_to be_successfully_executed
@@ -319,7 +311,7 @@ end
319
311
  Then(/^it should not (pass|fail) with:$/) do |pass_fail, expected|
320
312
  last_command_started.stop
321
313
 
322
- if pass_fail == 'pass'
314
+ if pass_fail == "pass"
323
315
  expect(last_command_stopped).to be_successfully_executed
324
316
  else
325
317
  expect(last_command_stopped).not_to be_successfully_executed
@@ -331,7 +323,7 @@ end
331
323
  Then(/^it should (pass|fail) with:$/) do |pass_fail, expected|
332
324
  last_command_started.stop
333
325
 
334
- if pass_fail == 'pass'
326
+ if pass_fail == "pass"
335
327
  expect(last_command_stopped).to be_successfully_executed
336
328
  else
337
329
  expect(last_command_stopped).not_to be_successfully_executed
@@ -343,7 +335,7 @@ end
343
335
  Then(/^it should not (pass|fail) with exactly:$/) do |pass_fail, expected|
344
336
  last_command_started.stop
345
337
 
346
- if pass_fail == 'pass'
338
+ if pass_fail == "pass"
347
339
  expect(last_command_stopped).to be_successfully_executed
348
340
  else
349
341
  expect(last_command_stopped).not_to be_successfully_executed
@@ -355,7 +347,7 @@ end
355
347
  Then(/^it should (pass|fail) with exactly:$/) do |pass_fail, expected|
356
348
  last_command_started.stop
357
349
 
358
- if pass_fail == 'pass'
350
+ if pass_fail == "pass"
359
351
  expect(last_command_stopped).to be_successfully_executed
360
352
  else
361
353
  expect(last_command_stopped).not_to be_successfully_executed
@@ -367,7 +359,7 @@ end
367
359
  Then(/^it should not (pass|fail) (?:with regexp?|matching):$/) do |pass_fail, expected|
368
360
  last_command_started.stop
369
361
 
370
- if pass_fail == 'pass'
362
+ if pass_fail == "pass"
371
363
  expect(last_command_stopped).to be_successfully_executed
372
364
  else
373
365
  expect(last_command_stopped).not_to be_successfully_executed
@@ -379,7 +371,7 @@ end
379
371
  Then(/^it should (pass|fail) (?:with regexp?|matching):$/) do |pass_fail, expected|
380
372
  last_command_started.stop
381
373
 
382
- if pass_fail == 'pass'
374
+ if pass_fail == "pass"
383
375
  expect(last_command_stopped).to be_successfully_executed
384
376
  else
385
377
  expect(last_command_stopped).not_to be_successfully_executed
@@ -390,9 +382,9 @@ end
390
382
 
391
383
  Then(/^(?:the )?(output|stderr|stdout) should not contain anything$/) do |channel|
392
384
  matcher = case channel
393
- when 'output'; then :have_output
394
- when 'stderr'; then :have_output_on_stderr
395
- when 'stdout'; then :have_output_on_stdout
385
+ when "output"; then :have_output
386
+ when "stderr"; then :have_output_on_stderr
387
+ when "stdout"; then :have_output_on_stdout
396
388
  end
397
389
 
398
390
  expect(all_commands).to include_an_object send(matcher, be_nil.or(be_empty))
@@ -402,9 +394,9 @@ Then(/^(?:the )?(output|stdout|stderr) should( not)? contain all of these lines:
402
394
  do |channel, negated, table|
403
395
  table.raw.flatten.each do |expected|
404
396
  _matcher = case channel
405
- when 'output'; then :have_output
406
- when 'stderr'; then :have_output_on_stderr
407
- when 'stdout'; then :have_output_on_stdout
397
+ when "output"; then :have_output
398
+ when "stderr"; then :have_output_on_stderr
399
+ when "stdout"; then :have_output_on_stdout
408
400
  end
409
401
 
410
402
  # TODO: This isn't actually using the above. It's hardcoded to use have_output only
@@ -448,5 +440,5 @@ When(/^I send the signal "([^"]*)" to the command (?:"([^"]*)"|(?:started last))
448
440
  end
449
441
 
450
442
  Given(/^I look for executables in "(.*)" within the current directory$/) do |directory|
451
- prepend_environment_variable 'PATH', expand_path(directory) + File::PATH_SEPARATOR
443
+ prepend_environment_variable "PATH", expand_path(directory) + File::PATH_SEPARATOR
452
444
  end