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 +4 -4
- data/lib/guard/internals/scope.rb +10 -5
- data/lib/guard/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fc0ad2fbda04c8ee81a66a51ab6bb8a084e1424
|
4
|
+
data.tar.gz: 3da8cfbf2e1014f8c0ac1bf16669514537474dd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
15
|
-
groups:
|
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
|
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 |
|
91
|
-
|
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
|
|
data/lib/guard/version.rb
CHANGED