aruba 0.14.14 → 1.0.0.pre.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. checksums.yaml +5 -5
  2. data/.cucumberproignore +3 -0
  3. data/.github/ISSUE_TEMPLATE.md +48 -0
  4. data/.github/PULL_REQUEST_TEMPLATE.md +39 -0
  5. data/.gitignore +1 -0
  6. data/.rspec +1 -0
  7. data/.rubocop.yml +1 -5
  8. data/.travis.yml +35 -27
  9. data/CONTRIBUTING.md +131 -29
  10. data/Dockerfile +67 -0
  11. data/Gemfile +33 -80
  12. data/History.md +602 -0
  13. data/README.md +24 -196
  14. data/Rakefile +87 -27
  15. data/appveyor.yml +0 -1
  16. data/aruba.gemspec +30 -40
  17. data/bin/bootstrap +34 -0
  18. data/bin/build +3 -0
  19. data/{script → bin}/console +0 -0
  20. data/bin/release +3 -0
  21. data/bin/test +9 -0
  22. data/cucumber.yml +1 -3
  23. data/docker-compose.yml +26 -0
  24. data/{bin → exec}/aruba +0 -0
  25. data/fixtures/cli-app/README.md +1 -1
  26. data/fixtures/cli-app/features/support/aruba.rb +1 -0
  27. data/fixtures/cli-app/features/support/env.rb +1 -1
  28. data/fixtures/cli-app/lib/cli/app.rb +1 -5
  29. data/fixtures/cli-app/spec/spec_helper.rb +1 -6
  30. data/fixtures/empty-app/lib/cli/app.rb +2 -0
  31. data/lib/aruba/api.rb +3 -3
  32. data/lib/aruba/api/{commands.rb → command.rb} +4 -30
  33. data/lib/aruba/api/core.rb +8 -25
  34. data/lib/aruba/api/deprecated.rb +150 -408
  35. data/lib/aruba/api/filesystem.rb +17 -2
  36. data/lib/aruba/api/rvm.rb +44 -0
  37. data/lib/aruba/aruba_path.rb +56 -32
  38. data/lib/aruba/basic_configuration.rb +3 -5
  39. data/lib/aruba/colorizer.rb +99 -10
  40. data/lib/aruba/command.rb +0 -2
  41. data/lib/aruba/config.rb +5 -5
  42. data/lib/aruba/config/jruby.rb +5 -15
  43. data/lib/aruba/console.rb +2 -0
  44. data/lib/aruba/console/help.rb +1 -7
  45. data/lib/aruba/cucumber.rb +0 -2
  46. data/lib/aruba/cucumber/command.rb +98 -72
  47. data/lib/aruba/cucumber/file.rb +15 -3
  48. data/lib/aruba/cucumber/hooks.rb +71 -10
  49. data/lib/aruba/event_bus/name_resolver.rb +2 -10
  50. data/lib/aruba/generators/script_file.rb +1 -1
  51. data/lib/aruba/in_process.rb +0 -2
  52. data/lib/aruba/initializer.rb +4 -14
  53. data/lib/aruba/matchers/base/object_formatter.rb +0 -5
  54. data/lib/aruba/matchers/file/have_same_file_content.rb +5 -5
  55. data/lib/aruba/matchers/string/output_string_eq.rb +1 -1
  56. data/lib/aruba/platforms/announcer.rb +11 -16
  57. data/lib/aruba/platforms/aruba_file_creator.rb +1 -5
  58. data/lib/aruba/platforms/aruba_logger.rb +1 -5
  59. data/lib/aruba/platforms/command_monitor.rb +10 -14
  60. data/lib/aruba/platforms/determine_disk_usage.rb +8 -3
  61. data/lib/aruba/platforms/filesystem_status.rb +1 -5
  62. data/lib/aruba/platforms/unix_command_string.rb +1 -8
  63. data/lib/aruba/platforms/unix_environment_variables.rb +6 -8
  64. data/lib/aruba/platforms/unix_platform.rb +9 -22
  65. data/lib/aruba/platforms/unix_which.rb +4 -0
  66. data/lib/aruba/platforms/windows_command_string.rb +6 -14
  67. data/lib/aruba/platforms/windows_environment_variables.rb +4 -16
  68. data/lib/aruba/platforms/windows_which.rb +4 -0
  69. data/lib/aruba/processes/basic_process.rb +22 -18
  70. data/lib/aruba/processes/spawn_process.rb +12 -35
  71. data/lib/aruba/rspec.rb +1 -0
  72. data/lib/aruba/runtime.rb +3 -4
  73. data/lib/aruba/setup.rb +9 -11
  74. data/lib/aruba/spawn_process.rb +1 -4
  75. data/lib/aruba/tasks/docker_helpers.rb +158 -0
  76. data/lib/aruba/version.rb +1 -1
  77. metadata +62 -230
  78. data/CHANGELOG.md +0 -991
  79. data/features/.nav +0 -72
  80. data/features/01_getting_started_with_aruba/cleanup_working_directory.feature +0 -57
  81. data/features/01_getting_started_with_aruba/run_commands.feature +0 -217
  82. data/features/01_getting_started_with_aruba/supported_testing_frameworks.feature +0 -88
  83. data/features/02_configure_aruba/activate_announcer_on_command_failure.feature +0 -38
  84. data/features/02_configure_aruba/basics.feature +0 -151
  85. data/features/02_configure_aruba/command_runtime_environment.feature +0 -129
  86. data/features/02_configure_aruba/console_history_file.feature +0 -38
  87. data/features/02_configure_aruba/exit_timeout.feature +0 -60
  88. data/features/02_configure_aruba/fixtures_directories.feature +0 -38
  89. data/features/02_configure_aruba/fixtures_path_prefix.feature +0 -23
  90. data/features/02_configure_aruba/home_directory.feature +0 -80
  91. data/features/02_configure_aruba/io_timeout.feature +0 -30
  92. data/features/02_configure_aruba/keep_ansi.feature +0 -30
  93. data/features/02_configure_aruba/log_level.feature +0 -38
  94. data/features/02_configure_aruba/physical_block_size.feature +0 -53
  95. data/features/02_configure_aruba/remove_ansi_escape_sequences.feature +0 -38
  96. data/features/02_configure_aruba/root_directory.feature +0 -30
  97. data/features/02_configure_aruba/startup_wait_time.feature +0 -48
  98. data/features/02_configure_aruba/working_directory.feature +0 -38
  99. data/features/03_testing_frameworks/cucumber/announce_information_for_troubleshooting.feature +0 -306
  100. data/features/03_testing_frameworks/cucumber/disable_bunder.feature +0 -18
  101. data/features/03_testing_frameworks/cucumber/steps/command/check_for_exit_statuses.feature +0 -136
  102. data/features/03_testing_frameworks/cucumber/steps/command/check_output_of_command.feature +0 -514
  103. data/features/03_testing_frameworks/cucumber/steps/command/check_stderr_of_command.feature +0 -68
  104. data/features/03_testing_frameworks/cucumber/steps/command/check_stdout_of_command.feature +0 -109
  105. data/features/03_testing_frameworks/cucumber/steps/command/debug_your_command_in_aruba.feature +0 -118
  106. data/features/03_testing_frameworks/cucumber/steps/command/run_a_command.feature +0 -66
  107. data/features/03_testing_frameworks/cucumber/steps/command/run_command_in_process.feature +0 -485
  108. data/features/03_testing_frameworks/cucumber/steps/command/run_command_interactively.feature +0 -90
  109. data/features/03_testing_frameworks/cucumber/steps/command/run_commands_which_require_a_shell.feature +0 -79
  110. data/features/03_testing_frameworks/cucumber/steps/command/send_signal_to_command.feature +0 -83
  111. data/features/03_testing_frameworks/cucumber/steps/command/stop_command.feature +0 -285
  112. data/features/03_testing_frameworks/cucumber/steps/environment/append_environment_variable.feature +0 -52
  113. data/features/03_testing_frameworks/cucumber/steps/environment/modify_home_variable_for_testing.feature +0 -62
  114. data/features/03_testing_frameworks/cucumber/steps/environment/prepend_environment_variable.feature +0 -52
  115. data/features/03_testing_frameworks/cucumber/steps/environment/set_environment_variable.feature +0 -49
  116. data/features/03_testing_frameworks/cucumber/steps/filesystem/append_to_file.feature +0 -45
  117. data/features/03_testing_frameworks/cucumber/steps/filesystem/cd_to_directory.feature +0 -33
  118. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_existence_of_directory.feature +0 -57
  119. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_existence_of_file.feature +0 -43
  120. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_file_content.feature +0 -143
  121. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_non_existence_of_directory.feature +0 -69
  122. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_non_existence_of_file.feature +0 -80
  123. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_permissions_of_file.feature +0 -39
  124. data/features/03_testing_frameworks/cucumber/steps/filesystem/compare_files.feature +0 -42
  125. data/features/03_testing_frameworks/cucumber/steps/filesystem/copy_file_or_directory.feature +0 -45
  126. data/features/03_testing_frameworks/cucumber/steps/filesystem/create_directory.feature +0 -57
  127. data/features/03_testing_frameworks/cucumber/steps/filesystem/create_file.feature +0 -76
  128. data/features/03_testing_frameworks/cucumber/steps/filesystem/move_file_or_directory.feature +0 -44
  129. data/features/03_testing_frameworks/cucumber/steps/filesystem/overwrite_file.feature +0 -72
  130. data/features/03_testing_frameworks/cucumber/steps/filesystem/remove_directory.feature +0 -38
  131. data/features/03_testing_frameworks/cucumber/steps/filesystem/remove_file.feature +0 -38
  132. data/features/03_testing_frameworks/cucumber/steps/filesystem/use_fixtures_for_setup_test.feature +0 -77
  133. data/features/03_testing_frameworks/rspec/hooks/define_after_hook_for_commands.feature +0 -43
  134. data/features/03_testing_frameworks/rspec/hooks/define_before_hook_for_commands.feature +0 -71
  135. data/features/03_testing_frameworks/rspec/setup_aruba_for_rspec.feature +0 -179
  136. data/features/04_aruba_api/command/find_a_started_command.feature +0 -83
  137. data/features/04_aruba_api/command/find_command_in_PATH.feature +0 -37
  138. data/features/04_aruba_api/command/read_stderr_of_command.feature +0 -46
  139. data/features/04_aruba_api/command/read_stdout_of_command.feature +0 -46
  140. data/features/04_aruba_api/command/run_command.feature +0 -423
  141. data/features/04_aruba_api/command/run_simple.feature +0 -254
  142. data/features/04_aruba_api/command/send_signal_to_command.feature +0 -53
  143. data/features/04_aruba_api/command/stop_all_commands.feature +0 -57
  144. data/features/04_aruba_api/command/stop_single_command.feature +0 -132
  145. data/features/04_aruba_api/command/terminate_all_commands.feature +0 -57
  146. data/features/04_aruba_api/command/use_last_command_started.feature +0 -50
  147. data/features/04_aruba_api/command/use_last_command_stopped.feature +0 -89
  148. data/features/04_aruba_api/core/expand_path.feature +0 -88
  149. data/features/04_aruba_api/environment/append_environment_variable.feature +0 -128
  150. data/features/04_aruba_api/environment/delete_environment_variable.feature +0 -63
  151. data/features/04_aruba_api/environment/prepend_environment_variable.feature +0 -128
  152. data/features/04_aruba_api/environment/set_environment_variable.feature +0 -376
  153. data/features/04_aruba_api/filesystem/cd_to_directory.feature +0 -184
  154. data/features/04_aruba_api/filesystem/check_existence_file_or_directory.feature +0 -62
  155. data/features/04_aruba_api/filesystem/check_if_path_is_absolute.feature +0 -48
  156. data/features/04_aruba_api/filesystem/check_if_path_is_directory.feature +0 -53
  157. data/features/04_aruba_api/filesystem/check_if_path_is_file.feature +0 -54
  158. data/features/04_aruba_api/filesystem/check_if_path_is_relative.feature +0 -48
  159. data/features/04_aruba_api/filesystem/create_directory.feature +0 -57
  160. data/features/04_aruba_api/filesystem/move_file_or_directory.feature +0 -119
  161. data/features/04_aruba_api/filesystem/report_disk_usage.feature +0 -152
  162. data/features/04_aruba_api/filesystem/use_fixtures.feature +0 -104
  163. data/features/04_aruba_api/text/extract_text.feature +0 -87
  164. data/features/04_aruba_api/text/replace_variables.feature +0 -45
  165. data/features/04_aruba_api/text/sanitize_text.feature +0 -228
  166. data/features/04_aruba_api/text/unescape_text.feature +0 -127
  167. data/features/05_use_rspec_matchers/command/check_timeouts.feature +0 -48
  168. data/features/05_use_rspec_matchers/directory/have_sub_directory.feature +0 -110
  169. data/features/05_use_rspec_matchers/file/be_a_command_found_in_path.feature +0 -115
  170. data/features/05_use_rspec_matchers/file/be_existing_executable.feature +0 -88
  171. data/features/05_use_rspec_matchers/file/be_existing_file.feature +0 -82
  172. data/features/05_use_rspec_matchers/file/have_file_content.feature +0 -123
  173. data/features/05_use_rspec_matchers/file/have_file_size.feature +0 -107
  174. data/features/05_use_rspec_matchers/path/be_an_absolute_path.feature +0 -74
  175. data/features/05_use_rspec_matchers/path/be_an_existing_path.feature +0 -97
  176. data/features/05_use_rspec_matchers/path/have_permissions.feature +0 -118
  177. data/features/06_use_aruba_cli/initialize_project_with_aruba.feature +0 -79
  178. data/features/06_use_aruba_cli/open_console.feature +0 -55
  179. data/features/08_other/improve_performance_if_using_jruby.feature +0 -37
  180. data/features/step_definitions/hooks.rb +0 -146
  181. data/features/support/aruba.rb +0 -7
  182. data/features/support/env.rb +0 -33
  183. data/features/support/simplecov_setup.rb +0 -11
  184. data/lib/aruba/api/bundler.rb +0 -16
  185. data/lib/aruba/cucumber/deprecated.rb +0 -93
  186. data/lib/aruba/matchers/deprecated.rb +0 -1
  187. data/lib/aruba/matchers/deprecated/file.rb +0 -17
  188. data/lib/aruba/reporting.rb +0 -126
  189. data/script/bootstrap +0 -24
  190. data/script/test +0 -3
  191. data/spec/aruba/api/bundler_spec.rb +0 -15
  192. data/spec/aruba/api/commands_spec.rb +0 -30
  193. data/spec/aruba/api/core_spec.rb +0 -184
  194. data/spec/aruba/api/deprecated_spec.rb +0 -421
  195. data/spec/aruba/api/filesystem_spec.rb +0 -746
  196. data/spec/aruba/api/runtime_spec.rb +0 -28
  197. data/spec/aruba/api_spec.rb +0 -73
  198. data/spec/aruba/aruba_path_spec.rb +0 -103
  199. data/spec/aruba/basic_configuration_spec.rb +0 -5
  200. data/spec/aruba/configuration_spec.rb +0 -5
  201. data/spec/aruba/hooks_spec.rb +0 -17
  202. data/spec/aruba/in_config_wrapper_spec.rb +0 -25
  203. data/spec/aruba/jruby_spec.rb +0 -73
  204. data/spec/aruba/matchers/command/have_output_size_spec.rb +0 -25
  205. data/spec/aruba/matchers/command_spec.rb +0 -174
  206. data/spec/aruba/matchers/deprecated_spec.rb +0 -120
  207. data/spec/aruba/matchers/directory_spec.rb +0 -57
  208. data/spec/aruba/matchers/file_spec.rb +0 -208
  209. data/spec/aruba/matchers/path_spec.rb +0 -58
  210. data/spec/aruba/platform/simple_table_spec.rb +0 -23
  211. data/spec/aruba/platform/windows_environment_variables_spec.rb +0 -500
  212. data/spec/aruba/platforms/unix_command_string_spec.rb +0 -17
  213. data/spec/aruba/platforms/windows_command_string_spec.rb +0 -22
  214. data/spec/aruba/processes/spawn_process_spec.rb +0 -112
  215. data/spec/aruba/rspec_spec.rb +0 -15
  216. data/spec/aruba/runtime_spec.rb +0 -29
  217. data/spec/event_bus/name_resolver_spec.rb +0 -68
  218. data/spec/event_bus_spec.rb +0 -158
  219. data/spec/spec_helper.rb +0 -22
  220. data/spec/support/configs/.keep +0 -0
  221. data/spec/support/configs/aruba.rb +0 -5
  222. data/spec/support/configs/pry.rb +0 -3
  223. data/spec/support/configs/rspec.rb +0 -15
  224. data/spec/support/helpers/.keep +0 -0
  225. data/spec/support/helpers/reporting.rb +0 -44
  226. data/spec/support/matchers/.keep +0 -0
  227. data/spec/support/matchers/option.rb +0 -35
  228. data/spec/support/shared_contexts/.keep +0 -0
  229. data/spec/support/shared_contexts/aruba.rb +0 -49
  230. data/spec/support/shared_examples/.keep +0 -0
  231. data/spec/support/shared_examples/configuration.rb +0 -116
  232. data/spec/support/shared_examples/directory.rb +0 -7
  233. data/spec/support/shared_examples/file.rb +0 -7
  234. data/templates/css/console.css +0 -24
  235. data/templates/css/filesystem.css +0 -42
  236. data/templates/css/pygments-autumn.css +0 -59
  237. data/templates/files.erb +0 -14
  238. data/templates/images/LICENSE +0 -22
  239. data/templates/images/folder.png +0 -0
  240. data/templates/images/page_white.png +0 -0
  241. data/templates/images/page_white_gherkin.png +0 -0
  242. data/templates/images/page_white_ruby.png +0 -0
  243. data/templates/index.erb +0 -20
  244. data/templates/js/filesystem.js +0 -5
  245. data/templates/js/jquery-1.11.3.min.js +0 -5
  246. data/templates/main.erb +0 -34
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env bash
2
+
3
+ set -e
4
+
5
+ info_msg="\e[0;32m[INFO]\e[39;49m"
6
+ error_msg="\e[0;31mFAILED\e[39;49m"
7
+
8
+ # TODO: these are Unix specific
9
+ TMPDIR="${TMPDIR:=/tmp}"
10
+ logfile=`mktemp -t aruba_tests.XXXXXXXXXX`
11
+
12
+ output_error_log() {
13
+ [[ -f "$logfile" ]] && ( cat "logfile" >&2; rm -f "$logfile")
14
+ }
15
+
16
+ check_for_binary() {
17
+ name="$1"
18
+
19
+ echo -ne "$info_msg Checking if $name installed? "
20
+ which "$name" >/dev/null 2>"$logfile" || ( echo -e "$error_msg\n\nCould not find \`$name\`. Please install $name or add it to PATH"; output_error_log; exit 1 )
21
+ echo OK
22
+ }
23
+
24
+ check_for_binary "ruby"
25
+ # check_for_binary "bash"
26
+ # check_for_binary "zsh"
27
+ # check_for_binary "python"
28
+ # check_for_binary "javac"
29
+
30
+ echo -e "$info_msg rubygem \"bundler\" "
31
+ gem install bundler
32
+
33
+ echo -e "$info_msg \"bundle install\" "
34
+ bundle install $*
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ bundle exec rake rubygem:build
File without changes
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ bundle exec rake rubygem:release
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env bash
2
+
3
+ : ${RUN_IN_DOCKER:='0'}
4
+
5
+ if [ "$RUN_IN_DOCKER" == '1' ]; then
6
+ bundle exec rake "docker:run[$*]"
7
+ else
8
+ bundle exec rake test $*
9
+ fi
@@ -5,7 +5,7 @@ require 'ffi'
5
5
 
