aruba 1.0.1 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +56 -1
  3. data/CONTRIBUTING.md +11 -23
  4. data/README.md +1 -2
  5. data/exe/aruba +2 -2
  6. data/lib/aruba.rb +1 -1
  7. data/lib/aruba/api.rb +11 -12
  8. data/lib/aruba/api/bundler.rb +18 -3
  9. data/lib/aruba/api/commands.rb +11 -11
  10. data/lib/aruba/api/core.rb +27 -25
  11. data/lib/aruba/api/environment.rb +2 -2
  12. data/lib/aruba/api/filesystem.rb +42 -16
  13. data/lib/aruba/api/text.rb +4 -4
  14. data/lib/aruba/aruba_path.rb +3 -4
  15. data/lib/aruba/basic_configuration.rb +51 -69
  16. data/lib/aruba/cli.rb +7 -7
  17. data/lib/aruba/command.rb +4 -4
  18. data/lib/aruba/config/jruby.rb +9 -9
  19. data/lib/aruba/config_wrapper.rb +2 -2
  20. data/lib/aruba/configuration.rb +36 -46
  21. data/lib/aruba/console.rb +11 -11
  22. data/lib/aruba/console/help.rb +7 -7
  23. data/lib/aruba/contracts/absolute_path.rb +1 -1
  24. data/lib/aruba/contracts/enum.rb +1 -1
  25. data/lib/aruba/contracts/is_power_of_two.rb +1 -1
  26. data/lib/aruba/contracts/relative_path.rb +1 -1
  27. data/lib/aruba/cucumber.rb +7 -7
  28. data/lib/aruba/cucumber/command.rb +41 -49
  29. data/lib/aruba/cucumber/environment.rb +7 -7
  30. data/lib/aruba/cucumber/file.rb +8 -4
  31. data/lib/aruba/cucumber/hooks.rb +29 -29
  32. data/lib/aruba/cucumber/testing_frameworks.rb +18 -18
  33. data/lib/aruba/event_bus.rb +4 -4
  34. data/lib/aruba/event_bus/name_resolver.rb +4 -4
  35. data/lib/aruba/file_size.rb +1 -1
  36. data/lib/aruba/generators/script_file.rb +2 -2
  37. data/lib/aruba/in_config_wrapper.rb +1 -1
  38. data/lib/aruba/initializer.rb +10 -10
  39. data/lib/aruba/matchers/base/base_matcher.rb +1 -1
  40. data/lib/aruba/matchers/base/message_indenter.rb +2 -2
  41. data/lib/aruba/matchers/base/object_formatter.rb +2 -2
  42. data/lib/aruba/matchers/collection.rb +1 -1
  43. data/lib/aruba/matchers/collection/all.rb +1 -1
  44. data/lib/aruba/matchers/collection/include_an_object.rb +2 -2
  45. data/lib/aruba/matchers/command.rb +1 -1
  46. data/lib/aruba/matchers/command/be_successfully_executed.rb +4 -4
  47. data/lib/aruba/matchers/command/have_finished_in_time.rb +1 -1
  48. data/lib/aruba/matchers/command/have_output.rb +1 -1
  49. data/lib/aruba/matchers/directory.rb +1 -1
  50. data/lib/aruba/matchers/directory/be_an_existing_directory.rb +2 -2
  51. data/lib/aruba/matchers/directory/have_sub_directory.rb +3 -3
  52. data/lib/aruba/matchers/environment.rb +1 -1
  53. data/lib/aruba/matchers/file.rb +1 -1
  54. data/lib/aruba/matchers/file/be_a_command_found_in_path.rb +1 -1
  55. data/lib/aruba/matchers/file/be_an_existing_executable.rb +2 -2
  56. data/lib/aruba/matchers/file/be_an_existing_file.rb +2 -2
  57. data/lib/aruba/matchers/file/have_file_content.rb +1 -1
  58. data/lib/aruba/matchers/file/have_file_size.rb +1 -1
  59. data/lib/aruba/matchers/file/have_same_file_content.rb +2 -2
  60. data/lib/aruba/matchers/path.rb +1 -1
  61. data/lib/aruba/matchers/path/a_path_matching_pattern.rb +1 -1
  62. data/lib/aruba/matchers/path/be_an_absolute_path.rb +1 -1
  63. data/lib/aruba/matchers/path/be_an_existing_path.rb +1 -1
  64. data/lib/aruba/matchers/path/have_permissions.rb +5 -4
  65. data/lib/aruba/matchers/string.rb +1 -1
  66. data/lib/aruba/matchers/string/include_output_string.rb +1 -1
  67. data/lib/aruba/matchers/string/match_output_string.rb +1 -1
  68. data/lib/aruba/matchers/string/output_string_eq.rb +1 -1
  69. data/lib/aruba/platform.rb +2 -2
  70. data/lib/aruba/platforms/announcer.rb +15 -15
  71. data/lib/aruba/platforms/aruba_fixed_size_file_creator.rb +1 -1
  72. data/lib/aruba/platforms/aruba_logger.rb +11 -10
  73. data/lib/aruba/platforms/command_monitor.rb +6 -8
  74. data/lib/aruba/platforms/determine_disk_usage.rb +2 -4
  75. data/lib/aruba/platforms/filesystem_status.rb +20 -14
  76. data/lib/aruba/platforms/simple_table.rb +3 -3
  77. data/lib/aruba/platforms/unix_command_string.rb +2 -2
  78. data/lib/aruba/platforms/unix_environment_variables.rb +1 -1
  79. data/lib/aruba/platforms/unix_platform.rb +23 -23
  80. data/lib/aruba/platforms/unix_which.rb +1 -1
  81. data/lib/aruba/platforms/windows_command_string.rb +2 -2
  82. data/lib/aruba/platforms/windows_environment_variables.rb +1 -1
  83. data/lib/aruba/platforms/windows_platform.rb +7 -7
  84. data/lib/aruba/platforms/windows_which.rb +5 -5
  85. data/lib/aruba/processes/basic_process.rb +4 -4
  86. data/lib/aruba/processes/debug_process.rb +5 -5
  87. data/lib/aruba/processes/in_process.rb +8 -8
  88. data/lib/aruba/processes/spawn_process.rb +18 -23
  89. data/lib/aruba/rspec.rb +6 -6
  90. data/lib/aruba/runtime.rb +6 -6
  91. data/lib/aruba/setup.rb +3 -3
  92. data/lib/aruba/version.rb +1 -1
  93. metadata +75 -94
  94. data/.cucumberproignore +0 -3
  95. data/.document +0 -5
  96. data/.github/ISSUE_TEMPLATE.md +0 -48
  97. data/.github/PULL_REQUEST_TEMPLATE.md +0 -41
  98. data/.gitignore +0 -38
  99. data/.rspec +0 -3
  100. data/.rubocop.yml +0 -52
  101. data/.rubocop_todo.yml +0 -216
  102. data/.simplecov +0 -36
  103. data/.travis.yml +0 -62
  104. data/.yardopts +0 -11
  105. data/Dockerfile +0 -67
  106. data/Gemfile +0 -14
  107. data/Rakefile +0 -82
  108. data/TODO.md +0 -13
  109. data/appveyor.yml +0 -28
  110. data/aruba.gemspec +0 -57
  111. data/bin/console +0 -7
  112. data/bin/test +0 -9
  113. data/config/.gitignore +0 -1
  114. data/cucumber.yml +0 -6
  115. data/docker-compose.yml +0 -26
  116. data/fixtures/cli-app/.gitignore +0 -9
  117. data/fixtures/cli-app/.rspec +0 -2
  118. data/fixtures/cli-app/README.md +0 -39
  119. data/fixtures/cli-app/Rakefile +0 -1
  120. data/fixtures/cli-app/bin/aruba-test-cli +0 -6
  121. data/fixtures/cli-app/cli-app.gemspec +0 -26
  122. data/fixtures/cli-app/features/support/aruba.rb +0 -1
  123. data/fixtures/cli-app/features/support/env.rb +0 -1
  124. data/fixtures/cli-app/lib/cli/app.rb +0 -9
  125. data/fixtures/cli-app/lib/cli/app/suppress_simple_cov_output.rb +0 -15
  126. data/fixtures/cli-app/lib/cli/app/version.rb +0 -5
  127. data/fixtures/cli-app/script/console +0 -14
  128. data/fixtures/cli-app/spec/spec_helper.rb +0 -8
  129. data/fixtures/cli-app/spec/support/aruba.rb +0 -1
  130. data/fixtures/copy/file.txt +0 -1
  131. data/fixtures/empty-app/.gitignore +0 -9
  132. data/fixtures/empty-app/.rspec +0 -2
  133. data/fixtures/empty-app/README.md +0 -24
  134. data/fixtures/empty-app/Rakefile +0 -1
  135. data/fixtures/empty-app/cli-app.gemspec +0 -26
  136. data/fixtures/empty-app/lib/cli/app.rb +0 -7
  137. data/fixtures/empty-app/lib/cli/app/version.rb +0 -5
  138. data/fixtures/getting-started-app/.gitignore +0 -4
  139. data/fixtures/getting-started-app/Gemfile +0 -4
  140. data/fixtures/getting-started-app/README.md +0 -3
  141. data/fixtures/getting-started-app/features/support/env.rb +0 -1
  142. data/lib/aruba/extensions/string/strip.rb +0 -25
  143. data/lib/aruba/tasks/docker_helpers.rb +0 -156
