spectator 1.3.1 → 1.3.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.
- checksums.yaml +4 -4
- data/lib/spectator.rb +2 -3
- data/lib/spectator/version.rb +1 -1
- data/spec/spectator/specs_matcher_spec.rb +18 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f76036a4e109005feb8d4e6d634c562a73b71e58
|
4
|
+
data.tar.gz: e1fb1af929bf3cf83347ca7a0fc30bfbf12ac19c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a122f32063d6bcc858824f57f626038d6932f01b81f9f6cb0a6363cb6cb6652365542aa16dd86c893161a22afbd07f48b3d86220deb3ff886b6702121592642
|
7
|
+
data.tar.gz: 2932484faefbdede1a8f3f63c044107669f70dc53d775a3799cbcfa087a0162892499e1a6ba95a78bf8dc3b00900327e65a025818f90f5f568a7a7c40e2bcbed
|
data/lib/spectator.rb
CHANGED
@@ -54,7 +54,7 @@ module Spectator
|
|
54
54
|
path_watcher.on_change { ui << :run_specs }
|
55
55
|
path_watcher.watch_paths!
|
56
56
|
|
57
|
-
ui.on(:run_all)
|
57
|
+
ui.on(:run_all) { run_all_handler }
|
58
58
|
ui.on(:run_specs) { run_specs_handler }
|
59
59
|
ui.on(:interrupt) { interrupt_handler }
|
60
60
|
|
@@ -64,11 +64,10 @@ module Spectator
|
|
64
64
|
|
65
65
|
def run_all_handler
|
66
66
|
return unless ui.can_run_specs?
|
67
|
-
|
68
67
|
ui.status = :running_specs
|
69
68
|
result = ui.run(spec_runner.command)
|
70
69
|
success_notifier.notify(result)
|
71
|
-
ui.
|
70
|
+
ui.wait_for_changes
|
72
71
|
end
|
73
72
|
|
74
73
|
def run_specs_handler
|
data/lib/spectator/version.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'spectator'
|
3
|
+
require 'spectator/specs_matcher'
|
4
|
+
require 'pathname'
|
5
|
+
|
6
|
+
describe Spectator::SpecsMatcher do
|
7
|
+
describe '#specs_for' do
|
8
|
+
let(:config) { OpenStruct.new(Spectator.default_config_hash) }
|
9
|
+
subject(:matcher) { described_class.new(config) }
|
10
|
+
let(:root) { Pathname(File.expand_path('../../../', __FILE__)) }
|
11
|
+
|
12
|
+
it 'matches specs too' do
|
13
|
+
spec_file = Pathname(__FILE__).expand_path.relative_path_from(root).to_s
|
14
|
+
|
15
|
+
expect(matcher.specs_for([spec_file])).to eq([spec_file])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
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.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elia
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05-
|
12
|
+
date: 2014-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: listen
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- lib/spectator/ui.rb
|
121
121
|
- lib/spectator/version.rb
|
122
122
|
- spec/spec_helper.rb
|
123
|
+
- spec/spectator/specs_matcher_spec.rb
|
123
124
|
- spec/spectator_spec.rb
|
124
125
|
- spectator.gemspec
|
125
126
|
homepage: ''
|
@@ -148,4 +149,5 @@ specification_version: 4
|
|
148
149
|
summary: Watches specs for a Ruby or Rails project
|
149
150
|
test_files:
|
150
151
|
- spec/spec_helper.rb
|
152
|
+
- spec/spectator/specs_matcher_spec.rb
|
151
153
|
- spec/spectator_spec.rb
|