aruba 0.14.2 → 0.14.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f83f6a317a039d5d392c8c8d7ab294c482120d51
4
- data.tar.gz: 080fda83821e31910ad169685d0c65713ca4ea2d
3
+ metadata.gz: d1a28b38002e8be7a18ef7f565bf01e03af948af
4
+ data.tar.gz: 9d9a66748e6626e01c26c1aaf81f0c6d9531adc4
5
5
  SHA512:
6
- metadata.gz: 90cd237f159cc8679d9a3e4e43a758959892e55fa2c099decefc6cbdd8cc0acae3b0fe54d19325bc8ac50430eaa80d1f8d19f51376f340ba74ed76fd1436ea9d
7
- data.tar.gz: fbc8e31a727d7ce1a59072bdfa21fbd5ab0994db40a824610946c47fe9d95c66f91c892679745084f45f000dccad04bb8c84df1f955deb6d16ec78f1745c2580
6
+ metadata.gz: d622dcb0c21bd5f01ec339928e9638f1a0dfc7bcfc0aa52026832672c37037294dd94082e376ed8094eff08269563f8c1b7fe28601941bb971b0d9fff11e8d48
7
+ data.tar.gz: 1bc9c24af389bd3daccde3fc5dd84c779e749060684a6e425386c60d063a02da8be5670dc3c067a6af26f8e38c269fb9eefe3ab535f9d72b50e12f43affbf2b7
@@ -10,7 +10,7 @@ rvm:
10
10
  - 2.1.8
11
11
  - 2.2.4
12
12
  - 2.3.0
13
- - jruby
13
+ - jruby-1.7.26
14
14
  - jruby-20mode
15
15
  - jruby-21mode
16
16
  - rbx
@@ -30,6 +30,10 @@ matrix:
30
30
  env: JRUBY_OPTS='--dev'
31
31
  - rvm: jruby-9.0.1.0-21mode
32
32
  env: JRUBY_OPTS='--dev'
33
+ branches:
34
+ only:
35
+ - master
36
+ - still
33
37
  notifications:
34
38
  email:
35
39
  - cukes-devs@googlegroups.com
data/Gemfile CHANGED
@@ -53,6 +53,12 @@ group :development, :test do
53
53
  gem 'cucumber', '~> 2.0'
54
54
  end
55
55
 
56
+ if RUBY_VERSION < '1.9.2'
57
+ gem 'contracts', '~> 0.15.0'
58
+ else
59
+ gem 'contracts', '~> 0.16.0'
60
+ end
61
+
56
62
  if RUBY_VERSION >= '1.9.3'
57
63
  # Make aruba compliant to ruby community guide
58
64
  gem 'rubocop', '~> 0.32', '< 0.41.1'