6
6
  java_version = (RUBY_DESCRIPTION.match(/.*?on.*?(1\.[\d]\..*? )/))[1] if defined?(JRUBY_VERSION)
7
7
 
8
- std_opts = "--color --exclude features/fixtures --require features --tags ~@unsupported-on"
8
+ std_opts = "--format pretty --color --exclude features/fixtures --require features --tags ~@unsupported-on"
9
9
  java_default_opts = "--tags ~@wip-jruby-java-1.6" if defined?(JRUBY_VERSION) && (java_version < '1.7.0')
10
10
  java_wip_opts = "--tags @wip-jruby-java-1.6:3" if defined?(JRUBY_VERSION) && (java_version < '1.7.0')
11
11
 
@@ -17,8 +17,6 @@ ignore_opts << '--tags ~@unsupported-on-platform-windows' if FFI::Platform.wind
17
17
  ignore_opts << '--tags ~@unsupported-on-platform-unix' if FFI::Platform.unix?
18
18
  ignore_opts << '--tags ~@unsupported-on-platform-mac' if FFI::Platform.mac?
19
19
  ignore_opts << '--tags ~@unsupported-on-ruby-older-2' if RUBY_VERSION < '2'
20
- ignore_opts << '--tags ~@unsupported-on-ruby-older-193' if RUBY_VERSION < '1.9.3'
21
- ignore_opts << '--tags ~@unsupported-on-ruby-older-19' if RUBY_VERSION < '1.9'
22
20
  ignore_opts << '--tags ~@requires-aruba-version-1' if Aruba::VERSION < '1'