@@ -1,5 +1,5 @@
1
1
  Given(/^a mocked home directory$/) do
2
- set_environment_variable 'HOME', expand_path('.')
2
+ set_environment_variable "HOME", expand_path(".")
3
3
  end
4
4
 
5
5
  Given(/^I set the environment variable "(.*)" to "(.*)"/) do |variable, value|
@@ -16,8 +16,8 @@ end
16
16
 
17
17
  Given(/^I set the environment variables? to:/) do |table|
18
18
  table.hashes.each do |row|
19
- variable = row['variable'].to_s
20
- value = row['value'].to_s
19
+ variable = row["variable"].to_s
20
+ value = row["value"].to_s
21
21
 
22
22
  set_environment_variable(variable, value)
23
23
  end
@@ -25,8 +25,8 @@ end
25
25
 
26
26
  Given(/^I append the values? to the environment variables?:/) do |table|
27
27
  table.hashes.each do |row|
28
- variable = row['variable'].to_s
29
- value = row['value'].to_s
28
+ variable = row["variable"].to_s
29
+ value = row["value"].to_s
30
30
 
31
31
  append_environment_variable(variable, value)
32
32
  end
@@ -34,8 +34,8 @@ end
34
34
 
35
35
  Given(/^I prepend the values? to the environment variables?:/) do |table|