data/History.md CHANGED
@@ -1,58 +1,15 @@
1
- # UNRELEASED
2
-
3
- ## [v1.0.0](https://github.com/cucumber/aruba/compare/v0.11.0...v1.0.0)
4
-
5
- * Support for rubies older than 1.9.3 is discontinued - e.g 1.8.7 and 1.9.2
6
- * aruba requires "cucumber 2" for the feature steps. The rest of aruba should
7
- be usable by whatever testing framework you are using.
8
- * Overwriting methods for configuration is discontinued. You need to use
9
- `aruba.config.<variable>` or `Aruba.configure { |config| config.<variable>`
10
- instead.
11
- * "aruba/reporting" will be removed. Please use `@debug`-tag + `byebug`,
12
- `debugger`, `pry` to troubleshoot your feature tests.
13
- * Set environment variables will have only effect on `#run` and the like +
14
- `#with_environment { }`.
15
- * The process environment will be fully resetted between tests. Sharing state
16
- via ENV['VAR'] = 'shared state' between tests will not be possible anymore.
17
- Please make that obvious by using explicit steps or use the aruba API for
18
- that.
19
- * There will be a major cleanup for command execution. There will be only
20
- `run` and `run_simple` left. `run_interactive` is replaced by `run`.
21
- * Setting the root directory of aruba via method overwrite or configuration -
22
- this should be your project root directory where the test suite is run.
23
- * The direct use of "InProcess", "DebugProcess" and "SpawnProcess" is not
24
- supported anymore. You need to use "Command" instead. But be careful, it has
25
- a different API.
26
- * HOME can be configured via `Aruba.configure {}` and defaults to
27
- `File.join(aruba.config.root_directory, aruba.config.working_directory?)`
28
- if `aruba/cucumber` or `aruba/rspec` is used.
29
- * Use different working directories based on test suite - RSpec, Cucumber.
30
- It's `tmp/rspec` and `tmp/cucumber` now to make sure they do not overwrite
31
- the test results from each other.
32
- * The use of `@interactive` is discontinued. You need to use
33
- `#last_command_started`-method to get access to the interactively started
34
- command.
35
- * If multiple commands have been started, each output has to be check
36
- separately
37
-
38
- ```cucumber
39
- Scenario: Detect stdout from all processes
40
- When I run `printf "hello world!\n"`
41
- And I run `cat` interactively
42
- And I type "hola"
43
- And I type ""
44
- Then the stdout should contain:
45
- """
46
- hello world!
47
- """
48
- And the stdout should contain:
49
- """
50
- hola
51
- """
52
- And the stderr should not contain anything
53
- ```
54
-
55
- # RELEASED
1
+ # RELEASED
2
+
3
+ ## [v0.14.3](https://github.com/cucumber/aruba/compare/v0.14.2...v0.14.3)
4
+
5
+ * Fix path bug (#422)
6
+ * Ensure non-deprecated methods do not use deprecated methods
7
+ * Update dependency on childprocess
8
+ * Fix encoding output on JRuby
9
+
10
+ ## [v0.14.2](https://github.com/cucumber/aruba/compare/v0.14.1...v0.14.2)
11
+
12
+ * Handle empty JRUBY_OPTS on JRuby
56
13
 
57
14
  ## [v0.14.1](https://github.com/cucumber/aruba/compare/v0.14.0...v0.14.1)
58
15
 
@@ -80,7 +37,7 @@
80
37
  * Fix circular require warnings (issue #339)
81
38
  * Fix use of old instances variable "@io_wait" (issue #341). Now the
82
39
  default value for io_wait_timeout can be set correctly.
83
- * Make it possible to announce information on command error, using a new option
40
+ * Make it possible to announce information on command error, using a new option
84
41
  called `activate_announcer_on_command_failure` (PR #335, @njam)
85
42
  * Re-integrate `event-bus`-library into `aruba`-core (PR #342)
86
43
 
@@ -301,7 +258,7 @@
301
258
  * Do not trigger Announcer API deprecation warning (issue #277)
302
259
 
303
260
  ## [v0.7.1](https://github.com/cucumber/aruba/compare/v0.7.0...v0.7.1)
304
- * Do not break if @interactive is used
261
+ * Do not break if @interactive is used
305
262
 
306
263
  ## [v0.7.0](https://github.com/cucumber/aruba/compare/v0.6.2...v0.7.0)
307
264
  * Introducing root_directory (issue #232)
data/Rakefile CHANGED
@@ -8,8 +8,7 @@ require 'cucumber/rake/task'
8
8
 
9
9
  Cucumber::Rake::Task.new do |t|
10
10
  t.cucumber_opts = ""
11
- # t.cucumber_opts = "--format Cucumber::Pro --out cucumber-pro.log" if ENV['CUCUMBER_PRO_TOKEN']
12
- t.cucumber_opts << "--format pretty"
11
+ t.cucumber_opts << "--format progress"
13
12
  end
14
13
 
15
14
  Cucumber::Rake::Task.new(:cucumber_wip) do |t|
@@ -19,7 +18,7 @@ end
19
18
  require 'rspec/core/rake_task'
20
19
  desc "Run RSpec"
21
20
  RSpec::Core::RakeTask.new do |spec|
22
- spec.rspec_opts = ['--color', '--format documentation', '--warnings']
21
+ spec.rspec_opts = ['--color', '--format progress', '--warnings']
23
22
  end
24
23
 
25
24
  namespace :travis do
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.homepage = 'http://github.com/cucumber/aruba'
15
15
 
16
16
  s.add_runtime_dependency 'cucumber', '>= 1.3.19'
17
- s.add_runtime_dependency 'childprocess', '~> 0.5.6'
17
+ s.add_runtime_dependency 'childprocess', '~> 0.8.0'
18
18
  s.add_runtime_dependency 'ffi', '~> 1.9.10'
19
19
  s.add_runtime_dependency 'rspec-expectations', '>= 2.99'
20
20
  s.add_runtime_dependency 'contracts', '~> 0.9'
@@ -23,6 +23,7 @@ Feature: Run commands with Aruba
23
23
  \"\"\"
24
24
  """
25
25
 
26
+ @requires-bash
26
27
  Scenario: Bash Program
27
28
  Given an executable named "bin/cli" with:
28
29
  """bash
@@ -33,6 +34,7 @@ Feature: Run commands with Aruba
33
34
  When I successfully run `cucumber`
34
35
  Then the features should all pass
35
36
 
37
+ @requires-bash
36
38
  Scenario: Bash Program run via bash
37
39
  Given a file named "features/hello_aruba.feature" with:
38
40
  """
@@ -51,6 +53,7 @@ Feature: Run commands with Aruba
51
53
  When I successfully run `cucumber`
52
54
  Then the features should all pass
53
55
 
56
+ @requires-ruby
54
57
  Scenario: Ruby Program
55
58
  Given an executable named "bin/cli" with:
56
59
  """ruby
@@ -61,6 +64,7 @@ Feature: Run commands with Aruba
61
64
  When I successfully run `cucumber`
62
65
  Then the features should all pass
63
66
 
67
+ @requires-ruby
64
68
  Scenario: Ruby Program via "ruby"
65
69
  Given a file named "features/hello_aruba.feature" with:
66
70
  """
@@ -79,6 +83,7 @@ Feature: Run commands with Aruba
79
83
  When I successfully run `cucumber`
80
84
  Then the features should all pass
81
85
 
86
+ @requires-python
82
87
  Scenario: Python Program
83
88
  Given an executable named "bin/cli" with:
84
89
  """python
@@ -89,6 +94,7 @@ Feature: Run commands with Aruba
89
94
  When I successfully run `cucumber`
90
95
  Then the features should all pass
91
96
 
97
+ @requires-python
92
98
  Scenario: Python Program via "python"
93
99
  Given a file named "features/hello_aruba.feature" with:
94
100
  """
@@ -107,6 +113,7 @@ Feature: Run commands with Aruba
107
113
  When I successfully run `cucumber`
108
114
  Then the features should all pass
109
115
 
116
+ @requires-perl
110
117
  Scenario: Perl Program
111
118
  Given an executable named "bin/cli" with:
112
119
  """perl
@@ -117,6 +124,7 @@ Feature: Run commands with Aruba
117
124
  When I successfully run `cucumber`
118
125
  Then the features should all pass
119
126
 
127
+ @requires-perl
120
128
  Scenario: Perl Program via "perl"
121
129
  Given a file named "features/hello_aruba.feature" with:
122
130
  """
@@ -135,6 +143,7 @@ Feature: Run commands with Aruba
135
143
  When I successfully run `cucumber`
136
144
  Then the features should all pass
137
145
 
146
+ @requires-java
138
147
  Scenario: Java Program
139
148
 
140
149
  It's even possible to compile and run Java programs with Aruba.
@@ -162,6 +171,7 @@ Feature: Run commands with Aruba
162
171
  When I successfully run `cucumber`
163
172
  Then the features should all pass
164
173
 
174
+ @requires-posix-standard-tools
165
175
  Scenario: POSIX standard tools
166
176
  Given a file named "features/hello_aruba.feature" with:
167
177
  """
@@ -19,6 +19,8 @@ Feature: After command hooks
19
19
  Scenario: Run a simple command with an "after(:command)"-hook
20
20
  Given a file named "spec/support/hooks.rb" with:
21
21
  """
22
+ require 'aruba'
23
+
22
24
  Aruba.configure do |config|
23
25
  config.after :command do |cmd|
24
26
  puts "after the run of `#{cmd.commandline}`"
@@ -21,6 +21,8 @@ Feature: before_cmd hooks
21
21
  Scenario: Run a simple command with a "before(:command)"-hook
22
22
  Given a file named "spec/support/hooks.rb" with:
23
23
  """
24
+ require 'aruba'
25
+
24
26
  Aruba.configure do |config|
25
27
  config.before :command do |cmd|
26
28
  puts "before the run of `#{cmd.commandline}`"
@@ -47,6 +49,8 @@ Feature: before_cmd hooks
47
49
  Scenario: Run a simple command with a "before(:cmd)"-hook (deprecated)
48
50
  Given a file named "spec/support/hooks.rb" with:
49
51
  """
52
+ require 'aruba'
53
+
50
54
  Aruba.configure do |config|
51
55
  config.before :cmd do |cmd|
52
56
  puts "before the run of `#{cmd}`"
@@ -1,5 +1,65 @@
1
1
  require 'cucumber/platform'
2
2
 
3
+ Before '@requires-python' do |scenario|
4
+ next unless Aruba.platform.which('python').nil?
5
+
6
+ if Cucumber::VERSION < '2'
7
+ scenario.skip_invoke!
8
+ else
9
+ skip_this_scenario
10
+ end
11
+ end
12
+
13
+ Before '@requires-zsh' do |scenario|
14
+ next unless Aruba.platform.which('zsh').nil?
15
+
16
+ if Cucumber::VERSION < '2'
17
+ scenario.skip_invoke!
18
+ else
19
+ skip_this_scenario
20
+ end
21
+ end
22
+
23
+ Before '@requires-java' do |scenario|
24
+ next unless Aruba.platform.which('javac').nil?
25
+
26
+ if Cucumber::VERSION < '2'
27
+ scenario.skip_invoke!
28
+ else
29
+ skip_this_scenario
30
+ end
31
+ end
32
+
33
+ Before '@requires-perl' do |scenario|
34
+ next unless Aruba.platform.which('perl').nil?
35
+
36
+ if Cucumber::VERSION < '2'
37
+ scenario.skip_invoke!
38
+ else
39
+ skip_this_scenario
40
+ end
41
+ end
42
+
43
+ Before '@requires-ruby' do |scenario|
44
+ next unless Aruba.platform.which('ruby').nil?
45
+
46
+ if Cucumber::VERSION < '2'
47
+ scenario.skip_invoke!
48
+ else
49
+ skip_this_scenario
50
+ end
51
+ end
52
+
53
+ Before '@requires-posix-standard-tools' do |scenario|
54
+ next unless Aruba.platform.which('printf').nil?
55
+
56
+ if Cucumber::VERSION < '2'
57
+ scenario.skip_invoke!
58
+ else
59
+ skip_this_scenario
60
+ end
61
+ end
62
+
3
63
  Before '@requires-ruby-version-193' do |scenario|
4
64
  next if RUBY_VERSION >= '1.9.3'
5
65
 
@@ -81,33 +81,12 @@ Feature: All output of commands which were executed
81
81
  When I run `cucumber`
82
82
  Then the features should all pass
83
83
 
84
- @posix
85
- Scenario: Detect exact one-line output for posix commands
84
+ Scenario: Detect exact one-line output
86
85
  Given a file named "features/output.feature" with:
87
86
  """cucumber
88
87
  Feature: Run command
89
88
  Scenario: Run command
90
- When I run `printf 'hello world'`
91
- Then the output should contain exactly:
92
- \"\"\"
93
- hello world
94
- \"\"\"
95
- """
96
- When I run `cucumber`
97
- Then the features should all pass
98
-
99
- Scenario: Detect exact one-line output for ruby commands
100
- Given an executable named "bin/cli" with:
101
- """ruby
102
- #!/usr/bin/env ruby
103
-
104
- print "hello world"
105
- """
106
- And a file named "features/output.feature" with:
107
- """cucumber
108
- Feature: Run command
109
- Scenario: Run command
110
- When I run `cli`
89
+ When I run `echo 'hello world'`
111
90
  Then the output should contain exactly:
112
91
  \"\"\"
113
92
  hello world
@@ -22,7 +22,7 @@ Feature: Running shell commands
22
22
 
23
23
  puts "Hello"
24
24
  \"\"\"
25
- Then the output should contain exactly "Hello"
25
+ Then the output should contain "Hello"
26
26
 
27
27
  Scenario: Running python script
28
28
  When I run the following script:
@@ -89,7 +89,7 @@ Feature: Running shell commands
89
89
  \"\"\"ruby
90
90
  puts "Hello, Aruba!"
91
91
  \"\"\"
92
- Then the output should contain exactly "Hello, Aruba!"
92
+ Then the output should contain "Hello, Aruba!"
93
93
  """
94
94
  When I run `cucumber`
95
95
  Then the features should all pass
@@ -4,45 +4,10 @@ Feature: Overview of steps
4
4
  Who would like to use `aruba`
5
5
  But didn't know which steps are available
6
6
 
7
- Background:
7
+ Scenario: Use cucumber output formatter
8
8
  Given I use a fixture named "cli-app"
9
-
10
- Scenario: Use information found in repository
11
- Given an executable named "bin/cli" with:
12
- """
13
- #!/bin/bash
14
- git clone https://github.com/cucumber/aruba.git
15
- cd aruba
16
- grep -E "When|Given|Then" lib/aruba/cucumber/*.rb | awk -F ":" '{ $1 = ""; print $0}' |sort
17
- """
18
9
  And a file named "features/run.feature" with:
19
10
  """
20
- Feature: Run it
21
- Scenario: Run command
22
- When I run `cli`
23
- Then the output should contain:
24
- \"\"\"
25
- Cloning into 'aruba'...
26
- \"\"\"
27
- And the output should contain:
28
- \"\"\"
29
- Given(/^
30
- \"\"\"
31
- And the output should contain:
32
- \"\"\"
33
- When(/^
34
- \"\"\"
35
- And the output should contain:
36
- \"\"\"
37
- Then(/^
38
- \"\"\"
39
- """
40
- When I run `cucumber`
41
- Then the features should all pass
42
-
43
- Scenario: Use cucumber output formatter
44
- Given a file named "features/run.feature" with:
45
- """
46
11
  Feature: Run it
47
12
  Scenario: Run command
48
13
  Given a directory named "features"
@@ -282,6 +282,7 @@ module Aruba
282
282
  expect(command).to be_successfully_executed
283
283
  rescue RSpec::Expectations::ExpectationNotMetError => e
284
284
  aruba.announcer.activate(aruba.config.activate_announcer_on_command_failure)
285
+ aruba.event_bus.notify Events::CommandStopped.new(command)
285
286
  raise e
286
287
  end
287
288
  end
@@ -56,6 +56,8 @@ module Aruba
56
56
 
57
57
  # Terminate command
58
58
  def terminate(*)
59
+ return if __getobj__.stopped?
60
+
59
61
  __getobj__.terminate
60
62
  event_bus.notify Events::CommandStopped.new(self)
61
63