xlogin 0.16.5 → 0.16.6

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: 6ef44033bfbc542654526a3a009b4400b813b3919beeac902aa38b4a68937ed6
4
- data.tar.gz: 5d71ff7e0f4acd38e0370fec946ed13165615bfc4d955047fb29a8f63296cef9
3
+ metadata.gz: f7bc26b26eaaf13f1577ebe322b44a888dd5c83426f81d484372e582bb8a1182
4
+ data.tar.gz: d3bfdb0e28a4857f2411c59567e0a54e70b94dc580f64b6c963b8e439919f85f
5
5
  SHA512:
6
- metadata.gz: 47d8c407ed8167173641c237eb07a0874d995b53b96191104961a29628b0514caa5bfc5b1c547afceba3bbf388fd31c64ae301e7e7dd4068ee744ed3825c3fb8
7
- data.tar.gz: 7a42ce312379c15c7faf1845dbd76dc29c9c1b407bfcdd684ba9563d259f201ef06a3feadab90139c490ca2bdf952efcbd4695cd302b5e8bfb577dba19cbc8e9
6
+ metadata.gz: 15af0c59968c287bcfb69f422e21de121ae893848b98c6bd6629d33809d4c0939a7a70ed88dd1a49da9e00a02e67bc01cddcce6119ac97396e672a523148a1db
7
+ data.tar.gz: 49794803c350a64a7f70d13223ad736b5950eab2e53ff4c090d2673f5fb179b979040c66a67514c9a86881b0954de93a3fe68d1872241e3ac2c1555ca71afd87
@@ -10,21 +10,21 @@ module Xlogin
10
10
  class << self
11
11
  include Rake::DSL
12
12
 
13
- def all(*patterns, &block)
13
+ def all(*patterns, **opts, &block)
14
14
  description = Rake.application.last_description
15
15
  task all: Xlogin.list(*patterns).map{ |e| e[:name] }
16
16
 
17
17
  desc description
18
- generate(*patterns, &block)
18
+ generate(*patterns, **opts, &block)
19
19
  end
20
20
 
21
- def generate(*patterns, &block)
21
+ def generate(*patterns, **opts, &block)
22
22
  description = Rake.application.last_description
23
23
 
24
24
  hostnames = Xlogin.list(*patterns).map{ |e| e[:name] }
25
25
  hostnames.each do |hostname|
26
26
  desc "#{description} - #{hostname}" if description
27
- RakeTask.new(hostname, &block)
27
+ RakeTask.new(hostname, **opts, &block)
28
28
  end
29
29
  end
30
30
 
@@ -40,14 +40,13 @@ module Xlogin
40
40
  attr_reader :name
41
41
  attr_accessor :log
42
42
  attr_accessor :lock
43
- attr_accessor :timeout
44
43
  attr_accessor :silent
45
44
  attr_accessor :fail_on_error
46
45
 
47
- def initialize(name)
46
+ def initialize(name, **opts)
48
47
  @name = name
48
+ @opts = opts
49
49
  @runner = nil
50
- @timeout = nil
51
50
  @silent ||= Rake.application.options.silent
52
51
  @fail_on_error = true
53
52
 
@@ -91,7 +90,7 @@ module Xlogin
91
90
  loggers << log if log
92
91
  loggers << STDOUT if !silent && !Rake.application.options.always_multitask
93
92
 
94
- session = Xlogin.get(name, log: loggers, timeout: timeout)
93
+ session = Xlogin.get(name, log: loggers, **@opts)
95
94
  instance_exec(session, &@runner)
96
95
 
97
96
  print(buffer.string) if !silent && Rake.application.options.always_multitask
@@ -1,3 +1,3 @@
1
1
  module Xlogin
2
- VERSION = "0.16.5"
2
+ VERSION = "0.16.6"
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.16.5
4
+ version: 0.16.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - haccht
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-16 00:00:00.000000000 Z
11
+ date: 2021-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-telnet