23
21
  ignore_opts = ignore_opts.join(' ')
24
22
  %>
@@ -0,0 +1,26 @@
1
+ # To build the base image (official Aruba base for this), run:
2
+ #
3
+ # $ docker-compose build base
4
+ #
5
+ # To run the tests, run:
6
+ #
7
+ # $ docker-compose run tests
8
+ #
9
+
10
+ version: '2'
11
+ services:
12
+ base:
13
+ image: 'cucumber/aruba'
14
+ container_name: 'cucumber-aruba-1'
15
+ build:
16
+ context: .
17
+ dockerfile: Dockerfile
18
+ args:
19
+ http_proxy: "${http_proxy}"
20
+ https_proxy: "${https_proxy}"
21
+ HTTP_PROXY: "${HTTP_PROXY}"
22
+ HTTPS_PROXY: "${HTTPS_PROXY}"
23
+ working_dir: /home/guest/aruba
24
+ command: /bin/bash -l -c "bundle exec rake test"
25
+ volumes:
26
+ - .:/home/guest/aruba
File without changes
@@ -31,7 +31,7 @@ cli
31
31
 
32
32
  ### Library
33
33
 
34
- You can use `script/console` to load your library.
34
+ You can use `bin/console` to load your library.
35
35
 
36
36
  ### Fixture
37
37
 
@@ -0,0 +1 @@
1
+ require 'aruba/cucumber'
@@ -1 +1 @@
1
- require 'aruba/cucumber'
1
+ require_relative 'aruba'
@@ -1,10 +1,6 @@
1
1
  require 'cli/app/version'
2
2
 
3
- if RUBY_VERSION < '1.9.3'
4
- ::Dir.glob(::File.expand_path('../**/*.rb', __FILE__)).each { |f| require File.join(File.dirname(f), File.basename(f, '.rb')) }
5
- else
6
- ::Dir.glob(File.expand_path('../**/*.rb', __FILE__)).each { |f| require_relative f }
7
- end
3
+ ::Dir.glob(File.expand_path('../**/*.rb', __FILE__)).each { |f| require_relative f }
8
4
 
9
5
  module Cli
10
6
  module App
@@ -1,10 +1,5 @@
1
1
  $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
2
2
 
3
3
  require 'cli/app'
4
- require 'support/aruba'
5
4
 
6
- if RUBY_VERSION < '1.9.3'
7
- ::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require File.join(File.dirname(f), File.basename(f, '.rb')) }
8
- else
9
- ::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require_relative f }
10
- end
5
+ ::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require_relative f }
@@ -1,5 +1,7 @@
1
1
  require 'cli/app/version'
2
2
 
3
+ ::Dir.glob(File.expand_path('../**/*.rb', __FILE__)).each { |f| require_relative f }
4
+
3
5
  module Cli
4
6
  module App
5
7
  # Your code goes here...
@@ -6,7 +6,7 @@ require 'aruba/extensions/string/strip'
6
6
 
7
7
  require 'aruba/platform'
8
8
  require 'aruba/api/core'
9
- require 'aruba/api/commands'
9
+ require 'aruba/api/command'
10
10
 
11
11
  if Aruba::VERSION <= '1.0.0'
12
12
  require 'aruba/api/deprecated'
@@ -15,7 +15,7 @@ end
15
15
  require 'aruba/api/environment'
16
16
  require 'aruba/api/filesystem'
17
17
  require 'aruba/api/text'
18
- require 'aruba/api/bundler'
18
+ require 'aruba/api/rvm'
19
19
 
20
20
  Aruba.platform.require_matching_files('../matchers/**/*.rb', __FILE__)
21
21
 
@@ -27,7 +27,7 @@ module Aruba
27
27
  include Aruba::Api::Commands
28
28
  include Aruba::Api::Environment
29
29
  include Aruba::Api::Filesystem
30
- include Aruba::Api::Bundler
30
+ include Aruba::Api::Rvm
31
31
  include Aruba::Api::Deprecated
32
32
  include Aruba::Api::Text
33
33
  end
@@ -103,30 +103,6 @@ module Aruba
103
103
  self
104
104
  end
105
105
 
106
- # Get stdout of all processes
107
- #
108
- # @return [String]
109
- # The stdout of all processes which have run before
110
- def all_stdout
111
- aruba.command_monitor.all_stdout
112
- end
113
-
114
- # Get stderr of all processes
115
- #
116
- # @return [String]
117
- # The stderr of all processes which have run before
118
- def all_stderr
119
- aruba.command_monitor.all_stderr
120
- end
121
-
122
- # Get stderr and stdout of all processes
123
- #
124
- # @return [String]
125
- # The stderr and stdout of all processes which have run before
126
- def all_output
127
- aruba.command_monitor.all_output
128
- end
129
-
130
106
  # Find a started command
131
107
  #
132
108
  # @param [String, Command] commandline
@@ -173,9 +149,8 @@ module Aruba
173
149
  stop_signal = opts[:stop_signal].nil? ? aruba.config.stop_signal : opts[:stop_signal]
174
150
  startup_wait_time = opts[:startup_wait_time].nil? ? aruba.config.startup_wait_time : opts[:startup_wait_time]
175
151
  else
176
- if args.size > 0
177
- Aruba.platform.deprecated(
178
- "Please pass options to `#run_command` as named parameters/hash and don\'t use the old style, e.g. `#run_command('cmd', :exit_timeout => 5)`.")
152
+ if args.size > 1
153
+ Aruba.platform.deprecated("Please pass options to `#run` as named parameters/hash and don\'t use the old style, e.g. `#run_command('cmd', :exit_timeout => 5)`.")
179
154
  end
180
155
 
181
156
  exit_timeout = args[0].nil? ? aruba.config.exit_timeout : args[0]
@@ -277,7 +252,7 @@ module Aruba
277
252
  opts = args.pop
278
253
  fail_on_error = opts.delete(:fail_on_error) == true ? true : false
279
254
  else
280
- if args.size > 0
255
+ if args.size > 1
281
256
  # rubocop:disable Metrics/LineLength
282
257
  Aruba.platform.deprecated("Please pass options to `#run_command_and_stop` as named parameters/hash and don\'t use the old style with positional parameters, NEW: e.g. `#run_command_and_stop('cmd', :exit_timeout => 5)`.")
283
258
  # rubocop:enable Metrics/LineLength
@@ -305,9 +280,8 @@ module Aruba
305
280
  begin
306
281
  expect(command).to have_finished_in_time
307
282
  expect(command).to be_successfully_executed
308
- rescue RSpec::Expectations::ExpectationNotMetError => e
283
+ rescue ::RSpec::Expectations::ExpectationNotMetError => e
309
284
  aruba.announcer.activate(aruba.config.activate_announcer_on_command_failure)
310
- aruba.event_bus.notify Events::CommandStopped.new(command)
311
285
  raise e
312
286
  end
313
287
  end
@@ -3,6 +3,8 @@ require 'aruba/runtime'
3
3
  require 'aruba/errors'
4
4
  require 'aruba/setup'
5
5
 
6
+ require 'aruba/config/jruby'
7
+
6
8
  # Aruba
7
9
  module Aruba
8
10
  # Api
@@ -23,21 +25,12 @@ module Aruba
23
25
  # This will only clean up aruba's working directory to remove all
24
26
  # artifacts of your tests. This does NOT clean up the current working
25
27
  # directory.
26
- def setup_aruba(clobber = true)
27
- Aruba::Setup.new(aruba).call(clobber)
28
+ def setup_aruba
29
+ Aruba::Setup.new(aruba).call
28
30
 
29
31
  self
30
32
  end
31
33
 
32
- # Execute block in Aruba's current directory
33
- #
34
- # @yield
35
- # The block which should be run in current directory
36
- def in_current_directory(&block)
37
- create_directory '.' unless directory?('.')
38
- cd('.', &block)
39
- end
40
-
41
34
  # Switch to directory
42
35
  #
43
36
  # @param [String] dir
@@ -68,7 +61,7 @@ module Aruba
68
61
 
69
62
  Aruba.platform.chdir File.join(aruba.root_directory, aruba.current_directory)
70
63
 
