guard-rspec 3.0.3 → 3.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 639765a4923eb0c18f6e903623c732acdf2ec011
4
- data.tar.gz: 686f2f76750aa4dbca040114f1fa5fcbee46e602
3
+ metadata.gz: b1dc600657deb79e8869f2128d794a1c3324c665
4
+ data.tar.gz: 32efeed7f726f7d57dd4a2da8fca8192305b69ce
5
5
  SHA512:
6
- metadata.gz: aa2ea4ac62f3b4941eef4ab2e32c81d843bca6d54178ec611ea1131ba229f1ea75482a42214390eb8d276628f0185066d1ad3363e9373004e7dfeda6c34be7af
7
- data.tar.gz: 0e0ccdac7ad624f8844d8d584ca8501fca49bf1fc1fcaf170dbe82d86706d3c5e2d51ddde8bd74bd2255eb1c44d7f5b3a0faf897d7187974873dec84fd1b22e5
6
+ metadata.gz: 6e600eccab4db141d8d50c5b8df3ae5fd2c01c0cbb5e5208fdeb6c6b03e59d61826c1b96fc905c2eee92e28ba0fa8b5ecc10365927cd9cd4fa0fc92b4405e557
7
+ data.tar.gz: a72d49552ebe12e9b85b8121ea4de2a9bd6ebb24fc3ce960a953e0a9789cea684ae3f75a9f7e2043d82dd49af31f7824013f414e7c45fe4c3f2f9c57f44a1a7d
data/README.md CHANGED
@@ -62,7 +62,6 @@ guard :rspec do
62
62
  watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
63
63
  end
64
64
  ```
65
-
66
65
  Please read [Guard doc](https://github.com/guard/guard#readme) for more information about the Guardfile DSL.
67
66
 
68
67
  ## Options
@@ -144,10 +143,21 @@ Former `:color`, `:drb`, `:fail_fast` and `:formatter` options are deprecated an
144
143
  :focus_on_failed => false # focus on the first 10 failed specs first, rerun till they pass
145
144
  :parallel => true # run all specs in parallel using [ParallelTests](https://github.com/grosser/parallel_tests) gem, default: false
146
145
  :parallel_cli => "-n 2" # pass arbitrary Parallel Tests arguments, default: ""
146
+ :launchy => nil # pass a path to an rspec results file, e.g. ./tmp/spec_results.html
147
147
  ```
148
148
 
149
149
  You can also use a custom binstubs directory using `:binstubs => 'some-dir'`.
150
150
 
151
+ ### Using Launchy to view rspec results
152
+ guard-rspec can be configured to launch a results file in lieu of outputing rspec results to the terminal.
153
+ Configure your Guardfile with the launchy option
154
+ ``` ruby
155
+ guard 'rspec', :cli=>'--color --format html --out ./tmp/spec_results.html' do
156
+ :launchy => "./tmp/spec_results.html"
157
+ # ...
158
+ end
159
+ ```
160
+
151
161
  ### DRb mode
152
162
 
153
163
  When you specify `--drb` within `:cli`, guard-rspec will circumvent the `rspec` command line tool by
@@ -1,5 +1,6 @@
1
1
  require 'drb/drb'
2
2
  require 'rspec'
3
+ require 'pathname'
3
4
 
4
5
  module Guard
5
6
  class RSpec
@@ -8,7 +9,6 @@ module Guard
8
9
  FAILURE_EXIT_CODE = 2
9
10
 
10
11
  attr_accessor :options
11
-
12
12
  def initialize(options = {})
13
13
  @options = {
14
14
  :bundler => true,
@@ -16,6 +16,7 @@ module Guard
16
16
  :rvm => nil,
17
17
  :cli => nil,
18
18
  :env => nil,
19
+ :launchy => nil,
19
20
  :notification => true,
20
21
  :spring => false,
21
22
  :turnip => false,
@@ -80,7 +81,7 @@ module Guard
80
81
  end
81
82
  end
82
83
 
83
- private
84
+ private
84
85
 
85
86
  def environment_variables
86
87
  return if options[:env].nil?
@@ -145,6 +146,13 @@ module Guard
145
146
  Notifier.notify("Failed", :title => "RSpec results", :image => :failed, :priority => 2)
146
147
  end
147
148
 
149
+ if options[:launchy]
150
+ require 'launchy'
151
+ pn = Pathname.new(options[:launchy])
152
+ if pn.exist?
153
+ Launchy.open(options[:launchy])
154
+ end
155
+ end
148
156
  success
149
157
  end
150
158
 
@@ -264,8 +272,8 @@ module Guard
264
272
  end
265
273
  end
266
274
  if options.key?(:version)
267
- @options.delete(:version)
268
- UI.info %{DEPRECATION WARNING: The :version option is deprecated. Only RSpec 2 is now supported.}
275
+ @options.delete(:version)
276
+ UI.info %{DEPRECATION WARNING: The :version option is deprecated. Only RSpec 2 is now supported.}
269
277
  end
270
278
  end
271
279
 
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module RSpecVersion
3
- VERSION = "3.0.3"
3
+ VERSION = "3.1.0"
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.3
4
+ version: 3.1.0
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-09-09 00:00:00.000000000 Z
11
+ date: 2013-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard
@@ -53,8 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.3'
55
55
  description: Guard::RSpec automatically run your specs (much like autotest).
56
- email:
57
- - thibaud@thibaud.me
56
+ email: thibaud@thibaud.me
58
57
  executables: []
59
58
  extensions: []
60
59
  extra_rdoc_files: []
@@ -68,7 +67,8 @@ files:
68
67
  - LICENSE
69
68
  - README.md
70
69
  homepage: http://rubygems.org/gems/guard-rspec
71
- licenses: []
70
+ licenses:
71
+ - MIT
72
72
  metadata: {}
73
73
  post_install_message:
74
74
  rdoc_options: []
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: 1.3.6
87
87
  requirements: []
88
88
  rubyforge_project: guard-rspec
89
- rubygems_version: 2.0.7
89
+ rubygems_version: 2.1.3
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Guard gem for RSpec