aruba 0.14.10 → 1.0.0

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 (299) hide show
  1. checksums.yaml +4 -4
  2. data/.cucumberproignore +3 -0
  3. data/.github/ISSUE_TEMPLATE.md +48 -0
  4. data/.github/PULL_REQUEST_TEMPLATE.md +41 -0
  5. data/.gitignore +1 -0
  6. data/.rspec +1 -1
  7. data/.rubocop.yml +20 -181
  8. data/.rubocop_todo.yml +262 -0
  9. data/.simplecov +7 -5
  10. data/.travis.yml +53 -25
  11. data/.yardopts +3 -0
  12. data/CHANGELOG.md +585 -248
  13. data/CONTRIBUTING.md +247 -45
  14. data/Dockerfile +67 -0
  15. data/Gemfile +5 -106
  16. data/LICENSE +1 -1
  17. data/README.md +57 -180
  18. data/Rakefile +63 -32
  19. data/appveyor.yml +8 -11
  20. data/aruba.gemspec +47 -41
  21. data/bin/console +7 -0
  22. data/bin/test +9 -0
  23. data/cucumber.yml +4 -24
  24. data/doc/dependency_decisions.yml +42 -2
  25. data/docker-compose.yml +26 -0
  26. data/{bin → exe}/aruba +1 -1
  27. data/fixtures/cli-app/Rakefile +1 -1
  28. data/fixtures/cli-app/bin/aruba-test-cli +1 -1
  29. data/fixtures/cli-app/cli-app.gemspec +1 -2
  30. data/fixtures/cli-app/features/support/aruba.rb +1 -0
  31. data/fixtures/cli-app/features/support/env.rb +1 -1
  32. data/fixtures/cli-app/lib/cli/app/suppress_simple_cov_output.rb +3 -3
  33. data/fixtures/cli-app/lib/cli/app/version.rb +1 -1
  34. data/fixtures/cli-app/lib/cli/app.rb +1 -5
  35. data/fixtures/cli-app/spec/spec_helper.rb +4 -7
  36. data/fixtures/empty-app/Rakefile +1 -1
  37. data/fixtures/empty-app/cli-app.gemspec +1 -2
  38. data/fixtures/empty-app/lib/cli/app/version.rb +1 -1
  39. data/fixtures/getting-started-app/Gemfile +1 -1
  40. data/lib/aruba/api/commands.rb +85 -143
  41. data/lib/aruba/api/core.rb +48 -41
  42. data/lib/aruba/api/environment.rb +16 -7
  43. data/lib/aruba/api/filesystem.rb +43 -30
  44. data/lib/aruba/api/text.rb +3 -9
  45. data/lib/aruba/api.rb +6 -11
  46. data/lib/aruba/aruba_path.rb +27 -89
  47. data/lib/aruba/basic_configuration.rb +4 -24
  48. data/lib/aruba/cli.rb +1 -1
  49. data/lib/aruba/command.rb +2 -0
  50. data/lib/aruba/config/jruby.rb +1 -1
  51. data/lib/aruba/config_wrapper.rb +1 -1
  52. data/lib/aruba/configuration.rb +92 -0
  53. data/lib/aruba/console/help.rb +1 -7
  54. data/lib/aruba/console.rb +5 -5
  55. data/lib/aruba/contracts/absolute_path.rb +2 -2
  56. data/lib/aruba/contracts/relative_path.rb +2 -2
  57. data/lib/aruba/cucumber/command.rb +136 -95
  58. data/lib/aruba/cucumber/environment.rb +1 -1
  59. data/lib/aruba/cucumber/file.rb +21 -23
  60. data/lib/aruba/cucumber/hooks.rb +18 -13
  61. data/lib/aruba/cucumber/testing_frameworks.rb +74 -50
  62. data/lib/aruba/cucumber.rb +0 -6
  63. data/lib/aruba/event_bus/name_resolver.rb +5 -16
  64. data/lib/aruba/hooks.rb +1 -1
  65. data/lib/aruba/in_config_wrapper.rb +5 -1
  66. data/lib/aruba/initializer.rb +36 -42
  67. data/lib/aruba/matchers/base/base_matcher.rb +2 -2
  68. data/lib/aruba/matchers/base/message_indenter.rb +19 -0
  69. data/lib/aruba/matchers/base/object_formatter.rb +2 -9
  70. data/lib/aruba/matchers/collection/include_an_object.rb +7 -9
  71. data/lib/aruba/matchers/command/be_successfully_executed.rb +6 -4
  72. data/lib/aruba/matchers/command/have_exit_status.rb +14 -4
  73. data/lib/aruba/matchers/command/have_finished_in_time.rb +3 -5
  74. data/lib/aruba/matchers/command/have_output.rb +10 -5
  75. data/lib/aruba/matchers/command/have_output_on_stderr.rb +2 -2
  76. data/lib/aruba/matchers/command/have_output_on_stdout.rb +2 -2
  77. data/lib/aruba/matchers/command/have_output_size.rb +2 -2
  78. data/lib/aruba/matchers/directory/be_an_existing_directory.rb +5 -7
  79. data/lib/aruba/matchers/directory/have_sub_directory.rb +4 -6
  80. data/lib/aruba/matchers/file/be_a_command_found_in_path.rb +2 -4
  81. data/lib/aruba/matchers/file/be_an_existing_executable.rb +4 -6
  82. data/lib/aruba/matchers/file/be_an_existing_file.rb +5 -7
  83. data/lib/aruba/matchers/file/have_file_content.rb +4 -4
  84. data/lib/aruba/matchers/file/have_file_size.rb +6 -8
  85. data/lib/aruba/matchers/file/have_same_file_content.rb +5 -8
  86. data/lib/aruba/matchers/path/a_path_matching_pattern.rb +2 -4
  87. data/lib/aruba/matchers/path/be_an_absolute_path.rb +3 -5
  88. data/lib/aruba/matchers/path/be_an_existing_path.rb +4 -6
  89. data/lib/aruba/matchers/path/have_permissions.rb +6 -8
  90. data/lib/aruba/matchers/string/include_output_string.rb +8 -10
  91. data/lib/aruba/matchers/string/match_output_string.rb +9 -11
  92. data/lib/aruba/matchers/string/output_string_eq.rb +8 -10
  93. data/lib/aruba/platform.rb +0 -8
  94. data/lib/aruba/platforms/announcer.rb +42 -79
  95. data/lib/aruba/platforms/aruba_file_creator.rb +2 -6
  96. data/lib/aruba/platforms/aruba_fixed_size_file_creator.rb +2 -2
  97. data/lib/aruba/platforms/aruba_logger.rb +23 -7
  98. data/lib/aruba/platforms/command_monitor.rb +12 -104
  99. data/lib/aruba/platforms/determine_disk_usage.rb +56 -14
  100. data/lib/aruba/platforms/filesystem_status.rb +10 -14
  101. data/lib/aruba/platforms/local_environment.rb +2 -2
  102. data/lib/aruba/platforms/simple_table.rb +3 -11
  103. data/lib/aruba/platforms/unix_command_string.rb +7 -11
  104. data/lib/aruba/platforms/unix_environment_variables.rb +18 -27
  105. data/lib/aruba/platforms/unix_platform.rb +20 -51
  106. data/lib/aruba/platforms/unix_which.rb +2 -1
  107. data/lib/aruba/platforms/windows_command_string.rb +15 -10
  108. data/lib/aruba/platforms/windows_environment_variables.rb +43 -44
  109. data/lib/aruba/platforms/windows_platform.rb +4 -0
  110. data/lib/aruba/platforms/windows_which.rb +4 -3
  111. data/lib/aruba/processes/basic_process.rb +28 -30
  112. data/lib/aruba/processes/debug_process.rb +12 -3
  113. data/lib/aruba/processes/in_process.rb +17 -8
  114. data/lib/aruba/processes/spawn_process.rb +40 -41
  115. data/lib/aruba/rspec.rb +14 -36
  116. data/lib/aruba/runtime.rb +3 -6
  117. data/lib/aruba/setup.rb +6 -6
  118. data/lib/aruba/tasks/docker_helpers.rb +154 -0
  119. data/lib/aruba/version.rb +1 -1
  120. metadata +190 -236
  121. data/features/.nav +0 -72
  122. data/features/01_getting_started_with_aruba/cleanup_working_directory.feature +0 -57
  123. data/features/01_getting_started_with_aruba/run_commands.feature +0 -217
  124. data/features/01_getting_started_with_aruba/supported_testing_frameworks.feature +0 -88
  125. data/features/02_configure_aruba/activate_announcer_on_command_failure.feature +0 -38
  126. data/features/02_configure_aruba/basics.feature +0 -151
  127. data/features/02_configure_aruba/command_runtime_environment.feature +0 -129
  128. data/features/02_configure_aruba/console_history_file.feature +0 -38
  129. data/features/02_configure_aruba/exit_timeout.feature +0 -60
  130. data/features/02_configure_aruba/fixtures_directories.feature +0 -38
  131. data/features/02_configure_aruba/fixtures_path_prefix.feature +0 -23
  132. data/features/02_configure_aruba/home_directory.feature +0 -80
  133. data/features/02_configure_aruba/io_timeout.feature +0 -30
  134. data/features/02_configure_aruba/keep_ansi.feature +0 -30
  135. data/features/02_configure_aruba/log_level.feature +0 -38
  136. data/features/02_configure_aruba/physical_block_size.feature +0 -53
  137. data/features/02_configure_aruba/remove_ansi_escape_sequences.feature +0 -38
  138. data/features/02_configure_aruba/root_directory.feature +0 -30
  139. data/features/02_configure_aruba/startup_wait_time.feature +0 -48
  140. data/features/02_configure_aruba/working_directory.feature +0 -38
  141. data/features/03_testing_frameworks/cucumber/announce_information_for_troubleshooting.feature +0 -263
  142. data/features/03_testing_frameworks/cucumber/disable_bunder.feature +0 -18
  143. data/features/03_testing_frameworks/cucumber/steps/command/check_for_exit_statuses.feature +0 -136
  144. data/features/03_testing_frameworks/cucumber/steps/command/check_output_of_command.feature +0 -514
  145. data/features/03_testing_frameworks/cucumber/steps/command/check_stderr_of_command.feature +0 -68
  146. data/features/03_testing_frameworks/cucumber/steps/command/check_stdout_of_command.feature +0 -109
  147. data/features/03_testing_frameworks/cucumber/steps/command/debug_your_command_in_aruba.feature +0 -92
  148. data/features/03_testing_frameworks/cucumber/steps/command/run_a_command.feature +0 -66
  149. data/features/03_testing_frameworks/cucumber/steps/command/run_command_in_process.feature +0 -485
  150. data/features/03_testing_frameworks/cucumber/steps/command/run_command_interactively.feature +0 -90
  151. data/features/03_testing_frameworks/cucumber/steps/command/run_commands_which_require_a_shell.feature +0 -79
  152. data/features/03_testing_frameworks/cucumber/steps/command/send_signal_to_command.feature +0 -83
  153. data/features/03_testing_frameworks/cucumber/steps/command/stop_command.feature +0 -285
  154. data/features/03_testing_frameworks/cucumber/steps/environment/append_environment_variable.feature +0 -52
  155. data/features/03_testing_frameworks/cucumber/steps/environment/modify_home_variable_for_testing.feature +0 -62
  156. data/features/03_testing_frameworks/cucumber/steps/environment/prepend_environment_variable.feature +0 -52
  157. data/features/03_testing_frameworks/cucumber/steps/environment/set_environment_variable.feature +0 -49
  158. data/features/03_testing_frameworks/cucumber/steps/filesystem/append_to_file.feature +0 -45
  159. data/features/03_testing_frameworks/cucumber/steps/filesystem/cd_to_directory.feature +0 -33
  160. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_existence_of_directory.feature +0 -57
  161. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_existence_of_file.feature +0 -43
  162. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_file_content.feature +0 -143
  163. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_non_existence_of_directory.feature +0 -69
  164. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_non_existence_of_file.feature +0 -80
  165. data/features/03_testing_frameworks/cucumber/steps/filesystem/check_permissions_of_file.feature +0 -39
  166. data/features/03_testing_frameworks/cucumber/steps/filesystem/compare_files.feature +0 -42
  167. data/features/03_testing_frameworks/cucumber/steps/filesystem/copy_file_or_directory.feature +0 -45
  168. data/features/03_testing_frameworks/cucumber/steps/filesystem/create_directory.feature +0 -57
  169. data/features/03_testing_frameworks/cucumber/steps/filesystem/create_file.feature +0 -76
  170. data/features/03_testing_frameworks/cucumber/steps/filesystem/move_file_or_directory.feature +0 -44
  171. data/features/03_testing_frameworks/cucumber/steps/filesystem/overwrite_file.feature +0 -72
  172. data/features/03_testing_frameworks/cucumber/steps/filesystem/remove_directory.feature +0 -38
  173. data/features/03_testing_frameworks/cucumber/steps/filesystem/remove_file.feature +0 -38
  174. data/features/03_testing_frameworks/cucumber/steps/filesystem/use_fixtures_for_setup_test.feature +0 -77
  175. data/features/03_testing_frameworks/rspec/hooks/define_after_hook_for_commands.feature +0 -43
  176. data/features/03_testing_frameworks/rspec/hooks/define_before_hook_for_commands.feature +0 -71
  177. data/features/03_testing_frameworks/rspec/setup_aruba_for_rspec.feature +0 -179
  178. data/features/04_aruba_api/command/find_a_started_command.feature +0 -83
  179. data/features/04_aruba_api/command/find_command_in_PATH.feature +0 -37
  180. data/features/04_aruba_api/command/read_stderr_of_command.feature +0 -46
  181. data/features/04_aruba_api/command/read_stdout_of_command.feature +0 -46
  182. data/features/04_aruba_api/command/run_command.feature +0 -423
  183. data/features/04_aruba_api/command/run_simple.feature +0 -254
  184. data/features/04_aruba_api/command/send_signal_to_command.feature +0 -53
  185. data/features/04_aruba_api/command/stop_all_commands.feature +0 -57
  186. data/features/04_aruba_api/command/stop_single_command.feature +0 -132
  187. data/features/04_aruba_api/command/terminate_all_commands.feature +0 -57
  188. data/features/04_aruba_api/command/use_last_command_started.feature +0 -50
  189. data/features/04_aruba_api/command/use_last_command_stopped.feature +0 -89
  190. data/features/04_aruba_api/core/expand_path.feature +0 -88
  191. data/features/04_aruba_api/environment/append_environment_variable.feature +0 -128
  192. data/features/04_aruba_api/environment/delete_environment_variable.feature +0 -63
  193. data/features/04_aruba_api/environment/prepend_environment_variable.feature +0 -128
  194. data/features/04_aruba_api/environment/set_environment_variable.feature +0 -376
  195. data/features/04_aruba_api/filesystem/cd_to_directory.feature +0 -184
  196. data/features/04_aruba_api/filesystem/check_existence_file_or_directory.feature +0 -62
  197. data/features/04_aruba_api/filesystem/check_if_path_is_absolute.feature +0 -48
  198. data/features/04_aruba_api/filesystem/check_if_path_is_directory.feature +0 -53
  199. data/features/04_aruba_api/filesystem/check_if_path_is_file.feature +0 -54
  200. data/features/04_aruba_api/filesystem/check_if_path_is_relative.feature +0 -48
  201. data/features/04_aruba_api/filesystem/create_directory.feature +0 -57
  202. data/features/04_aruba_api/filesystem/move_file_or_directory.feature +0 -119
  203. data/features/04_aruba_api/filesystem/report_disk_usage.feature +0 -152
  204. data/features/04_aruba_api/filesystem/use_fixtures.feature +0 -104
  205. data/features/04_aruba_api/text/extract_text.feature +0 -87
  206. data/features/04_aruba_api/text/replace_variables.feature +0 -45
  207. data/features/04_aruba_api/text/sanitize_text.feature +0 -228
  208. data/features/04_aruba_api/text/unescape_text.feature +0 -127
  209. data/features/05_use_rspec_matchers/command/check_timeouts.feature +0 -48
  210. data/features/05_use_rspec_matchers/directory/have_sub_directory.feature +0 -110
  211. data/features/05_use_rspec_matchers/file/be_a_command_found_in_path.feature +0 -115
  212. data/features/05_use_rspec_matchers/file/be_existing_executable.feature +0 -88
  213. data/features/05_use_rspec_matchers/file/be_existing_file.feature +0 -82
  214. data/features/05_use_rspec_matchers/file/have_file_content.feature +0 -123
  215. data/features/05_use_rspec_matchers/file/have_file_size.feature +0 -107
  216. data/features/05_use_rspec_matchers/path/be_an_absolute_path.feature +0 -74
  217. data/features/05_use_rspec_matchers/path/be_an_existing_path.feature +0 -97
  218. data/features/05_use_rspec_matchers/path/have_permissions.feature +0 -118
  219. data/features/06_use_aruba_cli/initialize_project_with_aruba.feature +0 -79
  220. data/features/06_use_aruba_cli/open_console.feature +0 -52
  221. data/features/08_other/improve_performance_if_using_jruby.feature +0 -37
  222. data/features/step_definitions/hooks.rb +0 -146
  223. data/features/support/aruba.rb +0 -7
  224. data/features/support/env.rb +0 -33
  225. data/features/support/jruby.rb +0 -5
  226. data/features/support/simplecov_setup.rb +0 -11
  227. data/fixtures/spawn_process/stderr.sh +0 -3
  228. data/lib/aruba/api/deprecated.rb +0 -1163
  229. data/lib/aruba/config.rb +0 -107
  230. data/lib/aruba/cucumber/core.rb +0 -5
  231. data/lib/aruba/cucumber/deprecated.rb +0 -93
  232. data/lib/aruba/cucumber/rvm.rb +0 -3
  233. data/lib/aruba/in_process.rb +0 -16
  234. data/lib/aruba/jruby.rb +0 -4
  235. data/lib/aruba/matchers/deprecated/file.rb +0 -17
  236. data/lib/aruba/matchers/deprecated.rb +0 -1
  237. data/lib/aruba/matchers/path/match_path_pattern.rb +0 -41
  238. data/lib/aruba/matchers/rspec_matcher_include_regexp.rb +0 -25
  239. data/lib/aruba/platforms/disk_usage_calculator.rb +0 -20
  240. data/lib/aruba/reporting.rb +0 -126
  241. data/lib/aruba/spawn_process.rb +0 -14
  242. data/script/bootstrap +0 -24
  243. data/script/console +0 -16
  244. data/script/test +0 -3
  245. data/spec/aruba/api/bundler_spec.rb +0 -15
  246. data/spec/aruba/api/core_spec.rb +0 -142
  247. data/spec/aruba/api/deprecated_spec.rb +0 -421
  248. data/spec/aruba/api/filesystem_spec.rb +0 -746
  249. data/spec/aruba/api/runtime_spec.rb +0 -28
  250. data/spec/aruba/api_spec.rb +0 -97
  251. data/spec/aruba/aruba_path_spec.rb +0 -103
  252. data/spec/aruba/basic_configuration_spec.rb +0 -5
  253. data/spec/aruba/configuration_spec.rb +0 -5
  254. data/spec/aruba/hooks_spec.rb +0 -17
  255. data/spec/aruba/in_config_wrapper_spec.rb +0 -25
  256. data/spec/aruba/jruby_spec.rb +0 -73
  257. data/spec/aruba/matchers/command/have_output_size_spec.rb +0 -25
  258. data/spec/aruba/matchers/command_spec.rb +0 -174
  259. data/spec/aruba/matchers/deprecated_spec.rb +0 -120
  260. data/spec/aruba/matchers/directory_spec.rb +0 -57
  261. data/spec/aruba/matchers/file_spec.rb +0 -208
  262. data/spec/aruba/matchers/path_spec.rb +0 -58
  263. data/spec/aruba/platform/simple_table_spec.rb +0 -23
  264. data/spec/aruba/platform/windows_environment_variables_spec.rb +0 -500
  265. data/spec/aruba/platforms/unix_command_string_spec.rb +0 -17
  266. data/spec/aruba/platforms/windows_command_string_spec.rb +0 -22
  267. data/spec/aruba/processes/spawn_process_spec.rb +0 -112
  268. data/spec/aruba/rspec_spec.rb +0 -15
  269. data/spec/aruba/runtime_spec.rb +0 -29
  270. data/spec/event_bus/name_resolver_spec.rb +0 -68
  271. data/spec/event_bus_spec.rb +0 -158
  272. data/spec/spec_helper.rb +0 -22
  273. data/spec/support/configs/.keep +0 -0
  274. data/spec/support/configs/aruba.rb +0 -5
  275. data/spec/support/configs/pry.rb +0 -3
  276. data/spec/support/configs/rspec.rb +0 -15
  277. data/spec/support/helpers/.keep +0 -0
  278. data/spec/support/helpers/reporting.rb +0 -44
  279. data/spec/support/matchers/.keep +0 -0
  280. data/spec/support/matchers/option.rb +0 -35
  281. data/spec/support/shared_contexts/.keep +0 -0
  282. data/spec/support/shared_contexts/aruba.rb +0 -49
  283. data/spec/support/shared_examples/.keep +0 -0
  284. data/spec/support/shared_examples/configuration.rb +0 -116
  285. data/spec/support/shared_examples/directory.rb +0 -7
  286. data/spec/support/shared_examples/file.rb +0 -7
  287. data/templates/css/console.css +0 -24
  288. data/templates/css/filesystem.css +0 -42
  289. data/templates/css/pygments-autumn.css +0 -59
  290. data/templates/files.erb +0 -14
  291. data/templates/images/LICENSE +0 -22
  292. data/templates/images/folder.png +0 -0
  293. data/templates/images/page_white.png +0 -0
  294. data/templates/images/page_white_gherkin.png +0 -0
  295. data/templates/images/page_white_ruby.png +0 -0
  296. data/templates/index.erb +0 -20
  297. data/templates/js/filesystem.js +0 -5
  298. data/templates/js/jquery-1.11.3.min.js +0 -5
  299. data/templates/main.erb +0 -34
