spectator 1.2.8 → 1.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c72941ed2f2136eca2366723b7942f51ceb7f8b
4
- data.tar.gz: 5807a32aeb0a36890c8329376d08d8c1305bc94b
3
+ metadata.gz: b007dc7704b182d89de0951bfe6d2657702b84d9
4
+ data.tar.gz: 4c85a986deb5cd1759a00d10d9708fd3d81ea5a3
5
5
  SHA512:
6
- metadata.gz: a6309a9b3167ccc4b92b280c6637beaa3e4b07a3ffc29bfc98af9df82980644056bd0df2893807a701e8dfc7d1fbb66b0052a48cb271df9a88b52226d1a0a903
7
- data.tar.gz: 4bdae2d7f3005dbcfa613f1cd33662855291e957dfc6969fb4ce78d4d3a83d26a88fcd140aec19c51c4a18c456cba29bc433c69a0ab82e0a9297066f8083473b
6
+ metadata.gz: b196901dbff9ff01089295b1af6d5731bd6f38d52388a51a63bc407a1ff4e33dfd8320ed43379ac15c20613de27fe559b72d96e7715d2e26397d9a9d18c21098
7
+ data.tar.gz: bb9fb23ff5016b4e42d5d277eb4b62a223d045aca84578c45cc5fc60d43d062ca51d0c675d816a9c2cd352cf66b47bc866a4419fb928d1b3ee9aaca88bfb1013
@@ -17,15 +17,29 @@ module Spectator
17
17
  @rspec_command ||= File.exist?('./.rspec') ? 'rspec' : 'spec'
18
18
  end
19
19
 
20
+ def full_rspec_command
21
+ @full_rspec_command ||= ENV['RSPEC_COMMAND'] || "bundle exec #{rspec_command}"
22
+ end
23
+
20
24
  def rspec options
21
25
  unless options.empty?
22
- success = run("bundle exec #{rspec_command} #{options}")
23
- notify( success ? '♥♥ SUCCESS :) ♥♥' : '♠♠ FAILED >:( ♠♠' )
26
+ success = run("#{full_rspec_command} #{options}")
27
+ notify( success ? success_message : failed_message )
24
28
  end
25
29
  end
26
30
 
31
+ def success_message
32
+ @success_message ||= osx? ? '🎉 SUCCESS'.freeze :
33
+ '♥♥ SUCCESS :) ♥♥'.freeze
34
+ end
35
+
36
+ def failed_message
37
+ @failed_message ||= osx? ? '💔 FAILED'.freeze :
38
+ '♠♠ FAILED >:( ♠♠'.freeze
39
+ end
40
+
27
41
  def rspec_all
28
- rspec 'spec'
42
+ rspec ENV['SPEC_DIR_GLOB'] || 'spec'
29
43
  end
30
44
 
31
45
  def rspec_files *files
@@ -1,3 +1,3 @@
1
1
  module Spectator
2
- VERSION = '1.2.8'
2
+ VERSION = '1.2.9'
3
3
  end
data/lib/spectator.rb CHANGED
@@ -89,9 +89,10 @@ module Spectator
89
89
  def initialize &block
90
90
  yield self if block_given?
91
91
 
92
-
93
- matchers << %r{^spec/(.*)_spec\.rb$}
94
- matchers << %r{^(?:app|lib|script)/(.*)(?:\.rb|\.\w+|)$}
92
+ spec_dir_glob = ENV['SPEC_DIR_GLOB'] || 'spec'
93
+ base_dir_glob = ENV['BASE_DIR_GLOB'] || 'app|lib|script'
94
+ matchers << %r{^#{spec_dir_glob}/(.*)_spec\.rb$}
95
+ matchers << %r{^(?:#{base_dir_glob})/(.*)(?:\.rb|\.\w+|)$}
95
96
 
96
97
  trap_int!
97
98
  Thread.abort_on_exception = true
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.8
4
+ version: 1.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elia
@@ -9,76 +9,76 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-27 00:00:00.000000000 Z
12
+ date: 2014-04-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: listen
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: 1.3.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: 1.3.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: term-ansicolor
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: 1.2.2
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: 1.2.2
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: notify
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: 0.5.2
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: 0.5.2
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: rake
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0.9'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0.9'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: bundler
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - ~>
74
+ - - "~>"
75
75
  - !ruby/object:Gem::Version
76
76
  version: '1.0'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '1.0'
84
84
  description: Watches specs for a Ruby (1.8 or 1.9) or Rails (2 or 3) project
@@ -89,7 +89,7 @@ executables:
89
89
  extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
- - .gitignore
92
+ - ".gitignore"
93
93
  - Gemfile
94
94
  - MIT-LICENSE
95
95
  - README.md
@@ -111,18 +111,19 @@ require_paths:
111
111
  - lib
112
112
  required_ruby_version: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - '>='
114
+ - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
- - - '>='
119
+ - - ">="
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
123
  rubyforge_project: rspec-rails-watchr
124
- rubygems_version: 2.0.3
124
+ rubygems_version: 2.2.2
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: Watches specs for a Ruby or Rails project
128
128
  test_files: []
129
+ has_rdoc: