guard-shotgun 0.3.1 → 0.4.0
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/Gemfile.lock +17 -11
- data/README.md +9 -0
- data/VERSION +1 -1
- data/guard-shotgun.gemspec +1 -1
- data/lib/guard/shotgun.rb +4 -4
- data/lib/guard/shotgun/notifier.rb +11 -7
- data/lib/guard/shotgun/version.rb +1 -1
- data/spec/dummy_app/Gemfile +1 -1
- data/spec/dummy_app/Gemfile.lock +16 -10
- data/spec/dummy_app/Guardfile +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 768372ae0e0beea64f279eeb4a905817ed43c6bd
|
4
|
+
data.tar.gz: 7c770228573a6f6123d5348bca3c91bc51fb07bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d29a66b72dd75355c57fd6d9f531849974822a9e91684b877d515843b533107777368a1dc6c4020db15530046b054b5c23ce4ca7510788636474096b7dddb9c2
|
7
|
+
data.tar.gz: 44151f39dba72b73a1acbd834fc0b06474cfb6d64d65b0e868128b3129f36c8a659be26bf568ebb5747522f1dc9de781bde09794c37d381e163d8e93e03e1003
|
data/Gemfile.lock
CHANGED
@@ -1,30 +1,37 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
guard-shotgun (0.
|
4
|
+
guard-shotgun (0.4.0)
|
5
5
|
ffi
|
6
|
-
guard (~>
|
6
|
+
guard (~> 2.0)
|
7
7
|
spoon
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
+
celluloid (0.15.2)
|
13
|
+
timers (~> 1.1.0)
|
14
|
+
celluloid-io (0.15.0)
|
15
|
+
celluloid (>= 0.15.0)
|
16
|
+
nio4r (>= 0.5.0)
|
12
17
|
coderay (1.1.0)
|
13
18
|
diff-lcs (1.2.5)
|
14
19
|
ffi (1.9.3)
|
15
20
|
formatador (0.2.5)
|
16
|
-
guard (
|
21
|
+
guard (2.5.1)
|
17
22
|
formatador (>= 0.2.4)
|
18
|
-
listen (~>
|
19
|
-
lumberjack (
|
20
|
-
pry (>= 0.9.
|
21
|
-
thor (>= 0.
|
22
|
-
listen (
|
23
|
+
listen (~> 2.6)
|
24
|
+
lumberjack (~> 1.0)
|
25
|
+
pry (>= 0.9.12)
|
26
|
+
thor (>= 0.18.1)
|
27
|
+
listen (2.7.1)
|
28
|
+
celluloid (>= 0.15.2)
|
29
|
+
celluloid-io (>= 0.15.0)
|
23
30
|
rb-fsevent (>= 0.9.3)
|
24
31
|
rb-inotify (>= 0.9)
|
25
|
-
rb-kqueue (>= 0.2)
|
26
32
|
lumberjack (1.0.9)
|
27
33
|
method_source (0.8.2)
|
34
|
+
nio4r (1.0.0)
|
28
35
|
pry (0.10.1)
|
29
36
|
coderay (~> 1.1.0)
|
30
37
|
method_source (~> 0.8.1)
|
@@ -33,8 +40,6 @@ GEM
|
|
33
40
|
rb-fsevent (0.9.4)
|
34
41
|
rb-inotify (0.9.5)
|
35
42
|
ffi (>= 0.5.0)
|
36
|
-
rb-kqueue (0.2.3)
|
37
|
-
ffi (>= 0.5.0)
|
38
43
|
rspec (3.1.0)
|
39
44
|
rspec-core (~> 3.1.0)
|
40
45
|
rspec-expectations (~> 3.1.0)
|
@@ -51,6 +56,7 @@ GEM
|
|
51
56
|
spoon (0.0.4)
|
52
57
|
ffi
|
53
58
|
thor (0.19.1)
|
59
|
+
timers (1.1.0)
|
54
60
|
|
55
61
|
PLATFORMS
|
56
62
|
ruby
|
data/README.md
CHANGED
@@ -85,6 +85,15 @@ This way, you can check it's working correctly. You can play with the `spec/dumm
|
|
85
85
|
|
86
86
|
## History
|
87
87
|
|
88
|
+
#### 0.4.0
|
89
|
+
|
90
|
+
* Merged PR with the changes to make it compatible with Guard 2. Thanks to
|
91
|
+
@jnv!
|
92
|
+
|
93
|
+
#### 0.3.1
|
94
|
+
|
95
|
+
* Merged PR fixing issue with Spoon
|
96
|
+
|
88
97
|
#### 0.3.0
|
89
98
|
|
90
99
|
* Adding dependency on Guard ~> 1.0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
data/guard-shotgun.gemspec
CHANGED
data/lib/guard/shotgun.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
require 'guard'
|
2
|
-
require 'guard/
|
2
|
+
require 'guard/plugin'
|
3
3
|
require 'spoon'
|
4
4
|
require 'socket'
|
5
5
|
require 'timeout'
|
6
6
|
|
7
7
|
module Guard
|
8
|
-
class Shotgun <
|
8
|
+
class Shotgun < Plugin
|
9
9
|
VALID_ARGS = %w{server host port env daemonize pid option}
|
10
10
|
|
11
|
-
require
|
11
|
+
require 'guard/shotgun/notifier'
|
12
12
|
attr_accessor :pid
|
13
13
|
|
14
14
|
STARTUP_TIMEOUT = 10 # seconds
|
15
15
|
|
16
|
-
def initialize(
|
16
|
+
def initialize(options={})
|
17
17
|
super
|
18
18
|
@options = {
|
19
19
|
host: 'localhost',
|
@@ -1,7 +1,17 @@
|
|
1
1
|
module Guard
|
2
|
-
class Shotgun
|
2
|
+
class Shotgun < Plugin
|
3
3
|
class Notifier
|
4
4
|
|
5
|
+
def self.notify(result)
|
6
|
+
message = guard_message(result)
|
7
|
+
options = {
|
8
|
+
title: 'guard-shotgun',
|
9
|
+
image: guard_image(result)
|
10
|
+
}
|
11
|
+
|
12
|
+
::Guard::Notifier.notify(message, options)
|
13
|
+
end
|
14
|
+
|
5
15
|
def self.guard_message(result)
|
6
16
|
case result
|
7
17
|
when 'up'
|
@@ -23,12 +33,6 @@ module Guard
|
|
23
33
|
end
|
24
34
|
end
|
25
35
|
|
26
|
-
def self.notify(result)
|
27
|
-
message = guard_message(result)
|
28
|
-
image = guard_image(result)
|
29
|
-
|
30
|
-
::Guard::Notifier.notify(message, :title => 'guard-shotgun', :image => image)
|
31
|
-
end
|
32
36
|
end
|
33
37
|
end
|
34
38
|
end
|
data/spec/dummy_app/Gemfile
CHANGED
data/spec/dummy_app/Gemfile.lock
CHANGED
@@ -1,21 +1,28 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
+
celluloid (0.15.2)
|
5
|
+
timers (~> 1.1.0)
|
6
|
+
celluloid-io (0.15.0)
|
7
|
+
celluloid (>= 0.15.0)
|
8
|
+
nio4r (>= 0.5.0)
|
4
9
|
coderay (1.1.0)
|
5
10
|
ffi (1.9.3)
|
6
11
|
formatador (0.2.5)
|
7
|
-
guard (
|
12
|
+
guard (2.5.1)
|
8
13
|
formatador (>= 0.2.4)
|
9
|
-
listen (~>
|
10
|
-
lumberjack (
|
11
|
-
pry (>= 0.9.
|
12
|
-
thor (>= 0.
|
13
|
-
listen (
|
14
|
+
listen (~> 2.6)
|
15
|
+
lumberjack (~> 1.0)
|
16
|
+
pry (>= 0.9.12)
|
17
|
+
thor (>= 0.18.1)
|
18
|
+
listen (2.7.1)
|
19
|
+
celluloid (>= 0.15.2)
|
20
|
+
celluloid-io (>= 0.15.0)
|
14
21
|
rb-fsevent (>= 0.9.3)
|
15
22
|
rb-inotify (>= 0.9)
|
16
|
-
rb-kqueue (>= 0.2)
|
17
23
|
lumberjack (1.0.9)
|
18
24
|
method_source (0.8.2)
|
25
|
+
nio4r (1.0.0)
|
19
26
|
pry (0.10.1)
|
20
27
|
coderay (~> 1.1.0)
|
21
28
|
method_source (~> 0.8.1)
|
@@ -26,8 +33,6 @@ GEM
|
|
26
33
|
rb-fsevent (0.9.4)
|
27
34
|
rb-inotify (0.9.5)
|
28
35
|
ffi (>= 0.5.0)
|
29
|
-
rb-kqueue (0.2.3)
|
30
|
-
ffi (>= 0.5.0)
|
31
36
|
sinatra (1.4.5)
|
32
37
|
rack (~> 1.4)
|
33
38
|
rack-protection (~> 1.4)
|
@@ -37,12 +42,13 @@ GEM
|
|
37
42
|
ffi
|
38
43
|
thor (0.19.1)
|
39
44
|
tilt (1.4.1)
|
45
|
+
timers (1.1.0)
|
40
46
|
|
41
47
|
PLATFORMS
|
42
48
|
ruby
|
43
49
|
|
44
50
|
DEPENDENCIES
|
45
51
|
ffi
|
46
|
-
guard (~>
|
52
|
+
guard (~> 2.0)
|
47
53
|
sinatra
|
48
54
|
spoon
|
data/spec/dummy_app/Guardfile
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-shotgun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- romain@softr.li
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '2.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
|
-
version: '
|
27
|
+
version: '2.0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: ffi
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|