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.
@@ -21,6 +21,6 @@ module Busser
21
21
  module Rspec
22
22
 
23
23
  # Version string for the Rspec Busser runner plugin
24
- VERSION = "0.7.3"
24
+ VERSION = "0.7.4"
25
25
  end
26
26
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: busser-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: