aruba 1.0.0.pre.alpha.5 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +153 -28
  3. data/CONTRIBUTING.md +0 -9
  4. data/LICENSE +1 -1
  5. data/README.md +37 -30
  6. data/lib/aruba/api.rb +0 -1
  7. data/lib/aruba/api/bundler.rb +17 -2
  8. data/lib/aruba/api/commands.rb +15 -16
  9. data/lib/aruba/api/core.rb +64 -50
  10. data/lib/aruba/api/environment.rb +12 -4
  11. data/lib/aruba/api/filesystem.rb +32 -46
  12. data/lib/aruba/api/text.rb +15 -3
  13. data/lib/aruba/aruba_path.rb +23 -95
  14. data/lib/aruba/basic_configuration.rb +46 -65
  15. data/lib/aruba/basic_configuration/option.rb +2 -2
  16. data/lib/aruba/cli.rb +4 -1
  17. data/lib/aruba/config/jruby.rb +1 -1
  18. data/lib/aruba/config_wrapper.rb +17 -4
  19. data/lib/aruba/configuration.rb +29 -22
  20. data/lib/aruba/console.rb +0 -2
  21. data/lib/aruba/console/help.rb +8 -5
  22. data/lib/aruba/contracts/absolute_path.rb +3 -3
  23. data/lib/aruba/contracts/is_power_of_two.rb +2 -2
  24. data/lib/aruba/contracts/relative_path.rb +3 -3
  25. data/lib/aruba/cucumber/command.rb +93 -82
  26. data/lib/aruba/cucumber/file.rb +43 -23
  27. data/lib/aruba/cucumber/hooks.rb +4 -1
  28. data/lib/aruba/cucumber/testing_frameworks.rb +14 -12
  29. data/lib/aruba/event_bus.rb +4 -2
  30. data/lib/aruba/event_bus/name_resolver.rb +9 -8
  31. data/lib/aruba/events.rb +2 -1
  32. data/lib/aruba/hooks.rb +2 -4
  33. data/lib/aruba/in_config_wrapper.rb +8 -5
  34. data/lib/aruba/initializer.rb +9 -3
  35. data/lib/aruba/matchers/base/base_matcher.rb +2 -11
  36. data/lib/aruba/matchers/base/message_indenter.rb +1 -1
  37. data/lib/aruba/matchers/base/object_formatter.rb +0 -5
  38. data/lib/aruba/matchers/collection/include_an_object.rb +4 -4
  39. data/lib/aruba/matchers/command/be_successfully_executed.rb +3 -1
  40. data/lib/aruba/matchers/command/have_exit_status.rb +3 -1
  41. data/lib/aruba/matchers/command/have_finished_in_time.rb +3 -1
  42. data/lib/aruba/matchers/command/have_output.rb +3 -1
  43. data/lib/aruba/matchers/command/have_output_on_stderr.rb +3 -1
  44. data/lib/aruba/matchers/command/have_output_on_stdout.rb +3 -1
  45. data/lib/aruba/matchers/directory/have_sub_directory.rb +8 -3
  46. data/lib/aruba/matchers/file/have_file_size.rb +4 -2
  47. data/lib/aruba/matchers/path/have_permissions.rb +7 -4
  48. data/lib/aruba/platforms/announcer.rb +25 -11
  49. data/lib/aruba/platforms/aruba_file_creator.rb +3 -1
  50. data/lib/aruba/platforms/aruba_fixed_size_file_creator.rb +7 -2
  51. data/lib/aruba/platforms/aruba_logger.rb +10 -9
  52. data/lib/aruba/platforms/command_monitor.rb +4 -6
  53. data/lib/aruba/platforms/determine_disk_usage.rb +55 -20
  54. data/lib/aruba/platforms/filesystem_status.rb +19 -13
  55. data/lib/aruba/platforms/simple_table.rb +2 -2
  56. data/lib/aruba/platforms/unix_environment_variables.rb +9 -4
  57. data/lib/aruba/platforms/unix_platform.rb +10 -10
  58. data/lib/aruba/platforms/unix_which.rb +1 -1
  59. data/lib/aruba/platforms/windows_command_string.rb +1 -1
  60. data/lib/aruba/platforms/windows_environment_variables.rb +2 -1
  61. data/lib/aruba/platforms/windows_platform.rb +3 -3
  62. data/lib/aruba/platforms/windows_which.rb +6 -2
  63. data/lib/aruba/processes/basic_process.rb +4 -6
  64. data/lib/aruba/processes/debug_process.rb +4 -2
  65. data/lib/aruba/processes/in_process.rb +5 -3
  66. data/lib/aruba/processes/spawn_process.rb +27 -16
  67. data/lib/aruba/rspec.rb +25 -15
  68. data/lib/aruba/runtime.rb +11 -4
  69. data/lib/aruba/setup.rb +23 -10
  70. data/lib/aruba/tasks/docker_helpers.rb +3 -1
  71. data/lib/aruba/version.rb +1 -1
  72. metadata +96 -109
  73. data/.cucumberproignore +0 -3
  74. data/.document +0 -5
  75. data/.github/ISSUE_TEMPLATE.md +0 -48
  76. data/.github/PULL_REQUEST_TEMPLATE.md +0 -41
  77. data/.gitignore +0 -38
  78. data/.rspec +0 -3
  79. data/.rubocop.yml +0 -31
  80. data/.rubocop_todo.yml +0 -258
  81. data/.simplecov +0 -34
  82. data/.travis.yml +0 -73
  83. data/.yardopts +0 -11
  84. data/Dockerfile +0 -67
  85. data/Gemfile +0 -15
  86. data/Rakefile +0 -92
  87. data/TODO.md +0 -13
  88. data/appveyor.yml +0 -30
  89. data/aruba.gemspec +0 -46
  90. data/bin/console +0 -7
  91. data/bin/test +0 -9
  92. data/config/.gitignore +0 -1
  93. data/cucumber.yml +0 -6
  94. data/docker-compose.yml +0 -26
  95. data/fixtures/cli-app/.gitignore +0 -9
  96. data/fixtures/cli-app/.rspec +0 -2
  97. data/fixtures/cli-app/README.md +0 -39
  98. data/fixtures/cli-app/Rakefile +0 -1
  99. data/fixtures/cli-app/bin/aruba-test-cli +0 -6
  100. data/fixtures/cli-app/cli-app.gemspec +0 -25
  101. data/fixtures/cli-app/features/support/aruba.rb +0 -1
  102. data/fixtures/cli-app/features/support/env.rb +0 -1
  103. data/fixtures/cli-app/lib/cli/app.rb +0 -9
  104. data/fixtures/cli-app/lib/cli/app/suppress_simple_cov_output.rb +0 -15
  105. data/fixtures/cli-app/lib/cli/app/version.rb +0 -5
  106. data/fixtures/cli-app/script/console +0 -14
  107. data/fixtures/cli-app/spec/spec_helper.rb +0 -7
  108. data/fixtures/cli-app/spec/support/aruba.rb +0 -1
  109. data/fixtures/copy/file.txt +0 -1
  110. data/fixtures/empty-app/.gitignore +0 -9
  111. data/fixtures/empty-app/.rspec +0 -2
  112. data/fixtures/empty-app/README.md +0 -24
  113. data/fixtures/empty-app/Rakefile +0 -1
  114. data/fixtures/empty-app/cli-app.gemspec +0 -25
  115. data/fixtures/empty-app/lib/cli/app.rb +0 -7
  116. data/fixtures/empty-app/lib/cli/app/version.rb +0 -5
  117. data/fixtures/getting-started-app/.gitignore +0 -4
  118. data/fixtures/getting-started-app/Gemfile +0 -4
  119. data/fixtures/getting-started-app/README.md +0 -3
  120. data/fixtures/getting-started-app/features/support/env.rb +0 -1
  121. data/lib/aruba/extensions/string/strip.rb +0 -25
  122. data/lib/aruba/platforms/disk_usage_calculator.rb +0 -20
