guard-tap 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/guard/tap/runner.rb +6 -6
- data/lib/guard/tap/version.rb +1 -1
- data/spec/guard/tap/runner_spec.rb +3 -3
- metadata +4 -4
data/lib/guard/tap/runner.rb
CHANGED
@@ -4,7 +4,7 @@ module Guard
|
|
4
4
|
class << self
|
5
5
|
|
6
6
|
def run command, title = command
|
7
|
-
notify "runnning: #{title}"
|
7
|
+
notify :info, "runnning: #{title}"
|
8
8
|
|
9
9
|
now_error = false
|
10
10
|
error_message = ''
|
@@ -16,7 +16,7 @@ module Guard
|
|
16
16
|
|
17
17
|
IO.popen(command, "r+"){ |io|
|
18
18
|
while line = io.gets
|
19
|
-
UI.
|
19
|
+
UI.debug line
|
20
20
|
if line =~ /^ok/
|
21
21
|
now_error = false
|
22
22
|
flush_error.call
|
@@ -46,17 +46,17 @@ module Guard
|
|
46
46
|
false
|
47
47
|
end
|
48
48
|
|
49
|
-
def notify message, args = { }
|
50
|
-
::Guard::UI.
|
49
|
+
def notify log_level, message, args = { }
|
50
|
+
::Guard::UI.send log_level, message
|
51
51
|
::Guard::Notifier.notify message, args
|
52
52
|
end
|
53
53
|
|
54
54
|
def notify_success message
|
55
|
-
notify message, image: :success
|
55
|
+
notify :info, message, image: :success
|
56
56
|
end
|
57
57
|
|
58
58
|
def notify_error message
|
59
|
-
notify message, image: :failed
|
59
|
+
notify :error, message, image: :failed
|
60
60
|
end
|
61
61
|
|
62
62
|
end
|
data/lib/guard/tap/version.rb
CHANGED
@@ -41,20 +41,20 @@ describe Guard::Tap::Runner do
|
|
41
41
|
it 'calls UI and Notifier' do
|
42
42
|
Guard::UI.should_receive(:info).with('hi')
|
43
43
|
Guard::Notifier.should_receive(:notify).with('hi', foo: 'bar')
|
44
|
-
runner.notify 'hi', foo: 'bar'
|
44
|
+
runner.notify :info, 'hi', foo: 'bar'
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
48
|
describe '#notify_success' do
|
49
49
|
it 'calls notify with image: success' do
|
50
|
-
runner.should_receive(:notify).with('hi', image: :success)
|
50
|
+
runner.should_receive(:notify).with(:info, 'hi', image: :success)
|
51
51
|
runner.notify_success('hi')
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
55
|
describe '#notify_error' do
|
56
56
|
it 'calls notify with image: failed' do
|
57
|
-
runner.should_receive(:notify).with('hi', image: :failed)
|
57
|
+
runner.should_receive(:notify).with(:error, 'hi', image: :failed)
|
58
58
|
runner.notify_error('hi')
|
59
59
|
end
|
60
60
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-tap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
segments:
|
146
146
|
- 0
|
147
|
-
hash:
|
147
|
+
hash: 268043442950140840
|
148
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
version: '0'
|
154
154
|
segments:
|
155
155
|
- 0
|
156
|
-
hash:
|
156
|
+
hash: 268043442950140840
|
157
157
|
requirements: []
|
158
158
|
rubyforge_project:
|
159
159
|
rubygems_version: 1.8.25
|