net-ssh-gateway 1.0.1 → 1.1.0

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.
@@ -1,3 +1,8 @@
1
+ === 1.1.0 / 30 Apr 2011
2
+
3
+ * Fix for sporadicly stalled SSH connections in Ruby 1.9 [Mat Trudel]
4
+ * Decrease wait time within Net::SSH session loop [Grant Hutchins, Michael Schubert]
5
+
1
6
  === 1.0.1 / 1 Feb 2009
2
7
 
3
8
  * Allow local port to be specified [Will Klancnik]
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ Echoe.new('net-ssh-gateway', version) do |p|
15
15
  p.changelog = "CHANGELOG.rdoc"
16
16
 
17
17
  p.author = "Jamis Buck"
18
- p.email = "jamis@jamisbuck.org"
18
+ p.email = "net-ssh-gateway@solutious.com"
19
19
  p.summary = "A simple library to assist in establishing tunneled Net::SSH connections"
20
20
  p.url = "http://net-ssh.rubyforge.org/gateway"
21
21
 
@@ -40,10 +40,10 @@ class Net::SSH::Gateway
40
40
  MAJOR = 1
41
41
 
42
42
  # The minor component of the library's version
43
- MINOR = 0
43
+ MINOR = 1
44
44
 
45
45
  # The tiny component of the library's version
46
- TINY = 1
46
+ TINY = 0
47
47
 
48
48
  # The library's version as a Version instance
49
49
  CURRENT = new(MAJOR, MINOR, TINY)
@@ -65,12 +65,17 @@ class Net::SSH::Gateway
65
65
  # are passed as given to that method to start up the gateway connection.
66
66
  #
67
67
  # gateway = Net::SSH::Gateway.new('host', 'user', :password => "password")
68
+ #
69
+ # As of 1.1 there is an additional option to specify the wait time for
70
+ # the gateway thread. The default is 0.001 seconds and can be changed
71
+ # with the :loop_wait option.
72
+ #
68
73
  def initialize(host, user, options={})
69
74
  @session = Net::SSH.start(host, user, options)
70
75
  @session_mutex = Mutex.new
71
76
  @port_mutex = Mutex.new
72
77
  @next_port = MAX_PORT
73
-
78
+ @loop_wait = options.delete(:loop_wait) || 0.001
74
79
  initiate_event_loop!
75
80
  end
76
81
 
@@ -190,8 +195,9 @@ class Net::SSH::Gateway
190
195
  @thread = Thread.new do
191
196
  while @active
192
197
  @session_mutex.synchronize do
193
- @session.process(0.1)
198
+ @session.process(@loop_wait)
194
199
  end
200
+ Thread.pass
195
201
  end
196
202
  end
197
203
  end
@@ -1,36 +1,33 @@
1
+ # -*- encoding: utf-8 -*-
2
+
1
3
  Gem::Specification.new do |s|
2
4
  s.name = %q{net-ssh-gateway}
3
- s.version = "1.0.1"
5
+ s.version = "1.1.0"
4
6
 
5
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
6
8
  s.authors = ["Jamis Buck"]
7
- s.date = %q{2009-02-01}
9
+ s.date = %q{2011-04-30}
8
10
  s.description = %q{A simple library to assist in establishing tunneled Net::SSH connections}
9
- s.email = %q{jamis@jamisbuck.org}
11
+ s.email = %q{net-ssh-gateway@solutious.com}
10
12
  s.extra_rdoc_files = ["CHANGELOG.rdoc", "lib/net/ssh/gateway.rb", "README.rdoc"]
11
13
  s.files = ["CHANGELOG.rdoc", "lib/net/ssh/gateway.rb", "Manifest", "Rakefile", "README.rdoc", "setup.rb", "test/gateway_test.rb", "net-ssh-gateway.gemspec"]
12
- s.has_rdoc = true
13
14
  s.homepage = %q{http://net-ssh.rubyforge.org/gateway}
14
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Net-ssh-gateway", "--main", "README.rdoc"]
15
16
  s.require_paths = ["lib"]
16
17
  s.rubyforge_project = %q{net-ssh-gateway}
17
- s.rubygems_version = %q{1.2.0}
18
+ s.rubygems_version = %q{1.5.2}
18
19
  s.summary = %q{A simple library to assist in establishing tunneled Net::SSH connections}
19
20
  s.test_files = ["test/gateway_test.rb"]
20
21
 
21
22
  if s.respond_to? :specification_version then
22
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
- s.specification_version = 2
23
+ s.specification_version = 3
24
24
 
25
- if current_version >= 3 then
25
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
26
  s.add_runtime_dependency(%q<net-ssh>, [">= 1.99.1"])
27
- s.add_development_dependency(%q<echoe>, [">= 0"])
28
27
  else
29
28
  s.add_dependency(%q<net-ssh>, [">= 1.99.1"])
30
- s.add_dependency(%q<echoe>, [">= 0"])
31
29
  end
32
30
  else
33
31
  s.add_dependency(%q<net-ssh>, [">= 1.99.1"])
34
- s.add_dependency(%q<echoe>, [">= 0"])
35
32
  end
36
33
  end
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-ssh-gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ prerelease:
5
+ version: 1.1.0
5
6
  platform: ruby
6
7
  authors:
7
8
  - Jamis Buck
@@ -9,31 +10,22 @@ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2009-02-01 00:00:00 -07:00
13
+ date: 2011-04-30 00:00:00 -04:00
13
14
  default_executable:
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: net-ssh
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
18
+ prerelease: false
19
+ requirement: &id001 !ruby/object:Gem::Requirement
20
+ none: false
20
21
  requirements:
21
22
  - - ">="
22
23
  - !ruby/object:Gem::Version
23
24
  version: 1.99.1
24
- version:
25
- - !ruby/object:Gem::Dependency
26
- name: echoe
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: "0"
34
- version:
25
+ type: :runtime
26
+ version_requirements: *id001
35
27
  description: A simple library to assist in establishing tunneled Net::SSH connections
36
- email: jamis@jamisbuck.org
28
+ email: net-ssh-gateway@solutious.com
37
29
  executables: []
38
30
 
39
31
  extensions: []
@@ -53,6 +45,8 @@ files:
53
45
  - net-ssh-gateway.gemspec
54
46
  has_rdoc: true
55
47
  homepage: http://net-ssh.rubyforge.org/gateway
48
+ licenses: []
49
+
56
50
  post_install_message:
57
51
  rdoc_options:
58
52
  - --line-numbers
@@ -64,23 +58,23 @@ rdoc_options:
64
58
  require_paths:
65
59
  - lib
66
60
  required_ruby_version: !ruby/object:Gem::Requirement
61
+ none: false
67
62
  requirements:
68
63
  - - ">="
69
64
  - !ruby/object:Gem::Version
70
65
  version: "0"
71
- version:
72
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
+ none: false
73
68
  requirements:
74
69
  - - ">="
75
70
  - !ruby/object:Gem::Version
76
71
  version: "1.2"
77
- version:
78
72
  requirements: []
79
73
 
80
74
  rubyforge_project: net-ssh-gateway
81
- rubygems_version: 1.2.0
75
+ rubygems_version: 1.5.2
82
76
  signing_key:
83
- specification_version: 2
77
+ specification_version: 3
84
78
  summary: A simple library to assist in establishing tunneled Net::SSH connections
85
79
  test_files:
86
80
  - test/gateway_test.rb