gemika 0.3.0 → 0.3.1
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.
- checksums.yaml +4 -4
- data/gemfiles/Gemfile.2.3.mysql2.lock +4 -1
- data/gemfiles/Gemfile.3.2.mysql2.lock +1 -1
- data/gemfiles/Gemfile.4.2.mysql2.lock +3 -1
- data/gemfiles/Gemfile.5.0.mysql2.lock +3 -1
- data/gemfiles/Gemfile.5.0.pg.lock +3 -1
- data/lib/gemika/rspec.rb +2 -1
- data/lib/gemika/tasks/matrix.rb +5 -1
- data/lib/gemika/tasks/rspec.rb +3 -1
- data/lib/gemika/version.rb +1 -1
- data/spec/gemika/rspec_spec.rb +14 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c3ae73c9f4029cdb9f0f0027ffac9318e66c827
|
4
|
+
data.tar.gz: 3a0b9b28d1d3c195229b6d111204df787c8d14d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c25a84fa98190a43e4271fd5e3780913615c2d4ad029078ff289d0441f99d8ebc3059fb97c014ad8afef47ca5adb8fa8f4ad73a80034888ba4e26c40df0e9c9
|
7
|
+
data.tar.gz: c32e215482d63f46fd538ec17fc0d325aeb75d5a4bdec57239123564f5ed86c683a4e068dc62870434845a1b5464482142b7f736f65f0548f496911ffa5624bf
|
data/lib/gemika/rspec.rb
CHANGED
@@ -15,7 +15,8 @@ module Gemika
|
|
15
15
|
gemfile = options.fetch(:gemfile, Gemika::Env.gemfile)
|
16
16
|
fatal = options.fetch(:fatal, true)
|
17
17
|
runner = binary(:gemfile => gemfile)
|
18
|
-
|
18
|
+
bundle_exec = options.fetch(:bundle_exec) ? 'bundle exec' : nil
|
19
|
+
command = [bundle_exec, runner, rspec_options, files].compact.join(' ')
|
19
20
|
result = shell_out(command)
|
20
21
|
if result
|
21
22
|
true
|
data/lib/gemika/tasks/matrix.rb
CHANGED
@@ -10,7 +10,11 @@ namespace :matrix do
|
|
10
10
|
desc "Run specs for all Ruby #{RUBY_VERSION} gemfiles"
|
11
11
|
task :spec, :files do |t, options|
|
12
12
|
Gemika::Matrix.from_travis_yml.each do |row|
|
13
|
-
options = options.to_hash.merge(
|
13
|
+
options = options.to_hash.merge(
|
14
|
+
:gemfile => row.gemfile,
|
15
|
+
:fatal => false,
|
16
|
+
:bundle_exec => true
|
17
|
+
)
|
14
18
|
Gemika::RSpec.run_specs(options)
|
15
19
|
end
|
16
20
|
end
|
data/lib/gemika/tasks/rspec.rb
CHANGED
@@ -4,6 +4,8 @@ require 'gemika/rspec'
|
|
4
4
|
# RSpec version (`spec` in RSpec 1, `rspec` in RSpec 2+)
|
5
5
|
desc 'Run specs with the current RSpec version'
|
6
6
|
task :current_rspec, :files do |t, options|
|
7
|
-
options = options.to_hash
|
7
|
+
options = options.to_hash.merge(
|
8
|
+
:bundle_exec => false
|
9
|
+
)
|
8
10
|
Gemika::RSpec.run_specs(options)
|
9
11
|
end
|
data/lib/gemika/version.rb
CHANGED
data/spec/gemika/rspec_spec.rb
CHANGED
@@ -23,20 +23,29 @@ describe Gemika::RSpec do
|
|
23
23
|
describe '.run_specs' do
|
24
24
|
|
25
25
|
it 'shells out to the binary' do
|
26
|
-
expected_command = %{
|
26
|
+
expected_command = %{#{subject.binary} --color spec}
|
27
27
|
subject.should_receive(:shell_out).with(expected_command).and_return(true)
|
28
|
-
subject.run_specs
|
28
|
+
subject.run_specs(:bundle_exec => false)
|
29
29
|
end
|
30
30
|
|
31
31
|
it 'allows to pass a :files option' do
|
32
|
-
expected_command = %{
|
32
|
+
expected_command = %{#{subject.binary} --color spec/foo_spec.rb:23}
|
33
|
+
subject.should_receive(:shell_out).with(expected_command).and_return(true)
|
34
|
+
subject.run_specs(
|
35
|
+
:bundle_exec => false,
|
36
|
+
:files => 'spec/foo_spec.rb:23'
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
it 'calls the binary with `bundle exec` if :bundle_exec option is true' do
|
41
|
+
expected_command = %{bundle exec #{subject.binary} --color spec}
|
33
42
|
subject.should_receive(:shell_out).with(expected_command).and_return(true)
|
34
|
-
subject.run_specs(:
|
43
|
+
subject.run_specs(:bundle_exec => true)
|
35
44
|
end
|
36
45
|
|
37
46
|
it 'raises an error if the call returns a non-zero error code' do
|
38
47
|
subject.should_receive(:shell_out).with(anything).and_return(false)
|
39
|
-
expect { subject.run_specs }.to raise_error(Gemika::RSpecFailed)
|
48
|
+
expect { subject.run_specs(:bundle_exec => false) }.to raise_error(Gemika::RSpecFailed)
|
40
49
|
end
|
41
50
|
|
42
51
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemika
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
87
|
rubyforge_project:
|
88
|
-
rubygems_version: 2.
|
88
|
+
rubygems_version: 2.4.5.1
|
89
89
|
signing_key:
|
90
90
|
specification_version: 4
|
91
91
|
summary: Helpers for testing Ruby gems
|