gemika 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a934a9b1bb2b0ffbf8ae5d02afe7da41a3e98555
4
- data.tar.gz: 43c266c1e45736030ff64909d407b581106b45f2
3
+ metadata.gz: 0c3ae73c9f4029cdb9f0f0027ffac9318e66c827
4
+ data.tar.gz: 3a0b9b28d1d3c195229b6d111204df787c8d14d0
5
5
  SHA512:
6
- metadata.gz: 870476f7b37365f079d5f4cd77eb0ed4840aae31a94d673636b38db5b821eac725a1e9e2f0f47205a4639eb788e11dfa2145df8b5266b50da798853396b9eb53
7
- data.tar.gz: 246b17fde0d99997efda8a8ce51ef891e354b61f13f06bb4daf3aed87eb108e50af542d4a23562c7e239ba6065b8800ce50facac60a1008936327d757b06ff55
6
+ metadata.gz: 3c25a84fa98190a43e4271fd5e3780913615c2d4ad029078ff289d0441f99d8ebc3059fb97c014ad8afef47ca5adb8fa8f4ad73a80034888ba4e26c40df0e9c9
7
+ data.tar.gz: c32e215482d63f46fd538ec17fc0d325aeb75d5a4bdec57239123564f5ed86c683a4e068dc62870434845a1b5464482142b7f736f65f0548f496911ffa5624bf
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- gemika (0.2.0)
4
+ gemika (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -27,5 +27,8 @@ DEPENDENCIES
27
27
  rake (= 10.0.4)
28
28
  rspec (~> 1.3.0)
29
29
 
30
+ RUBY VERSION
31
+ ruby 1.8.7p375
32
+
30
33
  BUNDLED WITH
31
34
  1.12.5
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- gemika (0.2.0)
4
+ gemika (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,6 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- gemika (0.2.0)
5
4
 
6
5
  GEM
7
6
  remote: https://rubygems.org/
@@ -56,5 +55,8 @@ DEPENDENCIES
56
55
  rake
57
56
  rspec (~> 3.4)
58
57
 
58
+ RUBY VERSION
59
+ ruby 2.2.4p230
60
+
59
61
  BUNDLED WITH
60
62
  1.12.5
@@ -1,7 +1,6 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- gemika (0.2.0)
5
4
 
6
5
  GEM
7
6
  remote: https://rubygems.org/
@@ -53,5 +52,8 @@ DEPENDENCIES
53
52
  rake
54
53
  rspec (~> 3.5)
55
54
 
55
+ RUBY VERSION
56
+ ruby 2.2.4p230
57
+
56
58
  BUNDLED WITH
57
59
  1.12.5
@@ -1,7 +1,6 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- gemika (0.2.0)
5
4
 
6
5
  GEM
7
6
  remote: https://rubygems.org/
@@ -53,5 +52,8 @@ DEPENDENCIES
53
52
  rake
54
53
  rspec (~> 3.5)
55
54
 
55
+ RUBY VERSION
56
+ ruby 2.2.4p230
57
+
56
58
  BUNDLED WITH
57
59
  1.12.5
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
- command = "bundle exec #{runner} #{rspec_options} #{files}"
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
@@ -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(:gemfile => row.gemfile, :fatal => false)
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Gemika
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -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 = %{bundle exec #{subject.binary} --color spec}
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 = %{bundle exec #{subject.binary} --color spec/foo_spec.rb:23}
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(:files => 'spec/foo_spec.rb:23')
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.0
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.6.6
88
+ rubygems_version: 2.4.5.1
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: Helpers for testing Ruby gems