spectator 1.2.4 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,31 +1,52 @@
1
- # Usage
1
+ # Spectator
2
2
 
3
- Launch `spectator` as usual (probably `bundle exec spectator`).
3
+ _Test driven development red-green cycle for simple people!_
4
4
 
5
- ## Instructions
5
+ ## The gist
6
+
7
+ Spectator is a simple watcher for your specs:
8
+ - it will execute a spec each time a file (spec or implementation) is modified or created (_really catches new files!_)
9
+ - it **does not** starts your whole suite at start, nor when a spec passes or fails (as autospec tends to do)
10
+ - _if you ask_ it runs the whole spec suite
11
+
12
+ > Started as a custom [Watchr](https://github.com/mynyml/watchr) script **Spectator** has grown up to a tiny gem!
13
+
14
+ ### Compatibility
15
+
16
+ Works with RSpec-1 and RSpec-2 (looks for a `.rspec` file in the project root).
17
+
18
+
19
+ ## Usage
20
+
21
+ Launch `spectator` in a terminal and go back to code!
6
22
 
7
23
  The normal behavior is similar to `autotest --fast-start --no-full-after-failed`
8
24
  but gives the user a bit more control over execution. By hitting CTRL+C (or CMD+. on OSX)
9
25
  you get the following prompt:
10
26
 
11
27
  ^C (Interrupted with CTRL+C)
12
- --- What to do now? (q=quit, a=all-specs, r=reload):
28
+ --- What to do now? (q=quit, a=all-specs):
29
+
30
+ Type `q` and `ENTER` (or `CTRL+C` again) to quit.
31
+
32
+ Type `a` and `ENTER` (or `CTRL+C` again) to execute the whole suite of specs.
33
+
13
34
 
14
35
  ## Advanced (upcoming!)
15
36
 
16
37
  If you want to override some path matching:
17
38
 
18
39
  ```ruby
19
- spectate do
20
- case path
21
- when %r{lib/calibration_with_coefficients}
22
- specs.grep(%r{models/(logarithmic|polynomial)_calibration})
23
- when %r{app/models/telemetry_parameter}
24
- specs.grep(%r{models/telemetry_parameter})
25
- end
26
- end
40
+ spectate do
41
+ case path
42
+ when %r{lib/calibration_with_coefficients}
43
+ specs.grep(%r{models/(logarithmic|polynomial)_calibration})
44
+ when %r{app/models/telemetry_parameter}
45
+ specs.grep(%r{models/telemetry_parameter})
46
+ end
47
+ end
27
48
  ```
28
49
 
29
50
 
30
51
 
31
- Copyright (c) 2011-2012 Elia Schito, released under the [MIT license](https://github.com/elia/spectator/blob/master/MIT-LICENSE)
52
+ Copyright © 2011-2012 Elia Schito, released under the [MIT license](https://github.com/elia/spectator/blob/master/MIT-LICENSE)
@@ -1,7 +1,7 @@
1
1
  module Spectator
2
2
  module CommandLine
3
3
  def terminal_columns
4
- cols = `stty -a 2&>1`.scan(/ (\d+) columns/).flatten.first
4
+ cols = `stty -a 2>&1`.scan(/ (\d+) columns/).flatten.first
5
5
  $?.success? ? cols.to_i : 0
6
6
  end
7
7
 
@@ -1,3 +1,3 @@
1
1
  module Spectator
2
- VERSION = '1.2.4'
2
+ VERSION = '1.2.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-16 00:00:00.000000000 Z
13
+ date: 2012-05-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: listen
17
- requirement: &70364886582120 !ruby/object:Gem::Requirement
17
+ requirement: &70167587110040 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70364886582120
25
+ version_requirements: *70167587110040
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: term-ansicolor
28
- requirement: &70364886581700 !ruby/object:Gem::Requirement
28
+ requirement: &70167587109620 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70364886581700
36
+ version_requirements: *70167587109620
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: notify
39
- requirement: &70364886581280 !ruby/object:Gem::Requirement
39
+ requirement: &70167587109200 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70364886581280
47
+ version_requirements: *70167587109200
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rake
50
- requirement: &70364886580780 !ruby/object:Gem::Requirement
50
+ requirement: &70167587108700 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0.9'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *70364886580780
58
+ version_requirements: *70167587108700
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: bundler
61
- requirement: &70364886580280 !ruby/object:Gem::Requirement
61
+ requirement: &70167587108200 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: '1.0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70364886580280
69
+ version_requirements: *70167587108200
70
70
  description: Watches specs for a Ruby (1.8 or 1.9) or Rails (2 or 3) project
71
71
  email:
72
72
  - elia@schito.me