36
36
  table.hashes.each do |row|
37
- variable = row['variable'].to_s
38
- value = row['value'].to_s
37
+ variable = row["variable"].to_s
38
+ value = row["value"].to_s
39
39
 
40
40
  prepend_environment_variable(variable, value)
41
41
  end
@@ -28,7 +28,7 @@ Given(/^(?:a|the) file(?: named)? "([^"]*)" with:$/) do |file_name, file_content
28
28
  end
29
29
 
30
30
  Given(/^(?:an|the) executable(?: named)? "([^"]*)" with:$/) do |file_name, file_content|
31
- step %(a file named "#{file_name}" with mode "0755" and with:), file_content
31
+ step %(a file named "#{file_name}" with mode "0o755" and with:), file_content
32
32
  end
33
33
 
34
34
  Given(/^(?:a|the) file(?: named)? "([^"]*)" with "([^"]*)"$/) do |file_name, file_content|
@@ -46,12 +46,12 @@ Given(/^(?:a|the) (\d+) byte file(?: named)? "([^"]*)"$/) do |file_size, file_na
46
46
  end
47
47
 
48
48
  Given(/^(?:an|the) empty file(?: named)? "([^"]*)"$/) do |file_name|
49
- write_file(file_name, '')
49
+ write_file(file_name, "")
50
50
  end
