guard-rspec 3.0.0 → 3.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbb56ed9604ac21d3cae7a6c7beaf37d20c3beab
4
- data.tar.gz: 53990653ab1d6803a35b335af297437b40340826
3
+ metadata.gz: 610744f60a30a1876f2e3a58656fcab424420765
4
+ data.tar.gz: 104ae5419c0da5861efe415e809ae8f9ed2c0285
5
5
  SHA512:
6
- metadata.gz: f26e6c5fa2e01614e6020568bd95465422a72ee498435b323fe88e4f4d0c150e661e627936aacea3534f9419dd45357bda79dc6a553a7bb56de34758d9b1b478
7
- data.tar.gz: f93d9d5d4edf51fb289c57f56c2d706860b0b107973d95f962a69abc67842713077ccd8cd08f2e6365445b65f5de59af9572ed3b4ba6cf0b4095af9c4abc7a3f
6
+ metadata.gz: 753711157a995bb32ae52c6f4dae42175d28180c4192447ba3e030882e7fcc2c60845f0a73108e9018047357034c40bb5cd7697c8bfe5a85b58038f0606c947c
7
+ data.tar.gz: 4d2e9d4b6db9ce398fb16424763f45a6f425c7e2651c9267cdff788d4c95db9022ce6b1bed61a92a2943667a467c984da290f9aba542c6c5fd16bb0ab12f36f9
data/README.md CHANGED
@@ -1,9 +1,10 @@
1
- # Guard::RSpec [![Gem Version](https://badge.fury.io/rb/guard-rspec.png)](http://badge.fury.io/rb/guard-rspec) [![Build Status](https://secure.travis-ci.org/guard/guard-rspec.png?branch=master)](http://travis-ci.org/guard/guard-rspec) [![Dependency Status](https://gemnasium.com/guard/guard-rspec.png)](https://gemnasium.com/guard/guard-rspec) [![Code Climate](https://codeclimate.com/github/guard/guard-rspec.png)](https://codeclimate.com/github/guard/guard-rspec) [![Coverage Status](https://coveralls.io/repos/guard/guard-rspec/badge.png?branch=master)](https://coveralls.io/r/guard/guard-rspec)
1
+ # Guard::RSpec
2
+ [![Gem Version](https://badge.fury.io/rb/guard-rspec.png)](http://badge.fury.io/rb/guard-rspec) [![Build Status](https://secure.travis-ci.org/guard/guard-rspec.png?branch=master)](http://travis-ci.org/guard/guard-rspec) [![Dependency Status](https://gemnasium.com/guard/guard-rspec.png)](https://gemnasium.com/guard/guard-rspec) [![Code Climate](https://codeclimate.com/github/guard/guard-rspec.png)](https://codeclimate.com/github/guard/guard-rspec) [![Coverage Status](https://coveralls.io/repos/guard/guard-rspec/badge.png?branch=master)](https://coveralls.io/r/guard/guard-rspec)
2
3
 
3
4
  RSpec guard allows to automatically & intelligently launch specs when files are modified.
4
5
 
5
6
  * Compatible with RSpec >= 2.13 (use guard-rspec 1.2.x for older release, including RSpec 1.x)
6
- * Tested against Ruby 1.8.7, 1.9.3, 2.0.0, REE and the latest versions of JRuby & Rubinius.
7
+ * Tested against Ruby 1.8.7, 1.9.2, 1.9.3, 2.0.0, Ruby head, REE, JRuby (1.8 mode, 1.9 mode & head) & Rubinius (1.8 mode, 1.9 mode & head).
7
8
 
8
9
  ## Install
9
10
 
@@ -133,7 +134,7 @@ Former `:color`, `:drb`, `:fail_fast` and `:formatter` options are deprecated an
133
134
  :all_after_pass => true # run all specs after changed specs pass, default: false
134
135
  :all_on_start => true # run all the specs at startup, default: false
135
136
  :keep_failed => true # keep failed specs until they pass, default: false
136
- :run_all => { :cli => "-p" } # cli arguments to use when running all specs, default: same as :cli
137
+ :run_all => { :cli => "-p", :parallel => true, :parallel_cli => '-n 2' } # cli arguments to use when running all specs, default: same as :cli; parallel_rspec arguments, default: same as :parallel_cli
137
138
  :spec_paths => ["spec"] # specify an array of paths that contain spec files
138
139
  :exclude => "spec/foo/**/*" # exclude files based on glob
139
140
  :spring => true # enable spring support; default: false
data/lib/guard/rspec.rb CHANGED
@@ -32,7 +32,7 @@ module Guard
32
32
  end
33
33
 
34
34
  def run_all
35
- passed = @runner.run(@inspector.spec_paths, @options[:run_all].merge(:message => 'Running all specs'))
35
+ passed = @runner.run(@inspector.spec_paths, @options[:run_all].merge(:message => 'Running all specs', :run_all_specs => true))
36
36
 
37
37
  unless @last_failed = !passed
38
38
  @failed_paths = []
@@ -53,8 +53,8 @@ module Guard
53
53
  end
54
54
  end
55
55
 
56
- def rspec_executable
57
- command = parallel? ? 'parallel_rspec' : 'rspec'
56
+ def rspec_executable(runtime_options = {})
57
+ command = parallel?(runtime_options) ? 'parallel_rspec' : 'rspec'
58
58
  @rspec_executable ||= (binstubs? && !executable_prefix?) ? "#{binstubs}/#{command}" : command
59
59
  end
60
60
 
@@ -118,9 +118,9 @@ module Guard
118
118
  cmd_parts << bin_command('foreman run') if foreman?
119
119
  cmd_parts << "bundle exec" if bundle_exec?
120
120
  cmd_parts << executable_prefix if executable_prefix?
121
- cmd_parts << rspec_executable
122
- cmd_parts << rspec_arguments(paths, options) if !parallel?
123
- cmd_parts << parallel_rspec_arguments(paths, options) if parallel?
121
+ cmd_parts << rspec_executable(options)
122
+ cmd_parts << rspec_arguments(paths, options) if !parallel?(options)
123
+ cmd_parts << parallel_rspec_arguments(paths, options) if parallel?(options)
124
124
  cmd_parts.compact.join(' ')
125
125
  end
126
126
 
@@ -213,8 +213,12 @@ module Guard
213
213
  options.fetch(:zeus, false)
214
214
  end
215
215
 
216
- def parallel?
217
- options.fetch(:parallel, false)
216
+ def parallel?(runtime_options = {})
217
+ if runtime_options[:run_all_specs]
218
+ runtime_options[:parallel]
219
+ else
220
+ options.fetch(:parallel, false)
221
+ end
218
222
  end
219
223
 
220
224
  def spring?
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module RSpecVersion
3
- VERSION = "3.0.0"
3
+ VERSION = "3.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-07 00:00:00.000000000 Z
11
+ date: 2013-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard