scutil 0.2.1 → 0.2.2
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.
- data/CHANGELOG +5 -0
- data/lib/scutil.rb +17 -2
- metadata +2 -2
data/CHANGELOG
CHANGED
data/lib/scutil.rb
CHANGED
@@ -55,6 +55,11 @@ module Scutil
|
|
55
55
|
end
|
56
56
|
false
|
57
57
|
end
|
58
|
+
|
59
|
+
# Remove all instances of _hostname_.
|
60
|
+
def remove(hostname)
|
61
|
+
@cache.delete_if { |c| c.hostname == hostname }
|
62
|
+
end
|
58
63
|
|
59
64
|
def <<(conn)
|
60
65
|
@cache << conn
|
@@ -65,7 +70,7 @@ module Scutil
|
|
65
70
|
end
|
66
71
|
end
|
67
72
|
|
68
|
-
SCUTIL_VERSION = '0.2.
|
73
|
+
SCUTIL_VERSION = '0.2.2'
|
69
74
|
# By default, buffer 10M of data before writing.
|
70
75
|
DEFAULT_OUTPUT_BUFFER_SIZE = 0xA00000
|
71
76
|
# Checks for a command starting with _sudo_ by default.
|
@@ -200,7 +205,16 @@ module Scutil
|
|
200
205
|
return options[:scutil_force_pty] ? true : false
|
201
206
|
end
|
202
207
|
end
|
203
|
-
|
208
|
+
|
209
|
+
# Drops all instances of +hostname+ from connection_cache.
|
210
|
+
def clear!(hostname)
|
211
|
+
if (Scutil.connection_cache.exists?(hostname))
|
212
|
+
Scutil.connection_cache.clear(hostname)
|
213
|
+
else
|
214
|
+
raise Scutil::Error.new("Error: :scutil_pty_regex must be a kind of Regexp", hostname)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
204
218
|
# Scutil.exec_command is used to execute a command, specified in
|
205
219
|
# _cmd_, on a remote system. The return value and any ouput of
|
206
220
|
# the command are captured.
|
@@ -318,6 +332,7 @@ module Scutil
|
|
318
332
|
end
|
319
333
|
|
320
334
|
channel.exec(cmd)
|
335
|
+
# channel.wait
|
321
336
|
end
|
322
337
|
|
323
338
|
conn.loop
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: scutil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Marc Soda
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-09-
|
13
|
+
date: 2011-09-25 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: net-ssh
|