xlogin 0.8.4 → 0.8.5

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: d0c4789d65178ce5f60077b6d9f1f066872a7e8f
4
- data.tar.gz: d41b0cdf51f5a566c84757104cb5094e1504ba1b
3
+ metadata.gz: 5d9fc0697e2772ea9b1f1805ada7a20e303b918b
4
+ data.tar.gz: 36f03a4395bf0c86bf7a5e9ab01d9407d1e8308f
5
5
  SHA512:
6
- metadata.gz: b9b3b1cf81d0f967cfaa2cfb3d630f1e1e1ede4abd3c5671b3b85eec429a5f5f6b088cf0fe763a61f6e8b1c6c977baa0b227f522465d38028347099fb47f3ca5
7
- data.tar.gz: 3005ee45108fc3c5f61b0c2abf0c77916db5a0561508274a9e9c4498d4c3dc7cc529136d3cf35f95a82ab6152f3c9c131772e952dc04ed85d5c74dfb5e6f355e
6
+ metadata.gz: edf73a4c3967628f47d3f3778eac4eed0f561867bd303ca19fd5c3c28a05050683bc5e4f3033d118d9d082d9fff2e1d8e9088e9045930bf5ced2a65c86f8c139
7
+ data.tar.gz: cb7eb1effbcbf380a500fa752a4ac47a7795d58a7a7058c7fe3a4652d02abafe12d4d8a43280154615b87fb51d8c27e445b2abc78d8bd9986c7d59a2bb8ce5a4
data/lib/xlogin/cli.rb CHANGED
@@ -64,7 +64,7 @@ module Xlogin
64
64
  load_templates(*config.templates.map { |file| File.expand_path(file, ENV['PWD']) })
65
65
  end
66
66
 
67
- config.hostlist = host.to_s.split(',').flat_map { |pattern| Xlogin.factory.list(pattern) }
67
+ config.hostlist = host.to_s.split(/\s+/).map { |pattern| Xlogin.factory.list(pattern) }.reduce(&:&)
68
68
  raise "No host found: `#{host}`" if config.hostlist.empty?
69
69
  rescue => e
70
70
  $stderr.puts e, '', parser
@@ -31,7 +31,7 @@ module Xlogin
31
31
  def list(pattern = nil)
32
32
  key, val = pattern.to_s.split(':')
33
33
  key, val = 'name', (key || '*') if val.nil?
34
- @database.values.select { |info| File.fnmatch(val, info[key.to_sym]) }
34
+ val.split(',').map { |e| @database.values.select { |info| File.fnmatch(e, info[key.to_sym]) } }.reduce(&:|)
35
35
  end
36
36
 
37
37
  def source_template(*files)
@@ -95,7 +95,7 @@ module Xlogin
95
95
  end
96
96
 
97
97
  def output(fp, text)
98
- prefix = (Rake.application.options.always_multitask)? "#{name}\t| " : ""
98
+ prefix = (Rake.application.options.always_multitask)? "#{name}\t|" : ""
99
99
  lines = text.lines.map { |line| "#{prefix}#{line.strip}\n" }
100
100
  lines.each { |line| $stdout.print line }
101
101
  end
@@ -1,3 +1,3 @@
1
1
  module Xlogin
2
- VERSION = "0.8.4"
2
+ VERSION = "0.8.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xlogin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - haccht
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-17 00:00:00.000000000 Z
11
+ date: 2018-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-telnet