pagoda-tunnel 0.1.1 → 0.1.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/lib/pagoda-tunnel.rb +11 -5
- metadata +6 -6
data/lib/pagoda-tunnel.rb
CHANGED
@@ -4,7 +4,7 @@ require 'openssl'
|
|
4
4
|
|
5
5
|
module Pagoda
|
6
6
|
class Tunnel
|
7
|
-
VERSION = "0.1.
|
7
|
+
VERSION = "0.1.2"
|
8
8
|
# Your code goes here...
|
9
9
|
|
10
10
|
def initialize(type, user, pass, app, instance, port = 3306)
|
@@ -47,7 +47,7 @@ module Pagoda
|
|
47
47
|
puts "Tunnel Closed."
|
48
48
|
puts "-----------------------------------------------"
|
49
49
|
puts
|
50
|
-
|
50
|
+
exit
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
@@ -59,9 +59,15 @@ module Pagoda
|
|
59
59
|
|
60
60
|
chunk = 4096*4096*2
|
61
61
|
|
62
|
-
#
|
63
|
-
#
|
64
|
-
|
62
|
+
# If we are running on windows checking available ports does not work
|
63
|
+
# thus we must just attempt a few times and fail if we cant we start at a high number and pray it works :)
|
64
|
+
|
65
|
+
if RUBY_PLATFORM =~ /mswin32|mingw32/ # running on windows
|
66
|
+
@port = 45000
|
67
|
+
else
|
68
|
+
@port = next_available_port(@port)
|
69
|
+
end
|
70
|
+
|
65
71
|
retrys = 0
|
66
72
|
begin
|
67
73
|
proxy_server = TCPServer.new('0.0.0.0', @port)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pagoda-tunnel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-14 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2154226360 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2154226360
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rest-client
|
27
|
-
requirement: &
|
27
|
+
requirement: &2154225040 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2154225040
|
36
36
|
description: Pagodabox container tunnel. Allows users to tunnel into pagodabox db's.
|
37
37
|
email:
|
38
38
|
- lyon@delorum.com
|