71
- result = with_environment(
64
+ result = Aruba.platform.with_environment(
72
65
  'OLDPWD' => old_dir,
73
66
  'PWD' => File.expand_path(File.join(aruba.root_directory, aruba.current_directory)),
74
67
  &block
@@ -139,17 +132,8 @@ module Aruba
139
132
  aruba.logger.warn %(`aruba`'s working directory does not exist. Maybe you forgot to run `setup_aruba` before using it's API. This warning will be an error from 1.0.0) unless Aruba.platform.directory? File.join(aruba.config.root_directory, aruba.config.working_directory)
140
133
  # rubocop:enable Metrics/LineLength
141
134
 
142
- if RUBY_VERSION < '1.9'
143
- prefix = file_name.chars.to_a[0].to_s
144
- rest = if file_name.chars.to_a[2..-1].nil?
145
- nil
146
- else
147
- file_name.chars.to_a[2..-1].join
148
- end
149
- else
150
- prefix = file_name[0]
151
- rest = file_name[2..-1]
152
- end
135
+ prefix = file_name[0]
136
+ rest = file_name[2..-1]
153
137
 
154
138
  if aruba.config.fixtures_path_prefix == prefix
155
139
  path = File.join(*[aruba.fixtures_directory, rest].compact)
@@ -170,8 +154,7 @@ module Aruba
170
154
  path.to_s
171
155
  else
172
156
  directory = File.join(aruba.root_directory, aruba.current_directory)
173
- directory = File.expand_path(dir_string, directory) if dir_string
174
- File.expand_path(file_name, directory)
157
+ ArubaPath.new(File.join(*[directory, dir_string, file_name].compact)).expand_path.to_s
175
158
  end
176
159
  end
177
160
  # rubocop:enable Metrics/MethodLength
@@ -13,13 +13,8 @@ module Aruba
13
13
  # @return [Array]
14
14
  # The directory path: Each subdirectory is a member of an array
15
15
  def dirs
16
- Aruba.platform.deprecated(
17
- 'The use of "dirs" is deprecated.' \
18
- ' Use "Aruba.configure { |c| c.current_directory = \'path/to/dir\' }"' \
19
- ' instead to set the current directory and "expand_path(".")" to get' \
20
- ' the current directory or use "#cd(\'.\') { # your code }" to run' \
21
- ' code in the current directory'
22
- )
16
+ Aruba.platform.deprecated('The use of "@dirs" is deprecated. Use "Aruba.configure { |c| c.current_directory = \'path/to/dir\' }" instead to set the "current_directory') if defined? @dirs
17
+ Aruba.platform.deprecated('The use of "dirs" deprecated. Use "Aruba.configure { |c| c.current_directory = \'path/to/dir\' }" instead to set the "current_directory and "expand_path(".")" to get the current directory or use "#cd(\'.\') { # your code }" to run code in the current directory')
23
18
 
24
19
  @dirs ||= aruba.current_directory
25
20
  end
@@ -30,11 +25,7 @@ module Aruba
30
25
  # @return
31
26
  # Current directory
32
27
  def current_directory
33
- Aruba.platform.deprecated(
34
- 'The use of "current_directory" is deprecated.' \
35
- ' Use "expand_path(".")" to get the current directory or "#cd" to run' \
36
- ' code in the current directory.'
37
- )
28
+ Aruba.platform.deprecated(%(The use of "current_directory" deprecated. Use "expand_path(".")" to get the current directory or "#cd" to run code in the current directory. #{caller.first}))
38
29
 
39
30
  aruba.current_directory.to_s
40
31
  end
@@ -42,15 +33,23 @@ module Aruba
42
33
  # @deprecated
43
34
  # Clean the current directory
44
35
  def clean_current_directory
45
- Aruba.platform.deprecated(
46
- 'The use of "clean_current_directory" is deprecated.' \
47
- ' Either use "#setup_aruba" or "#remove(\'.\')" to clean up Aruba\'s' \
48
- ' working directory before your tests are run'
49
- )
36
+ Aruba.platform.deprecated('The use of "clean_current_directory" is deprecated. Either use "#setup_aruba" or `#remove(\'.\') to clean up aruba\'s working directory before your tests are run')
50
37
 
51
38
  setup_aruba
52
39
  end
53
40
 
41
+ # @deprecated
42
+ # Execute block in current directory
43
+ #
44
+ # @yield
45
+ # The block which should be run in current directory
46
+ def in_current_directory(&block)
47
+ Aruba.platform.deprecated('The use of "in_current_directory" deprecated. Use "#cd(\'.\') { # your code }" instead. But be aware, `cd` requires a previously created directory')
48
+
49
+ create_directory '.' unless directory?('.')
50
+ cd('.', &block)
51
+ end
52
+
54
53
  # @deprecated
55
54
  def detect_ruby(cmd)
56
55
  Aruba.platform.deprecated('The use of "#detect_ruby" is deprecated')
@@ -74,31 +73,21 @@ module Aruba
74
73
 
75
74
  # @deprecated
76
75
  def absolute_path(*args)
77
- Aruba.platform.deprecated(
78
- 'The use of "absolute_path" is deprecated.' \
79
- ' Use "expand_path" instead.' \
80
- ' But be aware that "expand_path" uses a different implementation'
81
- )
76
+ Aruba.platform.deprecated('The use of "absolute_path" is deprecated. Use "expand_path" instead. But be aware that "expand_path" uses a different implementation')
82
77
 
83
78
  File.expand_path File.join(*args), aruba.current_directory
84
79
  end
85
80
 
86
81
  # @deprecated
87
82
  def _read_interactive
88
- Aruba.platform.deprecated(
89
- 'The use of "#_read_interactive" is deprecated.' \
90
- ' Use "last_command_started.stdout" instead'
91
- )
83
+ Aruba.platform.deprecated('The use of "#_read_interactive" is deprecated. Please use "last_command_started.stdout" instead')
92
84
 
93
85
  last_command_started.stdout
94
86
  end
95
87
 
96
88
  # @deprecated
97
89
  def announce_or_puts(msg)
98
- Aruba.platform.deprecated(
99
- 'The use of "#announce_or_puts" is deprecated.' \
100
- ' Use "#announcer.mode = :kernel" or "#announcer.mode = :puts" instead'
101
- )
90
+ Aruba.platform.deprecated('The use of "#announce_or_puts" is deprecated. Please use "#announcer.mode = :kernel" or "#announcer.mode = :puts" instead')
102
91
 
103
92
  if(@puts)
104
93
  Kernel.puts(msg)
@@ -109,20 +98,14 @@ module Aruba
109
98
 
110
99
  # @deprecated
111
100
  def _write_interactive(input)
112
- Aruba.platform.deprecated(
113
- 'The use of "#_write_interactive" is deprecated.' \
114
- ' Use "#last_command_started.write()" instead'
115
- )
101
+ Aruba.platform.deprecated('The use of "#_write_interactive" is deprecated. Please use "#last_command_started.write()" instead')
116
102
 
117
103
  last_command_started.write(input)
118
104
  end
119
105
 
120
106
  # @deprecated
121
107
  def eot
122
- Aruba.platform.deprecated(
123
- 'The use of "#eot" is deprecated.' \
124
- ' Use "#close_input" instead.'
125
- )
108
+ Aruba.platform.deprecated(%{\e[35m The \"#eot\"-method is deprecated. It will be deleted with the next major version. Please use \"#close_input\"-method instead.\e[0m})
126
109
 
127
110
  close_input
128
111
  end
@@ -133,99 +116,27 @@ module Aruba
133
116
  # The command to by run
134
117
  #
135
118
  # @see #cmd
136
- # @deprecated
119
+ # @deprectated
137
120
  def run_interactive(cmd)
138
- Aruba.platform.deprecated(
139
- 'The use of "#run_interactive" is deprecated.' \
140
- ' Use "run_command" instead'
141
- )
121
+ Aruba.platform.deprecated('The use of "#run_interactive" is deprecated. You can simply use "run" instead')
142
122
 
143
123
  run_command(cmd)
144
124
  end
145
125
 
146
- # Run given command and stop it if timeout is reached
147
- #
148
- # @param [String] cmd
149
- # The command which should be executed
150
- #
151
- # @param [Hash] opts
152
- # Options
153
- #
154
- # @option [Integer] exit_timeout
155
- # If the timeout is reached the command will be killed
156
- #
157
- # @option [Integer] io_wait_timeout
158
- # Wait for IO to finish
159
- #
160
- # @option [Integer] startup_wait_time
161
- # Wait for a command to start
162
- #
163
- # @option [String] stop_signal
164
- # Use signal to stop command
165
- #
166
- # @yield [SpawnProcess]
167
- # Run block with process
168
- #
169
- # @see #run_command
170
- # @deprecated
171
- def run(*args)
172
- Aruba.platform.deprecated(
173
- 'The use of "#run" is deprecated.' \
174
- ' Use "run_command" instead'
175
- )
176
-
177
- run_command(*args)
178
- end
179
-
180
- # Run a command with aruba
181
- #
182
- # Checks for error during command execution and checks the output to detect
183
- # an timeout error.
184
- #
185
- # @param [String] cmd
186
- # The command to be executed
187
- #
188
- # @param [Hash] options
189
- # Options for aruba
190
- #
191
- # @option [TrueClass,FalseClass] fail_on_error
192
- # Should aruba fail on error?
193
- #
194
- # @option [Integer] exit_timeout
195
- # Timeout for execution
196
- #
197
- # @option [Integer] io_wait_timeout
198
- # Timeout for IO - STDERR, STDOUT
199
- #
200
- def run_simple(*args)
201
- Aruba.platform.deprecated(
202
- 'The use of "#run_simple" is deprecated.' \
203
- ' Use "run_command_and_stop" instead'
204
- )
205
-
206
- run_command_and_stop(*args)
207
- end
208
-
209
126
  # @deprecated
210
127
  # Create an empty file
211
128
  #
212
129
  # @param [String] file_name
213
130
  # The name of the file
214
131
  def touch_file(*args)
215
- Aruba.platform.deprecated(
216
- 'The use of "#touch_file" is deprecated.' \
217
- ' Use "#touch" instead'
218
- )
132
+ Aruba.platform.deprecated('The use of "#touch_file" is deprecated. Use "#touch" instead')
219
133
 
220
134
  touch(*args)
221
135
  end
222
136
 
223
137
  # @deprecated
224
138
  def mod?(file, perms, &block)
225
- Aruba.platform.deprecated(
226
- 'The use of "#mod?" is deprecated.' \
227
- ' Use "expect(file).to have_permissions(perms)" instead'
228
- )
139
+ Aruba.platform.deprecated('The use of "#mod?" is deprecated. Use "expect().to have_permissions()" instead')
229
140
 
230
141
  expect(Array(file)).to Aruba::Matchers.all have_permissions(perms)
231
142
  end
@@ -236,20 +147,14 @@ module Aruba
236
147
  # @param [String] file_name
237
148
  # The file which should be deleted in current directory
238
149
  def remove_file(*args)
239
- Aruba.platform.deprecated(
240
- 'The use of "#remove_file" is deprecated.' \
241
- ' Use "#remove" instead'
242
- )
150
+ Aruba.platform.deprecated('The use of "#remove_file" is deprecated. Use "#remove" instead')
243
151
 
244
152
  remove(*args)
245
153
  end
246
154
 
247
155
  # @deprecated
248
156
  def create_dir(*args)
249
- Aruba.platform.deprecated(
250
- 'The use of "#create_dir" is deprecated.' \
251
- ' Use "#create_directory" instead'
252
- )
157
+ Aruba.platform.deprecated('The use of "#create_dir" is deprecated. Use "#create_directory" instead')
253
158
  create_directory(*args)
254
159
  end
255
160
 
@@ -259,19 +164,13 @@ module Aruba
259
164
  # @param [String] directory_name
260
165
  # The name of the directory which should be removed
261
166
  def remove_directory(*args)
262
- Aruba.platform.deprecated(
263
- 'The use of "remove_directory" is deprecated.' \
264
- ' Use "remove" instead'
265
- )
167
+ Aruba.platform.deprecated('The use of "remove_directory" is deprecated. Use "remove" instead')
266
168
  remove(*args)
267
169
  end
268
170
 
269
171
  # @deprecated
270
172
  def remove_dir(*args)
271
- Aruba.platform.deprecated(
272
- 'The use of "remove_dir" is deprecated.' \
273
- ' Use "remove" instead'
274
- )
173
+ Aruba.platform.deprecated('The use of "remove_dir" is deprecated. Use "remove" instead')
275
174
  remove(*args)
276
175
  end
277
176
 
@@ -285,11 +184,7 @@ module Aruba
285
184
  # @param [true,false] expect_presence
286
185
  # Should the given paths be present (true) or absent (false)
287
186
  def check_file_presence(paths, expect_presence = true)
288
- Aruba.platform.deprecated(
289
- 'The use of "check_file_presence" is deprecated.' \
290
- ' Use "expect(path).to be_an_existing_file" or' \
291
- ' "expect(all_paths).to all match /pattern/" instead'
292
- )
187
+ Aruba.platform.deprecated('The use of "check_file_presence" is deprecated. Use "expect().to be_an_existing_file" or "expect(all_paths).to all match /pattern/" instead')
293
188
 
294
189
  stop_all_commands
295
190
 
@@ -325,10 +220,7 @@ module Aruba
325
220
  # check_file_size(paths_and_sizes)
326
221
  #
327
222
  def check_file_size(paths_and_sizes)
328
- Aruba.platform.deprecated(
329
- 'The use of "#check_file_size" is deprecated.' \
330
- ' Use "expect(file).to have_file_size(size)" instead'
331
- )
223
+ Aruba.platform.deprecated('The use of "#check_file_size" is deprecated. Use "expect(file).to have_file_size(size)", "expect(all_files).to all have_file_size(1)", "expect(all_files).to include a_file_with_size(1)" instead')
332
224
 
333
225
  stop_all_commands
334
226
 
@@ -339,10 +231,7 @@ module Aruba
339
231
 
340
232
  # @deprecated
341
233
  def check_exact_file_content(file, exact_content, expect_match = true)
342
- Aruba.platform.deprecated(
343
- 'The use of "#check_exact_file_content" is deprecated.' \
344
- ' Use "expect(file).to have_file_content(content)" with a string'
345
- )
234
+ Aruba.platform.deprecated('The use of "#check_exact_file_content" is deprecated. Use "expect(file).to have_file_content(content)" with a string')
346
235
 
347
236
  check_file_content(file, exact_content, expect_match)
348
237
  end
@@ -359,17 +248,14 @@ module Aruba
359
248
  # @param [true, false] expect_match
360
249
  # Must the content be in the file or not
361
250
  def check_binary_file_content(file, reference_file, expect_match = true)
362
- Aruba.platform.deprecated(
363
- 'The use of "#check_binary_file_content" is deprecated.' \
364
- ' Use "expect(file).to have_same_file_content_as(file)"'
365
- )
251
+ Aruba.platform.deprecated('The use of "#check_binary_file_content" is deprecated. Use "expect(file).to have_same_file_content_like(file)"')
366
252
 
367
253
  stop_all_commands
368
254
 
369
255
  if expect_match
370
- expect(file).to have_same_file_content_as reference_file
256
+ expect(file).to have_same_file_content_like reference_file
371
257
  else
372
- expect(file).not_to have_same_file_content_as reference_file
258
+ expect(file).not_to have_same_file_content_like reference_file
373
259
  end
374
260
  end
375
261
 
@@ -382,10 +268,7 @@ module Aruba
382
268
  # @param [true, false] expect_presence
383
269
  # Should the directory be there or should the directory not be there
384
270
  def check_directory_presence(paths, expect_presence)
385
- Aruba.platform.deprecated(
386
- 'The use of "#check_directory_presence" is deprecated.' \
387
- ' Use "expect(directory).to be_an_existing_directory"'
388
- )
271
+ Aruba.platform.deprecated('The use of "#check_directory_presence" is deprecated. Use "expect(directory).to be_an_existing_directory"')
389
272
 
390
273
  stop_all_commands
391
274
 
@@ -402,10 +285,7 @@ module Aruba
402
285
 
403
286
  # @deprecated
404
287
  def prep_for_fs_check(&block)
405
- Aruba.platform.deprecated(
406
- 'The use of "prep_for_fs_check" is deprecated.' \
407
- ' Use apropriate methods and the new rspec matchers instead'
408
- )
288
+ Aruba.platform.deprecated('The use of "prep_for_fs_check" is deprecated. Use apropriate methods and the new rspec matchers instead')
409
289
 
410
290
  stop_all_commands
411
291
 
@@ -414,19 +294,15 @@ module Aruba
414
294
 
415
295
  # @deprecated
416
296
  def assert_exit_status_and_partial_output(expect_to_pass, expected)
417
- Aruba.platform.deprecated(
418
- 'The use of "assert_exit_status_and_partial_output" is deprecated.' \
419
- ' Use "expect(last_command_started).to be_successfully_executed"' \
420
- ' and "expect(command).to have_output /partial/" instead.'
421
- )
297
+ Aruba.platform.deprecated('The use of "assert_exit_status_and_partial_output" is deprecated. Use "#assert_access" and "#assert_partial_output" instead')
422
298
 
423
299
  assert_success(expect_to_pass)
424
300
  assert_partial_output(expected, all_output)
425
301
  end
426
302
 
303
+ # TODO: Remove this. Call more methods elsewhere instead. Reveals more intent.
427
304
  # @deprecated
428
- def assert_exit_status_and_output(expect_to_pass, expected_output,
429
- expect_exact_output)
305
+ def assert_exit_status_and_output(expect_to_pass, expected_output, expect_exact_output)
430
306
  assert_success(expect_to_pass)
431
307
  if expect_exact_output
432
308
  assert_exact_output(expected_output, all_output)
@@ -451,11 +327,7 @@ module Aruba
451
327
  # @param [true, false] expect_match
452
328
  # Must the content be in the file or not
453
329
  def check_file_content(file, content, expect_match = true)
454
- Aruba.platform.deprecated(
455
- 'The use of "#check_file_content" is deprecated.' \
456
- ' Use "expect(file).to have_file_content(content)" instead.' \
457
- ' For eq match use string, for partial match use /regex/'
458
- )
330
+ Aruba.platform.deprecated('The use of "#check_file_content" is deprecated. Use "expect(file).to have_file_content(content)" instead. For eq match use string, for partial match use /regex/')
459
331
 
460
332
  stop_all_commands
461
333
 
@@ -468,51 +340,38 @@ module Aruba
468
340
 
469
341
  # @deprecated
470
342
  def _mkdir(dir_name)
471
- Aruba.platform.deprecated(
472
- 'The use of "#_mkdir" is deprecated'
473
- )
343
+ Aruba.platform.deprecated('The use of "#_mkdir" is deprecated')
474
344
 
475
345
  Aruba.platform.mkdir(dir_name)
476
346
  end
477
347
 
478
348
  # @deprecated
479
349
  def _rm(dir_name)
480
- Aruba.platform.deprecated(
481
- 'The use of "#_rm_rf" is deprecated'
482
- )
350
+ Aruba.platform.deprecated('The use of "#_rm_rf" is deprecated')
483
351
 
484
352
  Aruba.platform.rm(dir_name)
485
353
  end
486
354
 
487
355
  # @deprecated
488
356
  def current_dir(*args, &block)
489
- Aruba.platform.deprecated(
490
- 'The use of "#current_dir" is deprecated.' \
491
- ' Use "#current_directory" instead'
492
- )
357
+ Aruba.platform.deprecated('The use of "#current_dir" is deprecated. Use "#current_directory" instead')
493
358
 
494
359
  current_directory(*args, &block)
495
360
  end
496
361
 
497
362
  # @deprecated
498
363
  def clean_current_dir(*args, &block)
499
- Aruba.platform.deprecated(
500
- 'The use of "clean_current_dir" is deprecated.' \
501
- ' Use "#setup_aruba" or `#remove(\'.\') to clean up Aruba\'s working' \
502
- ' directory before your tests are run'
503
- )
364
+ Aruba.platform.deprecated('The use of "clean_current_dir" is deprecated. Either use "#setup_aruba" or `#remove(\'.\') to clean up aruba\'s working directory before your tests are run')
504
365
 
505
366
  setup_aruba
506
367
  end
507
368
 
508
369
  # @deprecated
509
370
  def in_current_dir(&block)
510
- Aruba.platform.deprecated(
511
- 'The use of "in_current_dir" is deprecated.' \
512
- ' Use "#in_current_directory { }" instead'
513
- )
371
+ Aruba.platform.deprecated('The use of "in_current_dir" is deprecated. Use "#cd(\'.\') { }" instead')
514
372
 
515
- in_current_directory(&block)
373
+ create_directory '.' unless directory?('.')
374
+ cd('.', &block)
516
375
  end
517
376
 
518
377
  # @deprecated
@@ -524,11 +383,7 @@ module Aruba
524
383
  # @yield
525
384
  # The block of code which should be run with the changed environment variables
526
385
  def with_env(env = {}, &block)
527
- Aruba.platform.deprecated(
528
- 'The use of "#with_env" is deprecated.' \
529
- ' Use "#with_environment {}" instead. But be careful this uses a' \
530
- ' different implementation'
531
- )
386
+ Aruba.platform.deprecated('The use of "#with_env" is deprecated. Use "#with_environment {}" instead. But be careful this uses a different implementation')
532
387
 
533
388
  env.each do |k,v|
534
389
  set_env k, v
@@ -540,12 +395,9 @@ module Aruba
540
395
  # @deprecated
541
396
  # Restore original process environment
542
397
  def restore_env
543
- Aruba.platform.deprecated(
544
- 'The use of "#restore_env" is deprecated.' \
545
- ' If you use "set_environment_variable" there\'s no need to restore' \
546
- ' the environment'
547
- )
548
-
398
+ # No output because we need to reset env on each scenario/spec run
399
+ # Aruba.platform.deprecated('The use of "#restore_env" is deprecated. If you use "set_environment_variable" there\'s no need to restore the environment')
400
+ #
549
401
  original_env.each do |key, value|
550
402
  if value
551
403
  ENV[key] = value
@@ -566,11 +418,7 @@ module Aruba
566
418
  # @param [String] value
567
419
  # The value of the environment variable. Needs to be a string.
568
420
  def set_env(key, value)
569
- Aruba.platform.deprecated(
570
- 'The use of "#set_env" is deprecated.' \
571
- ' Use "set_environment_variable" instead. ' \
572
- ' But be careful, this method uses a different kind of implementation'
573
- )
421
+ Aruba.platform.deprecated('The use of "#set_env" is deprecated. Please use "set_environment_variable" instead. But be careful, this method uses a different kind of implementation')
574
422
 
575
423
  aruba.announcer.announce(:environment, key, value)
576
424
  set_environment_variable key, value
@@ -581,19 +429,14 @@ module Aruba
581
429
 
582
430
  # @deprecated
583
431
  def original_env
584
- Aruba.platform.deprecated(
585
- 'The use of "#original_env" is deprecated'
586
- )
432
+ # Aruba.platform.deprecated('The use of "#original_env" is deprecated')
587
433
 
588
434
  @original_env ||= {}
589
435
  end
590
436
 
591
437
  # @deprecated
592
438
  def filesystem_permissions(*args)
593
- Aruba.platform.deprecated(
594
- 'The use of "#filesystem_permissions" is deprecated.' \
595
- ' Use "#chmod" instead'
596
- )
439
+ Aruba.platform.deprecated('The use of "#filesystem_permissions" is deprecated. Please use "#chmod" instead')
597
440
 
598
441
  chmod(*args)
599
442
  end
@@ -607,10 +450,7 @@ module Aruba
607
450
  # @param [Boolean] expected_result
608
451
  # Are the permissions expected to be mode or are they expected not to be mode?
609
452
  def check_filesystem_permissions(*args)
610
- Aruba.platform.deprecated(
611
- 'The use of "#check_filesystem_permissions" is deprecated.' \
612
- ' Use "expect(path).to have_permissions perms" instead'
613
- )
453
+ Aruba.platform.deprecated('The use of "#check_filesystem_permissions" is deprecated. Please use "expect().to have_permissions perms" instead')
614
454
 
615
455
  args = args.flatten
616
456
 
@@ -630,9 +470,7 @@ module Aruba
630
470
 
631
471
  # @deprecated
632
472
  def _create_file(name, content, check_presence)
633
- Aruba.platform.deprecated(
634
- 'The use of "#_create_file" is deprecated.'
635
- )
473
+ Aruba.platform.deprecated('The use of "#_create_file" is deprecated. It will be removed soon')
636
474
 
637
475
  ArubaFileCreator.new.write(expand_path(name), content, check_presence)
638
476
 
@@ -641,9 +479,7 @@ module Aruba
641
479
 
642
480
  # @deprecated
643
481
  def _create_fixed_size_file(file_name, file_size, check_presence)
644
- Aruba.platform.deprecated(
645
- 'The use of "#_create_fixed_size_file" is deprecated.'
646
- )
482
+ Aruba.platform.deprecated('The use of "#_create_fixed_size_file" is deprecated. It will be removed soon')
647
483
 
648
484
  ArubaFixedSizeFileCreator.new.write(expand_path(name), size, check_presence)
649
485
 
@@ -659,17 +495,10 @@ module Aruba
659
495
  # @return
660
496
  # The string stripped from escape sequences
661
497
  def unescape(string, keep_ansi = false)
662
- Aruba.platform.deprecated(
663
- 'The use of "#unescape" is deprecated.' \
664
- ' Use "#sanitize_text" intead'
665
- )
498
+ Aruba.platform.deprecated('The use of "#unescape" is deprecated. Please use "#sanitize_text" intead')
666
499
 
667
500
  string = unescape_text(string)
668
- if !keep_ansi ||
669
- !aruba.config.keep_ansi ||
670
- aruba.config.remove_ansi_escape_sequences
671
- string = extract_text(string)
672
- end
501
+ string = extract_text(string) if !keep_ansi || !aruba.config.keep_ansi || aruba.config.remove_ansi_escape_sequences
673
502
 
674
503
  string
675
504
  end
@@ -677,10 +506,7 @@ module Aruba
677
506
  # @deprecated
678
507
  # The root directory of aruba
679
508
  def root_directory
680
- Aruba.platform.deprecated(
681
- 'The use of "#root_directory" is deprecated.' \
682
- ' Use "aruba.root_directory" instead'
683
- )
509
+ Aruba.platform.deprecated('The use of "#root_directory" is deprecated. Use "aruba.root_directory" instead')
684
510
 
685
511
  aruba.root_directory
686
512
  end
@@ -691,58 +517,43 @@ module Aruba
691
517
  # @return [String]
692
518
  # The directory to where your fixtures are stored
693
519
  def fixtures_directory
694
- Aruba.platform.deprecated(
695
- 'The use of "#fixtures_directory" is deprecated.' \
696
- ' Use "aruba.fixtures_directory" instead'
697
- )
520
+ Aruba.platform.deprecated('The use of "#fixtures_directory" is deprecated. Use "aruba.fixtures_directory" instead')
698
521
 
699
522
  aruba.fixtures_directory
700
523
  end
701
524
 
702
525
  # @deprecated
526
+ # rubocop:disable Metrics/CyclomaticComplexity
527
+ # rubocop:disable Metrics/MethodLength
703
528
  def check_for_deprecated_variables
704
529
  if defined? @aruba_exit_timeout
705
- Aruba.platform.deprecated(
706
- 'The use of "@aruba_exit_timeout" is deprecated.' \
707
- ' Use "#aruba.config.exit_timeout = <numeric>" instead'
708
- )
530
+ Aruba.platform.deprecated('The use of "@aruba_exit_timeout" is deprecated. Use "#aruba.config.exit_timeout = <numeric>" instead')
709
531
  aruba.config.exit_timeout = @aruba_exit_timeout
710
532
  end
711
533
 
712
534
  if defined? @aruba_io_wait_seconds
713
- Aruba.platform.deprecated(
714
- 'The use of "@aruba_io_wait_seconds" is deprecated.' \
715
- ' Use "#aruba.config.io_wait_timeout = <numeric>" instead'
716
- )
535
+ Aruba.platform.deprecated('The use of "@aruba_io_wait_seconds" is deprecated. Use "#aruba.config.io_wait_timeout = <numeric>" instead')
717
536
  aruba.config.io_wait_timeout = @aruba_io_wait_seconds
718
537
  end
719
538
 
720
539
  if defined? @keep_ansi
721
- Aruba.platform.deprecated(
722
- 'The use of "@aruba_keep_ansi" is deprecated.' \
723
- ' Use "#aruba.config.remove_ansi_escape_sequences = <true|false>" instead.' \
724
- ' Be aware that it uses an inverted logic'
725
- )
540
+ Aruba.platform.deprecated('The use of "@aruba_keep_ansi" is deprecated. Use "#aruba.config.remove_ansi_escape_sequences = <true|false>" instead. Be aware that it uses an inverted logic')
726
541
 
727
542
  aruba.config.remove_ansi_escape_sequences = false
728
543
  end
729
544
 
730
545
  if defined? @aruba_root_directory
731
- Aruba.platform.deprecated(
732
- 'The use of "@aruba_root_directory" is deprecated.' \
733
- ' Use "#aruba.config.root_directory = <string>" instead'
734
- )
546
+ Aruba.platform.deprecated('The use of "@aruba_root_directory" is deprecated. Use "#aruba.config.root_directory = <string>" instead')
735
547
 
736
548
  aruba.config.root_directory = @aruba_root_directory.to_s
737
549
  end
738
550
  end
551
+ # rubocop:enable Metrics/CyclomaticComplexity
552
+ # rubocop:enable Metrics/MethodLength
739
553
 
740
554
  # Last command started
741
555
  def last_command
742
- Aruba.platform.deprecated(
743
- 'The use of "#last_command" is deprecated.' \
744
- ' Use "#last_command_started"'
745
- )
556
+ Aruba.platform.deprecated('The use of "#last_command" is deprecated. Use "#last_command_started"')
746
557
 
747
558
  process_monitor.last_command_started
748
559
  end
@@ -754,15 +565,10 @@ module Aruba
754
565
  # @return [TrueClass, FalseClass]
755
566
  # If arg1 is exactly the same as arg2 return true, otherwise false
756
567
  def assert_exact_output(expected, actual)
757
- Aruba.platform.deprecated(
758
- 'The use of "#assert_exact_output" is deprecated.' \
759
- ' Use "expect(command).to have_output \'exact\'" instead.' \
760
- ' There are also special matchers for "stdout" and "stderr"'
761
- )
568
+ Aruba.platform.deprecated('The use of "#assert_exact_output" is deprecated. Use "expect(command).to have_output \'exact\'" instead. There are also special matchers for "stdout" and "stderr"')
762
569
 
763
- actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9"
764
- expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).
765
- to eq Aruba.platform.unescape(expected, aruba.config.keep_ansi)
570
+ actual.force_encoding(expected.encoding)
571
+ expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).to eq Aruba.platform.unescape(expected, aruba.config.keep_ansi)
766
572
  end
767
573
 
768
574
  # @deprecated
@@ -772,14 +578,10 @@ module Aruba
772
578
  # @return [TrueClass, FalseClass]
773
579
  # If arg2 contains arg1 return true, otherwise false
774
580
  def assert_partial_output(expected, actual)
775
- Aruba.platform.deprecated(
776
- 'The use of "#assert_partial_output" is deprecated.' \
777
- ' Use "expect(actual).to include_output_string partial" instead.'
778
- )
581
+ Aruba.platform.deprecated('The use of "#assert_partial_output" is deprecated. Use "expect(command).to have_output /partial/" instead. There are also special matchers for "stdout" and "stderr"')
779
582
 
780
- actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9"
781
- expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).
782
- to include(Aruba.platform.unescape(expected, aruba.config.keep_ansi))
583
+ actual.force_encoding(expected.encoding)
584
+ expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).to include(Aruba.platform.unescape(expected, aruba.config.keep_ansi))
783
585
  end
784
586
 
785
587
  # @deprecated
@@ -789,14 +591,10 @@ module Aruba
789
591
  # @return [TrueClass, FalseClass]
790
592
  # If arg2 matches arg1 return true, otherwise false
791
593
  def assert_matching_output(expected, actual)
792
- Aruba.platform.deprecated(
793
- 'The use of "#assert_matching_output" is deprecated.' \
794
- ' Use "expect(actual).to match_output partial" instead.'
795
- )
594
+ Aruba.platform.deprecated('The use of "#assert_matching_output" is deprecated. Use "expect(command).to have_output /partial/" instead. There are also special matchers for "stdout" and "stderr"')
796
595
 
797
- actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9"
798
- expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).
799
- to match(/#{Aruba.platform.unescape(expected, aruba.config.keep_ansi)}/m)
596
+ actual.force_encoding(expected.encoding)
597
+ expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).to match(/#{Aruba.platform.unescape(expected, aruba.config.keep_ansi)}/m)
800
598
  end
801
599
 
802
600
  # @deprecated
@@ -806,14 +604,10 @@ module Aruba
806
604
  # @return [TrueClass, FalseClass]
807
605
  # If arg2 does not match arg1 return true, otherwise false
808
606
  def assert_not_matching_output(expected, actual)
809
- Aruba.platform.deprecated(
810
- 'The use of "#assert_not_matching_output" is deprecated.' \
811
- ' Use "expect(actual).not_to match_output partial" instead.'
812
- )
607
+ Aruba.platform.deprecated('The use of "#assert_not_matching_output" is deprecated. Use "expect(command).not_to have_output /partial/" instead. There are also special matchers for "stdout" and "stderr"')
813
608
 
814
- actual.force_encoding(expected.encoding) if RUBY_VERSION >= "1.9"
815
- expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).
816
- not_to match(/#{Aruba.platform.unescape(expected, aruba.config.keep_ansi)}/m)
609
+ actual.force_encoding(expected.encoding)
610
+ expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).not_to match(/#{Aruba.platform.unescape(expected, aruba.config.keep_ansi)}/m)
817
611
  end
818
612
 
819
613
  # @deprecated
@@ -823,18 +617,13 @@ module Aruba
823
617
  # @return [TrueClass, FalseClass]
824
618
  # If arg2 does not match/include arg1 return true, otherwise false
825
619
  def assert_no_partial_output(unexpected, actual)
826
- Aruba.platform.deprecated(
827
- 'The use of "#assert_no_partial_output" is deprecated.' \
828
- ' Use "expect(actual).not_to include_output_string partial" instead.'
829
- )
620
+ Aruba.platform.deprecated('The use of "#assert_no_partial_output" is deprecated. Use "expect(command).not_to have_output /partial/" instead. There are also special matchers for "stdout" and "stderr"')
830
621
 
831
- actual.force_encoding(unexpected.encoding) if RUBY_VERSION >= "1.9"
622
+ actual.force_encoding(unexpected.encoding)
832
623
  if Regexp === unexpected
833
- expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).
834
- not_to match unexpected
624
+ expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).not_to match unexpected
835
625
  else
836
- expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).
837
- not_to include(unexpected)
626
+ expect(Aruba.platform.unescape(actual, aruba.config.keep_ansi)).not_to include(unexpected)
838
627
  end