@@ -1 +0,0 @@
1
- require 'bundler/gem_tasks'
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $LOAD_PATH << File.expand_path('../lib', __dir__)
4
- require 'cli/app'
5
-
6
- exit 0
@@ -1,25 +0,0 @@
1
- lib = File.expand_path('lib', __dir__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'cli/app/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'cli-app'
7
- spec.version = Cli::App::VERSION
8
- spec.authors = ['Aruba Developers']
9
- spec.email = 'cukes@googlegroups.com'
10
-
11
- spec.summary = 'Summary'
12
- spec.description = 'Description'
13
- spec.homepage = 'http://example.com'
14
-
15
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
16
- # delete this section to allow pushing this gem to any host.
17
-
18
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
- spec.bindir = 'exe'
20
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ['lib']
22
-
23
- spec.add_development_dependency 'bundler', '~> 1.9'
24
- spec.add_development_dependency 'rake', '~> 10.0'
25
- end
@@ -1 +0,0 @@
1
- require 'aruba/cucumber'
@@ -1 +0,0 @@
1
- require_relative 'aruba'
@@ -1,9 +0,0 @@
1
- require 'cli/app/version'
2
-
3
- ::Dir.glob(File.expand_path('**/*.rb', __dir__)).each { |f| require_relative f }
4
-
5
- module Cli
6
- module App
7
- # Your code goes here...
8
- end
9
- end
@@ -1,15 +0,0 @@
1
- module SimpleCov
2
- module Formatter
3
- class HTMLFormatter
4
- def format(result)
5
- Dir[File.join(File.dirname(__FILE__), '../public/*')].each do |path|
6
- FileUtils.cp_r(path, asset_output_path)
7
- end
8
-
9
- File.open(File.join(output_path, 'index.html'), 'wb') do |file|
10
- file.puts template('layout').result(binding)
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,5 +0,0 @@
1
- module Cli
2
- module App
3
- VERSION = '0.1.0'.freeze
4
- end
5
- end
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'cli/app'
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require 'irb'
14
- IRB.start
@@ -1,7 +0,0 @@
1
- $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
2
-
3
- require 'cli/app'
4
-
5
- require_relative 'support/aruba'
6
-
7
- ::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require_relative f }
@@ -1 +0,0 @@
1
- require 'aruba/rspec'
@@ -1 +0,0 @@
1
- a
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
@@ -1,24 +0,0 @@
1
- # Empty Cli App
2
-
3
- This is a simple test cli app
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'cli-app'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install cli-app
20
-
21
- ## Usage
22
-
23
- Place files in `lib/cli/app/`. They are loaded automatically. If you need a
24
- specific load order, use `require` in your files.
@@ -1 +0,0 @@
1
- require 'bundler/gem_tasks'
@@ -1,25 +0,0 @@
1
- lib = File.expand_path('lib', __dir__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'cli/app/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'cli-app'
7
- spec.version = Cli::App::VERSION
8
- spec.authors = ['Aruba Developers']
9
- spec.email = 'cukes@googlegroups.com'
10
-
11
- spec.summary = 'Summary'
12
- spec.description = 'Description'
13
- spec.homepage = 'http://example.com'
14
-
15
- # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
16
- # delete this section to allow pushing this gem to any host.
17
-
18
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
- spec.bindir = 'exe'
20
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ['lib']
22
-
23
- spec.add_development_dependency 'bundler', '~> 1.9'
24
- spec.add_development_dependency 'rake', '~> 10.0'
25
- end
@@ -1,7 +0,0 @@
1
- require 'cli/app/version'
2
-
3
- module Cli
4
- module App
5
- # Your code goes here...
6
- end
7
- end
@@ -1,5 +0,0 @@
1
- module Cli
2
- module App
3
- VERSION = '0.1.0'.freeze
4
- end
5
- end
@@ -1,4 +0,0 @@
1
- /coverage/
2
- /doc/
3
- /pkg/
4
- /tmp/
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'aruba', path: File.expand_path('../../..', __dir__)
4
- gem 'cucumber'
@@ -1,3 +0,0 @@
1
- # Simple Cli App
2
-
3
- This is a simple app to get started with `aruba`.
@@ -1 +0,0 @@
1
- require 'aruba/cucumber'
@@ -1,25 +0,0 @@
1
- # String
2
- class String
3
- # Strips indentation in heredocs.
4
- #
5
- # For example in
6
- #
7
- # if options[:usage]
8
- # puts <<-USAGE.strip_heredoc
9
- # This command does such and such.
10
- #
11
- # Supported options are:
12
- # -h This message
13
- # ...
14
- # USAGE
15
- # end
16
- #
17
- # the user would see the usage message aligned against the left margin.
18
- #
19
- # Technically, it looks for the least indented line in the whole string, and removes
20
- # that amount of leading whitespace.
21
- def strip_heredoc
22
- indent = scan(/^[ \t]*(?=\S)/).min.to_s.size
23
- gsub(/^[ \t]{#{indent}}/, '')
24
- end
25
- end
@@ -1,20 +0,0 @@
1
- require 'aruba/file_size'
2
-
3
- # Aruba
4
- module Aruba
5
- # Platforms
6
- module Platforms
7
- # Calculate disk usage
8
- class DiskUsageCalculator
9
- # Calc
10
- #
11
- # @param [Integer] blocks
12
- # Count of blocks
13
- # @param [Integer] block_size
14
- # The size of a single block
15
- def call(blocks, block_size)
16
- Aruba::FileSize.new(blocks * block_size)
17
- end
18
- end
19
- end
20
- end