busser-rspec 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/busser/rspec/version.rb +1 -1
- data/lib/busser/runner_plugin/rspec.rb +7 -7
- metadata +1 -1
data/lib/busser/rspec/version.rb
CHANGED
@@ -35,13 +35,6 @@ class Busser::RunnerPlugin::Rspec < Busser::RunnerPlugin::Base
|
|
35
35
|
setup_file = File.join(rspec_path, "setup-recipe.rb")
|
36
36
|
|
37
37
|
Dir.chdir(rspec_path) do
|
38
|
-
if File.exists?(setup_file)
|
39
|
-
if !File.exists?("/opt/chef/bin/chef-apply")
|
40
|
-
raise "You have a chef setup file at #{setup_file}, but /opt/chef/bin/chef-apply does not if exist"
|
41
|
-
end
|
42
|
-
# avoid run() here which runs with bundler context
|
43
|
-
system("/opt/chef/bin/chef-apply #{setup_file}")
|
44
|
-
end
|
45
38
|
|
46
39
|
if File.exists?(File.join(rspec_path, "Gemfile"))
|
47
40
|
# Bundle install local completes quickly if the gems are already found locally
|
@@ -50,6 +43,13 @@ class Busser::RunnerPlugin::Rspec < Busser::RunnerPlugin::Base
|
|
50
43
|
run("PATH=#{ENV['PATH']}:#{Gem.bindir}; bundle install --local || bundle install")
|
51
44
|
end
|
52
45
|
|
46
|
+
if File.exists?(setup_file)
|
47
|
+
if !File.exists?("/opt/chef/bin/chef-apply")
|
48
|
+
raise "You have a chef setup file at #{setup_file}, but /opt/chef/bin/chef-apply does not if exist"
|
49
|
+
end
|
50
|
+
run("/opt/chef/bin/chef-apply #{setup_file}")
|
51
|
+
end
|
52
|
+
|
53
53
|
runner = File.expand_path(File.join(File.dirname(__FILE__), "..", "rspec", "runner.rb"))
|
54
54
|
run_ruby_script!("#{runner} -I #{rspec_path} -I #{rspec_path}/lib #{rspec_path}")
|
55
55
|
end
|