839
628
  end
840
629
 
@@ -845,13 +634,9 @@ module Aruba
845
634
  # @return [TrueClass, FalseClass]
846
635
  # If output of interactive command includes arg1 return true, otherwise false
847
636
  def assert_partial_output_interactive(expected)
848
- Aruba.platform.deprecated(
849
- 'The use of "#assert_partial_output_interactive" is deprecated.' \
850
- ' Use "expect(last_command_started).to have_output an_output_string_including partial" instead.'
851
- )
637
+ Aruba.platform.deprecated('The use of "#assert_partial_output_interactive" is deprecated. Use "expect(last_command_started).to have_output /partial/" instead. There are also special matchers for "stdout" and "stderr"')
852
638
 
853
- Aruba.platform.unescape(last_command_started.stdout, aruba.config.keep_ansi).
854
- include?(Aruba.platform.unescape(expected, aruba.config.keep_ansi))
639
+ Aruba.platform.unescape(last_command_started.stdout, aruba.config.keep_ansi).include?(Aruba.platform.unescape(expected, aruba.config.keep_ansi)) ? true : false
855
640
  end
856
641
 
857
642
  # @deprecated
@@ -861,13 +646,7 @@ module Aruba
861
646
  # @return [TrueClass, FalseClass]
862
647
  # If exit status is 0 and arg1 is included in output return true, otherwise false