data/{bin → exe}/aruba RENAMED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $LOAD_PATH << File.expand_path('../../lib', __FILE__)
3
+ $LOAD_PATH << File.expand_path('../lib', __dir__)
4
4
 
5
5
  require 'aruba/cli'
6
6
 
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $LOAD_PATH << File.expand_path('../../lib', __FILE__)
3
+ $LOAD_PATH << File.expand_path('../lib', __dir__)
4
4
  require 'cli/app'
5
5
 
6
6
  exit 0
@@ -1,5 +1,4 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'cli/app/version'
5
4
 
@@ -0,0 +1 @@
1
+ require 'aruba/cucumber'
@@ -1 +1 @@
1
- require 'aruba/cucumber'
1
+ require_relative 'aruba'
@@ -2,12 +2,12 @@ module SimpleCov
2
2
  module Formatter
3
3
  class HTMLFormatter
4
4
  def format(result)
5
- Dir[File.join(File.dirname(__FILE__), "../public/*")].each do |path|
5
+ Dir[File.join(File.dirname(__FILE__), '../public/*')].each do |path|
6
6
  FileUtils.cp_r(path, asset_output_path)
7
7
  end
8
8
 
9
- File.open(File.join(output_path, "index.html"), "wb") do |file|
10
- file.puts template("layout").result(binding)
9
+ File.open(File.join(output_path, 'index.html'), 'wb') do |file|
10
+ file.puts template('layout').result(binding)
11
11
  end
