guard-rspec 0.4.0 → 0.4.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.
- data/README.md +12 -10
- data/lib/guard/rspec.rb +2 -1
- data/lib/guard/rspec/runner.rb +2 -1
- data/lib/guard/rspec/templates/Guardfile +4 -3
- data/lib/guard/rspec/version.rb +1 -1
- metadata +40 -48
data/README.md
CHANGED
@@ -15,7 +15,7 @@ Install the gem:
|
|
15
15
|
|
16
16
|
$ gem install guard-rspec
|
17
17
|
|
18
|
-
Add it to your Gemfile (inside
|
18
|
+
Add it to your Gemfile (inside development group):
|
19
19
|
|
20
20
|
``` ruby
|
21
21
|
gem 'guard-rspec'
|
@@ -85,14 +85,15 @@ Former `:color`, `:drb`, `:fail_fast` and `:formatter` options are thus deprecat
|
|
85
85
|
### List of available options:
|
86
86
|
|
87
87
|
``` ruby
|
88
|
-
:version => 1
|
89
|
-
:cli => "-c -f doc"
|
90
|
-
:bundler => false
|
91
|
-
:rvm => ['1.8.7', '1.9.2']
|
92
|
-
:notification => false
|
93
|
-
:all_after_pass => false
|
94
|
-
:all_on_start => false
|
95
|
-
:keep_failed => false
|
88
|
+
:version => 1 # force use RSpec version 1, default: 2
|
89
|
+
:cli => "-c -f doc" # pass arbitrary RSpec CLI arguments, default: "-f progress"
|
90
|
+
:bundler => false # don't use "bundle exec" to run the RSpec command, default: true
|
91
|
+
:rvm => ['1.8.7', '1.9.2'] # directly run your specs on multiple Rubies, default: nil
|
92
|
+
:notification => false # don't display Growl (or Libnotify) notification after the specs are done running, default: true
|
93
|
+
:all_after_pass => false # don't run all specs after changed specs pass, default: true
|
94
|
+
:all_on_start => false # don't run all the specs at startup, default: true
|
95
|
+
:keep_failed => false # keep failed specs until them pass, default: true
|
96
|
+
:run_all => { :cli => "-p" } # override any option when running all specs
|
96
97
|
```
|
97
98
|
|
98
99
|
Notification
|
@@ -122,7 +123,7 @@ Default formatter is the `progress` formatter (same as RSpec default).
|
|
122
123
|
Running a subset of all specs
|
123
124
|
-----------
|
124
125
|
|
125
|
-
The `:all_on_start` and `:all_after_pass` options cause all specs to be run. If there
|
126
|
+
The `:all_on_start` and `:all_after_pass` options cause all specs located in the `spec` directory to be run. If there
|
126
127
|
are some specs you want to skip, you can tag them with RSpec metadata (such as `:slow => true`)
|
127
128
|
and skip them with the cli `--tag` option (i.e. `--tag ~slow`).
|
128
129
|
|
@@ -144,3 +145,4 @@ Author
|
|
144
145
|
------
|
145
146
|
|
146
147
|
[Thibaud Guillaume-Gentil](https://github.com/thibaudgg)
|
148
|
+
|
data/lib/guard/rspec.rb
CHANGED
@@ -27,7 +27,7 @@ module Guard
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def run_all
|
30
|
-
passed = Runner.run(["spec"], options.merge(:message => "Running all specs"))
|
30
|
+
passed = Runner.run(["spec/"], options.merge(options[:run_all] || {}).merge(:message => "Running all specs"))
|
31
31
|
|
32
32
|
@failed_paths = [] if passed
|
33
33
|
@last_failed = !passed
|
@@ -57,3 +57,4 @@ module Guard
|
|
57
57
|
|
58
58
|
end
|
59
59
|
end
|
60
|
+
|
data/lib/guard/rspec/runner.rb
CHANGED
@@ -8,7 +8,8 @@ module Guard
|
|
8
8
|
return false if paths.empty?
|
9
9
|
message = options[:message] || "Running: #{paths.join(' ')}"
|
10
10
|
UI.info(message, :reset => true)
|
11
|
-
system(rspec_command(paths, options))
|
11
|
+
system(rspec_command(paths, options)) ||
|
12
|
+
Notifier.notify("Failed", :title => "RSpec results", :image => :failed, :priority => 2)
|
12
13
|
end
|
13
14
|
|
14
15
|
def set_rspec_version(options={})
|
@@ -1,17 +1,18 @@
|
|
1
1
|
guard 'rspec', :version => 2 do
|
2
2
|
watch(%r{^spec/.+_spec\.rb$})
|
3
3
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
4
|
-
watch('spec/spec_helper.rb') { "spec" }
|
4
|
+
watch('spec/spec_helper.rb') { "spec/" }
|
5
5
|
|
6
6
|
# Rails example
|
7
7
|
watch(%r{^spec/.+_spec\.rb$})
|
8
8
|
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
9
9
|
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
10
10
|
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"] }
|
11
|
-
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
12
|
-
watch('spec/spec_helper.rb') { "spec" }
|
11
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec/" }
|
12
|
+
watch('spec/spec_helper.rb') { "spec/" }
|
13
13
|
watch('config/routes.rb') { "spec/routing" }
|
14
14
|
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
15
15
|
# Capybara request specs
|
16
16
|
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
|
17
17
|
end
|
18
|
+
|
data/lib/guard/rspec/version.rb
CHANGED
metadata
CHANGED
@@ -1,60 +1,56 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-rspec
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.1
|
4
5
|
prerelease:
|
5
|
-
version: 0.4.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Thibaud Guillaume-Gentil
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-08-10 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: guard
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70328300041900 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
23
21
|
version: 0.4.0
|
24
22
|
type: :runtime
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: bundler
|
28
23
|
prerelease: false
|
29
|
-
|
24
|
+
version_requirements: *70328300041900
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: bundler
|
27
|
+
requirement: &70328300041340 !ruby/object:Gem::Requirement
|
30
28
|
none: false
|
31
|
-
requirements:
|
29
|
+
requirements:
|
32
30
|
- - ~>
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.0'
|
35
33
|
type: :development
|
36
|
-
version_requirements: *id002
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: rspec
|
39
34
|
prerelease: false
|
40
|
-
|
35
|
+
version_requirements: *70328300041340
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &70328300040300 !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
|
-
requirements:
|
40
|
+
requirements:
|
43
41
|
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '2.6'
|
46
44
|
type: :development
|
47
|
-
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70328300040300
|
48
47
|
description: Guard::RSpec automatically run your specs (much like autotest).
|
49
|
-
email:
|
48
|
+
email:
|
50
49
|
- thibaud@thibaud.me
|
51
50
|
executables: []
|
52
|
-
|
53
51
|
extensions: []
|
54
|
-
|
55
52
|
extra_rdoc_files: []
|
56
|
-
|
57
|
-
files:
|
53
|
+
files:
|
58
54
|
- lib/guard/rspec/formatter.rb
|
59
55
|
- lib/guard/rspec/formatters/notification_rspec.rb
|
60
56
|
- lib/guard/rspec/formatters/notification_spec.rb
|
@@ -67,30 +63,26 @@ files:
|
|
67
63
|
- README.md
|
68
64
|
homepage: http://rubygems.org/gems/guard-rspec
|
69
65
|
licenses: []
|
70
|
-
|
71
66
|
post_install_message:
|
72
67
|
rdoc_options: []
|
73
|
-
|
74
|
-
require_paths:
|
68
|
+
require_paths:
|
75
69
|
- lib
|
76
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
77
71
|
none: false
|
78
|
-
requirements:
|
79
|
-
- -
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version:
|
82
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ! '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
77
|
none: false
|
84
|
-
requirements:
|
85
|
-
- -
|
86
|
-
- !ruby/object:Gem::Version
|
78
|
+
requirements:
|
79
|
+
- - ! '>='
|
80
|
+
- !ruby/object:Gem::Version
|
87
81
|
version: 1.3.6
|
88
82
|
requirements: []
|
89
|
-
|
90
83
|
rubyforge_project: guard-rspec
|
91
|
-
rubygems_version: 1.8.
|
84
|
+
rubygems_version: 1.8.7
|
92
85
|
signing_key:
|
93
86
|
specification_version: 3
|
94
87
|
summary: Guard gem for RSpec
|
95
88
|
test_files: []
|
96
|
-
|