863
648
  def assert_passing_with(expected)
864
- Aruba.platform.deprecated(
865
- 'The use of "#assert_passing_with" is deprecated.' \
866
- ' Use "expect(last_command_started).to be_successfully_executed"' \
867
- ' and expect(last_command_started).to have_output(/partial/)"' \
868
- ' or something similar instead.' \
869
- ' There are also special matchers for "stdout" and "stderr"'
870
- )
649
+ Aruba.platform.deprecated('The use of "#assert_passing_with" is deprecated. Use "expect(all_commands).to all(be_successfully_executed).and include_an_object(have_output(/partial/))" or something similar instead. There are also special matchers for "stdout" and "stderr"')
871
650
 
872
651
  assert_success(true)
873
652
  assert_partial_output(expected, all_output)
@@ -878,16 +657,9 @@ module Aruba
878
657
  # Check if command failed and if arg1 is included in output
879
658
  #
880
659
  # @return [TrueClass, FalseClass]
881
- # If exit status is not equal 0 and arg1 is included in output return
882
- # true, otherwise false
660
+ # If exit status is not equal 0 and arg1 is included in output return true, otherwise false
883
661
  def assert_failing_with(expected)
884
- Aruba.platform.deprecated(
885
- 'The use of "#assert_passing_with" is deprecated.' \
886
- ' Use "expect(last_command_started).not_to be_successfully_executed"' \
887
- ' and "expect(last_command_started).to have_output(/partial/)"' \
888
- ' or something similar instead.' \
889
- ' There are also special matchers for "stdout" and "stderr"'
890
- )
662
+ Aruba.platform.deprecated('The use of "#assert_passing_with" is deprecated. Use "expect(all_commands).not_to include_an_object(be_successfully_executed).and include_an_object(have_output(/partial/))" or something similar instead. There are also special matchers for "stdout" and "stderr"')
891
663
 
