vagrant-rspec-ci 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -1
- data/lib/vagrant-rspec-ci/command.rb +14 -1
- data/lib/vagrant-rspec-ci/config.rb +6 -1
- data/lib/vagrant-rspec-ci.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -62,8 +62,14 @@ your Vagrantfile:
|
|
62
62
|
|
63
63
|
## Change Log
|
64
64
|
|
65
|
-
### 0.0.
|
65
|
+
### 0.0.2 (2013-04-10)
|
66
|
+
* Try to use rspec from vagrant gemset if possible
|
66
67
|
|
68
|
+
### 0.0.1 (2013-04-09)
|
69
|
+
* Integrated with ci_reporter
|
70
|
+
* Added directories as search paths, with defaults
|
71
|
+
* Added globbing for test files
|
72
|
+
* Removed internal testing support
|
67
73
|
* Forked from v0.1.2 of vagrant-test
|
68
74
|
|
69
75
|
## License
|
@@ -22,8 +22,10 @@ module VagrantRspecCI
|
|
22
22
|
tests.each do |testfile|
|
23
23
|
vm.ui.info("Running rspec test: #{testfile}")
|
24
24
|
cmd = "#{cmd} #{testfile}"
|
25
|
+
env = prep_env(vm)
|
25
26
|
@logger.debug("Command: #{cmd}")
|
26
|
-
|
27
|
+
@logger.debug("Environment: #{env.inspect()}")
|
28
|
+
system(env, cmd)
|
27
29
|
result = $?
|
28
30
|
# rspec exits 0 if all passed, 1 if some failed - and system gives nil if there was a problem starting the process
|
29
31
|
if result.nil? then
|
@@ -46,6 +48,17 @@ module VagrantRspecCI
|
|
46
48
|
end
|
47
49
|
|
48
50
|
private
|
51
|
+
|
52
|
+
def prep_env(vm)
|
53
|
+
env = {}
|
54
|
+
env["CI_REPORTS"] = vm.config.rspec.reports_dir
|
55
|
+
|
56
|
+
# Needed so vagrant-gemmed bins (like rspec) can find ruby_noexec_wrapper
|
57
|
+
env["PATH"] = ::Gem.bindir + ':' + ENV["PATH"]
|
58
|
+
|
59
|
+
env
|
60
|
+
end
|
61
|
+
|
49
62
|
def expand_test_list (rspec_config)
|
50
63
|
tests = rspec_config.tests.map { |filespec|
|
51
64
|
rspec_config.dirs.find_all { |dir| File.directory?(dir) }.map { |dir|
|
@@ -18,7 +18,12 @@ module VagrantRspecCI
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def rspec_bin_path
|
21
|
-
@rpsec_bin_path
|
21
|
+
if @rpsec_bin_path then
|
22
|
+
return @rpsec_bin_path
|
23
|
+
else
|
24
|
+
guess = File.join(::Gem.bindir, 'rspec')
|
25
|
+
return File.exists?(guess) ? guess : DEFAULT_RSPEC_BIN_PATH
|
26
|
+
end
|
22
27
|
end
|
23
28
|
|
24
29
|
def reports_dir
|
data/lib/vagrant-rspec-ci.rb
CHANGED
@@ -12,7 +12,7 @@ require "pry-debugger"
|
|
12
12
|
module VagrantRspecCI
|
13
13
|
|
14
14
|
NAME = "vagrant-rspec-ci"
|
15
|
-
VERSION = "0.0.
|
15
|
+
VERSION = "0.0.2"
|
16
16
|
AUTHOR = "Clinton Wolfe"
|
17
17
|
AUTHOR_EMAIL = "clintoncwolfe [at] gmail [dot] com"
|
18
18
|
DESCRIPTION = "vagrant-rspec-ci is a Vagrant plugin for running tests against your VMs, derived from vagrant-test"
|