aruba 1.0.0.pre.alpha.2 → 1.0.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 (135) hide show
  1. checksums.yaml +5 -5
  2. data/.github/PULL_REQUEST_TEMPLATE.md +2 -1
  3. data/.rspec +0 -1
  4. data/.rubocop.yml +46 -182
  5. data/.rubocop_todo.yml +216 -0
  6. data/.simplecov +7 -5
  7. data/.travis.yml +56 -40
  8. data/.yardopts +3 -0
  9. data/CHANGELOG.md +1312 -0
  10. data/CONTRIBUTING.md +175 -83
  11. data/Gemfile +5 -69
  12. data/LICENSE +1 -1
  13. data/README.md +58 -21
  14. data/Rakefile +27 -54
  15. data/appveyor.yml +7 -10
  16. data/aruba.gemspec +38 -19
  17. data/bin/console +3 -12
  18. data/cucumber.yml +4 -22
  19. data/exe/aruba +1 -1
  20. data/fixtures/cli-app/README.md +1 -1
  21. data/fixtures/cli-app/Rakefile +1 -1
  22. data/fixtures/cli-app/bin/aruba-test-cli +1 -1
  23. data/fixtures/cli-app/cli-app.gemspec +4 -4
  24. data/fixtures/cli-app/lib/cli/app.rb +1 -1
  25. data/fixtures/cli-app/lib/cli/app/suppress_simple_cov_output.rb +3 -3
  26. data/fixtures/cli-app/lib/cli/app/version.rb +1 -1
  27. data/fixtures/cli-app/spec/spec_helper.rb +3 -2
  28. data/fixtures/empty-app/Rakefile +1 -1
  29. data/fixtures/empty-app/cli-app.gemspec +4 -4
  30. data/fixtures/empty-app/lib/cli/app.rb +0 -2
  31. data/fixtures/empty-app/lib/cli/app/version.rb +1 -1
  32. data/fixtures/getting-started-app/Gemfile +1 -1
  33. data/lib/aruba/api.rb +8 -15
  34. data/lib/aruba/api/bundler.rb +16 -0
  35. data/lib/aruba/api/commands.rb +272 -0
  36. data/lib/aruba/api/core.rb +82 -43
  37. data/lib/aruba/api/environment.rb +24 -7
  38. data/lib/aruba/api/filesystem.rb +66 -64
  39. data/lib/aruba/api/text.rb +17 -11
  40. data/lib/aruba/aruba_path.rb +25 -111
  41. data/lib/aruba/basic_configuration.rb +8 -25
  42. data/lib/aruba/basic_configuration/option.rb +2 -2
  43. data/lib/aruba/cli.rb +4 -1
  44. data/lib/aruba/colorizer.rb +10 -99
  45. data/lib/aruba/command.rb +4 -0
  46. data/lib/aruba/config/jruby.rb +15 -5
  47. data/lib/aruba/config_wrapper.rb +17 -2
  48. data/lib/aruba/configuration.rb +107 -0
  49. data/lib/aruba/console.rb +5 -7
  50. data/lib/aruba/console/help.rb +5 -2
  51. data/lib/aruba/contracts/absolute_path.rb +3 -3
  52. data/lib/aruba/contracts/is_power_of_two.rb +2 -2
  53. data/lib/aruba/contracts/relative_path.rb +3 -3
  54. data/lib/aruba/cucumber.rb +0 -3
  55. data/lib/aruba/cucumber/command.rb +227 -190
  56. data/lib/aruba/cucumber/environment.rb +1 -1
  57. data/lib/aruba/cucumber/file.rb +56 -50
  58. data/lib/aruba/cucumber/hooks.rb +10 -63
  59. data/lib/aruba/cucumber/testing_frameworks.rb +76 -50
  60. data/lib/aruba/event_bus.rb +4 -2
  61. data/lib/aruba/event_bus/name_resolver.rb +10 -10
  62. data/lib/aruba/events.rb +2 -1
  63. data/lib/aruba/hooks.rb +3 -5
  64. data/lib/aruba/in_config_wrapper.rb +10 -3
  65. data/lib/aruba/initializer.rb +40 -34
  66. data/lib/aruba/matchers/base/base_matcher.rb +2 -11
  67. data/lib/aruba/matchers/base/message_indenter.rb +19 -0
  68. data/lib/aruba/matchers/base/object_formatter.rb +2 -7
  69. data/lib/aruba/matchers/collection/include_an_object.rb +11 -13
  70. data/lib/aruba/matchers/command/be_successfully_executed.rb +8 -4
  71. data/lib/aruba/matchers/command/have_exit_status.rb +16 -4
  72. data/lib/aruba/matchers/command/have_finished_in_time.rb +5 -5
  73. data/lib/aruba/matchers/command/have_output.rb +12 -5
  74. data/lib/aruba/matchers/command/have_output_on_stderr.rb +4 -2
  75. data/lib/aruba/matchers/command/have_output_on_stdout.rb +4 -2
  76. data/lib/aruba/matchers/command/have_output_size.rb +2 -2
  77. data/lib/aruba/matchers/directory/be_an_existing_directory.rb +5 -7
  78. data/lib/aruba/matchers/directory/have_sub_directory.rb +10 -7
  79. data/lib/aruba/matchers/file/be_a_command_found_in_path.rb +2 -4
  80. data/lib/aruba/matchers/file/be_an_existing_executable.rb +4 -6
  81. data/lib/aruba/matchers/file/be_an_existing_file.rb +5 -7
  82. data/lib/aruba/matchers/file/have_file_content.rb +4 -4
  83. data/lib/aruba/matchers/file/have_file_size.rb +8 -8
  84. data/lib/aruba/matchers/file/have_same_file_content.rb +9 -12
  85. data/lib/aruba/matchers/path/a_path_matching_pattern.rb +2 -4
  86. data/lib/aruba/matchers/path/be_an_absolute_path.rb +3 -5
  87. data/lib/aruba/matchers/path/be_an_existing_path.rb +4 -6
  88. data/lib/aruba/matchers/path/have_permissions.rb +8 -8
  89. data/lib/aruba/matchers/string/include_output_string.rb +8 -10
  90. data/lib/aruba/matchers/string/match_output_string.rb +9 -11
  91. data/lib/aruba/matchers/string/output_string_eq.rb +7 -9
  92. data/lib/aruba/platform.rb +0 -8
  93. data/lib/aruba/platforms/announcer.rb +60 -85
  94. data/lib/aruba/platforms/aruba_file_creator.rb +4 -2
  95. data/lib/aruba/platforms/aruba_fixed_size_file_creator.rb +8 -3
  96. data/lib/aruba/platforms/aruba_logger.rb +22 -2
  97. data/lib/aruba/platforms/command_monitor.rb +15 -102
  98. data/lib/aruba/platforms/determine_disk_usage.rb +56 -19
  99. data/lib/aruba/platforms/filesystem_status.rb +9 -9
  100. data/lib/aruba/platforms/local_environment.rb +2 -2
  101. data/lib/aruba/platforms/simple_table.rb +3 -11
  102. data/lib/aruba/platforms/unix_command_string.rb +7 -4
  103. data/lib/aruba/platforms/unix_environment_variables.rb +19 -26
  104. data/lib/aruba/platforms/unix_platform.rb +18 -39
  105. data/lib/aruba/platforms/unix_which.rb +3 -2
  106. data/lib/aruba/platforms/windows_command_string.rb +20 -7
  107. data/lib/aruba/platforms/windows_environment_variables.rb +42 -30
  108. data/lib/aruba/platforms/windows_platform.rb +4 -0
  109. data/lib/aruba/platforms/windows_which.rb +9 -4
  110. data/lib/aruba/processes/basic_process.rb +21 -27
  111. data/lib/aruba/processes/debug_process.rb +16 -5
  112. data/lib/aruba/processes/in_process.rb +20 -9
  113. data/lib/aruba/processes/spawn_process.rb +64 -36
  114. data/lib/aruba/rspec.rb +28 -31
  115. data/lib/aruba/runtime.rb +16 -7
  116. data/lib/aruba/setup.rb +32 -17
  117. data/lib/aruba/tasks/docker_helpers.rb +4 -2
  118. data/lib/aruba/version.rb +1 -1
  119. metadata +194 -64
  120. data/History.md +0 -612
  121. data/bin/bootstrap +0 -34
  122. data/bin/build +0 -3
  123. data/bin/release +0 -3
  124. data/fixtures/spawn_process/stderr.sh +0 -3
  125. data/lib/aruba/api/command.rb +0 -309
  126. data/lib/aruba/api/deprecated.rb +0 -895
  127. data/lib/aruba/api/rvm.rb +0 -44
  128. data/lib/aruba/config.rb +0 -101
  129. data/lib/aruba/cucumber/rvm.rb +0 -3
  130. data/lib/aruba/in_process.rb +0 -14
  131. data/lib/aruba/jruby.rb +0 -4
  132. data/lib/aruba/matchers/path/match_path_pattern.rb +0 -41
  133. data/lib/aruba/matchers/rspec_matcher_include_regexp.rb +0 -25
  134. data/lib/aruba/platforms/disk_usage_calculator.rb +0 -20
  135. data/lib/aruba/spawn_process.rb +0 -11
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- $LOAD_PATH << File.expand_path('../', __FILE__)
1
+ $LOAD_PATH << File.expand_path(__dir__)
2
2
 