892
664
  assert_success(false)
893
665
  assert_partial_output(expected, all_output)
@@ -901,12 +673,7 @@ module Aruba
901
673
  # If arg1 is true, return true if command was successful
902
674
  # If arg1 is false, return true if command failed
903
675
  def assert_success(success)
904
- Aruba.platform.deprecated(
905
- 'The use of "#assert_success" is deprecated.' \
906
- ' Use "expect(last_command_started).to be_successfully_executed" or' \
907
- ' with "not_to" or the negative form "have_failed_running"' \
908
- ' (requires rspec >= 3.1)'
909
- )
676
+ Aruba.platform.deprecated('The use of "#assert_success" is deprecated. Use "expect(last_command_started).to be_successfully_executed" or with "not_to" or the negative form "have_failed_running" (requires rspec >= 3.1)')
910
677
 
911
678
  if success
912
679
  expect(last_command_started).to be_successfully_executed
@@ -917,20 +684,14 @@ module Aruba
917
684
 
918
685
  # @deprecated
919
686
  def assert_exit_status(status)
920
- Aruba.platform.deprecated(
921
- 'The use of "#assert_exit_status" is deprecated.' \
922
- ' Use "expect(last_command_started).to have_exit_status(status)"'
923
- )
687
+ Aruba.platform.deprecated('The use of "#assert_success" is deprecated. Use "expect(last_command_started).to have_exit_status(status)"')
924
688
 
925
689
  expect(last_command_started).to have_exit_status(status)
926
690
  end
927
691
 
928
692
  # @deprecated
929
693
  def assert_not_exit_status(status)
930
- Aruba.platform.deprecated(
931
- 'The use of "#assert_not_exit_status" is deprecated.' \
932
- ' Use "expect(last_command_started).not_to have_exit_status(status)"'
933
- )
694
+ Aruba.platform.deprecated('The use of "#assert_success" is deprecated. Use "expect(last_command_started).not_to have_exit_status(status)"')
934
695
 
935
696
  expect(last_exit_status).not_to eq(status),
936
697
  append_output_to("Exit status was #{last_exit_status} which was not expected.")
@@ -938,23 +699,21 @@ module Aruba
938
699
 
939
700
  # @deprecated
940
701
  def append_output_to(message)
941
- Aruba.platform.deprecated(
942
- 'The use of "#append_output_to" is deprecated'
943
- )
702
+ Aruba.platform.deprecated('The use of "#append_output_to" is deprecated')
944
703
 
945
704
  "#{message} Output:\n\n#{all_output}\n"
946
705
  end
947
706
 
948
707
  # @deprecated
949
708
  def register_process(*args)
