aruba 0.9.0.pre → 0.9.0.pre2
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.
- checksums.yaml +4 -4
- data/Gemfile +8 -3
- data/History.md +61 -19
- data/README.md +10 -6
- data/TODO.md +6 -1
- data/cucumber.yml +10 -6
- data/features/.nav +72 -0
- data/features/announce.feature +203 -0
- data/features/api/command/extract_text.feature +10 -0
- data/features/api/command/run.feature +6 -6
- data/features/api/command/stop_all_commands.feature +53 -0
- data/features/api/command/terminate_all_commands.feature +53 -0
- data/features/api/command/unescape_text.feature +12 -0
- data/features/api/command/which.feature +3 -3
- data/features/api/core/expand_path.feature +4 -4
- data/features/api/environment/append_environment_variable.feature +18 -8
- data/features/api/environment/prepend_environment_variable.feature +18 -8
- data/features/api/environment/set_environment_variable.feature +33 -16
- data/features/api/filesystem/cd.feature +23 -13
- data/features/api/filesystem/create_directory.feature +2 -2
- data/features/api/filesystem/disk_usage.feature +7 -6
- data/features/api/filesystem/does_exist.feature +2 -2
- data/features/api/filesystem/is_absolute.feature +2 -2
- data/features/api/filesystem/is_directory.feature +2 -2
- data/features/api/filesystem/is_file.feature +2 -2
- data/features/api/filesystem/is_relative.feature +2 -2
- data/features/api/filesystem/move.feature +119 -0
- data/features/cli/console.feature +3 -3
- data/features/commands/debug_command.feature +93 -0
- data/features/commands/environment_variables.feature +64 -0
- data/features/commands/flushing.feature +74 -0
- data/features/commands/interactive.feature +90 -0
- data/features/commands/output/all_output.feature +445 -0
- data/features/commands/output/stdout.feature +66 -0
- data/features/configuration/exit_timeout.feature +5 -5
- data/features/configuration/fixtures_directories.feature +3 -3
- data/features/configuration/fixtures_path_prefix.feature +1 -1
- data/features/configuration/home_directory.feature +4 -4
- data/features/configuration/io_timeout.feature +2 -2
- data/features/configuration/keep_ansi.feature +2 -2
- data/features/configuration/log_level.feature +3 -3
- data/features/configuration/physical_block_size.feature +3 -3
- data/features/configuration/usage.feature +159 -0
- data/features/core/cleanup_aruba_directory.feature +52 -0
- data/features/development/build.feature +16 -0
- data/features/development/test.feature +24 -0
- data/features/file_system_commands.feature +12 -12
- data/features/getting_started/supported_programming_languages.feature +89 -0
- data/features/hooks/after/command.feature +1 -1
- data/features/hooks/before/command.feature +2 -2
- data/features/matchers/collection/include_an_object.feature +72 -0
- data/features/matchers/timeouts.feature +2 -2
- data/features/output.feature +60 -181
- data/features/step_definitions/aruba_dev_steps.rb +17 -10
- data/features/step_definitions/hooks.rb +11 -0
- data/features/steps/commands/exit_statuses.feature +3 -3
- data/features/steps/commands/run.feature +0 -15
- data/features/steps/filesystem/copy.feature +45 -0
- data/features/steps/filesystem/create_directory.feature +47 -0
- data/features/steps/filesystem/create_file.feature +53 -0
- data/features/steps/filesystem/file_content.feature +1 -1
- data/features/steps/filesystem/move.feature +45 -0
- data/features/steps/filesystem/overwrite_file.feature +72 -0
- data/features/steps/filesystem/use_fixture.feature +77 -0
- data/features/usage/install.feature +8 -0
- data/{features/fixtures → fixtures}/cli-app/.gitignore +0 -0
- data/{features/fixtures → fixtures}/cli-app/.rspec +0 -0
- data/{features/fixtures → fixtures}/cli-app/README.md +0 -0
- data/{features/fixtures → fixtures}/cli-app/Rakefile +0 -0
- data/{features/fixtures → fixtures}/cli-app/bin/cli +0 -0
- data/{features/fixtures → fixtures}/cli-app/cli-app.gemspec +0 -0
- data/{features/fixtures → fixtures}/cli-app/features/support/env.rb +0 -0
- data/{features/fixtures → fixtures}/cli-app/lib/cli/app.rb +0 -0
- data/fixtures/cli-app/lib/cli/app/suppress_simple_cov_output.rb +15 -0
- data/{features/fixtures → fixtures}/cli-app/lib/cli/app/version.rb +0 -0
- data/{features/fixtures/empty-app → fixtures/cli-app}/script/console +3 -3
- data/{features/fixtures → fixtures}/cli-app/spec/spec_helper.rb +0 -0
- data/{features/fixtures → fixtures}/cli-app/spec/support/aruba.rb +0 -0
- data/{features/fixtures → fixtures}/copy/file.txt +0 -0
- data/{features/fixtures → fixtures}/empty-app/.gitignore +0 -0
- data/{features/fixtures → fixtures}/empty-app/.rspec +0 -0
- data/{features/fixtures → fixtures}/empty-app/README.md +0 -0
- data/{features/fixtures → fixtures}/empty-app/Rakefile +0 -0
- data/{features/fixtures → fixtures}/empty-app/bin/cli +0 -0
- data/{features/fixtures → fixtures}/empty-app/cli-app.gemspec +0 -0
- data/{features/fixtures → fixtures}/empty-app/lib/cli/app.rb +0 -0
- data/{features/fixtures → fixtures}/empty-app/lib/cli/app/version.rb +0 -0
- data/{features/fixtures/cli-app → fixtures/empty-app}/script/console +3 -3
- data/{features/fixtures → fixtures}/empty-app/spec/spec_helper.rb +0 -0
- data/{features/fixtures → fixtures}/fixtures-app/test.txt +0 -0
- data/fixtures/getting-started-app/.gitignore +4 -0
- data/fixtures/getting-started-app/Gemfile +4 -0
- data/fixtures/getting-started-app/README.md +3 -0
- data/fixtures/getting-started-app/features/support/env.rb +1 -0
- data/{features/fixtures → fixtures}/spawn_process/stderr.sh +0 -0
- data/lib/aruba/announcer.rb +6 -2
- data/lib/aruba/api.rb +0 -16
- data/lib/aruba/api/command.rb +64 -266
- data/lib/aruba/api/core.rb +24 -26
- data/lib/aruba/api/deprecated.rb +370 -12
- data/lib/aruba/api/filesystem.rb +64 -15
- data/lib/aruba/aruba_path.rb +4 -0
- data/lib/aruba/config.rb +1 -1
- data/lib/aruba/cucumber.rb +5 -449
- data/lib/aruba/cucumber/command.rb +378 -0
- data/lib/aruba/cucumber/core.rb +29 -0
- data/lib/aruba/cucumber/environment.rb +30 -0
- data/lib/aruba/cucumber/file.rb +210 -0
- data/lib/aruba/cucumber/hooks.rb +11 -14
- data/lib/aruba/cucumber/rvm.rb +3 -0
- data/lib/aruba/matchers/base/base_matcher.rb +94 -0
- data/lib/aruba/matchers/collection.rb +1 -0
- data/lib/aruba/matchers/collection/all_objects.rb +2 -0
- data/lib/aruba/matchers/collection/include_an_object.rb +120 -0
- data/lib/aruba/matchers/command/be_successfully_executed.rb +3 -3
- data/lib/aruba/matchers/command/have_exit_status.rb +2 -11
- data/lib/aruba/matchers/command/have_finished_in_time.rb +5 -5
- data/lib/aruba/matchers/command/have_output.rb +46 -0
- data/lib/aruba/matchers/command/have_output_on_stderr.rb +42 -0
- data/lib/aruba/matchers/command/have_output_on_stdout.rb +42 -0
- data/lib/aruba/matchers/command/have_output_size.rb +28 -0
- data/lib/aruba/matchers/directory/be_an_existing_directory.rb +1 -1
- data/lib/aruba/matchers/file/be_an_existing_file.rb +1 -1
- data/lib/aruba/matchers/file/have_file_content.rb +1 -1
- data/lib/aruba/matchers/file/have_file_size.rb +2 -2
- data/lib/aruba/matchers/file/have_same_file_content.rb +1 -1
- data/lib/aruba/matchers/path/have_permissions.rb +1 -1
- data/lib/aruba/platforms/aruba_file_creator.rb +2 -3
- data/lib/aruba/platforms/aruba_fixed_size_file_creator.rb +2 -3
- data/lib/aruba/platforms/determine_disk_usage.rb +23 -0
- data/lib/aruba/platforms/determine_file_size.rb +13 -0
- data/lib/aruba/platforms/disk_usage_calculator.rb +11 -0
- data/lib/aruba/platforms/local_environment.rb +15 -0
- data/lib/aruba/platforms/unix_environment_variables.rb +1 -1
- data/lib/aruba/platforms/unix_platform.rb +35 -14
- data/lib/aruba/process_monitor.rb +53 -7
- data/lib/aruba/processes/basic_process.rb +25 -5
- data/lib/aruba/processes/debug_process.rb +27 -25
- data/lib/aruba/processes/in_process.rb +7 -22
- data/lib/aruba/processes/spawn_process.rb +74 -31
- data/lib/aruba/rspec.rb +1 -6
- data/lib/aruba/version.rb +1 -1
- data/script/console +0 -1
- data/spec/aruba/api/environment/restore_env_spec.rb +65 -0
- data/spec/aruba/api/environment/set_env_spec.rb +42 -0
- data/spec/aruba/api/filesystem/file_size_spec.rb +28 -0
- data/spec/aruba/api_spec.rb +10 -7
- data/spec/aruba/matchers/command/have_output_size_spec.rb +25 -0
- data/spec/aruba/matchers/command_spec.rb +135 -4
- data/spec/aruba/spawn_process_spec.rb +1 -1
- metadata +107 -65
- data/.nav +0 -12
- data/features/debug.feature +0 -15
- data/features/fixtures/cli-app/spec/cli/app_spec.rb +0 -7
- data/features/flushing.feature +0 -26
- data/features/interactive.feature +0 -66
- data/features/no_clobber.feature +0 -25
- data/lib/aruba/disk_usage_calculator.rb +0 -7
data/.nav
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
README.md
|
2
|
-
# before_cmd_hooks.feature
|
3
|
-
# command_environment_variables.feature
|
4
|
-
# configuration-rspec.feature
|
5
|
-
# custom_ruby_process.feature
|
6
|
-
# exit_statuses.feature
|
7
|
-
# file_system_commands.feature
|
8
|
-
# flushing.feature
|
9
|
-
# interactive.feature
|
10
|
-
# no_clobber.feature
|
11
|
-
# output.feature
|
12
|
-
# utf-8.feature
|
data/features/debug.feature
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
Feature: Debug command execution
|
2
|
-
|
3
|
-
As a developer
|
4
|
-
I want to use some debugger in my code and therefor need system() to execute my program
|
5
|
-
In order to find a bug
|
6
|
-
|
7
|
-
@debug
|
8
|
-
Scenario: Run program with debug code
|
9
|
-
When I run `true`
|
10
|
-
Then the exit status should be 0
|
11
|
-
|
12
|
-
@debug
|
13
|
-
Scenario: Run failing program with debug code
|
14
|
-
When I run `false`
|
15
|
-
Then the exit status should be 1
|
data/features/flushing.feature
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
Feature: Flushing output
|
2
|
-
|
3
|
-
In order to test processes that output a lot of data
|
4
|
-
As a developer using Aruba
|
5
|
-
I want to make sure that large amounts of output aren't buffered
|
6
|
-
|
7
|
-
Scenario: A little output
|
8
|
-
When I run `bash -c 'for ((c=0; c<256; c = c+1)); do echo -n "a"; done'`
|
9
|
-
Then the output should contain "a"
|
10
|
-
And the output should be 256 bytes long
|
11
|
-
And the exit status should be 0
|
12
|
-
|
13
|
-
Scenario: Tons of output
|
14
|
-
Given the default aruba timeout is 10 seconds
|
15
|
-
When I run `bash -c 'for ((c=0; c<65536; c = c+1)); do echo -n "a"; done'`
|
16
|
-
Then the output should contain "a"
|
17
|
-
And the output should be 65536 bytes long
|
18
|
-
And the exit status should be 0
|
19
|
-
|
20
|
-
Scenario: Tons of interactive output
|
21
|
-
Given the default aruba timeout is 10 seconds
|
22
|
-
When I run `bash -c 'read size; for ((c=0; c<$size; c = c+1)); do echo -n "a"; done'` interactively
|
23
|
-
And I type "65536"
|
24
|
-
Then the output should contain "a"
|
25
|
-
And the output should be 65536 bytes long
|
26
|
-
# And the exit status should be 0
|
@@ -1,66 +0,0 @@
|
|
1
|
-
Feature: Interactive process control
|
2
|
-
|
3
|
-
In order to test interactive command line applications
|
4
|
-
As a developer using Cucumber
|
5
|
-
I want to use the interactive session steps
|
6
|
-
|
7
|
-
@wip-jruby-java-1.6
|
8
|
-
Scenario: Running ruby interactively
|
9
|
-
Given a file named "echo.rb" with:
|
10
|
-
"""
|
11
|
-
while res = gets.chomp
|
12
|
-
break if res == "quit"
|
13
|
-
puts res.reverse
|
14
|
-
end
|
15
|
-
"""
|
16
|
-
When I run `ruby echo.rb` interactively
|
17
|
-
And I type "hello, world"
|
18
|
-
And I type "quit"
|
19
|
-
Then it should pass with:
|
20
|
-
"""
|
21
|
-
dlrow ,olleh
|
22
|
-
"""
|
23
|
-
|
24
|
-
@posix
|
25
|
-
Scenario: Running a native binary interactively
|
26
|
-
When I run `cat` interactively
|
27
|
-
And I type "Hello, world"
|
28
|
-
And I type ""
|
29
|
-
Then the output should contain:
|
30
|
-
"""
|
31
|
-
Hello, world
|
32
|
-
"""
|
33
|
-
|
34
|
-
@posix
|
35
|
-
Scenario: Pipe in a file
|
36
|
-
Given a file named "test.txt" with:
|
37
|
-
"""
|
38
|
-
line1
|
39
|
-
line2
|
40
|
-
"""
|
41
|
-
When I run `cat` interactively
|
42
|
-
And I pipe in the file "test.txt"
|
43
|
-
Then the output should contain:
|
44
|
-
"""
|
45
|
-
line1
|
46
|
-
line2
|
47
|
-
"""
|
48
|
-
|
49
|
-
@posix
|
50
|
-
Scenario: Close stdin stream
|
51
|
-
When I run `cat` interactively
|
52
|
-
And I type "Hello, world"
|
53
|
-
And I close the stdin stream
|
54
|
-
Then the output should contain:
|
55
|
-
"""
|
56
|
-
Hello, world
|
57
|
-
"""
|
58
|
-
|
59
|
-
@posix
|
60
|
-
Scenario: Stop processes before checking for filesystem changes
|
61
|
-
See: http://github.com/aslakhellesoy/aruba/issues#issue/17 for context
|
62
|
-
|
63
|
-
Given a directory named "rename_me"
|
64
|
-
When I run `mv rename_me renamed` interactively
|
65
|
-
Then the directory "renamed" should exist
|
66
|
-
And the directory "rename_me" should not exist
|
data/features/no_clobber.feature
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
Feature: No clobber
|
2
|
-
|
3
|
-
By default Aruba removes its scratch directory before
|
4
|
-
every scenario. This isn't always the right thing
|
5
|
-
to do, especially when the path to the default directory
|
6
|
-
has been changed. Use @no-clobber to stop Aruba from
|
7
|
-
cleaning up after itself.
|
8
|
-
|
9
|
-
Scenario: Change the filesystem
|
10
|
-
Given a directory named "foo/bar"
|
11
|
-
And a file named "foo/bar/baz.txt" with:
|
12
|
-
"""
|
13
|
-
I don't want to die!
|
14
|
-
"""
|
15
|
-
|
16
|
-
@no-clobber
|
17
|
-
Scenario: Verify nothing was clobbered
|
18
|
-
Then a file named "foo/bar/baz.txt" should exist
|
19
|
-
And the file "foo/bar/baz.txt" should contain exactly:
|
20
|
-
"""
|
21
|
-
I don't want to die!
|
22
|
-
"""
|
23
|
-
|
24
|
-
Scenario: Cleanup and verify the previous scenario
|
25
|
-
Then a file named "foo/bar/baz.txt" should not exist
|