busser-rspec 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/busser/rspec/runner.rb +2 -11
- data/lib/busser/rspec/version.rb +1 -1
- data/lib/busser/runner_plugin/rspec.rb +15 -16
- metadata +3 -3
data/lib/busser/rspec/runner.rb
CHANGED
@@ -17,16 +17,7 @@
|
|
17
17
|
# See the License for the specific language governing permissions and
|
18
18
|
# limitations under the License.
|
19
19
|
|
20
|
-
require 'rake'
|
21
20
|
require 'bundler/setup'
|
22
|
-
require 'rspec/core
|
23
|
-
require 'rbconfig'
|
21
|
+
require 'rspec/core'
|
24
22
|
|
25
|
-
|
26
|
-
|
27
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
28
|
-
t.rspec_path = RbConfig::CONFIG['bindir'] + '/rspec'
|
29
|
-
t.ruby_opts = [ "-I#{base_path}" ]
|
30
|
-
t.pattern = "#{base_path}/**/*_spec.rb"
|
31
|
-
end
|
32
|
-
Rake::Task["spec"].invoke
|
23
|
+
exit RSpec::Core::Runner.run(ARGV)
|
data/lib/busser/rspec/version.rb
CHANGED
@@ -27,29 +27,28 @@ class Busser::RunnerPlugin::Rspec < Busser::RunnerPlugin::Base
|
|
27
27
|
postinstall do
|
28
28
|
install_gem("rspec", "<= 2.13.1")
|
29
29
|
install_gem("bundler")
|
30
|
+
end
|
30
31
|
|
32
|
+
def test
|
31
33
|
rspec_path = suite_path('rspec').to_s
|
32
|
-
setup_file = File.join(rspec_path, "setup-recipe.rb")
|
33
34
|
|
34
|
-
|
35
|
-
|
35
|
+
chef_apply do
|
36
|
+
setup_file = File.join(rspec_path, "setup-recipe.rb")
|
37
|
+
|
38
|
+
if File.exists?(setup_file)
|
36
39
|
eval(IO.read(setup_file))
|
37
40
|
end
|
38
|
-
end
|
39
|
-
end
|
40
41
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
chef_apply do
|
46
|
-
execute "bundle install" do
|
47
|
-
environment(:PATH => Gem.binpath)
|
48
|
-
cwd rspec_path
|
49
|
-
end
|
42
|
+
execute "bundle install" do
|
43
|
+
environment("PATH" => Gem.bindir)
|
44
|
+
cwd rspec_path
|
45
|
+
only_if { File.exists?(File.join(rspec_path, "Gemfile")) }
|
50
46
|
end
|
51
47
|
end
|
52
|
-
|
53
|
-
|
48
|
+
|
49
|
+
Dir.chdir(rspec_path) do
|
50
|
+
runner = File.expand_path(File.join(File.dirname(__FILE__), "..", "rspec", "runner.rb"))
|
51
|
+
run_ruby_script!("#{runner} -I #{rspec_path} -I #{rspec_path}/lib #{rspec_path}")
|
52
|
+
end
|
54
53
|
end
|
55
54
|
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.
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -162,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
162
|
version: '0'
|
163
163
|
segments:
|
164
164
|
- 0
|
165
|
-
hash: -
|
165
|
+
hash: -3544285135490086574
|
166
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
167
|
none: false
|
168
168
|
requirements:
|
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
171
|
version: '0'
|
172
172
|
segments:
|
173
173
|
- 0
|
174
|
-
hash: -
|
174
|
+
hash: -3544285135490086574
|
175
175
|
requirements: []
|
176
176
|
rubyforge_project:
|
177
177
|
rubygems_version: 1.8.25
|