aruba 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +6 -6
- data/History.txt +5 -0
- data/aruba.gemspec +3 -3
- data/features/file_system_commands.feature +9 -1
- data/lib/aruba/api.rb +7 -1
- data/lib/aruba/cucumber.rb +8 -0
- metadata +19 -25
data/Gemfile
CHANGED
@@ -2,9 +2,9 @@ source "http://rubygems.org"
|
|
2
2
|
gemspec
|
3
3
|
|
4
4
|
# Use source from sibling folders (if available) instead of gems
|
5
|
-
%w[cucumber].each do |g|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
5
|
+
# %w[cucumber].each do |g|
|
6
|
+
# if File.directory?(File.dirname(__FILE__) + "/../#{g}")
|
7
|
+
# @dependencies.reject!{|dep| dep.name == g}
|
8
|
+
# gem g, :path => "../#{g}"
|
9
|
+
# end
|
10
|
+
# end
|
data/History.txt
CHANGED
data/aruba.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'aruba'
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.4"
|
6
6
|
s.authors = ["Aslak Hellesøy", "David Chelimsky"]
|
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.9.
|
12
|
+
s.add_dependency 'cucumber', '~> 0.9.3'
|
13
13
|
s.add_dependency 'background_process' # Can't specify a version - bundler/rubygems chokes on '2.1'
|
14
|
-
s.add_development_dependency 'rspec', '~> 2.0.
|
14
|
+
s.add_development_dependency 'rspec', '~> 2.0.1'
|
15
15
|
|
16
16
|
s.rubygems_version = "1.3.7"
|
17
17
|
s.files = `git ls-files`.split("\n")
|
@@ -93,10 +93,18 @@ Feature: file system commands
|
|
93
93
|
Then the file "foo" should contain "hello world"
|
94
94
|
And the file "foo" should not contain "HELLO WORLD"
|
95
95
|
|
96
|
-
Scenario: Check file contents
|
96
|
+
Scenario: Check file contents with regexp
|
97
97
|
Given a file named "foo" with:
|
98
98
|
"""
|
99
99
|
hello world
|
100
100
|
"""
|
101
101
|
Then the file "foo" should match /hel.o world/
|
102
102
|
And the file "foo" should not match /HELLO WORLD/
|
103
|
+
|
104
|
+
Scenario: Remove file
|
105
|
+
Given a file named "foo" with:
|
106
|
+
"""
|
107
|
+
hello world
|
108
|
+
"""
|
109
|
+
When I remove the file "foo"
|
110
|
+
Then the file "foo" should not exist
|
data/lib/aruba/api.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'fileutils'
|
2
2
|
require 'rbconfig'
|
3
3
|
require 'background_process'
|
4
4
|
|
@@ -30,6 +30,12 @@ module Aruba
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
def remove_file(file_name)
|
34
|
+
in_current_dir do
|
35
|
+
FileUtils.rm(file_name)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
33
39
|
def append_to_file(file_name, file_content)
|
34
40
|
in_current_dir do
|
35
41
|
File.open(file_name, 'a') { |f| f << file_content }
|
data/lib/aruba/cucumber.rb
CHANGED
@@ -83,6 +83,10 @@ When /^I append to "([^"]*)" with:$/ do |file_name, file_content|
|
|
83
83
|
append_to_file(file_name, file_content)
|
84
84
|
end
|
85
85
|
|
86
|
+
When /^I remove the file "([^"]*)"$/ do |file_name|
|
87
|
+
remove_file(file_name)
|
88
|
+
end
|
89
|
+
|
86
90
|
When /^I cd to "([^"]*)"$/ do |dir|
|
87
91
|
cd(dir)
|
88
92
|
end
|
@@ -176,6 +180,10 @@ Then /^the stdout should not contain "([^"]*)"$/ do |partial_output|
|
|
176
180
|
@last_stdout.should_not =~ regexp(partial_output)
|
177
181
|
end
|
178
182
|
|
183
|
+
Then /^the file "([^"]*)" should not exist$/ do |file_name|
|
184
|
+
check_file_presence([file_name], false)
|
185
|
+
end
|
186
|
+
|
179
187
|
Then /^the following files should exist:$/ do |files|
|
180
188
|
check_file_presence(files.raw.map{|file_row| file_row[0]}, true)
|
181
189
|
end
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aruba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 17
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
8
|
+
- 4
|
9
|
+
version: 0.2.4
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- "Aslak Helles\xC3\xB8y"
|
@@ -16,57 +15,52 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2010-
|
18
|
+
date: 2010-11-02 00:00:00 +00:00
|
20
19
|
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
|
-
|
22
|
+
name: cucumber
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
26
|
- - ~>
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 59
|
29
28
|
segments:
|
30
29
|
- 0
|
31
30
|
- 9
|
32
|
-
-
|
33
|
-
version: 0.9.
|
34
|
-
requirement: *id001
|
31
|
+
- 3
|
32
|
+
version: 0.9.3
|
35
33
|
type: :runtime
|
36
|
-
name: cucumber
|
37
34
|
prerelease: false
|
35
|
+
version_requirements: *id001
|
38
36
|
- !ruby/object:Gem::Dependency
|
39
|
-
|
37
|
+
name: background_process
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
40
|
requirements:
|
42
41
|
- - ">="
|
43
42
|
- !ruby/object:Gem::Version
|
44
|
-
hash: 3
|
45
43
|
segments:
|
46
44
|
- 0
|
47
45
|
version: "0"
|
48
|
-
requirement: *id002
|
49
46
|
type: :runtime
|
50
|
-
name: background_process
|
51
47
|
prerelease: false
|
48
|
+
version_requirements: *id002
|
52
49
|
- !ruby/object:Gem::Dependency
|
53
|
-
|
50
|
+
name: rspec
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
52
|
none: false
|
55
53
|
requirements:
|
56
54
|
- - ~>
|
57
55
|
- !ruby/object:Gem::Version
|
58
|
-
hash: 62196431
|
59
56
|
segments:
|
60
57
|
- 2
|
61
58
|
- 0
|
62
|
-
-
|
63
|
-
|
64
|
-
- 22
|
65
|
-
version: 2.0.0.beta.22
|
66
|
-
requirement: *id003
|
59
|
+
- 1
|
60
|
+
version: 2.0.1
|
67
61
|
type: :development
|
68
|
-
name: rspec
|
69
62
|
prerelease: false
|
63
|
+
version_requirements: *id003
|
70
64
|
description: CLI Steps for Cucumber, hand-crafted for you in Aruba
|
71
65
|
email: cukes@googlegroups.com
|
72
66
|
executables: []
|
@@ -112,7 +106,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
106
|
requirements:
|
113
107
|
- - ">="
|
114
108
|
- !ruby/object:Gem::Version
|
115
|
-
hash:
|
109
|
+
hash: -3353510939538542612
|
116
110
|
segments:
|
117
111
|
- 0
|
118
112
|
version: "0"
|
@@ -121,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
115
|
requirements:
|
122
116
|
- - ">="
|
123
117
|
- !ruby/object:Gem::Version
|
124
|
-
hash:
|
118
|
+
hash: -3353510939538542612
|
125
119
|
segments:
|
126
120
|
- 0
|
127
121
|
version: "0"
|
@@ -131,7 +125,7 @@ rubyforge_project:
|
|
131
125
|
rubygems_version: 1.3.7
|
132
126
|
signing_key:
|
133
127
|
specification_version: 3
|
134
|
-
summary: aruba-0.2.
|
128
|
+
summary: aruba-0.2.4
|
135
129
|
test_files:
|
136
130
|
- features/exit_statuses.feature
|
137
131
|
- features/file_system_commands.feature
|