aruba 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.3.4
2
+
3
+ * Use backticks (`) instead of quotes (") to specify command line. Quote still works, but is deprecated. (Anthony Eden, Aslak Hellesøy)
4
+
1
5
  == 0.3.3
2
6
 
3
7
  * Updated RSpec development requirement to 2.5 (Robert Speicher, Mike Sassak, Aslak Hellesøy)
data/aruba.gemspec CHANGED
@@ -2,18 +2,18 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'aruba'
5
- s.version = '0.3.3'
5
+ s.version = '0.3.4'
6
6
  s.authors = ["Aslak Hellesøy", "David Chelimsky", "Mike Sassak"]
7
7
  s.description = 'CLI Steps for Cucumber, hand-crafted for you in Aruba'
8
8
  s.summary = "aruba-#{s.version}"
9
9
  s.email = 'cukes@googlegroups.com'
10
10
  s.homepage = 'http://github.com/aslakhellesoy/aruba'
11
11
 
12
- s.add_dependency 'cucumber', '~> 0.10'
13
- s.add_dependency 'childprocess', '~> 0.1.7'
14
- s.add_dependency 'rspec', '~> 2.5'
12
+ s.add_dependency 'cucumber', '>= 0.10.0'
13
+ s.add_dependency 'childprocess', '>= 0.1.7'
14
+ s.add_dependency 'rspec', '>= 2.5.0'
15
15
 
16
- s.rubygems_version = ">= 1.6.1"
16
+ s.rubygems_version = ">= 1.6.1"
17
17
  s.files = `git ls-files`.split("\n")
18
18
  s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -5,25 +5,36 @@ Feature: exit statuses
5
5
  I want to use the "the exit status should be" step
6
6
 
7
7
  Scenario: exit status of 0
8
- When I run "ruby -h"
8
+ When I run `ruby -h`
9
+ Then the exit status should be 0
10
+
11
+ Scenario: exit status of 0 with `
12
+ When I run `ruby -h`
9
13
  Then the exit status should be 0
10
14
 
11
15
  Scenario: Not explicitly exiting at all
12
- When I run "ruby -e '42'"
16
+ When I run `ruby -e '42'`
13
17
  Then the exit status should be 0
14
18
 
15
19
  Scenario: non-zero exit status
16
- When I run "ruby -e 'exit 56'"
20
+ When I run `ruby -e 'exit 56'`
17
21
  Then the exit status should be 56
18
22
  And the exit status should not be 0
19
23
 
20
24
  Scenario: Successfully run something
21
- When I successfully run "ruby -e 'exit 0'"
25
+ When I successfully run `ruby -e 'exit 0'`
26
+
27
+ Scenario: Successfully run something with `
28
+ When I successfully run `ruby -e 'exit 0'`
22
29
 
23
30
  Scenario: Unsuccessfully run something
24
- When I do aruba I successfully run "ruby -e 'exit 10'"
31
+ When I do aruba I successfully run `ruby -e 'exit 10'`
25
32
  Then aruba should fail with "Exit status was 10"
26
33
 
27
34
  Scenario: Try to run something that doesn't exist
28
- When I run "does_not_exist"
35
+ When I run `does_not_exist`
36
+ Then the exit status should be 1
37
+
38
+ Scenario: Try to run something that doesn't exist with `
39
+ When I run `does_not_exist`
29
40
  Then the exit status should be 1
@@ -5,19 +5,19 @@ Feature: Flushing output
5
5
  I want to make sure that large amounts of output aren't buffered
6
6
 
7
7
  Scenario: A little output
8
- When I run "ruby -e 'puts :a.to_s * 256'"
8
+ When I run `ruby -e 'puts :a.to_s * 256'`
9
9
  Then the output should contain "a"
10
10
  And the output should be 256 bytes long
11
11
  And the exit status should be 0
12
12
 
13
13
  Scenario: Tons of output
14
- When I run "ruby -e 'puts :a.to_s * 65536'"
14
+ When I run `ruby -e 'puts :a.to_s * 65536'`
15
15
  Then the output should contain "a"
16
16
  And the output should be 65536 bytes long
17
17
  And the exit status should be 0
18
18
 
19
19
  Scenario: Tons of interactive output
20
- When I run "ruby -e 'len = gets.chomp; puts :a.to_s * len.to_i'" interactively
20
+ When I run `ruby -e 'len = gets.chomp; puts :a.to_s * len.to_i'` interactively
21
21
  And I type "65536"
22
22
  Then the output should contain "a"
23
23
  And the output should be 65536 bytes long
@@ -12,7 +12,7 @@ Feature: Interactive process control
12
12
  puts res.reverse
13
13
  end
14
14
  """
15
- When I run "ruby echo.rb" interactively
15
+ When I run `ruby echo.rb` interactively
16
16
  And I type "hello, world"
17
17
  And I type "quit"
18
18
  Then the output should contain:
@@ -21,7 +21,7 @@ Feature: Interactive process control
21
21
  """
22
22
 
23
23
  Scenario: Running a native binary interactively
24
- When I run "bc -q" interactively
24
+ When I run `bc -q` interactively
25
25
  And I type "4 + 3"
26
26
  And I type "quit"
27
27
  Then the output should contain:
@@ -33,6 +33,6 @@ Feature: Interactive process control
33
33
  See: http://github.com/aslakhellesoy/aruba/issues#issue/17 for context
34
34
 
35
35
  Given a directory named "rename_me"
36
- When I run "mv rename_me renamed" interactively
36
+ When I run `mv rename_me renamed` interactively
37
37
  Then a directory named "renamed" should exist
38
38
  And a directory named "rename_me" should not exist
@@ -5,40 +5,40 @@ Feature: Output
5
5
  I want to use the "the output should contain" step
6
6
 
7
7
  Scenario: Run unknown command
8
- When I run "neverever gonna work"
8
+ When I run `neverever gonna work`
9
9
  Then the output should contain:
10
- """
11
- No such file or directory - neverever
12
- """
10
+ """
11
+ No such file or directory - neverever
12
+ """
13
13
 
14
14
  Scenario: Detect subset of one-line output
15
- When I run "ruby -e 'puts \"hello world\"'"
15
+ When I run `ruby -e 'puts \"hello world\"'`
16
16
  Then the output should contain "hello world"
17
17
 
18
18
  Scenario: Detect subset of one-line output
19
- When I run "echo 'hello world'"
19
+ When I run `echo 'hello world'`
20
20
  Then the output should contain "hello world"
21
21
 
22
22
  Scenario: Detect absence of one-line output
23
- When I run "ruby -e 'puts \"hello world\"'"
23
+ When I run `ruby -e 'puts \"hello world\"'`
24
24
  Then the output should not contain "good-bye"
25
25
 
26
26
  Scenario: Detect subset of multiline output
27
- When I run "ruby -e 'puts \"hello\\nworld\"'"
27
+ When I run `ruby -e 'puts \"hello\\nworld\"'`
28
28
  Then the output should contain:
29
29
  """
30
30
  hello
31
31
  """
32
32
 
33
33
  Scenario: Detect subset of multiline output
34
- When I run "ruby -e 'puts \"hello\\nworld\"'"
34
+ When I run `ruby -e 'puts \"hello\\nworld\"'`
35
35
  Then the output should not contain:
36
36
  """
37
37
  good-bye
38
38
  """
39
39
 
40
40
  Scenario: Detect exact one-line output
41
- When I run "ruby -e 'puts \"hello world\"'"
41
+ When I run `ruby -e 'puts \"hello world\"'`
42
42
  Then the output should contain exactly:
43
43
  """
44
44
  hello world
@@ -46,7 +46,7 @@ Feature: Output
46
46
  """
47
47
 
48
48
  Scenario: Detect exact multiline output
49
- When I run "ruby -e 'puts "hello\nworld"'"
49
+ When I run `ruby -e 'puts "hello\nworld"'`
50
50
  Then the output should contain exactly:
51
51
  """
52
52
  hello
@@ -56,13 +56,13 @@ Feature: Output
56
56
 
57
57
  @announce
58
58
  Scenario: Detect subset of one-line output with regex
59
- When I run "ruby --version"
59
+ When I run `ruby --version`
60
60
  Then the output should contain "ruby"
61
61
  And the output should match /ruby ([\d]+\.[\d]+\.[\d]+)(p\d+)? \(.*$/
62
62
 
63
63
  @announce
64
64
  Scenario: Detect subset of multiline output with regex
65
- When I run "ruby -e 'puts "hello\nworld\nextra line1\nextra line2\nimportant line"'"
65
+ When I run `ruby -e 'puts "hello\nworld\nextra line1\nextra line2\nimportant line"'`
66
66
  Then the output should match:
67
67
  """
68
68
  he..o
@@ -73,14 +73,14 @@ Feature: Output
73
73
 
74
74
  @announce
75
75
  Scenario: Match passing exit status and partial output
76
- When I run "ruby -e 'puts "hello\nworld"'"
76
+ When I run `ruby -e 'puts "hello\nworld"'`
77
77
  Then it should pass with:
78
78
  """
79
79
  hello
80
80
  """
81
81
 
82
82
  Scenario: Match passing exit status and exact output
83
- When I run "ruby -e 'puts "hello\nworld"'"
83
+ When I run `ruby -e 'puts "hello\nworld"'`
84
84
  Then it should pass with exactly:
85
85
  """
86
86
  hello
@@ -90,14 +90,14 @@ Feature: Output
90
90
 
91
91
  @announce-stdout
92
92
  Scenario: Match failing exit status and partial output
93
- When I run "ruby -e 'puts \"hello\\nworld\";exit 99'"
93
+ When I run `ruby -e 'puts \"hello\\nworld\";exit 99'`
94
94
  Then it should fail with:
95
95
  """
96
96
  hello
97
97
  """
98
98
 
99
99
  Scenario: Match failing exit status and exact output
100
- When I run "ruby -e 'puts "hello\nworld";exit 99'"
100
+ When I run `ruby -e 'puts "hello\nworld";exit 99'`
101
101
  Then it should fail with exactly:
102
102
  """
103
103
  hello
@@ -107,7 +107,7 @@ Feature: Output
107
107
 
108
108
  @announce-stdout
109
109
  Scenario: Match failing exit status and output with regex
110
- When I run "ruby -e 'puts \"hello\\nworld\";exit 99'"
110
+ When I run `ruby -e 'puts \"hello\\nworld\";exit 99'`
111
111
  Then it should fail with regex:
112
112
  """
113
113
  hello\s*world
@@ -115,33 +115,33 @@ Feature: Output
115
115
 
116
116
  @announce-cmd
117
117
  Scenario: Match output in stdout
118
- When I run "ruby -e 'puts \"hello\\nworld\"'"
118
+ When I run `ruby -e 'puts \"hello\\nworld\"'`
119
119
  Then the stdout should contain "hello"
120
120
  Then the stderr should not contain "hello"
121
121
 
122
122
  @announce
123
123
  Scenario: Match output on several lines
124
- When I run "ruby -e 'puts %{GET /}'"
124
+ When I run `ruby -e 'puts %{GET /}'`
125
125
  Then the stdout should contain:
126
126
  """
127
127
  GET /
128
128
  """
129
129
 
130
130
  Scenario: Match output on several lines using quotes
131
- When I run "ruby -e 'puts %{GET "/"}'"
131
+ When I run `ruby -e 'puts %{GET "/"}'`
132
132
  Then the stdout should contain:
133
133
  """
134
134
  GET "/"
135
135
  """
136
136
 
137
137
  Scenario: Match output in stdout
138
- When I run "ruby -e 'puts \"hello\\nworld\"'"
138
+ When I run `ruby -e 'puts \"hello\\nworld\"'`
139
139
  Then the stdout should contain "hello"
140
140
  Then the stderr should not contain "hello"
141
141
 
142
142
  Scenario: Detect output from all processes
143
- When I run "ruby -e 'puts \"hello world!\"'"
144
- And I run "ruby -e 'puts gets.chomp.reverse'" interactively
143
+ When I run `ruby -e 'puts \"hello world!\"'`
144
+ And I run `ruby -e 'puts gets.chomp.reverse'` interactively
145
145
  And I type "hello"
146
146
  Then the output should contain exactly:
147
147
  """
@@ -151,8 +151,8 @@ Feature: Output
151
151
  """
152
152
 
153
153
  Scenario: Detect stdout from all processes
154
- When I run "ruby -e 'puts \"hello world!\"'"
155
- And I run "ruby -e 'puts gets.chomp.reverse'" interactively
154
+ When I run `ruby -e 'puts \"hello world!\"'`
155
+ And I run `ruby -e 'puts gets.chomp.reverse'` interactively
156
156
  And I type "hello"
157
157
  Then the stdout should contain:
158
158
  """
@@ -166,8 +166,8 @@ Feature: Output
166
166
  """
167
167
 
168
168
  Scenario: Detect stderr from all processes
169
- When I run "ruby -e 'STDERR.puts \"hello world!\"'"
170
- And I run "ruby -e 'STDERR.puts gets.chomp.reverse'" interactively
169
+ When I run `ruby -e 'STDERR.puts \"hello world!\"'`
170
+ And I run `ruby -e 'STDERR.puts gets.chomp.reverse'` interactively
171
171
  And I type "hello"
172
172
  Then the stderr should contain:
173
173
  """
@@ -181,22 +181,22 @@ Feature: Output
181
181
  """
182
182
 
183
183
  Scenario: Detect output from named source
184
- When I run "ruby -e 'puts :simple'"
185
- And I run "ruby -e 'puts gets.chomp'" interactively
184
+ When I run `ruby -e 'puts :simple'`
185
+ And I run `ruby -e 'puts gets.chomp'` interactively
186
186
  And I type "interactive"
187
187
  Then the output from "ruby -e 'puts :simple'" should contain "simple"
188
188
  And the output from "ruby -e 'puts gets.chomp'" should not contain "simple"
189
189
 
190
190
  Scenario: Detect stdout from named source
191
- When I run "ruby -e 'puts :hello'"
192
- And I run "ruby -e 'puts :goodbye'"
191
+ When I run `ruby -e 'puts :hello'`
192
+ And I run `ruby -e 'puts :goodbye'`
193
193
  Then the stdout from "ruby -e 'puts :hello'" should contain "hello"
194
194
  And the stderr from "ruby -e 'puts :hello'" should not contain "hello"
195
195
  And the stdout from "ruby -e 'puts :goodbye'" should not contain "hello"
196
196
 
197
197
  Scenario: Detect stderr from named source
198
- When I run "ruby -e 'STDERR.puts :hello'"
199
- And I run "ruby -e 'puts :goodbye'"
198
+ When I run `ruby -e 'STDERR.puts :hello'`
199
+ And I run `ruby -e 'puts :goodbye'`
200
200
  Then the stderr from "ruby -e 'STDERR.puts :hello'" should contain "hello"
201
201
  And the stdout from "ruby -e 'STDERR.puts :hello'" should not contain "hello"
202
202
  And the stderr from "ruby -e 'puts :goodbye'" should not contain "hello"
@@ -92,14 +92,29 @@ When /^I cd to "([^"]*)"$/ do |dir|
92
92
  end
93
93
 
94
94
  When /^I run "(.*)"$/ do |cmd|
95
+ warn(%{\e[35m The /^I run "(.*)"$/ step definition is deprecated. Please use the `backticks` version\e[0m})
96
+ run_simple(unescape(cmd), false)
97
+ end
98
+
99
+ When /^I run `([^`]*)`$/ do |cmd|
95
100
  run_simple(unescape(cmd), false)
96
101
  end
97
102
 
98
103
  When /^I successfully run "(.*)"$/ do |cmd|
104
+ warn(%{\e[35m The /^I successfully run "(.*)"$/ step definition is deprecated. Please use the `backticks` version\e[0m})
105
+ run_simple(unescape(cmd))
106
+ end
107
+
108
+ When /^I successfully run `([^`]*)`$/ do |cmd|
99
109
  run_simple(unescape(cmd))
100
110
  end
101
111
 
102
112
  When /^I run "([^"]*)" interactively$/ do |cmd|
113
+ warn(%{\e[35m The /^I run "([^"]*)" interactively$/ step definition is deprecated. Please use the `backticks` version\e[0m})
114
+ run_interactive(unescape(cmd))
115
+ end
116
+
117
+ When /^I run `([^`]*)` interactively$/ do |cmd|
103
118
  run_interactive(unescape(cmd))
104
119
  end
105
120
 
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aruba
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 3
8
- - 3
9
- version: 0.3.3
4
+ prerelease:
5
+ version: 0.3.4
10
6
  platform: ruby
11
7
  authors:
12
8
  - "Aslak Helles\xC3\xB8y"
@@ -16,7 +12,7 @@ autorequire:
16
12
  bindir: bin
17
13
  cert_chain: []
18
14
 
19
- date: 2011-03-13 00:00:00 +00:00
15
+ date: 2011-03-20 00:00:00 +00:00
20
16
  default_executable:
21
17
  dependencies:
22
18
  - !ruby/object:Gem::Dependency
@@ -24,12 +20,9 @@ dependencies:
24
20
  requirement: &id001 !ruby/object:Gem::Requirement
25
21
  none: false
26
22
  requirements:
27
- - - ~>
23
+ - - ">="
28
24
  - !ruby/object:Gem::Version
29
- segments:
30
- - 0
31
- - 10
32
- version: "0.10"
25
+ version: 0.10.0
33
26
  type: :runtime
34
27
  prerelease: false
35
28
  version_requirements: *id001
@@ -38,12 +31,8 @@ dependencies:
38
31
  requirement: &id002 !ruby/object:Gem::Requirement
39
32
  none: false
40
33
  requirements:
41
- - - ~>
34
+ - - ">="
42
35
  - !ruby/object:Gem::Version
43
- segments:
44
- - 0
45
- - 1
46
- - 7
47
36
  version: 0.1.7
48
37
  type: :runtime
49
38
  prerelease: false
@@ -53,12 +42,9 @@ dependencies:
53
42
  requirement: &id003 !ruby/object:Gem::Requirement
54
43
  none: false
55
44
  requirements:
56
- - - ~>
45
+ - - ">="
57
46
  - !ruby/object:Gem::Version
58
- segments:
59
- - 2
60
- - 5
61
- version: "2.5"
47
+ version: 2.5.0
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: *id003
@@ -109,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
95
  requirements:
110
96
  - - ">="
111
97
  - !ruby/object:Gem::Version
112
- hash: -2014879782021527006
98
+ hash: 2705483300968521573
113
99
  segments:
114
100
  - 0
115
101
  version: "0"
@@ -118,17 +104,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
104
  requirements:
119
105
  - - ">="
120
106
  - !ruby/object:Gem::Version
121
- hash: -2014879782021527006
107
+ hash: 2705483300968521573
122
108
  segments:
123
109
  - 0
124
110
  version: "0"
125
111
  requirements: []
126
112
 
127
113
  rubyforge_project:
128
- rubygems_version: 1.3.7
114
+ rubygems_version: 1.6.2
129
115
  signing_key:
130
116
  specification_version: 3
131
- summary: aruba-0.3.3
117
+ summary: aruba-0.3.4
132
118
  test_files:
133
119
  - features/exit_statuses.feature
134
120
  - features/file_system_commands.feature