51
51
 
52
52
  Given(/^(?:an|the) empty file(?: named)? "([^"]*)" with mode "([^"]*)"$/) \
53
53
  do |file_name, file_mode|
54
- write_file(file_name, '')
54
+ write_file(file_name, "")
55
55
  chmod(file_mode, file_name)
56
56
  end
57
57
 
@@ -68,13 +68,17 @@ When(/^I append to "([^"]*)" with:$/) do |file_name, file_content|
68
68
  append_to_file(file_name, file_content)
69
69
  end
70
70
 
71
+ When(/^I append the following lines to "([^"]*)":$/) do |file_name, file_content|
72
+ append_lines_to_file(file_name, file_content)
73
+ end
74
+
71
75
  When(/^I append to "([^"]*)" with "([^"]*)"$/) do |file_name, file_content|
72
76
  append_to_file(file_name, file_content)
73
77
  end
74
78
 
75
79
  When(/^I remove (?:a|the) (?:file|directory)(?: named)? "([^"]*)"( with full force)?$/) \
76
80
  do |name, force_remove|
77
- remove(name, force: force_remove.nil? ? false : true)
81
+ remove(name, force: !force_remove.nil?)
78
82
  end
79
83
 
80
84
  Given(/^(?:a|the) (?:file|directory)(?: named)? "([^"]*)" does not exist$/) do |name|
@@ -1,6 +1,6 @@
1
- require 'aruba/aruba_path'
2
- require 'aruba/api'
3
- require 'aruba/platform'
1
+ require "aruba/aruba_path"
2
+ require "aruba/api"
3
+ require "aruba/platform"
4
4
  World(Aruba::Api)
5
5
 
6
6
  Around do |_, block|
@@ -10,10 +10,10 @@ end
10
10
  Before do
11
11
  # ... so every change needs to be done later
12
12
  prepend_environment_variable(
13
- 'PATH',
13
+ "PATH",
14
14
  aruba.config.command_search_paths.join(File::PATH_SEPARATOR) + File::PATH_SEPARATOR
15
15
  )
16
- set_environment_variable 'HOME', aruba.config.home_directory
16
+ set_environment_variable "HOME", aruba.config.home_directory
17
17
  end
18
18
 
19
19
  After do
@@ -21,68 +21,68 @@ After do
21
21
  aruba.command_monitor.clear
22
22
  end
23
23
 
24
- Before('@no-clobber') do
24
+ Before("@no-clobber") do
25
25
  setup_aruba(false)
26
26
  end
27
27
 
28
- Before('~@no-clobber') do
28
+ Before("~@no-clobber") do
29
29
  setup_aruba
30
30
  end
31
31
 
32
- Before('@puts') do
32
+ Before("@puts") do
33
33
  aruba.announcer.mode = :puts
34
34
  end
35
35
 
36
- Before('@announce-command') do
36
+ Before("@announce-command") do
37
37
  aruba.announcer.activate :command
38
38
  end
39
39
 
40
- Before('@announce-command-content') do
40
+ Before("@announce-command-content") do
41
41
  aruba.announcer.activate :command_content
42
42
  end
43
43
 
44
- Before('@announce-command-filesystem-status') do
44
+ Before("@announce-command-filesystem-status") do
45
45
  aruba.announcer.activate :command_filesystem_status
46
46
  end
47
47
 
48
- Before('@announce-output') do
48
+ Before("@announce-output") do
49
49
  aruba.announcer.activate :stdout
50
50
  aruba.announcer.activate :stderr
51
51
  end
52
52
 
