xlogin 0.11.9 → 0.11.11
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 +4 -4
- data/lib/xlogin/rake_task.rb +18 -12
- 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: d6dae2d182fa540c1ede9d1bb18eef34307a333b5f9981de501491824e576c62
|
4
|
+
data.tar.gz: 5a35f8146697e899a1b406083b99b35e4ff2e5e217e8d3ec8116d230b0e80aed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfba33b9fd36cb0725c4adc94ba2b300085aa115eff051694969ca3e46943fe4c8b2f2d6d653bfeb9cbd72e9c7fc8f423b23310cdfa9729c3d4c7a9dc110f0b6
|
7
|
+
data.tar.gz: b1b6ef3733cd9dd2cbb8396bfd71e43b7063fdd59c605672f1b92295d43a9a0137a1eb457b9401c2599c90a695678e184a445cc10d4686eec4ebcc6bcbb462f7
|
data/lib/xlogin/rake_task.rb
CHANGED
@@ -21,6 +21,21 @@ module Xlogin
|
|
21
21
|
end
|
22
22
|
|
23
23
|
end
|
24
|
+
|
25
|
+
def printf(fp, text)
|
26
|
+
time = Time.now.iso8601
|
27
|
+
lines = text.lines
|
28
|
+
lines.pop if lines[-1] == "\n"
|
29
|
+
|
30
|
+
lines = lines.map do |line|
|
31
|
+
str = time
|
32
|
+
str << " #{name}" if Rake.application.options.always_multitask
|
33
|
+
str << " |#{line.gsub(/^\s*[\r\n]+/, '')}"
|
34
|
+
end
|
35
|
+
|
36
|
+
fp.print "\n"
|
37
|
+
fp.print lines.join("\n")
|
38
|
+
end
|
24
39
|
end
|
25
40
|
|
26
41
|
attr_reader :name
|
@@ -84,22 +99,13 @@ module Xlogin
|
|
84
99
|
@runner.call(session)
|
85
100
|
session.close rescue nil
|
86
101
|
|
87
|
-
printf($stdout, buffer.string) if !silent && Rake.application.options.always_multitask
|
102
|
+
RakeTask.printf($stdout, buffer.string) if !silent && Rake.application.options.always_multitask
|
88
103
|
rescue => e
|
89
|
-
printf($stderr, buffer.string) if !silent && Rake.application.options.always_multitask
|
90
|
-
printf($stderr, "
|
104
|
+
RakeTask.printf($stderr, buffer.string) if !silent && Rake.application.options.always_multitask
|
105
|
+
RakeTask.printf($stderr, "ERROR - #{e}\n")
|
91
106
|
|
92
107
|
@@graceful_shutdown = true if fail_on_error
|
93
108
|
end
|
94
109
|
|
95
|
-
def printf(fp, text)
|
96
|
-
time = Time.now.iso8601
|
97
|
-
text.each_line do |line|
|
98
|
-
fp.print "#{time} "
|
99
|
-
fp.print "#{name}\t" if Rake.application.options.always_multitask
|
100
|
-
fp.print "|#{line.chomp.gsub(/^\s*\r/, '')}\n"
|
101
|
-
end
|
102
|
-
end
|
103
|
-
|
104
110
|
end
|
105
111
|
end
|
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.11.
|
4
|
+
version: 0.11.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- haccht
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-telnet
|