xlogin 0.11.7 → 0.11.8

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
  SHA256:
3
- metadata.gz: 6fb6b0b2b1b8ca4e21cabb2b4888092cf2d0858da9a69aa050c77a97b7a018f7
4
- data.tar.gz: e30fe43223d680c1c7ca1c404a60cffceb5748832ada7db4b30d5e49a5a47267
3
+ metadata.gz: 8fd335318689c026b7aa162b99de3a54e4ae760123fef926775bb7cd4d433b49
4
+ data.tar.gz: 9f343da2fdd052cd9dfb4cc7d7e66de7a2f839549603d9313eaca7b116965f40
5
5
  SHA512:
6
- metadata.gz: 68cf84fc489f32734d16dec2e99e7760a976cbed54846dacd1ba9131aa717c8f864b63f3f5174a4a7495caa26f881625f9da4ffb5e2ec3fc5b461eb1f960c8bc
7
- data.tar.gz: 79654b10f48a5e02254adc9b394f8a456ea32af5aef6575972e2749ced574011c3f5dbfd4aa4f213646f77b2548274c79e5ee9f98301c04530f383f83bc448b4
6
+ metadata.gz: 70ba27017719f0c4a1f0a384d2b1c90ccf3afbd753c712ff1e72b5d26a4696a811b4510ff41712107def86a08835d7e558e59a0f3e4e9e323804932251a142e7
7
+ data.tar.gz: 8406f62ad439bc9b075519f0b4be068408bf7ddd315b538b0ac9316ce2e6c33e3c135e59460604e2351edb236923f37e076c063c5b9c1d57bef60a21bb354d6c
@@ -26,6 +26,7 @@ module Xlogin
26
26
  attr_reader :name
27
27
  attr_accessor :lock
28
28
  attr_accessor :log
29
+ attr_accessor :timeout
29
30
  attr_accessor :silent
30
31
  attr_accessor :fail_on_error
31
32
 
@@ -34,6 +35,7 @@ module Xlogin
34
35
  def initialize(name)
35
36
  @name = name
36
37
  @runner = nil
38
+ @timeout = nil
37
39
  @silent ||= Rake.application.options.silent
38
40
  @fail_on_error = true
39
41
 
@@ -69,13 +71,16 @@ module Xlogin
69
71
  end
70
72
 
71
73
  def run_task
72
- buffer = StringIO.new
73
- loggers = []
74
- loggers << log if log
75
- loggers << buffer if !silent && Rake.application.options.always_multitask
76
- loggers << $stdout if !silent && !Rake.application.options.always_multitask
74
+ buffer = StringIO.new
77
75
 
78
- session = Xlogin.get(name, log: loggers)
76
+ args = Hash.new
77
+ args[:log] = []
78
+ args[:log] << log if log
79
+ args[:log] << buffer if !silent && Rake.application.options.always_multitask
80
+ args[:log] << $stdout if !silent && !Rake.application.options.always_multitask
81
+ args[:timeout] = timeout if timeout
82
+
83
+ session = Xlogin.get(name, **args)
79
84
  @runner.call(session)
80
85
  session.close rescue nil
81
86
 
data/lib/xlogin/spec.rb CHANGED
@@ -45,6 +45,7 @@ module Xlogin
45
45
  def expect(*args)
46
46
  Expectation.new(self, *args)
47
47
  end
48
+ alias_method :exp, :expect
48
49
 
49
50
  end
50
51
  end
@@ -1,3 +1,3 @@
1
1
  module Xlogin
2
- VERSION = "0.11.7"
2
+ VERSION = "0.11.8"
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.11.7
4
+ version: 0.11.8
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-10 00:00:00.000000000 Z
11
+ date: 2019-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-telnet