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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7597d72f3e0fa7ac0983b0a40841d05e97d4ca089586e941dc4d9fa832d33ffe
4
- data.tar.gz: 6db438d3ef936a944eeca47856e62f1d0838b80d9b1e5327e37ed2245a5fb7bb
3
+ metadata.gz: f42c5865068748beef0105170a86a417541a2e5795bd2255c8922a8a087580df
4
+ data.tar.gz: 58fc9bd6cc07cfb251cf296d002337b4fefcd44f558ffcc6a3ccbc18a2c06dfc
5
5
  SHA512:
6
- metadata.gz: 4755b483886ba979e6e8fb040923b5b7c53f6e8364eff68184dccb96011d62a39e23570825bcad3e45980318e7b1b6e91797568466f632b16f580ae03decd472
7
- data.tar.gz: a68ea30752d1f4c0223dedd8a5e4d4b279d5230231b6c45a57d382a5b0009c4c3ff8285a1ea2a88aecd95759087099e854d6cb41346276963675769fa2d9eb1c
6
+ metadata.gz: 3a05591f833bf303edf41aca096d3c79bf8367fc4d97efdd9ce32b86016d63fb2b57932c716039c1566ded07b831c88a666a60fadc5001331a22db91e3d40cf9
7
+ data.tar.gz: 1f4288e96bdb275dae475772dd3c3e161a0ad48916ed1ce8e90b5e93afec6cc550b09271d8cb3232053cd4997c2dfa6b3e9931988302ce68c25e8143fc60b7fc
@@ -25,12 +25,15 @@ module Xlogin
25
25
  def list_inventory(*patterns)
26
26
  return @inventory.values if patterns.empty?
27
27
 
28
- values = patterns.map do |pattern|
29
- key, val = pattern.to_s.split(':')
30
- key, val = 'name', key if val.nil?
31
- val.split(',').map { |e| @inventory.values.select { |info| File.fnmatch(e, info[key.to_sym]) } }.reduce(&:|)
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
- values.reduce(&:&).uniq
36
+ values1.reduce(&:|)
34
37
  end
35
38
 
36
39
  def set_template(name, text = nil, &block)
@@ -1,3 +1,3 @@
1
1
  module Xlogin
2
- VERSION = "0.11.0"
2
+ VERSION = "0.11.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xlogin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - haccht