12
12
  end
13
13
  end
@@ -1,5 +1,5 @@
1
1
  module Cli
2
2
  module App
3
- VERSION = "0.1.0".freeze
3
+ VERSION = '0.1.0'.freeze
4
4
  end
5
5
  end
@@ -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', __dir__)).each { |f| require_relative f }
8
4
 
9
5
  module Cli
10
6
  module App
@@ -1,10 +1,7 @@
1
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
1
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
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
+ require_relative 'support/aruba'
6
+
7
+ ::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require_relative f }
@@ -1 +1 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
@@ -1,5 +1,4 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'cli/app/version'
5
4
 
@@ -1,5 +1,5 @@
1
1
  module Cli
2
2
  module App
3
- VERSION = "0.1.0".freeze
3
+ VERSION = '0.1.0'.freeze
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ gem 'aruba', path: File.expand_path('../../..', __dir__)
3
4
  gem 'cucumber'
4
- gem 'aruba', path: File.expand_path('../../../../', __FILE__)
@@ -5,17 +5,6 @@ require 'aruba/command'
5
5
 
6
6
  # require 'win32/file' if File::ALT_SEPARATOR
7
7
 
8
- # Aruba
9
- module Aruba
10
- class << self
11
- # @deprecated
12
- attr_accessor :process
13
- end
14
-
15
- # @deprecated
16
- # self.process = Aruba::Processes::SpawnProcess
17
- end
18
-
19
8
  # Aruba
