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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +153 -28
- data/CONTRIBUTING.md +0 -9
- data/LICENSE +1 -1
- data/README.md +37 -30
- data/lib/aruba/api.rb +0 -1
- data/lib/aruba/api/bundler.rb +17 -2
- data/lib/aruba/api/commands.rb +15 -16
- data/lib/aruba/api/core.rb +64 -50
- data/lib/aruba/api/environment.rb +12 -4
- data/lib/aruba/api/filesystem.rb +32 -46
- data/lib/aruba/api/text.rb +15 -3
- data/lib/aruba/aruba_path.rb +23 -95
- data/lib/aruba/basic_configuration.rb +46 -65
- data/lib/aruba/basic_configuration/option.rb +2 -2
- data/lib/aruba/cli.rb +4 -1
- data/lib/aruba/config/jruby.rb +1 -1
- data/lib/aruba/config_wrapper.rb +17 -4
- data/lib/aruba/configuration.rb +29 -22
- data/lib/aruba/console.rb +0 -2
- data/lib/aruba/console/help.rb +8 -5
- data/lib/aruba/contracts/absolute_path.rb +3 -3
- data/lib/aruba/contracts/is_power_of_two.rb +2 -2
- data/lib/aruba/contracts/relative_path.rb +3 -3
- data/lib/aruba/cucumber/command.rb +93 -82
- data/lib/aruba/cucumber/file.rb +43 -23
- data/lib/aruba/cucumber/hooks.rb +4 -1
- data/lib/aruba/cucumber/testing_frameworks.rb +14 -12
- data/lib/aruba/event_bus.rb +4 -2
- data/lib/aruba/event_bus/name_resolver.rb +9 -8
- data/lib/aruba/events.rb +2 -1
- data/lib/aruba/hooks.rb +2 -4
- data/lib/aruba/in_config_wrapper.rb +8 -5
- data/lib/aruba/initializer.rb +9 -3
- data/lib/aruba/matchers/base/base_matcher.rb +2 -11
- data/lib/aruba/matchers/base/message_indenter.rb +1 -1
- data/lib/aruba/matchers/base/object_formatter.rb +0 -5
- data/lib/aruba/matchers/collection/include_an_object.rb +4 -4
- data/lib/aruba/matchers/command/be_successfully_executed.rb +3 -1
- data/lib/aruba/matchers/command/have_exit_status.rb +3 -1
- data/lib/aruba/matchers/command/have_finished_in_time.rb +3 -1
- data/lib/aruba/matchers/command/have_output.rb +3 -1
- data/lib/aruba/matchers/command/have_output_on_stderr.rb +3 -1
- data/lib/aruba/matchers/command/have_output_on_stdout.rb +3 -1
- data/lib/aruba/matchers/directory/have_sub_directory.rb +8 -3
- data/lib/aruba/matchers/file/have_file_size.rb +4 -2
- data/lib/aruba/matchers/path/have_permissions.rb +7 -4
- data/lib/aruba/platforms/announcer.rb +25 -11
- data/lib/aruba/platforms/aruba_file_creator.rb +3 -1
- data/lib/aruba/platforms/aruba_fixed_size_file_creator.rb +7 -2
- data/lib/aruba/platforms/aruba_logger.rb +10 -9
- data/lib/aruba/platforms/command_monitor.rb +4 -6
- data/lib/aruba/platforms/determine_disk_usage.rb +55 -20
- data/lib/aruba/platforms/filesystem_status.rb +19 -13
- data/lib/aruba/platforms/simple_table.rb +2 -2
- data/lib/aruba/platforms/unix_environment_variables.rb +9 -4
- data/lib/aruba/platforms/unix_platform.rb +10 -10
- data/lib/aruba/platforms/unix_which.rb +1 -1
- data/lib/aruba/platforms/windows_command_string.rb +1 -1
- data/lib/aruba/platforms/windows_environment_variables.rb +2 -1
- data/lib/aruba/platforms/windows_platform.rb +3 -3
- data/lib/aruba/platforms/windows_which.rb +6 -2
- data/lib/aruba/processes/basic_process.rb +4 -6
- data/lib/aruba/processes/debug_process.rb +4 -2
- data/lib/aruba/processes/in_process.rb +5 -3
- data/lib/aruba/processes/spawn_process.rb +27 -16
- data/lib/aruba/rspec.rb +25 -15
- data/lib/aruba/runtime.rb +11 -4
- data/lib/aruba/setup.rb +23 -10
- data/lib/aruba/tasks/docker_helpers.rb +3 -1
- data/lib/aruba/version.rb +1 -1
- metadata +96 -109
- data/.cucumberproignore +0 -3
- data/.document +0 -5
- data/.github/ISSUE_TEMPLATE.md +0 -48
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -41
- data/.gitignore +0 -38
- data/.rspec +0 -3
- data/.rubocop.yml +0 -31
- data/.rubocop_todo.yml +0 -258
- data/.simplecov +0 -34
- data/.travis.yml +0 -73
- data/.yardopts +0 -11
- data/Dockerfile +0 -67
- data/Gemfile +0 -15
- data/Rakefile +0 -92
- data/TODO.md +0 -13
- data/appveyor.yml +0 -30
- data/aruba.gemspec +0 -46
- data/bin/console +0 -7
- data/bin/test +0 -9
- data/config/.gitignore +0 -1
- data/cucumber.yml +0 -6
- data/docker-compose.yml +0 -26
- data/fixtures/cli-app/.gitignore +0 -9
- data/fixtures/cli-app/.rspec +0 -2
- data/fixtures/cli-app/README.md +0 -39
- data/fixtures/cli-app/Rakefile +0 -1
- data/fixtures/cli-app/bin/aruba-test-cli +0 -6
- data/fixtures/cli-app/cli-app.gemspec +0 -25
- data/fixtures/cli-app/features/support/aruba.rb +0 -1
- data/fixtures/cli-app/features/support/env.rb +0 -1
- data/fixtures/cli-app/lib/cli/app.rb +0 -9
- data/fixtures/cli-app/lib/cli/app/suppress_simple_cov_output.rb +0 -15
- data/fixtures/cli-app/lib/cli/app/version.rb +0 -5
- data/fixtures/cli-app/script/console +0 -14
- data/fixtures/cli-app/spec/spec_helper.rb +0 -7
- data/fixtures/cli-app/spec/support/aruba.rb +0 -1
- data/fixtures/copy/file.txt +0 -1
- data/fixtures/empty-app/.gitignore +0 -9
- data/fixtures/empty-app/.rspec +0 -2
- data/fixtures/empty-app/README.md +0 -24
- data/fixtures/empty-app/Rakefile +0 -1
- data/fixtures/empty-app/cli-app.gemspec +0 -25
- data/fixtures/empty-app/lib/cli/app.rb +0 -7
- data/fixtures/empty-app/lib/cli/app/version.rb +0 -5
- data/fixtures/getting-started-app/.gitignore +0 -4
- data/fixtures/getting-started-app/Gemfile +0 -4
- data/fixtures/getting-started-app/README.md +0 -3
- data/fixtures/getting-started-app/features/support/env.rb +0 -1
- data/lib/aruba/extensions/string/strip.rb +0 -25
- data/lib/aruba/platforms/disk_usage_calculator.rb +0 -20
data/fixtures/cli-app/Rakefile
DELETED
@@ -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 +0,0 @@
|
|
1
|
-
require 'aruba/cucumber'
|
@@ -1 +0,0 @@
|
|
1
|
-
require_relative 'aruba'
|
@@ -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,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 +0,0 @@
|
|
1
|
-
require 'aruba/rspec'
|
data/fixtures/copy/file.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
a
|
data/fixtures/empty-app/.rspec
DELETED
@@ -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.
|
data/fixtures/empty-app/Rakefile
DELETED
@@ -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 +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
|