xlogin 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xlogin/factory.rb +8 -5
- data/lib/xlogin/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f42c5865068748beef0105170a86a417541a2e5795bd2255c8922a8a087580df
|
4
|
+
data.tar.gz: 58fc9bd6cc07cfb251cf296d002337b4fefcd44f558ffcc6a3ccbc18a2c06dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a05591f833bf303edf41aca096d3c79bf8367fc4d97efdd9ce32b86016d63fb2b57932c716039c1566ded07b831c88a666a60fadc5001331a22db91e3d40cf9
|
7
|
+
data.tar.gz: 1f4288e96bdb275dae475772dd3c3e161a0ad48916ed1ce8e90b5e93afec6cc550b09271d8cb3232053cd4997c2dfa6b3e9931988302ce68c25e8143fc60b7fc
|
data/lib/xlogin/factory.rb
CHANGED
@@ -25,12 +25,15 @@ module Xlogin
|
|
25
25
|
def list_inventory(*patterns)
|
26
26
|
return @inventory.values if patterns.empty?
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
values1 = patterns.map do |pattern|
|
29
|
+
values2 = pattern.split(',').map do |entry|
|
30
|
+
key, val = entry.to_s.split(':')
|
31
|
+
key, val = 'name', key if val.nil?
|
32
|
+
@inventory.values.select { |e| File.fnmatch(val, e[key.to_sym]) }
|
33
|
+
end
|
34
|
+
values2.reduce(&:&)
|
32
35
|
end
|
33
|
-
|
36
|
+
values1.reduce(&:|)
|
34
37
|
end
|
35
38
|
|
36
39
|
def set_template(name, text = nil, &block)
|
data/lib/xlogin/version.rb
CHANGED