guard-fast_spec 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. data/README.md +18 -172
  2. data/lib/guard/fast_spec/version.rb +1 -1
  3. metadata +7 -7
data/README.md CHANGED
@@ -1,194 +1,40 @@
1
- # Guard::RSpec [![Build Status](https://secure.travis-ci.org/guard/guard-rspec.png?branch=master)](http://travis-ci.org/guard/guard-rspec)
1
+ # Guard::FastSpec [![Build Status](https://secure.travis-ci.org/guard/guard-rspec.png?branch=master)](http://travis-ci.org/guard/guard-rspec)
2
2
 
3
- RSpec guard allows to automatically & intelligently launch specs when files are modified.
3
+ Forked from guard-rspec(https://github.com/guard/guard-rspec)
4
4
 
5
- * Compatible with RSpec 1.x & RSpec 2.x (>= 2.4 needed for the notification feature).
6
- * Tested against Ruby 1.8.7, 1.9.2, 1.9.3, REE and the latest versions of JRuby & Rubinius.
5
+ This fork lets you run fast-specs along with rspec in your guard file together at the same time.
7
6
 
8
- ## Install
9
-
10
- Please be sure to have [Guard](https://github.com/guard/guard) installed before continue.
11
-
12
- Install the gem:
13
-
14
- ```
15
- $ gem install guard-rspec
16
- ```
17
-
18
- Add it to your Gemfile (inside development group):
7
+ Eg.,
19
8
 
20
9
  ``` ruby
21
- group :development do
22
- gem 'guard-rspec'
23
- end
24
- ```
25
-
26
- Add guard definition to your Guardfile by running this command:
10
+ guard 'fast_spec', :cli => "-Ifast_specs -r turnip", :spec_paths => ["fast_specs"], :version => 2 do
11
+ watch(%r{^fast_specs/roles/.+_spec\.rb$})
27
12
 
28
- ```
29
- $ guard init rspec
30
- ```
31
13
 
32
- ## Usage
14
+ watch(%r{^fast_specs/lib/(.+)\.rb$}) { |m| "fast_specs/lib/#{m[1]}_spec.rb" }
33
15
 
34
- Please read [Guard usage doc](https://github.com/guard/guard#readme)
16
+ watch('fast_specs/spec_helper.rb') { "fast_specs" }
35
17
 
36
- ## Guardfile
37
18
 
38
- RSpec guard can be really adapted to all kind of projects.
19
+ watch(%r{^app/roles/(.+)\.rb$}) { |m| "fast_specs/roles/#{m[1]}_spec.rb" }
20
+ end
39
21
 
40
- ### Standard RubyGem project
41
22
 
42
- ``` ruby
43
- guard 'rspec' do
23
+ guard 'rspec', :version => 2 do
44
24
  watch(%r{^spec/.+_spec\.rb$})
45
25
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
46
26
  watch('spec/spec_helper.rb') { "spec" }
47
- end
48
- ```
49
27
 
50
- ### Typical Rails app
51
-
52
- ``` ruby
53
- guard 'rspec' do
54
- watch('spec/spec_helper.rb') { "spec" }
55
- watch('config/routes.rb') { "spec/routing" }
56
- watch('app/controllers/application_controller.rb') { "spec/controllers" }
28
+ # Rails example
57
29
  watch(%r{^spec/.+_spec\.rb$})
58
30
  watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
59
- watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
60
31
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
61
32
  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"] }
33
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
34
+ watch('spec/spec_helper.rb') { "spec" }
35
+ watch('config/routes.rb') { "spec/routing" }
36
+ watch('app/controllers/application_controller.rb') { "spec/controllers" }
37
+ # Capybara request specs
38
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
62
39
  end
63
40
  ```
64
-
65
- Please read [Guard doc](https://github.com/guard/guard#readme) for more information about the Guardfile DSL.
66
-
67
- ## Options
68
-
69
- By default, Guard::RSpec automatically detect your RSpec version (with the `spec_helper.rb` syntax or with Bundler) but you can force the version with the `:version` option:
70
-
71
- ``` ruby
72
- guard 'rspec', :version => 2 do
73
- # ...
74
- end
75
- ```
76
-
77
- You can pass any of the standard RSpec CLI options using the `:cli` option:
78
-
79
- ``` ruby
80
- guard 'rspec', :cli => "--color --format nested --fail-fast --drb" do
81
- # ...
82
- end
83
- ```
84
-
85
- By default, Guard::RSpec will only look for spec files within `spec` in your project root. You can configure Guard::RSpec to look in additional paths by using the `:spec_paths` option:
86
-
87
- ``` ruby
88
- guard 'rspec', :spec_paths => ["spec", "vendor/engines/reset/spec"] do
89
- # ...
90
- end
91
- ```
92
- If you have only one path to look, you can configure `:spec_paths` option with a string:
93
-
94
- ``` ruby
95
- guard 'rspec', :spec_paths => "test" do
96
- # ...
97
- end
98
- ```
99
-
100
-
101
- Former `:color`, `:drb`, `:fail_fast` and `:formatter` options are deprecated and have no effect anymore.
102
-
103
- ### List of available options:
104
-
105
- ``` ruby
106
- :version => 1 # force use RSpec version 1, default: 2
107
- :cli => "-c -f doc" # pass arbitrary RSpec CLI arguments, default: "-f progress"
108
- :bundler => false # don't use "bundle exec" to run the RSpec command, default: true
109
- :binstubs => true # use "bin/rspec" to run the RSpec command (implies :bundler => true), default: false
110
- :rvm => ['1.8.7', '1.9.2'] # directly run your specs on multiple Rubies, default: nil
111
- :notification => false # display Growl (or Libnotify) notification after the specs are done running, default: true
112
- :all_after_pass => false # run all specs after changed specs pass, default: true
113
- :all_on_start => false # run all the specs at startup, default: true
114
- :keep_failed => false # keep failed specs until they pass, default: true
115
- :run_all => { :cli => "-p" } # cli arguments to use when running all specs, default: same as :cli
116
- :spec_paths => ["spec"] # specify an array of paths that contain spec files
117
- ```
118
-
119
- ### DRb mode
120
-
121
- When you specify `--drb` within `:cli`, guard-rspec will circumvent the `rspec` command line tool by
122
- directly communicating with the RSpec DRb server. This avoids the extra overhead incurred by your
123
- shell, bundler and loading RSpec's environment just to send a DRb message. It shaves off a
124
- second or two before the specs start to run; they should run almost immediately.
125
-
126
-
127
- Notification
128
- ------------
129
-
130
- The notification feature is only available for RSpec < 2, and RSpec >= 2.4 (due to the multiple-formatters feature that was present in RSpec 1, was removed in RSpec 2 and reintroduced in RSpec 2.4). So if you are using a version between 2 and 2.4, you should disable the notification with <tt>:notification => false</tt>. Otherwise, nothing will be displayed in the terminal when your specs will run.
131
-
132
- The best solution is still to update RSpec to the latest version!
133
-
134
- Formatters
135
- ----------
136
-
137
- The `:formatter` option has been removed since CLI arguments can be passed through the `:cli` option. If you want to use the former Instafail formatter, you need to use [rspec-instafail](http://rubygems.org/gems/rspec-instafail) gem instead:
138
-
139
- ``` ruby
140
- # in your Gemfile
141
- gem 'rspec-instafail'
142
-
143
- # in your Guardfile
144
- guard 'rspec', :cli => '-r rspec/instafail -f RSpec::Instafail' do
145
- # ...
146
- end
147
- ```
148
-
149
- Default formatter is the `progress` formatter (same as RSpec default).
150
-
151
- Running a subset of all specs
152
- -----------
153
-
154
- The `:all_on_start` and `:all_after_pass` options cause all specs located in the `spec` directory to be run. If there
155
- are some specs you want to skip, you can tag them with RSpec metadata (such as `:slow => true`)
156
- and skip them with the cli `--tag` option (i.e. `--tag ~slow`).
157
-
158
- You can also use option :spec_paths to override paths used when running all specs.
159
- You can use this feature to create multiple groups of guarded specs with distinct paths, and execute each in own process:
160
-
161
- ``` ruby
162
- # in your Guardfile
163
- group 'acceptance-tests' do
164
- guard 'rspec', :spec_paths => ['spec/acceptance'] do
165
- # ...
166
- end
167
- end
168
-
169
- group 'unit-tests' do
170
- guard 'rspec', :spec_paths => ['spec/models', 'spec/controllers', 'spec/routing'] do
171
- # ...
172
- end
173
- end
174
- ```
175
-
176
-
177
- Development
178
- -----------
179
-
180
- * Source hosted at [GitHub](https://github.com/guard/guard-rspec)
181
- * Report issues/Questions/Feature requests on [GitHub Issues](https://github.com/guard/guard-rspec/issues)
182
-
183
- Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change
184
- you make.
185
-
186
- Testing
187
- -------
188
-
189
- Please run `rake spec:prepare_fixtures` once before launching specs.
190
-
191
- Author
192
- ------
193
-
194
- [Thibaud Guillaume-Gentil](https://github.com/thibaudgg)
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module FastSpecVersion
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-fast_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
16
- requirement: &70139249986840 !ruby/object:Gem::Requirement
16
+ requirement: &70324877140380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.10.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70139249986840
24
+ version_requirements: *70324877140380
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &70139249985560 !ruby/object:Gem::Requirement
27
+ requirement: &70324877138840 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '1.0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70139249985560
35
+ version_requirements: *70324877138840
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70139249983840 !ruby/object:Gem::Requirement
38
+ requirement: &70324877137840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '2.7'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70139249983840
46
+ version_requirements: *70324877137840
47
47
  description: Guard::FastSpec automatically run your specs (much like autotest).
48
48
  email:
49
49
  - thibaud@thibaud.me