3
3
  require 'aruba/tasks/docker_helpers'
4
4
  require 'aruba/platform'
@@ -6,83 +6,55 @@ require 'aruba/platform'
6
6
  require 'bundler'
7
7
  Bundler.setup
8
8
 
9
- task :default => :test
9
+ task default: %w(spec cucumber cucumber:wip lint)
10
10
 
11
- desc 'Run the whole test suite. Any failure will stop rake going on'
12
- task :test => %w(lint:travis lint:coding_guidelines lint:licenses test:rspec test:cucumber test:cucumber_wip)
11
+ desc 'Run all linters.'
12
+ task lint: %w(lint:coding_guidelines lint:licenses)
13
13
 
14
- task :cucumber do
15
- Aruba.platform.deprecated 'The use of task "cucumber" is deprecated. Please use "test:cucumber"'
16
- Rake::Task['test:cucumber'].invoke
17
- end
14
+ desc 'Run the whole test suite.'
15
+ task test: %w(spec cucumber cucumber:wip)
18
16
 
19
- task :cucumber_wip do
20
- Aruba.platform.deprecated 'The use of task "cucumber_wip" is deprecated. Please use "test:cucumber_wip"'
21
- Rake::Task['test:cucumber_wip'].invoke
22
- end
17
+ require 'cucumber/rake/task'
18
+ require 'rspec/core/rake_task'
23
19
 
