Skip to content

Commit ec1b7f4

Browse files
committed
bump aruba
1 parent 75a7583 commit ec1b7f4

File tree

4 files changed

+57
-54
lines changed

4 files changed

+57
-54
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
source 'https://rubygems.org'
22

3-
gem 'aruba', '~> 1.0.0.pre.alpha.4'
3+
gem 'aruba', '~> 1.0.4'
44
gem 'cucumber', '~> 3.1.2'
55
gem 'sinatra'

Gemfile.lock

+17-22
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
aruba (1.0.0.pre.alpha.4)
5-
childprocess (~> 1.0)
6-
contracts (~> 0.13)
7-
cucumber (>= 2.4, < 4.0)
8-
ffi (~> 1.9)
4+
aruba (1.0.4)
5+
childprocess (>= 2.0, < 5.0)
6+
contracts (~> 0.16.0)
7+
cucumber (>= 2.4, < 6.0)
98
rspec-expectations (~> 3.4)
10-
thor (~> 0.19)
11-
backports (3.15.0)
12-
builder (3.2.3)
13-
childprocess (1.0.1)
14-
rake (< 13.0)
15-
contracts (0.16.0)
9+
thor (~> 1.0)
10+
backports (3.23.0)
11+
builder (3.2.4)
12+
childprocess (4.1.0)
13+
contracts (0.16.1)
1614
cucumber (3.1.2)
1715
builder (>= 2.1.2)
1816
cucumber-core (~> 3.2.0)
@@ -29,37 +27,34 @@ GEM
2927
cucumber-expressions (6.0.1)
3028
cucumber-tag_expressions (1.1.1)
3129
cucumber-wire (0.0.1)
32-
diff-lcs (1.3)
33-
ffi (1.11.1)
34-
ffi (1.11.1-java)
30+
diff-lcs (1.5.0)
3531
gherkin (5.1.0)
36-
multi_json (1.13.1)
32+
multi_json (1.15.0)
3733
multi_test (0.1.2)
3834
mustermann (1.0.3)
3935
rack (2.0.7)
4036
rack-protection (2.0.5)
4137
rack
42-
rake (12.3.3)
43-
rspec-expectations (3.8.4)
38+
rspec-expectations (3.11.0)
4439
diff-lcs (>= 1.2.0, < 2.0)
45-
rspec-support (~> 3.8.0)
46-
rspec-support (3.8.2)
40+
rspec-support (~> 3.11.0)
41+
rspec-support (3.11.0)
4742
sinatra (2.0.5)
4843
mustermann (~> 1.0)
4944
rack (~> 2.0)
5045
rack-protection (= 2.0.5)
5146
tilt (~> 2.0)
52-
thor (0.20.3)
47+
thor (1.2.1)
5348
tilt (2.0.9)
5449

5550
PLATFORMS
5651
java
5752
ruby
5853

5954
DEPENDENCIES
60-
aruba (~> 1.0.0.pre.alpha.4)
55+
aruba (~> 1.0.4)
6156
cucumber (~> 3.1.2)
6257
sinatra
6358

6459
BUNDLED WITH
65-
1.17.1
60+
1.17.2

features/steps.rb

+30-30
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
require 'fileutils'
22

33
Given(/^HTTPS is preferred$/) do
4-
run_command_and_stop %(git config --global hub.protocol https)
4+
run_ignored_command %(git config --global hub.protocol https)
55
end
66

77
Given(/^there are no remotes$/) do
8-
run_command_and_stop 'git remote'
9-
expect(last_command_started).not_to have_output
8+
output = run_ignored_command 'git remote'
9+
expect(output).to be_empty
1010
end
1111

1212
Given(/^"([^"]*)" is a whitelisted Enterprise host$/) do |host|
13-
run_command_and_stop %(git config --global --add hub.host "#{host}")
13+
run_ignored_command %(git config --global --add hub.host "#{host}")
1414
end
1515

