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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d126e8ee210944ba24296943a76dd584da6dbd4e
4
- data.tar.gz: e69decc7e4b43d9cb6eb97ee7cdb2939923f1f29
3
+ metadata.gz: 768372ae0e0beea64f279eeb4a905817ed43c6bd
4
+ data.tar.gz: 7c770228573a6f6123d5348bca3c91bc51fb07bc
5
5
  SHA512:
6
- metadata.gz: 14a93627a3ec082efa06630de14191806b1e12aa3add2829f0480b688e574e5b75f3034391e9a3124705a63d196746f30ed3c4564d5f4661b687640d239af07e
7
- data.tar.gz: e07f1eefedd465e3930677debf7d0d62071df731236a66f1e16dcc62249f170e3baf74a21a9a1d90a96335de8f4febe578072c1e0353472a88b20076d3ded197
6
+ metadata.gz: d29a66b72dd75355c57fd6d9f531849974822a9e91684b877d515843b533107777368a1dc6c4020db15530046b054b5c23ce4ca7510788636474096b7dddb9c2
7
+ data.tar.gz: 44151f39dba72b73a1acbd834fc0b06474cfb6d64d65b0e868128b3129f36c8a659be26bf568ebb5747522f1dc9de781bde09794c37d381e163d8e93e03e1003
@@ -1,30 +1,37 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- guard-shotgun (0.3.1)
4
+ guard-shotgun (0.4.0)
5
5
  ffi
6
- guard (~> 1.0)
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 (1.8.3)
21
+ guard (2.5.1)
17
22
  formatador (>= 0.2.4)
18
- listen (~> 1.3)
19
- lumberjack (>= 1.0.2)
20
- pry (>= 0.9.10)
21
- thor (>= 0.14.6)
22
- listen (1.3.1)
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.3.1
1
+ 0.4.0
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
22
22
  gem.require_paths = ["lib"]
23
23
  gem.required_ruby_version = '>= 1.9'
24
24
 
25
- gem.add_dependency 'guard', "~> 1.0"
25
+ gem.add_dependency 'guard', '~> 2.0'
26
26
  gem.add_dependency 'ffi'
27
27
  gem.add_dependency 'spoon'
28
28
 
@@ -1,19 +1,19 @@
1
1
  require 'guard'
2
- require 'guard/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 < Guard
8
+ class Shotgun < Plugin
9
9
  VALID_ARGS = %w{server host port env daemonize pid option}
10
10
 
11
- require File.expand_path('../shotgun/notifier', __FILE__)
11
+ require 'guard/shotgun/notifier'
12
12
  attr_accessor :pid
13
13
 
14
14
  STARTUP_TIMEOUT = 10 # seconds
15
15
 
16
- def initialize(watchers=[], options={})
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
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module ShotgunVersion
3
- VERSION = '0.3.1'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -3,7 +3,7 @@ source "http://rubygems.org"
3
3
  gem 'sinatra', :require => "sinatra/base"
4
4
 
5
5
  group :development, :test do
6
- gem 'guard', '~> 1'
6
+ gem 'guard', '~> 2.0'
7
7
 
8
8
  # Requirements for the manually inserted guard-shotgun
9
9
  gem 'spoon'
@@ -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 (1.8.3)
12
+ guard (2.5.1)
8
13
  formatador (>= 0.2.4)
9
- listen (~> 1.3)
10
- lumberjack (>= 1.0.2)
11
- pry (>= 0.9.10)
12
- thor (>= 0.14.6)
13
- listen (1.3.1)
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 (~> 1)
52
+ guard (~> 2.0)
47
53
  sinatra
48
54
  spoon
@@ -1,5 +1,6 @@
1
- require File.expand_path('../../../lib/guard/shotgun', __FILE__)
1
+ $LOAD_PATH << File.expand_path('../../lib', __dir__)
2
+ require 'guard/shotgun'
2
3
 
3
4
  guard 'shotgun' do
4
5
  watch(%r{^(app|assets|lib|config)/(.)*.(rb|css|js|haml)})
5
- end
6
+ end
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.3.1
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: '1.0'
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: '1.0'
27
+ version: '2.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: ffi
30
30
  requirement: !ruby/object:Gem::Requirement