net-ssh-telnet 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 29d0a1186cd6ea45319c2afbdab046530200851d
4
- data.tar.gz: 8e2f7f9c996225aefc02c6bcaf3738c693ebc08f
2
+ SHA256:
3
+ metadata.gz: 10aec54d7c32b4a525b98057128d3da89e49fbd3f9b94933c086ed52ea8aafc4
4
+ data.tar.gz: 9a0b9a576e1f9dbb5e99266ba34b376201cee0a3ce7be5ceb22418d07498feb7
5
5
  SHA512:
6
- metadata.gz: ac0df2b1f5d6a5a7e2b64d5d401300aa97e6c5f6b563487ced4a1fdc2b62d04a725020ecce65c91fbe573ae5bd6a7c88e2dda5a355a54a8d5ebef5d2d6521e25
7
- data.tar.gz: f73a34decc609c1c853a36c6ff322e5d3c055ddfb44386fc882bd8689ad0ddbf10323e89d1d68af6ebd8a3e5d85081c5d0a3b26fe2290f15e6557ad7e32a5eba
6
+ metadata.gz: f390243d5ebf140299256ab4843055ea596cb8e55024038efbb0bf80da0b456d3e7911d1259e3ab0c672b6aca6bfe5da93504095245d0b01553e9337d424f3c0
7
+ data.tar.gz: f6b0e8cc9de3e02c1adec0d6d2ff290120d8a5583e584a62e855fffb35f4e9ab88b4cfa8d02bd6c106cb63c1c9f0b343ab8552443a675a235f250d3008c23987
data/History.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.3.0 / 2021-01-26
2
+ * Require net/protocol to ensure Net::ReadTimeout is available (patch from electricalen)
3
+ * Add option to not allocate PTY (patch from lumean)
4
+
1
5
  ### 0.2.1 / 2017-10-08
2
6
  * Add compatibility for net-ssh v4.2 (patch from haccht)
3
7
  * Add PTYOptions option (patch from Ben Miller)
@@ -1,4 +1,5 @@
1
1
  require 'net/ssh'
2
+ require 'net/protocol'
2
3
 
3
4
  module Net
4
5
  module SSH
@@ -147,6 +148,7 @@ module SSH
147
148
  # * <tt>"Timeout"</tt> - the time out value passed on to Net::SSH - also the default value for #waitfor(Default: 10)
148
149
  # * <tt>"Waittime"</tt> - Max time to wait after a possible prompt it seen to make sure more data isn't coming(Default: 0)
149
150
  # * <tt>"Terminator"</tt> - This value is appended to all strings that are sent to #print.(Default: LF)
151
+ # * <tt>"PTY"</tt> - If true a real Pty is allocated (ssh -T) otherwise only a shell is requested (Default: true)
150
152
  # * <tt>"Binmode"</tt> - Enable binary mode.(Default: false)
151
153
  # * <tt>"Output_log"</tt> - A file name to open as an output log.
152
154
  # * <tt>"Dump_log"</tt> - A file name to open to dump the entire session to.
@@ -163,6 +165,7 @@ module SSH
163
165
  @options["Timeout"] = 10 unless @options.has_key?("Timeout")
164
166
  @options["Waittime"] = 0 unless @options.has_key?("Waittime")
165
167
  @options["Terminator"] = LF unless @options.has_key?("Terminator")
168
+ @options["PTY"] = true unless @options.has_key?("PTY")
166
169
  @options["PTYOptions"] = {} unless @options.has_key?("PTYOptions")
167
170
 
168
171
  unless @options.has_key?("Binmode")
@@ -258,11 +261,13 @@ module SSH
258
261
  channel.on_data { |ch,data| @buf << data }
259
262
  channel.on_extended_data { |ch,type,data| @buf << data if type == 1 }
260
263
  channel.on_close { @eof = true }
261
- channel.request_pty(@options["PTYOptions"]) { |ch,success|
262
- if success == false
263
- raise "Failed to open ssh pty"
264
- end
265
- }
264
+ if @options["PTY"]
265
+ channel.request_pty(@options["PTYOptions"]) { |ch,success|
266
+ if success == false
267
+ raise "Failed to open ssh pty"
268
+ end
269
+ }
270
+ end
266
271
  channel.send_channel_request("shell") { |ch, success|
267
272
  if success
268
273
  @channel = ch
@@ -1,7 +1,7 @@
1
1
  module Net
2
2
  module SSH
3
3
  class Telnet
4
- VERSION = '0.2.1'
4
+ VERSION = '0.3.0'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh-telnet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Dilda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-09 00:00:00.000000000 Z
11
+ date: 2021-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh
@@ -83,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  requirements: []
86
- rubyforge_project:
87
- rubygems_version: 2.6.13
86
+ rubygems_version: 3.0.3
88
87
  signing_key:
89
88
  specification_version: 4
90
89
  summary: Provides Net::Telnet API for SSH connections