24
- task :spec do
25
- Aruba.platform.deprecated 'The use of task "spec" is deprecated. Please use "test:rspec"'
26
- Rake::Task['test:rspec'].invoke
20
+ Cucumber::Rake::Task.new do |t|
21
+ t.cucumber_opts = %w(--format progress)
27
22
  end
28
23
 
29
- task :rubocop do
30
- Aruba.platform.deprecated 'The use of task "rubocop" is deprecated. Please use "lint:coding_guidelines"'
31
- Rake::Task['test:coding_guidelines'].invoke
24
+ Cucumber::Rake::Task.new('cucumber:wip', 'Run Cucumber features '\
25
+ 'which are "WORK IN PROGRESS" and '\
26
+ 'are allowed to fail') do |t|
27
+ t.cucumber_opts = %w(--format progress)
28
+ t.profile = 'wip'
32
29
  end
33
30
 
34
- namespace :test do
35
- desc 'Run cucumber tests'
36
- task :cucumber do
37
- sh 'bundle exec cucumber'
38
- end
39
-
40
- desc 'Run cucumber tests which are "WORK IN PROGRESS" and are allowed to fail'
41
- task :cucumber_wip do
42
- sh 'bundle exec cucumber -p wip'
43
- end
44
-
45
- desc 'Run rspec tests'
46
- task :rspec do
47
- sh 'bundle exec rspec'
48
- end
49
- end
31
+ RSpec::Core::RakeTask.new
50
32
 
