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 +4 -4
- data/lib/xlogin/rake_task.rb +7 -8
- data/lib/xlogin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7bc26b26eaaf13f1577ebe322b44a888dd5c83426f81d484372e582bb8a1182
|
4
|
+
data.tar.gz: d3bfdb0e28a4857f2411c59567e0a54e70b94dc580f64b6c963b8e439919f85f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15af0c59968c287bcfb69f422e21de121ae893848b98c6bd6629d33809d4c0939a7a70ed88dd1a49da9e00a02e67bc01cddcce6119ac97396e672a523148a1db
|
7
|
+
data.tar.gz: 49794803c350a64a7f70d13223ad736b5950eab2e53ff4c090d2673f5fb179b979040c66a67514c9a86881b0954de93a3fe68d1872241e3ac2c1555ca71afd87
|
data/lib/xlogin/rake_task.rb
CHANGED
@@ -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,
|
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
|
data/lib/xlogin/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2021-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-telnet
|