950
- Aruba.platform.deprecated('The use of "#register_process" is deprecated')
709
+ # Aruba.platform.deprecated('The use of "#register_process" is deprecated')
951
710
 
952
711
  process_monitor.register_process(*args)
953
712
  end
954
713
 
955
714
  # @deprecated
956
715
  def get_process(wanted)
957
- Aruba.platform.deprecated('The use of "#get_process" is deprecated')
716
+ # Aruba.platform.deprecated('The use of "#get_process" is deprecated')
958
717
 
959
718
  process_monitor.get_process(wanted)
960
719
  end
@@ -966,7 +725,7 @@ module Aruba
966
725
  # @param [String] cmd
967
726
  # The command
968
727
  def output_from(cmd)
969
- Aruba.platform.deprecated('The use of "#output_from" is deprecated')
728
+ # Aruba.platform.deprecated('The use of "#output_from" is deprecated')
970
729
 
971
730
  process_monitor.output_from(cmd)
972
731
  end
@@ -978,7 +737,7 @@ module Aruba
978
737
  # @param [String] cmd
979
738
  # The command
980
739
  def stdout_from(cmd)
981
- Aruba.platform.deprecated('The use of "#stdout_from" is deprecated')
740
+ # Aruba.platform.deprecated('The use of "#stdout_from" is deprecated')
982
741
 
983
742
  process_monitor.stdout_from(cmd)
984
743
  end
@@ -990,19 +749,55 @@ module Aruba
990
749
  # @param [String] cmd
991
750
  # The command
992
751
  def stderr_from(cmd)
993
- Aruba.platform.deprecated('The use of "#stderr_from" is deprecated')
752
+ # Aruba.platform.deprecated('The use of "#stderr_from" is deprecated')
994
753
 
995
754
  process_monitor.stderr_from(cmd)
996
755
  end
997
756
 
757
+ # @deprecated
758
+ #
759
+ # Get stdout of all processes
760
+ #
761
+ # @return [String]
762
+ # The stdout of all process which have run before
763
+ def all_stdout
764
+ Aruba.platform.deprecated('The use of "#all_stdout" is deprecated. Use `all_commands.map { |c| c.stdout }.join("\n") instead. If you need to check for some output use "expect(all_commands).to have_output_on_stdout /output/" instead')
765
+
766
+ process_monitor.all_stdout
767
+ end
768
+
769
+ # @deprecated
770
+ #
771
+ # Get stderr of all processes
772
+ #
773
+ # @return [String]
774
+ # The stderr of all process which have run before
775
+ def all_stderr
776
+ Aruba.platform.deprecated('The use of "#all_stderr" is deprecated. Use `all_commands.map { |c| c.stderr }.join("\n") instead. If you need to check for some output use "expect(all_commands).to have_output_on_stderr /output/" instead')
777
+
778
+ process_monitor.all_stderr
779
+ end
780
+
781
+ # @deprecated
782
+ #
783
+ # Get stderr and stdout of all processes
784
+ #
785
+ # @return [String]
786
+ # The stderr and stdout of all process which have run before
787
+ def all_output
788
+ Aruba.platform.deprecated('The use of "#all_output" is deprecated. Use `all_commands.map { |c| c.output }.join("\n") instead. If you need to check for some output use "expect(all_commands).to have_output /output/" instead')
789
+
790
+ process_monitor.all_output
791
+ end
792
+
998
793
  # @deprecated
999
794
  #
1000
795
  # Default exit timeout for running commands with aruba
796
+ #
797
+ # Overwrite this method if you want a different timeout or set
798
+ # `@aruba_timeout_seconds`.
1001
799
  def exit_timeout
1002
- Aruba.platform.deprecated(
1003
- 'The use of "#exit_timeout" is deprecated.' \
1004
- ' Use "aruba.config.exit_timeout" instead.'
1005
- )
800
+ Aruba.platform.deprecated('The use of "#exit_timeout" is deprecated. Use "aruba.config.exit_timeout" instead.')
1006
801
 
1007
802
  aruba.config.exit_timeout
1008
803
  end
@@ -1014,10 +809,7 @@ module Aruba
1014
809
  # Overwrite this method if you want a different timeout or set
1015
810
  # `@aruba_io_wait_seconds
1016
811
  def io_wait
1017
- Aruba.platform.deprecated(
1018
- 'The use of "#io_wait" is deprecated.' \
1019
- ' Use "aruba.config.io_wait_timeout" instead'
1020
- )
812
+ Aruba.platform.deprecated('The use of "#io_wait" is deprecated. Use "aruba.config.io_wait_timeout" instead')
1021
813
 
1022
814
  aruba.config.io_wait_timeout
1023
815
  end
@@ -1025,50 +817,35 @@ module Aruba
1025
817
  # @deprecated
1026
818
  # Only processes
1027
819
  def only_processes
1028
- Aruba.platform.deprecated(
1029
- 'The use of "#only_processes" is deprecated.' \
1030
- ' Use "#all_commands" instead'
1031
- )
820
+ Aruba.platform.deprecated('The use of "#only_processes" is deprecated. Use "#all_commands" instead')
1032
821
 
1033
822
  process_monitor.only_processes
1034
823
  end
1035
824
 
1036
825
  # @deprecated
1037
826
  def last_exit_status
1038
- Aruba.platform.deprecated(
1039
- 'The use of "#last_exit_status" is deprecated.' \
1040
- ' Use "#last_command_(started|stopped).exit_status" instead'
1041
- )
827
+ Aruba.platform.deprecated('The use of "#last_exit_status" is deprecated. Use "#last_command_(started|stopped).exit_status" instead')
1042
828
 
1043
829
  process_monitor.last_exit_status
1044
830
  end
1045
831
 
1046
832
  # @deprecated
1047
833
  def stop_process(process)
1048
- Aruba.platform.deprecated(
1049
- 'The use of "#stop_process" is deprecated.' \
1050
- ' Use "#last_command_(started|stopped).stop" instead'
1051
- )
834
+ # Aruba.platform.deprecated('The use of "#stop_process" is deprecated. Use "#last_command_(started|stopped).stop" instead')
1052
835
 
1053
836
  @last_exit_status = process_monitor.stop_process(process)
1054
837
  end
1055
838
 
1056
839
  # @deprecated
1057
840
  def terminate_process(process)
1058
- Aruba.platform.deprecated(
1059
- 'The use of "#terminate_process" is deprecated.' \
1060
- ' Use "#last_command_(started|stopped).terminate" instead'
1061
- )
841
+ # Aruba.platform.deprecated('The use of "#terminate_process" is deprecated. Use "#last_command_(started|stopped).terminate" instead')
1062
842
 
1063
843
  process_monitor.terminate_process(process)
1064
844
  end
1065
845
 
1066
846
  # @deprecated
1067
847
  def stop_processes!
1068
- Aruba.platform.deprecated(
1069
- 'The use of "#stop_processes!" is deprecated.' \
1070
- ' Use "#stop_all_commands" instead'
1071
- )
848
+ Aruba.platform.deprecated('The use of "#stop_processes!" is deprecated. Use "#stop_all_commands" instead')
1072
849
 
1073
850
  stop_all_commands
1074
851
  end
@@ -1077,10 +854,7 @@ module Aruba
1077
854
  #
1078
855
  # Terminate all running processes
1079
856
  def terminate_processes!
1080
- Aruba.platform.deprecated(
1081
- 'The use of "#stop_processes!" is deprecated.' \
1082
- ' Use "all_commands.each(&:terminate)" instead'
1083
- )
857
+ Aruba.platform.deprecated('The use of "#stop_processes!" is deprecated. Use "all_commands.each(&:terminate)" instead')
1084
858
 
1085
859
  all_commands.each(&:terminate)
1086
860
  end
@@ -1089,10 +863,7 @@ module Aruba
1089
863
  #
1090
864
  # Access to announcer
1091
865
  def announcer
1092
- Aruba.platform.deprecated(
1093
- 'The use of "#announcer" is deprecated.' \
1094
- ' Use "aruba.announcer" instead'
1095
- )
866
+ Aruba.platform.deprecated('The use of "#announcer" is deprecated. Use "aruba.announcer" instead')
1096
867
 
1097
868
  @announcer ||= Platforms::Announcer.new(
1098
869
  self,
@@ -1106,32 +877,6 @@ module Aruba
1106
877
  @announcer
1107
878
  end
1108
879
 
1109
- # @deprecated
1110
- # Use a clean rvm gemset
1111
- #
1112
- # Please make sure that you've got [rvm](http://rvm.io/) installed.
1113
- #
1114
- # @param [String] gemset
1115
- # The name of the gemset to be used
1116
- def use_clean_gemset(gemset)
1117
- Aruba.platform.deprecated('The use of "#use_clean_gemset" is deprecated.')
1118
- run_simple(%{rvm gemset create "#{gemset}"}, true)
1119
- if all_stdout =~ /'#{gemset}' gemset created \((.*)\)\./
1120
- gem_home = Regexp.last_match[1]
1121
- set_environment_variable('GEM_HOME', gem_home)
1122
- set_environment_variable('GEM_PATH', gem_home)
1123
- set_environment_variable('BUNDLE_PATH', gem_home)
1124
-
1125
- paths = (ENV['PATH'] || "").split(File::PATH_SEPARATOR)
1126
- paths.unshift(File.join(gem_home, 'bin'))
1127
- set_environment_variable('PATH', paths.uniq.join(File::PATH_SEPARATOR))
1128
-
1129
- run_simple("gem install bundler", true)
1130
- else
1131
- raise "I didn't understand rvm's output: #{all_stdout}"
1132
- end
1133
- end
1134
-
1135
880
  # @private
1136
881
  # @deprecated
1137
882
  def process_monitor
@@ -1143,10 +888,7 @@ module Aruba
1143
888
  # @private
1144
889
  # @deprecated
1145
890
  def processes
1146
- Aruba.platform.deprecated(
1147
- 'The use of "#process_monitor" is deprecated.' \
1148
- ' Use "#all_commands" instead.'
1149
- )
891
+ Aruba.platform.deprecated('The use of "#process_monitor" is deprecated. Please use "#all_commands" instead.')
1150
892
 
1151
893
  aruba.command_monitor.send(:processes)
1152
894
  end