53
- Before('@announce-stdout') do
53
+ Before("@announce-stdout") do
54
54
  aruba.announcer.activate :stdout
55
55
  end
56
56
 
57
- Before('@announce-stderr') do
57
+ Before("@announce-stderr") do
58
58
  aruba.announcer.activate :stderr
59
59
  end
60
60
 
61
- Before('@announce-directory') do
61
+ Before("@announce-directory") do
62
62
  aruba.announcer.activate :directory
63
63
  end
64
64
 
65
- Before('@announce-stop-signal') do
65
+ Before("@announce-stop-signal") do
66
66
  aruba.announcer.activate :stop_signal
67
67
  end
68
68
 
69
- Before('@announce-full-environment') do
69
+ Before("@announce-full-environment") do
70
70
  aruba.announcer.activate :full_environment
71
71
  end
72
72
 
73
- Before('@announce-changed-environment') do
73
+ Before("@announce-changed-environment") do
74
74
  aruba.announcer.activate :changed_environment
75
75
  end
76
76
 
77
- Before('@announce-timeout') do
77
+ Before("@announce-timeout") do
78
78
  aruba.announcer.activate :timeout
79
79
  end
80
80
 
81
- Before('@announce-wait-time') do
81
+ Before("@announce-wait-time") do
82
82
  aruba.announcer.activate :wait_time
83
83
  end
84
84
 
85
- Before('@announce') do
85
+ Before("@announce") do
86
86
  aruba.announcer.activate :changed_environment
87
87
  aruba.announcer.activate :command
88
88
  aruba.announcer.activate :directory
@@ -98,30 +98,30 @@ Before('@announce') do
98
98
  aruba.announcer.activate :command_filesystem_status
99
99
  end
100
100
 
101
- Before('@keep-ansi-escape-sequences') do
101
+ Before("@keep-ansi-escape-sequences") do
102
102
  aruba.config.remove_ansi_escape_sequences = false
103
103
  end
104
104
 
105
- Before '@mocked-home-directory' do
106
- set_environment_variable 'HOME', expand_path('.')
105
+ Before "@mocked-home-directory" do
106
+ set_environment_variable "HOME", expand_path(".")
107
107
  end
108
108
 
109
- Before('@disable-bundler') do
109
+ Before("@disable-bundler") do
110
110
  unset_bundler_env_vars
111
111
  end
112
112
 
113
- Before('@debug') do
113
+ Before("@debug") do
114
114
  aruba.config.command_launcher = :debug
115
115
  end
116
116
 
117
- Before('@command-launcher-spawn') do
117
+ Before("@command-launcher-spawn") do
118
118
  aruba.config.command_launcher = :spawn
119
119
  end
120
120
 
121
- Before('@command-launcher-in-process') do
121
+ Before("@command-launcher-in-process") do
122
122
  aruba.config.command_launcher = :in_process
123
123
  end
124
124
 
125
- Before('@command-launcher-debug') do
125
+ Before("@command-launcher-debug") do
126
126
  aruba.config.command_launcher = :debug
127
127
  end
@@ -1,25 +1,25 @@
1
1
  # Cucumber
2
2
  Then(/^the feature(?:s)? should not(?: all)? pass$/) do
3
3
  step 'the output should contain " failed)"'
4
- step 'the exit status should be 1'
4
+ step "the exit status should be 1"
5
5
  end
6
6
 
7
7
  # Cucumber
8
8
  Then(/^the feature(?:s)? should(?: all)? pass$/) do
9
9
  step 'the output should not contain " failed)"'
10
10
  step 'the output should not contain " undefined)"'
11
- step 'the exit status should be 0'
11
+ step "the exit status should be 0"
12
12
  end
13
13
 
14
14
  # Cucumber
15
15
  Then(/^the feature(?:s)? should not(?: all)? pass with( regex)?:$/) do |regex, string|
16
16
  step 'the output should contain " failed)"'
17
- step 'the exit status should be 1'
17
+ step "the exit status should be 1"
18
18
 