51
33
  namespace :lint do
52
- desc 'Lint our .travis.yml'
53
- task :travis do
54
- begin
55
- require 'travis/yaml'
56
-
57
- puts 'Linting .travis.yml ... No output is good!'
58
- Travis::Yaml.parse! File.read('.travis.yml')
59
- rescue LoadError => e
60
- $stderr.puts "You ruby is not supported for linting the .travis.yml: #{e.message}"
61
- end
62
- end
63
-
64
34
  desc 'Lint our code with "rubocop"'
65
35
  task :coding_guidelines do
66
- sh 'bundle exec rubocop --fail-level E'
36
+ sh 'bundle exec rubocop'
67
37
  end
68
38
 
69
39
  desc 'Check for relevant licenses in project'
70
40
  task :licenses do
71
41
  sh 'bundle exec license_finder'
72
42
  end
73
- end
74
43
 
75
- namespace :rubygem do
76
- Bundler::GemHelper.install_tasks
44
+ require 'yard-junk/rake'
45
+ YardJunk::Rake.define_task
77
46
  end
78
47
 
48
+ Bundler::GemHelper.install_tasks
49
+
79
50
  namespace :docker do
80
51
  desc 'Build docker image'
81
52
  task :build, :cache, :version do |_, args|
82
- args.with_defaults(:version => 'latest')
83
- args.with_defaults(:cache => true)
53
+ args.with_defaults(version: 'latest')
54
+ args.with_defaults(cache: true)
84
55
 
85
- docker_compose_file = Aruba::DockerComposeFile.new(File.expand_path('../docker-compose.yml', __FILE__))
56
+ docker_compose_file =
57
+ Aruba::DockerComposeFile.new(File.expand_path('docker-compose.yml', __dir__))
86
58
  docker_run_instance = Aruba::DockerRunInstance.new(docker_compose_file, :base)
87
59
 