1616
Given(/^git "(.+?)" is set to "(.+?)"$/) do |key, value|
17-
run_command_and_stop %(git config #{key} "#{value}")
17+
run_ignored_command %(git config #{key} "#{value}")
1818
end
1919

2020
Given(/^the "([^"]*)" remote has(?: (push))? url "([^"]*)"$/) do |remote_name, push, url|
21-
run_command_and_stop 'git remote'
22-
unless last_command_started.stdout.split("\n").include? remote_name
23-
run_command_and_stop %(git remote add #{remote_name} "#{url}")
21+
remotes = run_ignored_command 'git remote'
22+
unless remotes.split("\n").include? remote_name
23+
run_ignored_command %(git remote add #{remote_name} "#{url}")
2424
else
25-
run_command_and_stop %(git remote set-url #{"--push" if push} #{remote_name} "#{url}")
25+
run_ignored_command %(git remote set-url #{"--push" if push} #{remote_name} "#{url}")
2626
end
2727
end
2828

@@ -52,7 +52,7 @@
5252
end
5353

5454
Given(/^a (bare )?git repo in "([^"]*)"$/) do |bare, dir_name|
55-
run_command_and_stop %(git init --quiet #{"--bare" if bare} '#{dir_name}')
55+
run_ignored_command %(git init --quiet #{"--bare" if bare} '#{dir_name}')
5656
end
5757

5858
Given(/^a git bundle named "([^"]*)"$/) do |file|
@@ -71,8 +71,8 @@
7171
Given(/^there is a commit named "([^"]+)"$/) do |name|
7272
empty_commit
7373
empty_commit
74-
run_command_and_stop %(git tag #{name})
75-
run_command_and_stop %(git reset --quiet --hard HEAD^)
74+
run_ignored_command %(git tag #{name})
75+
run_ignored_command %(git reset --quiet --hard HEAD^)
7676
end
7777

7878
Given(/^there is a git FETCH_HEAD$/) do
@@ -83,7 +83,7 @@
8383
fetch_head.puts "%s\t\t'refs/heads/made-up' of git://github.com/made/up.git" % `git rev-parse HEAD`.chomp
8484
end
8585
end
86-
run_command_and_stop %(git reset --quiet --hard HEAD^)
86+
run_ignored_command %(git reset --quiet --hard HEAD^)
8787
end
8888

8989
When(/^I make (a|\d+) commits?(?: with message "([^"]+)")?$/) do |num, msg|
@@ -114,15 +114,15 @@
114114
end
115115

116116
Given(/^I am on the "([^"]+)" branch(?: (pushed to|with upstream) "([^"]+)")?$/) do |name, type, upstream|
117-
run_command_and_stop %(git checkout --quiet -b #{shell_escape name})
117+
run_ignored_command %(git checkout --quiet -b #{shell_escape name})
118118
empty_commit
119119

120120
if upstream
121121
full_upstream = upstream.start_with?('refs/') ? upstream : "refs/remotes/#{upstream}"
122-
run_command_and_stop %(git update-ref #{shell_escape full_upstream} HEAD)
122+
run_ignored_command %(git update-ref #{shell_escape full_upstream} HEAD)
123123

124124
if type == 'with upstream'
125-
run_command_and_stop %(git branch --set-upstream-to #{shell_escape upstream})
125+
run_ignored_command %(git branch --set-upstream-to #{shell_escape upstream})
126126
end
127127
end
128128
end
@@ -136,13 +136,13 @@
136136
FileUtils.cp '.git/refs/heads/master', ref_file
137137
end
138138
end
139-
run_command_and_stop %(git remote set-head #{remote} #{branch})
139+
run_ignored_command %(git remote set-head #{remote} #{branch})
140140
end
141141

142142
Given(/^I am in detached HEAD$/) do
143143
empty_commit
144144
empty_commit
145-
run_command_and_stop %(git checkout HEAD^)
145+
run_ignored_command %(git checkout HEAD^)
146146
end
147147

148148
Given(/^the current dir is not a repo$/) do
@@ -185,26 +185,26 @@
185185
end
186186

187187
Then(/^the url for "([^"]*)" should be "([^"]*)"$/) do |name, url|
188-
run_command_and_stop %(git config --get-all remote.#{name}.url)
189-
expect(last_command_started).to have_output(url)
188+
output = run_ignored_command %(git config --get-all remote.#{name}.url)
189+
expect(output).to include(url)
190190
end
191191

192192
Then(/^the "([^"]*)" submodule url should be "([^"]*)"$/) do |name, url|
193-
run_command_and_stop %(git config --get-all submodule."#{name}".url)
194-
expect(last_command_started).to have_output(url)
193+
output = run_ignored_command %(git config --get-all submodule."#{name}".url)
194+
expect(output).to include(url)
195195
end
196196

197197
Then(/^"([^"]*)" should merge "([^"]*)" from remote "([^"]*)"$/) do |name, merge, remote|
198-
run_command_and_stop %(git config --get-all branch.#{name}.remote)
199-
expect(last_command_started).to have_output(remote)
198+
output = run_ignored_command %(git config --get-all branch.#{name}.remote)
199+
expect(output).to include(remote)
200200

201-
run_command_and_stop %(git config --get-all branch.#{name}.merge)
202-
expect(last_command_started).to have_output(merge)
201+
output = run_ignored_command %(git config --get-all branch.#{name}.merge)
202+
expect(output).to include(merge)
203203
end
204204

205205
Then(/^there should be no "([^"]*)" remote$/) do |remote_name|
206-
run_command_and_stop 'git remote'
207-
expect(last_command_started.output.split("\n")).to_not include(remote_name)
206+
remotes = run_ignored_command 'git remote'
207+
expect(remotes.split("\n")).to_not include(remote_name)
208208
end
209209

210210
Then(/^the file "([^"]*)" should have mode "([^"]*)"$/) do |file, expected_mode|
@@ -216,8 +216,8 @@
216216
if ref == 'HEAD'
217217
empty_commit
218218
end
219-
run_command_and_stop %(git rev-parse #{ref})
220-
rev = last_command_started.output.chomp
219+
output = run_ignored_command %(git rev-parse #{ref})
220+
rev = output.chomp
221221

222222
host, owner, repo = proj.split('/', 3)
223223
if repo.nil?

features/support/env.rb

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
require 'fileutils'
33
require 'forwardable'
44
require 'tmpdir'
5+
require 'open3'
56

67
system_git = `which git 2>/dev/null`.chomp
78
bin_dir = File.expand_path('../fakebin', __FILE__)
@@ -139,10 +140,17 @@ def empty_commit(message = nil)
139140
@empty_commit_count = defined?(@empty_commit_count) ? @empty_commit_count + 1 : 1
140141
message = "empty #{@empty_commit_count}"
141142
end
142-
run_command_and_stop "git commit --quiet -m '#{message}' --allow-empty"
143+
run_ignored_command "git commit --quiet -m '#{message}' --allow-empty"
143144
end
144145

145146
def shell_escape(message)
146147
message.to_s.gsub(/['"\\ $]/) { |m| "\\#{m}" }
147148
end
149+
150+
# runs a command entirely outside of Aruba's command system and returns its stdout
151+
def run_ignored_command(cmd_string)
152+
stdout, stderr, status = Open3.capture3(aruba.environment, cmd_string, chdir: expand_path('.'))
153+
expect(status).to be_success
154+
stdout
155+
end
148156
}

0 commit comments

Comments
 (0)