net-ssh-telnet2 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.yardopts +1 -0
- data/Gemfile +4 -0
- data/History.txt +4 -1
- data/lib/net/ssh/telnet.rb +4 -4
- data/net-ssh-telnet.gemspec +22 -0
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18549f4479417ad5fb5292754a895e46cde06e4e
|
4
|
+
data.tar.gz: 25047c4bbb17444ede9d091a04b2f00a6e7ae863
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d802e61e09252d54c245d2fb28d791c1a282bdc5e53bb7ab41a78d7b8959a1405cbda797e11db7ee337aaf7a46ef65ea87106f3e57f237e71b1e30389878c80a
|
7
|
+
data.tar.gz: 4166f895efeec38e9f44114c4e6c687c1d09a440f9f164253d5b6e084e01b112f4a81710e888b7eb4db423e2f45eeda966d75088d96c9472b0e41e47639ca59f
|
data/.gitignore
CHANGED
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
- History.txt
|
data/Gemfile
ADDED
data/History.txt
CHANGED
data/lib/net/ssh/telnet.rb
CHANGED
@@ -14,7 +14,7 @@ module SSH
|
|
14
14
|
CR = "\015"
|
15
15
|
LF = "\012"
|
16
16
|
EOL = CR + LF
|
17
|
-
VERSION = '0.1.
|
17
|
+
VERSION = '0.1.1'
|
18
18
|
|
19
19
|
# Wrapper to emulate the behaviour of Net::Telnet "Proxy" option, where
|
20
20
|
# the user passes in an already-open socket
|
@@ -252,6 +252,9 @@ module SSH
|
|
252
252
|
@eof = false
|
253
253
|
@channel = nil
|
254
254
|
@ssh.open_channel do |channel|
|
255
|
+
channel.on_data { |ch,data| @buf << data }
|
256
|
+
channel.on_extended_data { |ch,type,data| @buf << data if type == 1 }
|
257
|
+
channel.on_close { @eof = true }
|
255
258
|
channel.request_pty { |ch,success|
|
256
259
|
if success == false
|
257
260
|
raise "Failed to open ssh pty"
|
@@ -266,9 +269,6 @@ module SSH
|
|
266
269
|
raise "Failed to open ssh shell"
|
267
270
|
end
|
268
271
|
}
|
269
|
-
channel.on_data { |ch,data| @buf << data }
|
270
|
-
channel.on_extended_data { |ch,type,data| @buf << data if type == 1 }
|
271
|
-
channel.on_close { @eof = true }
|
272
272
|
end
|
273
273
|
@ssh.loop
|
274
274
|
end # initialize
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'net/ssh/telnet'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "net-ssh-telnet2"
|
8
|
+
spec.version = Net::SSH::Telnet::VERSION
|
9
|
+
spec.authors = ["Sean Dilda"]
|
10
|
+
spec.email = ["sean@duke.edu"]
|
11
|
+
spec.description = %q{A ruby module to provide a simple send/expect interface over SSH with an API almost identical to Net::Telnet. Ideally it should be a drop in replacement. Please see Net::Telnet for main documentation (included with ruby stdlib).}
|
12
|
+
spec.summary = %q{Provides Net::Telnet API for SSH connections}
|
13
|
+
spec.homepage = "https://github.com/duke-automation/net-ssh-telnet2"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
spec.extra_rdoc_files = ['README.txt', 'History.txt']
|
19
|
+
|
20
|
+
spec.add_runtime_dependency 'net-ssh', '>= 2.0.1'
|
21
|
+
spec.add_development_dependency 'rake'
|
22
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: net-ssh-telnet2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Dilda
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|
@@ -50,6 +50,8 @@ extra_rdoc_files:
|
|
50
50
|
- History.txt
|
51
51
|
files:
|
52
52
|
- ".gitignore"
|
53
|
+
- ".yardopts"
|
54
|
+
- Gemfile
|
53
55
|
- History.txt
|
54
56
|
- README.txt
|
55
57
|
- Rakefile
|
@@ -59,6 +61,7 @@ files:
|
|
59
61
|
- examples/get_hostname.rb
|
60
62
|
- examples/non_standard_shell.rb
|
61
63
|
- lib/net/ssh/telnet.rb
|
64
|
+
- net-ssh-telnet.gemspec
|
62
65
|
- test/test_net-ssh-telnet.rb
|
63
66
|
homepage: https://github.com/duke-automation/net-ssh-telnet2
|
64
67
|
licenses:
|
@@ -80,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
83
|
version: '0'
|
81
84
|
requirements: []
|
82
85
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
86
|
+
rubygems_version: 2.4.5
|
84
87
|
signing_key:
|
85
88
|
specification_version: 4
|
86
89
|
summary: Provides Net::Telnet API for SSH connections
|