88
60
  builder = Aruba::DockerBuildCommandLineBuilder.new(
@@ -96,7 +68,8 @@ namespace :docker do
96
68
 
97
69
  desc 'Run docker container'
98
70
  task :run, :command do |_, args|
99
- docker_compose_file = Aruba::DockerComposeFile.new(File.expand_path('../docker-compose.yml', __FILE__))
71
+ docker_compose_file =
72
+ Aruba::DockerComposeFile.new(File.expand_path('docker-compose.yml', __dir__))
100
73
  docker_run_instance = Aruba::DockerRunInstance.new(docker_compose_file, :base)
101
74
 
102
75
  builder = Aruba::DockerRunCommandLineBuilder.new(
@@ -1,8 +1,8 @@
1
1
  version: "{build}"
2
2
 
3
- # This will build all PRs targetting matching branches.
3
+ # This will build all PRs targeting matching branches.
4
4
  # Without this, each PR builds twice -- once for the PR branch HEAD,
5
- # and once for the merge commit that github creates for each mergable PR.
5
+ # and once for the merge commit that github creates for each mergeable PR.
6
6
  branches:
7
7
  only:
8
8
  - master
@@ -14,18 +14,15 @@ install:
14
14
  - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
15
15
  - ruby --version
16
16
  - gem --version
17
- - gem install bundler
18
17
  - bundler --version
19
18
  - bundle install
20
- - cinst ansicon
21
19
 
22
20
  test_script:
23
- - bundle exec rake test --trace
21
+ - bundle exec rake spec --trace
24
22
 
25
23
  environment:
26
24
  matrix:
27
- - ruby_version: '19'
28
- - ruby_version: '20'
29
- - ruby_version: '21'
30
- - ruby_version: '22'
31
-
25
+ - ruby_version: '24'
26
+ - ruby_version: '25'
27
+ - ruby_version: '26'
28
+ # Note: ruby version 2.7 is not available as of 2019-12-31
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  lib = ::File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'aruba/version'
@@ -6,33 +5,53 @@ require 'aruba/version'
6
5
  Gem::Specification.new do |spec|
7
6
  spec.name = 'aruba'
8
7
  spec.version = Aruba::VERSION
9
- spec.author = "Aslak Hellesøy, Matt Wynne and other Aruba Contributors"
10
- spec.description = 'Extension for popular TDD and BDD frameworks like "Cucumber", "RSpec" and "Minitest" to make testing commandline applications meaningful, easy and fun.'
8
+ spec.author = 'Aslak Hellesøy, Matt Wynne and other Aruba Contributors'
9
+ spec.description = <<~TEXT
10
+ Extension for popular TDD and BDD frameworks like "Cucumber", "RSpec" and "Minitest",
11
+ to make testing commandline applications meaningful, easy and fun.
12
+ TEXT
11
13
  spec.summary = "aruba-#{spec.version}"
12
14
  spec.license = 'MIT'
13
15
  spec.email = 'cukes@googlegroups.com'
14
- spec.homepage = 'http://github.com/cucumber/aruba'
16
+ spec.homepage = 'https://github.com/cucumber/aruba'
15
17
 
16
- spec.add_runtime_dependency 'cucumber', '~> 2.4', '>= 2.4.0'
17
- spec.add_runtime_dependency 'childprocess', '~> 0.7.1'
18
- spec.add_runtime_dependency 'ffi', '~> 1.9', '>= 1.9.10'
19
- spec.add_runtime_dependency 'rspec-expectations', '~> 3.4', '>= 3.4.0'
20
- spec.add_runtime_dependency 'contracts', '~> 0.14'
21
- spec.add_runtime_dependency 'thor', '~> 0.19'
18
+ spec.metadata = {
19
+ 'bug_tracker_uri' => 'https://github.com/cucumber/aruba/issues',
20
+ 'changelog_uri' => 'https://www.rubydoc.info/gems/aruba/file/CHANGELOG.md',
21
+ 'documentation_uri' => 'https://www.rubydoc.info/gems/aruba',
22
+ 'homepage_uri' => spec.homepage,
23
+ 'source_code_uri' => 'https://github.com/cucumber/aruba'
24
+ }
22
25
 
23
- spec.add_development_dependency 'bundler', '~> 1.11'
24
- spec.rubygems_version = ">= 1.6.1"
25
- spec.required_ruby_version = '>= 1.9.3'
26
+ spec.add_runtime_dependency 'childprocess', '~> 3.0'
27
+ spec.add_runtime_dependency 'contracts', '~> 0.16.0'
28
+ spec.add_runtime_dependency 'cucumber', ['>= 2.4', '< 5.0']
29
+ spec.add_runtime_dependency 'ffi', '~> 1.9'
30
+ spec.add_runtime_dependency 'rspec-expectations', '~> 3.4'
31
+ spec.add_runtime_dependency 'thor', '~> 1.0'
26
32
 
27
- # spec.post_install_message = <<-EOS
28
- # EOS
33
+ spec.add_development_dependency 'json', '~> 2.1'
34
+ spec.add_development_dependency 'license_finder', '~> 6.0'
35
+ spec.add_development_dependency 'minitest', '~> 5.10'
36
+ spec.add_development_dependency 'pry-doc', '~> 1.0'
37
+ spec.add_development_dependency 'rake', '~> 13.0'
38
+ spec.add_development_dependency 'rspec', '~> 3.6'
39
+ spec.add_development_dependency 'rubocop', '~> 0.84.0'
40
+ spec.add_development_dependency 'rubocop-performance', '~> 1.5'
41
+ spec.add_development_dependency 'rubocop-rspec', '~> 1.39'
42
+ spec.add_development_dependency 'simplecov', '~> 0.18.0'
43
+ spec.add_development_dependency 'yard-junk', '~> 0.0.7'
44
+
45
+ spec.rubygems_version = '>= 1.6.1'
46
+ spec.required_ruby_version = '>= 2.4'
29
47
 
30
48
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
31
49
  f.match(%r{^(test|spec|features)/})
32
50
  end
33
51
 
34
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
- spec.rdoc_options = ["--charset=UTF-8"]
36
- spec.bindir = "exe"
37
- spec.require_paths = ["lib"]
52
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
53
+ spec.rdoc_options = ['--charset', 'UTF-8', '--main', 'README.md']
54
+ spec.extra_rdoc_files = ['CHANGELOG.md', 'CONTRIBUTING.md', 'README.md', 'LICENSE']
55
+ spec.bindir = 'exe'
56
+ spec.require_paths = ['lib']
38
57
  end
@@ -1,16 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
3
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
4
4
 
5
- require 'pry'
5
+ require 'aruba/console'
6
6
 
7
- require 'aruba/api'
8
-
9
- module Aruba
10
- class MyConsole
11
- include Aruba::Api
12
- end
13
- end
14
-
15
- include Aruba
16
- Pry.start MyConsole.new
7
+ Aruba::Console.new.start
@@ -1,24 +1,6 @@
1
1
  <%
2
- $LOAD_PATH << ::File.expand_path('../lib', __FILE__)
3
- require 'aruba/version'
4
- require 'ffi'
5
-
6
- java_version = (RUBY_DESCRIPTION.match(/.*?on.*?(1\.[\d]\..*? )/))[1] if defined?(JRUBY_VERSION)
7
-
8
- std_opts = "--format pretty --color --exclude features/fixtures --require features --tags ~@unsupported-on"
9
- java_default_opts = "--tags ~@wip-jruby-java-1.6" if defined?(JRUBY_VERSION) && (java_version < '1.7.0')
10
- java_wip_opts = "--tags @wip-jruby-java-1.6:3" if defined?(JRUBY_VERSION) && (java_version < '1.7.0')
11
-
12
- ignore_opts = []
13
- ignore_opts << '--tags ~@ignore'
14
- ignore_opts << '--tags ~@unsupported-on-platform-java' if RUBY_PLATFORM.include? 'java'
15
- ignore_opts << '--tags ~@unsupported-on-platform-mri' if !RUBY_PLATFORM.include? 'java'
16
- ignore_opts << '--tags ~@unsupported-on-platform-windows' if FFI::Platform.windows?
17
- ignore_opts << '--tags ~@unsupported-on-platform-unix' if FFI::Platform.unix?
18
- ignore_opts << '--tags ~@unsupported-on-platform-mac' if FFI::Platform.mac?
19
- ignore_opts << '--tags ~@unsupported-on-ruby-older-2' if RUBY_VERSION < '2'
20
- ignore_opts << '--tags ~@requires-aruba-version-1' if Aruba::VERSION < '1'
21
- ignore_opts = ignore_opts.join(' ')
2
+ std_opts = "--format pretty --color --exclude features/fixtures --require features --tags 'not @unsupported-on'"
3
+ ignore_opts = "--tags 'not @ignore'"
22
4
  %>
23
- default: <%= std_opts %> --tags ~@wip <%= java_default_opts %> <%= ignore_opts %>
24
- wip: <%= std_opts %> --wip --tags @wip:3 <%= java_wip_opts %> <%= ignore_opts %>
5
+ default: <%= std_opts %> --tags 'not @wip' <%= ignore_opts %>
6
+ wip: <%= std_opts %> --wip --tags @wip:3 <%= ignore_opts %>
data/exe/aruba CHANGED
@@ -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
 
@@ -31,7 +31,7 @@ cli
31
31
 
32
32
  ### Library
33
33
 
34
- You can use `bin/console` to load your library.
34
+ You can use `script/console` to load your library.
35
35
 
36
36
  ### Fixture
37
37
 
@@ -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
 
@@ -16,11 +15,12 @@ Gem::Specification.new do |spec|
16
15
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
17
16
  # delete this section to allow pushing this gem to any host.
18
17
 
19
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.files = `git ls-files -z`.split("\x0")
19
+ .reject { |f| f.match(%r{^(test|spec|features)/}) }
20
20
  spec.bindir = 'exe'
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.9'
25
- spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency 'rake', '~> 13.0'
26
26
  end
@@ -1,6 +1,6 @@
1
1
  require 'cli/app/version'
2
2
 
3
- ::Dir.glob(File.expand_path('../**/*.rb', __FILE__)).each { |f| require_relative f }
3
+ ::Dir.glob(File.expand_path('**/*.rb', __dir__)).each { |f| require_relative f }
4
4
 
5
5
  module Cli
6
6
  module App
@@ -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,7 +1,8 @@
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
4
 
5
5
  require_relative 'support/aruba'
6
6
 
7
- ::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require_relative f }
7
+ ::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__))
8
+ .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
 