19
19
  if regex
20
20
  step "the output should match %r<#{string}>"
21
21
  else
22
- step 'the output should contain:', string
22
+ step "the output should contain:", string
23
23
  end
24
24
  end
25
25
 
@@ -27,12 +27,12 @@ end
27
27
  Then(/^the feature(?:s)? should(?: all)? pass with( regex)?:$/) do |regex, string|
28
28
  step 'the output should not contain " failed)"'
29
29
  step 'the output should not contain " undefined)"'
30
- step 'the exit status should be 0'
30
+ step "the exit status should be 0"
31
31
 
32
32
  if regex
33
33
  step "the output should match %r<#{string}>"
34
34
  else
35
- step 'the output should contain:', string
35
+ step "the output should contain:", string
36
36
  end
37
37
  end
38
38
 
@@ -45,36 +45,36 @@ Then(/^the spec(?:s)? should not(?: all)? pass(?: with (\d+) failures?)?$/) \
45
45
  step %(the output should contain "#{count_failures} failures")
46
46
  end
47
47
 
48
- step 'the exit status should be 1'
48
+ step "the exit status should be 1"
49
49
  end
50
50
 
51
51
  # RSpec
52
52
  Then(/^the spec(?:s)? should all pass$/) do
53
53
  step 'the output should contain "0 failures"'
54
- step 'the exit status should be 0'
54
+ step "the exit status should be 0"
55
55
  end
56
56
 
57
57
  # RSpec
58
58
  Then(/^the spec(?:s)? should not(?: all)? pass with( regex)?:$/) do |regex, string|
59
59
  step 'the output should not contain "0 failures"'
60
- step 'the exit status should be 1'
60
+ step "the exit status should be 1"
61
61
 
62
62
  if regex
63
63
  step "the output should match %r<#{string}>"
64
64
  else
65
- step 'the output should contain:', string
65
+ step "the output should contain:", string
66
66
  end
67
67
  end
68
68
 
69
69
  # RSpec
70
70
  Then(/^the spec(?:s)? should(?: all)? pass with( regex)?:$/) do |regex, string|
71
71
  step 'the output should contain "0 failures"'
72
- step 'the exit status should be 0'
72
+ step "the exit status should be 0"
73
73
 
74
74
  if regex
75
75
  step "the output should match %r<#{string}>"
76
76
  else
77
- step 'the output should contain:', string
77
+ step "the output should contain:", string
78
78
  end
79
79
  end
80
80
 
@@ -87,35 +87,35 @@ Then(/^the tests(?:s)? should not(?: all)? pass(?: with (\d+) failures?)?$/) \
87
87
  step %(the output should contain "#{count_failures} errors")
88
88
  end
89
89
 
90
- step 'the exit status should be 1'
90
+ step "the exit status should be 1"
91
91
  end
92
92
 
93
93
  # Minitest
94
94
  Then(/^the tests(?:s)? should all pass$/) do
95
95
  step 'the output should contain "0 errors"'
96
- step 'the exit status should be 0'
96
+ step "the exit status should be 0"
97
97
  end
98
98
 
99
99
  # Minitest
100
100
  Then(/^the test(?:s)? should not(?: all)? pass with( regex)?:$/) do |regex, string|
101
101
  step 'the output should contain "0 errors"'
102
- step 'the exit status should be 1'
102
+ step "the exit status should be 1"
103
103
 
104
104
  if regex
105
105
  step "the output should match %r<#{string}>"
106
106
  else
107
- step 'the output should contain:', string
107
+ step "the output should contain:", string
108
108
  end
109
109
  end
110
110
 
111
111
  # Minitest
112
112
  Then(/^the test(?:s)? should(?: all)? pass with( regex)?:$/) do |regex, string|
113
113
  step 'the output should not contain "0 errors"'
114
- step 'the exit status should be 0'
114
+ step "the exit status should be 0"
115
115
 
116
116
  if regex
117
117
  step "the output should match %r<#{string}>"
