guard 2.10.3 → 2.10.4

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: 12901ae839ae58fdc3f18c932ffc1aef5fbd5f93
4
- data.tar.gz: 05665929d7b77277aa5cd37156e6984b11651379
3
+ metadata.gz: 6fc0ad2fbda04c8ee81a66a51ab6bb8a084e1424
4
+ data.tar.gz: 3da8cfbf2e1014f8c0ac1bf16669514537474dd9
5
5
  SHA512:
6
- metadata.gz: 8d850a23954953c2a6b2ba15813ee408d8fa29d8a85dec0c15b5fb68ab7e51b7bc2e1cb87951975991e5ac24305e58b99ac41088f7e2c96b1f662119e3ad924f
7
- data.tar.gz: 067ca85ff9546dfedd73972e87acdf97c6aa48cdbfa3ea6475df7280bd8f52bab9b587bd0117511b12410f6bb79c781c8c46e88c6e3fc0698f569fefddf75a99
6
+ metadata.gz: 36a8be8f123f47f11d4051d502f5063fd4afea3e1c1d8305cfae527d6763338b7cd01b4411361b765283de0e90462f27b9a6707a1a33591f0ca9dfb69e5f4076
7
+ data.tar.gz: 338cd2c5a62a03bc7a922398537b98decf56c1543e304c04cd3b60e54c6efc9b69e395d6b6bb36429bc55af3c5adcf09a69696b87da035d52cad0fd61d3454b7
@@ -11,8 +11,8 @@ module Guard
11
11
 
12
12
  def to_hash
13
13
  {
14
- plugins: _build_scope(:plugin),
15
- groups: _build_scope(:group)
14
+ plugins: _hashify_scope(:plugin),
15
+ groups: _hashify_scope(:group)
16
16
  }.dup.freeze
17
17
  end
18
18
 
@@ -72,7 +72,7 @@ module Guard
72
72
 
73
73
  # TODO: let the Plugins and Groups classes handle this?
74
74
  # TODO: why even instantiate?? just to check if it exists?
75
- def _build_scope(type)
75
+ def _hashify_scope(type)
76
76
  # TODO: get cmdline passed to initialize above?
77
77
  cmdline = Array(Guard.state.session.send("cmdline_#{type}s"))
78
78
  guardfile = Guard.state.session.send(:"guardfile_#{type}_scope")
@@ -87,8 +87,13 @@ module Guard
87
87
  # TODO: not tested when groups/plugins given don't exist
88
88
 
89
89
  # TODO: should already be instantiated
90
- Array(items).map do |name|
91
- (type == :group ? _groups : _plugins).all(name).first
90
+ Array(items).map do |obj|
91
+ if obj.respond_to?(:name)
92
+ obj
93
+ else
94
+ name = obj
95
+ (type == :group ? _groups : _plugins).all(name).first
96
+ end
92
97
  end.compact
93
98
  end
94
99
 
@@ -1,3 +1,3 @@
1
1
  module Guard
2
- VERSION = "2.10.3"
2
+ VERSION = "2.10.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.10.3
4
+ version: 2.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibaud Guillaume-Gentil