@@ -16,11 +15,12 @@ Gem::Specification.new do |spec|
16
15
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
17
16
  # delete this section to allow pushing this gem to any host.
18
17
 
19
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.files = `git ls-files -z`.split("\x0")
19
+ .reject { |f| f.match(%r{^(test|spec|features)/}) }
20
20
  spec.bindir = 'exe'
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
24
  spec.add_development_dependency 'bundler', '~> 1.9'
25
- spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency 'rake', '~> 13.0'
26
26
  end
@@ -1,7 +1,5 @@
1
1
  require 'cli/app/version'
2
2
 
3
- ::Dir.glob(File.expand_path('../**/*.rb', __FILE__)).each { |f| require_relative f }
4
-
5
3
  module Cli
6
4
  module App
7
5
  # Your code goes here...
@@ -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__)
@@ -6,16 +6,12 @@ require 'aruba/extensions/string/strip'
6
6
 
7
7
  require 'aruba/platform'
8
8
  require 'aruba/api/core'
9
- require 'aruba/api/command'
10
-
11
- if Aruba::VERSION <= '1.1.0'
12
- require 'aruba/api/deprecated'
13
- end
9
+ require 'aruba/api/commands'
14
10
 
15
11
  require 'aruba/api/environment'
16
12
  require 'aruba/api/filesystem'
17
13
  require 'aruba/api/text'
18
- require 'aruba/api/rvm'
14
+ require 'aruba/api/bundler'
19
15
 
20
16
  Aruba.platform.require_matching_files('../matchers/**/*.rb', __FILE__)
21
17
 
@@ -23,14 +19,11 @@ Aruba.platform.require_matching_files('../matchers/**/*.rb', __FILE__)
23
19
  module Aruba
24
20
  # Api
25
21
  module Api
26
- include Aruba::Api::Core
27
- include Aruba::Api::Commands
28
- include Aruba::Api::Environment
29
- include Aruba::Api::Filesystem
30
- include Aruba::Api::Rvm
31
- if Aruba::VERSION <= '1.1.0'
32
- include Aruba::Api::Deprecated
33
- end
34
- include Aruba::Api::Text
22
+ include Core
23
+ include Commands
24
+ include Environment
25
+ include Filesystem
26
+ include Text
27
+ include Bundler
35
28
  end
36
29
  end