118
118
  else
119
- step 'the output should contain:', string
119
+ step "the output should contain:", string
120
120
  end
121
121
  end
@@ -1,5 +1,5 @@
1
- require 'aruba/event_bus/name_resolver'
2
- require 'aruba/errors'
1
+ require "aruba/event_bus/name_resolver"
2
+ require "aruba/errors"
3
3
 
4
4
  module Aruba
5
5
  # Event bus
@@ -34,7 +34,7 @@ module Aruba
34
34
  handler = handler_proc || handler_object
35
35
 
36
36
  if handler.nil? || !handler.respond_to?(:call)
37
- raise ArgumentError, 'Please pass either an object#call or a handler block'
37
+ raise ArgumentError, "Please pass either an object#call or a handler block"
38
38
  end
39
39
 
40
40
  Array(event_ids).flatten.each do |id|
@@ -53,7 +53,7 @@ module Aruba
53
53
  # handler.
54
54
  #
55
55
  def notify(event)
56
- raise NoEventError, 'Please pass an event object, not a class' if event.is_a?(Class)
56
+ raise NoEventError, "Please pass an event object, not a class" if event.is_a?(Class)
57
57
 
58
58
  @handlers[event.class.to_s].each { |handler| handler.call(event) }
59
59
  end
@@ -1,4 +1,4 @@
1
- require 'aruba/errors'
1
+ require "aruba/errors"
2
2
 
3
3
  # Event notification library
4
4
  module Aruba
@@ -10,13 +10,13 @@ module Aruba
10
10
  # Helpers for Resolvers
11
11
  module ResolveHelpers
12
12
  def camel_case(underscored_name)
13
- underscored_name.to_s.split('_').map { |word| word.upcase[0] + word[1..-1] }.join
13
+ underscored_name.to_s.split("_").map { |word| word.upcase[0] + word[1..-1] }.join
14
14
  end
15
15
 
16
16
  # Thanks ActiveSupport
17
17
  # (Only needed to support Ruby 1.9.3 and JRuby)
18
18
  def constantize(camel_cased_word)
19
- names = camel_cased_word.split('::')
19
+ names = camel_cased_word.split("::")
20
20
 
21
21
  # Trigger a built-in NameError exception including the ill-formed
22
22
  # constant in the message.
@@ -148,7 +148,7 @@ module Aruba
148
148
  def transform(event_id)
149
149
  resolvers.find { |r| r.match? event_id }.new.transform(default_namespace, event_id)
150
150
  rescue StandardError => e
151
- types = @resolvers.map(&:supports).flatten.join(', ')
151
+ types = @resolvers.map(&:supports).flatten.join(", ")
152
152
  message = "Transforming \"#{event_id}\" into an event class failed." \
153
153
  " Supported types are: #{types}. #{e.message}."
154
154
  raise EventNameResolveError, message, cause: e
@@ -1,4 +1,4 @@
1
- require 'delegate'
1
+ require "delegate"
2
2
 
3
3
  # Aruba
4
4
  module Aruba
@@ -23,7 +23,7 @@ module Aruba
23
23
 
24
24
  def header
25
25
  if script_starts_with_shebang?
26
- ''
26
+ ""
27
27
  elsif interpreter_is_absolute_path?
28
28
  format("#!%s\n", interpreter)
29
29
  elsif interpreter_is_just_the_name_of_shell?
@@ -40,7 +40,7 @@ module Aruba
40
40
  end
41
41
 
42
42
  def script_starts_with_shebang?
43
- content.start_with? '#!'
43
+ content.start_with? "#!"
44
44
  end
45
45
  end
46
46
  end
@@ -16,7 +16,7 @@ module Aruba
16
16
 
17
17
  def method_missing(name, *args)
18
18
  if config.key? name
19
- raise ArgumentError, 'Options take no argument' if args.any?
19
+ raise ArgumentError, "Options take no argument" if args.any?
20
20
 
21
21
  config[name]
22
22
  else