20
9
  module Aruba
21
10
  # Api
@@ -143,108 +132,33 @@ module Aruba
143
132
  # @param [Hash] opts
144
133
  # Options
145
134
  #
146
- # @option [Integer] exit_timeout
135
+ # @option opts [Numeric] exit_timeout
147
136
  # If the timeout is reached the command will be killed
148
137
  #
149
- # @option [Integer] io_wait_timeout
138
+ # @option opts [Numeric] io_wait_timeout
150
139
  # Wait for IO to finish
151
140
  #
152
- # @option [Integer] startup_wait_time
141
+ # @option opts [Numeric] startup_wait_time
153
142
  # Wait for a command to start
154
143
  #
155
- # @option [String] stop_signal
144
+ # @option opts [String] stop_signal
156
145
  # Use signal to stop command
157
146
  #
158
147
  # @yield [SpawnProcess]
159
148
  # Run block with process
160
149
  #
161
- # rubocop:disable Metrics/MethodLength
162
- # rubocop:disable Metrics/CyclomaticComplexity
163
- def run_command(*args)
164
- fail ArgumentError, 'Please pass at least a command as first argument.' if args.empty?
165
-
166
- cmd = args.shift
167
-
168
- if args.last.is_a? Hash
169
- opts = args.pop
170
-
171
- exit_timeout = opts[:exit_timeout].nil? ? aruba.config.exit_timeout : opts[:exit_timeout]
172
- io_wait_timeout = opts[:io_wait_timeout].nil? ? aruba.config.io_wait_timeout : opts[:io_wait_timeout]
173
- stop_signal = opts[:stop_signal].nil? ? aruba.config.stop_signal : opts[:stop_signal]
174
- startup_wait_time = opts[:startup_wait_time].nil? ? aruba.config.startup_wait_time : opts[:startup_wait_time]
175
- 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)`.")
179
- end
180
-
181
- exit_timeout = args[0].nil? ? aruba.config.exit_timeout : args[0]
182
- io_wait_timeout = args[1].nil? ? aruba.config.io_wait_timeout : args[1]
183
- stop_signal = args[2].nil? ? aruba.config.stop_signal : args[2]
184
- startup_wait_time = args[3].nil? ? aruba.config.startup_wait_time : args[3]
185
- end
186
-
187
- cmd = replace_variables(cmd)
150
+ def run_command(cmd, opts = {})
151
+ command = prepare_command(cmd, opts)
188
152
 
189
- @commands ||= []
190
- @commands << cmd
191
-
192
- environment = aruba.environment
193
- working_directory = expand_path('.')
194
- event_bus = aruba.event_bus
195
-
196
- cmd = Aruba.platform.detect_ruby(cmd)
197
-
198
- mode = if Aruba.process
199
- # rubocop:disable Metrics/LineLength
200
- Aruba.platform.deprecated('The use of "Aruba.process = <process>" and "Aruba.process.main_class" is deprecated. Use "Aruba.configure { |config| config.command_launcher = :in_process|:debug|:spawn }" and "Aruba.configure { |config| config.main_class = <klass> }" instead.')
201
- # rubocop:enable Metrics/LineLength
202
- Aruba.process
203
- else
204
- aruba.config.command_launcher
205
- end
206
-
207
- main_class = if Aruba.process.respond_to?(:main_class) && Aruba.process.main_class
208
- # rubocop:disable Metrics/LineLength
209
- Aruba.platform.deprecated('The use of "Aruba.process = <process>" and "Aruba.process.main_class" is deprecated. Use "Aruba.configure { |config| config.command_launcher = :in_process|:debug|:spawn }" and "Aruba.configure { |config| config.main_class = <klass> }" instead.')
210
- # rubocop:enable Metrics/LineLength
211
- Aruba.process.main_class
212
- else
213
- aruba.config.main_class
214
- end
215
-
216
- command = Command.new(
217
- cmd,
218
- :mode => mode,
219
- :exit_timeout => exit_timeout,
220
- :io_wait_timeout => io_wait_timeout,
221
- :working_directory => working_directory,
222
- :environment => environment.to_hash,
223
- :main_class => main_class,
224
- :stop_signal => stop_signal,
225
- :startup_wait_time => startup_wait_time,
226
- :event_bus => event_bus
227
- )
228
-
229
- if aruba.config.before? :cmd
230
- # rubocop:disable Metrics/LineLength
231
- Aruba.platform.deprecated('The use of "before"-hook" ":cmd" is deprecated. Use ":command" instead. Please be aware that this hook gets the command passed in not the cmdline itself. To get the commandline use "#cmd.commandline"')
232
- # rubocop:enable Metrics/LineLength
233
- aruba.config.before(:cmd, self, cmd)
153
+ unless command.interactive?
154
+ raise NotImplementedError,
155
+ 'Running interactively is not supported with this process launcher.'
234
156
  end
235
157
 
236
- aruba.config.before(:command, self, command)
237
-
238
- command.start
239
-
240
- aruba.announcer.announce(:stop_signal, command.pid, stop_signal) if stop_signal
241
-
242
- aruba.config.after(:command, self, command)
158
+ start_command(command)
243
159
 
244
160
  block_given? ? yield(command) : command
245
161
  end
246
- # rubocop:enable Metrics/CyclomaticComplexity
247
- # rubocop:enable Metrics/MethodLength
248
162
 
249
163
  # Run a command with aruba
250
164
  #
@@ -257,70 +171,45 @@ module Aruba
257
171
  # @param [Hash] options
258
172
  # Options for aruba
259
173
  #
260
- # @option [TrueClass,FalseClass] fail_on_error
174
+ # @option options [Boolean] fail_on_error
261
175
  # Should aruba fail on error?
262
176
  #
263
- # @option [Integer] exit_timeout
177
+ # @option options [Numeric] exit_timeout
264
178
  # Timeout for execution
265
179
  #
266
- # @option [Integer] io_wait_timeout
180
+ # @option options [Numeric] io_wait_timeout
267
181
  # Timeout for IO - STDERR, STDOUT
268
182
  #
269
- # rubocop:disable Metrics/CyclomaticComplexity
270
- # rubocop:disable Metrics/MethodLength
271
- def run_command_and_stop(*args)
272
- fail ArgumentError, 'Please pass at least a command as first argument.' if args.empty?
273
-
274
- cmd = args.shift
275
-
276
- if args.last.is_a? Hash
277
- opts = args.pop
278
- fail_on_error = opts.delete(:fail_on_error) == true ? true : false
279
- else
280
- if args.size > 0
281
- # rubocop:disable Metrics/LineLength
282
- 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
- # rubocop:enable Metrics/LineLength
284
- end
285
-
286
- fail_on_error = args[0] == false ? false : true
287
-
288
- opts = {
289
- :exit_timeout => (args[1] || aruba.config.exit_timeout),
290
- :io_wait_timeout => (args[2] || aruba.config.io_wait_timeout),
291
- :stop_signal => (args[3] || aruba.config.stop_signal),
292
- :startup_wait_time => (args[4] || aruba.config.startup_wait_time)
293
- }
294
- end
295
-
296
- command = run_command(cmd, opts)
183
+ def run_command_and_stop(cmd, opts = {})
184
+ fail_on_error = if opts.key?(:fail_on_error)
185
+ opts.delete(:fail_on_error) == true
186
+ else
187
+ true
188
+ end
189
+
190
+ command = prepare_command(cmd, opts)
191
+ start_command(command)
297
192
  command.stop
298
193
 
299
- if Aruba::VERSION < '1'
300
- @last_exit_status = command.exit_status
301
- @timed_out = command.timed_out?
302
- end
194
+ return unless fail_on_error
303
195
 
304
- if fail_on_error
305
- begin
306
- expect(command).to have_finished_in_time
307
- expect(command).to be_successfully_executed
308
- rescue RSpec::Expectations::ExpectationNotMetError => e
309
- aruba.announcer.activate(aruba.config.activate_announcer_on_command_failure)
310
- aruba.event_bus.notify Events::CommandStopped.new(command)
311
- raise e
312
- end
196
+ begin
197
+ expect(command).to have_finished_in_time
198
+ expect(command).to be_successfully_executed
199
+ rescue ::RSpec::Expectations::ExpectationNotMetError => e
200
+ aruba.announcer.activate(aruba.config.activate_announcer_on_command_failure)
201
+ aruba.event_bus.notify Events::CommandStopped.new(command)
202
+ raise e
313
203
  end
314
204
  end
315
- # rubocop:enable Metrics/CyclomaticComplexity
316
- # rubocop:enable Metrics/MethodLength
317
205
 
318
206
  # Provide data to command via stdin
319
207
  #
320
208
  # @param [String] input
321
209
  # The input for the command
322
210
  def type(input)
323
- return close_input if "" == input
211
+ return close_input if input == "\u0004"
212
+
324
213
  last_command_started.write(input << "\n")
325
214
  end
326
215
 
@@ -328,6 +217,59 @@ module Aruba
328
217
  def close_input
329
218
  last_command_started.close_io(:stdin)
330
219
  end
220
+
221
+ private
222
+
223
+ # rubocop:disable Metrics/MethodLength
224
+ def prepare_command(cmd, opts)
225
+ exit_timeout = opts[:exit_timeout].nil? ? aruba.config.exit_timeout : opts[:exit_timeout]
226
+ io_wait_timeout = opts[:io_wait_timeout].nil? ? aruba.config.io_wait_timeout : opts[:io_wait_timeout]
227
+ stop_signal = opts[:stop_signal].nil? ? aruba.config.stop_signal : opts[:stop_signal]
228
+ startup_wait_time = opts[:startup_wait_time].nil? ? aruba.config.startup_wait_time : opts[:startup_wait_time]
229
+
230
+ cmd = replace_variables(cmd)
231
+
232
+ @commands ||= []
233
+ @commands << cmd
234
+
235
+ environment = aruba.environment
236
+ working_directory = expand_path('.')
237
+ event_bus = aruba.event_bus
238
+
239
+ cmd = Aruba.platform.detect_ruby(cmd)
240
+
241
+ mode = aruba.config.command_launcher
242
+
243
+ main_class = aruba.config.main_class
244
+
245
+ Command.new(
246
+ cmd,
247
+ mode: mode,
248
+ exit_timeout: exit_timeout,
249
+ io_wait_timeout: io_wait_timeout,
250
+ working_directory: working_directory,
251
+ environment: environment.to_hash,
252
+ main_class: main_class,
253
+ stop_signal: stop_signal,
254
+ startup_wait_time: startup_wait_time,
255
+ event_bus: event_bus
256
+ )
257
+ end
258
+
259
+ # rubocop:enable Metrics/MethodLength
260
+
261
+ def start_command(command)
262
+ aruba.config.before(:command, self, command)
263
+
264
+ in_current_directory do
265
+ command.start
266
+ end
267
+
268
+ stop_signal = command.stop_signal
269
+ aruba.announcer.announce(:stop_signal, command.pid, stop_signal) if stop_signal
270
+
271
+ aruba.config.after(:command, self, command)
272
+ end
331
273
  end
332
274
  end
333
275
  end
@@ -15,6 +15,8 @@ module Aruba
15
15
 
16
16
  # Aruba Runtime
17
17
  def aruba
18
+ # TODO: Check this variable being accessed inconsistently. Should only be using the memo!
19
+ # Renaming this to `aruba` causes 100's of rspec failures. Needs a deeper dive, approach with caution!
18
20
  @_aruba_runtime ||= Runtime.new
19
21
  end
20
22
 
@@ -62,15 +64,16 @@ module Aruba
62
64
  aruba.current_directory << dir
63
65
  new_directory = expand_path('.')
64
66
 
65
- aruba.event_bus.notify Events::ChangedWorkingDirectory.new(:old => old_directory, :new => new_directory)
67
+ aruba.event_bus.notify Events::ChangedWorkingDirectory.new(old: old_directory, new: new_directory)
66
68
 
67
69
  old_dir = Aruba.platform.getwd
68
70
 
69
- Aruba.platform.chdir File.join(aruba.root_directory, aruba.current_directory)
71
+ real_new_directory = File.expand_path(aruba.current_directory, aruba.root_directory)
72
+ Aruba.platform.chdir real_new_directory
70
73
 
71
74
  result = with_environment(
72
75
  'OLDPWD' => old_dir,
73
- 'PWD' => File.expand_path(File.join(aruba.root_directory, aruba.current_directory)),
76
+ 'PWD' => real_new_directory,
74
77
  &block
75
78
  )
76
79
  ensure
@@ -87,7 +90,7 @@ module Aruba
87
90
  aruba.current_directory << dir
88
91
  new_directory = expand_path('.')
89
92
 
90
- aruba.event_bus.notify Events::ChangedWorkingDirectory.new(:old => old_directory, :new => new_directory)
93
+ aruba.event_bus.notify Events::ChangedWorkingDirectory.new(old: old_directory, new: new_directory)
91
94
 
92
95
  self
93
96
  end
@@ -124,58 +127,66 @@ module Aruba
124
127
  # # => <path>/test/fixtures/file
125
128
  # expand_path('%/file')
126
129
  #
130
+ # @example Absolute directory
131
+ #
132
+ # # => /foo/bar
133
+ # expand_path('/foo/bar')
134
+ #
127
135
  # rubocop:disable Metrics/MethodLength
128
136
  # rubocop:disable Metrics/CyclomaticComplexity
137
+ # rubocop:disable Metrics/PerceivedComplexity
129
138
  def expand_path(file_name, dir_string = nil)
130
- check_for_deprecated_variables if Aruba::VERSION < '1'
131
-
132
- # rubocop:disable Metrics/LineLength
139
+ # rubocop:disable Layout/LineLength
133
140
  message = %(Filename "#{file_name}" needs to be a string. It cannot be nil or empty either. Please use `expand_path('.')` if you want the current directory to be expanded.)
134
- # rubocop:enable Metrics/LineLength
141
+ # rubocop:enable Layout/LineLength
135
142
 
136
143
  fail ArgumentError, message unless file_name.is_a?(String) && !file_name.empty?
137
144
 
138
- # rubocop:disable Metrics/LineLength
139
- 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
- # rubocop:enable Metrics/LineLength
141
-
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
145
+ # rubocop:disable Layout/LineLength
146
+ fail %(Aruba's working directory does not exist. Maybe you forgot to run `setup_aruba` before using its API.) unless Aruba.platform.directory? File.join(aruba.config.root_directory, aruba.config.working_directory)
147
+
148
+ # rubocop:enable Layout/LineLength
149
+
150
+ prefix = file_name[0]
151
+ rest = file_name[2..-1]
153
152
 
154
153
  if aruba.config.fixtures_path_prefix == prefix
155
154
  path = File.join(*[aruba.fixtures_directory, rest].compact)
156
155
 
157
- # rubocop:disable Metrics/LineLength
156
+ # rubocop:disable Layout/LineLength
158
157
  fail ArgumentError, %(Fixture "#{rest}" does not exist in fixtures directory "#{aruba.fixtures_directory}". This was the one we found first on your system from all possible candidates: #{aruba.config.fixtures_directories.map { |p| format('"%s"', p) }.join(', ')}.) unless Aruba.platform.exist? path
159
- # rubocop:enable Metrics/LineLength
158
+
159
+ # rubocop:enable Layout/LineLength
160
160
 
161
161
  path
162
- elsif '~' == prefix
162
+ elsif prefix == '~'
163
163
  path = with_environment do
164
- ArubaPath.new(File.expand_path(file_name))
164
+ File.expand_path(file_name)
165
165
  end
166
166
 
167
- fail ArgumentError, 'Expanding "~/" to "/" is not allowed' if path.to_s == '/'
168
- fail ArgumentError, %(Expanding "~/" to a relative path "#{path}" is not allowed) unless path.absolute?
167
+ fail ArgumentError, 'Expanding "~/" to "/" is not allowed' if path == '/'
168
+ fail ArgumentError, %(Expanding "~/" to a relative path "#{path}" is not allowed) unless Aruba.platform.absolute_path? path
169
169
 
170
170
  path.to_s
171
+ elsif absolute? file_name
172
+ unless aruba.config.allow_absolute_paths
173
+ caller_location = caller_locations(1, 1).first
174
+ caller_file_line = "#{caller_location.path}:#{caller_location.lineno}"
175
+ aruba.logger.warn "Aruba's `expand_path` method was called with an absolute path at #{caller_file_line}, which is not recommended." \
176
+ ' Change the call to pass a relative path or set config.allow_absolute_paths = true to silence this warning'
177
+ end
178
+ file_name
171
179
  else
172
- 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)
180
+ with_environment do
181
+ directory = File.expand_path(aruba.current_directory, aruba.root_directory)
182
+ directory = File.expand_path(dir_string, directory) if dir_string
183
+ File.expand_path(file_name, directory)
184
+ end
175
185
  end
176
186
  end
177
187
  # rubocop:enable Metrics/MethodLength
178
- # rubocop:enable Metrics/CyclomaticComplexity
188
+ # rubocop:enable Metrics/CyclomaticComplexity
189
+ # rubocop:enable Metrics/PerceivedComplexity
179
190
 
180
191
  # Run block with environment
181
192
  #
@@ -185,14 +196,10 @@ module Aruba
185
196
  # @yield
186
197
  # The block of code which should be run with the changed environment variables
187
198
  def with_environment(env = {}, &block)
188
- old_aruba_env = aruba.environment.to_h
189
-
190
- # make sure the old environment is really restored in "ENV"
191
- Aruba.platform.with_environment aruba.environment.update(env).to_h, &block
192
- ensure
193
- # make sure the old environment is really restored in "aruba.environment"
194
- aruba.environment.clear
195
- aruba.environment.update old_aruba_env
199
+ aruba.environment.nest do |nested_env|
200
+ nested_env.update(env)
201
+ Aruba.platform.with_environment nested_env.to_h, &block
202
+ end
196
203
  end
197
204
  end
198
205
  end
@@ -13,6 +13,8 @@ module Aruba
13
13
  #
14
14
  # @param [String] value
15
15
  # The value of the environment variable. Needs to be a string.
16
+ #
17
+ # @return [self]
16
18
  def set_environment_variable(name, value)
17
19
  name = name.to_s
18
20
  value = value.to_s
@@ -21,7 +23,8 @@ module Aruba
21
23
  aruba.environment[name] = value
22
24
  new_environment = aruba.environment.to_h
23
25
 
24
- aruba.event_bus.notify Events::AddedEnvironmentVariable.new(:old => old_environment, :new => new_environment, :changed => { :name => name, :value => value })
26
+ environment_change = { old: old_environment, new: new_environment, changed: { name: name, value: value } }
27
+ aruba.event_bus.notify Events::AddedEnvironmentVariable.new(environment_change)
25
28
 
26
29
  self
27
30
  end
@@ -33,6 +36,8 @@ module Aruba
33
36
  #
34
37
  # @param [String] value
35
38
  # The value of the environment variable. Needs to be a string.
39
+ #
40
+ # @return [self]
36
41
  def append_environment_variable(name, value)
37
42
  name = name.to_s
38
43
  value = value.to_s
@@ -41,7 +46,8 @@ module Aruba
41
46
  aruba.environment.append name, value
42
47
  new_environment = aruba.environment.to_h
43
48
 
44
- aruba.event_bus.notify Events::ChangedEnvironmentVariable.new(:old => old_environment, :new => new_environment, :changed => { :name => name, :value => value })
49
+ environment_change = { old: old_environment, new: new_environment, changed: { name: name, value: value } }
50
+ aruba.event_bus.notify Events::ChangedEnvironmentVariable.new(environment_change)
45
51
 
46
52
  self
47
53
  end
@@ -53,6 +59,8 @@ module Aruba
53
59
  #
54
60
  # @param [String] value
55
61
  # The value of the environment variable. Needs to be a string.
62
+ #
63
+ # @return [self]
56
64
  def prepend_environment_variable(name, value)
57
65
  name = name.to_s
58
66
  value = value.to_s
@@ -61,18 +69,18 @@ module Aruba
61
69
  aruba.environment.prepend name, value
62
70
  new_environment = aruba.environment.to_h
63
71
 
64
- aruba.event_bus.notify Events::ChangedEnvironmentVariable.new(:old => old_environment, :new => new_environment, :changed => { :name => name, :value => value })
72
+ environment_change = { old: old_environment, new: new_environment, changed: { name: name, value: value } }
73
+ aruba.event_bus.notify Events::ChangedEnvironmentVariable.new(environment_change)
65
74
 
66
75
  self
67
76
  end
68
77
 
69
78
  # Remove existing environment variable
70
79
  #
71
- # @param [String] key
80
+ # @param [String] name
72
81
  # The name of the environment variable as string, e.g. 'HOME'
73
82
  #
74
- # @param [String] value
75
- # The value of the environment variable. Needs to be a string.
83
+ # @return [self]
76
84
  def delete_environment_variable(name)
77
85
  name = name.to_s
78
86
 
@@ -80,7 +88,8 @@ module Aruba
80
88
  aruba.environment.delete name
81
89
  new_environment = aruba.environment.to_h
82
90
 
83
- aruba.event_bus.notify Events::DeletedEnvironmentVariable.new(:old => old_environment, :new => new_environment, :changed => { :name => name, :value => '' })
91
+ environment_change = { old: old_environment, new: new_environment, changed: { name: name, value: '' } }
92
+ aruba.event_bus.notify Events::ChangedEnvironmentVariable.new(environment_change)
84
93
 
85
94
  self
86
95
  end