tunnel-cf-plugin 0.3.0 → 0.3.1.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/helper-app/server.rb +5 -5
- data/lib/tunnel-cf-plugin/tunnel.rb +2 -4
- data/lib/tunnel-cf-plugin/version.rb +1 -1
- metadata +154 -133
data/helper-app/server.rb
CHANGED
@@ -10,7 +10,7 @@ require 'sinatra'
|
|
10
10
|
require 'json'
|
11
11
|
require 'eventmachine'
|
12
12
|
|
13
|
-
port = ENV['
|
13
|
+
port = ENV['PORT']
|
14
14
|
port ||= 8081
|
15
15
|
|
16
16
|
# add vcap specific stuff to Caldecott
|
@@ -24,19 +24,19 @@ class VcapHttpTunnel < Caldecott::Server::HttpTunnel
|
|
24
24
|
end
|
25
25
|
|
26
26
|
get '/services' do
|
27
|
-
services_env = ENV['
|
27
|
+
services_env = ENV['VCAP_SERVICES']
|
28
28
|
return "no services env" if services_env.nil? or services_env.empty?
|
29
29
|
services_env
|
30
30
|
end
|
31
31
|
|
32
32
|
get '/services/:service' do |service_name|
|
33
|
-
services_env = ENV['
|
33
|
+
services_env = ENV['VCAP_SERVICES']
|
34
34
|
not_found if services_env.nil?
|
35
35
|
|
36
|
-
services = JSON.parse(services_env)
|
36
|
+
services = JSON.parse(services_env).values.flatten(1)
|
37
37
|
service = services.find { |s| s["name"] == service_name }
|
38
38
|
not_found if service.nil?
|
39
|
-
service["
|
39
|
+
service["credentials"].to_json
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -128,11 +128,9 @@ class CFTunnel
|
|
128
128
|
|
129
129
|
app = @client.app
|
130
130
|
app.name = HELPER_NAME
|
131
|
-
app.
|
132
|
-
app.runtime = @client.runtime_by_name("ruby19")
|
133
|
-
app.command = "bundle exec ruby server.rb -p $VCAP_APP_PORT"
|
131
|
+
app.command = "bundle exec ruby server.rb"
|
134
132
|
app.total_instances = 1
|
135
|
-
app.memory =
|
133
|
+
app.memory = 128
|
136
134
|
app.env = { "CALDECOTT_AUTH" => token }
|
137
135
|
|
138
136
|
if is_v2
|
metadata
CHANGED
@@ -1,167 +1,180 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: tunnel-cf-plugin
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 190425765
|
5
|
+
prerelease: 6
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 1
|
10
|
+
- rc
|
11
|
+
- 1
|
12
|
+
version: 0.3.1.rc1
|
6
13
|
platform: ruby
|
7
|
-
authors:
|
14
|
+
authors:
|
8
15
|
- Alex Suraci
|
9
16
|
autorequire:
|
10
17
|
bindir: bin
|
11
18
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
19
|
+
|
20
|
+
date: 2013-04-12 00:00:00 Z
|
21
|
+
dependencies:
|
22
|
+
- !ruby/object:Gem::Dependency
|
15
23
|
name: cfoundry
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 0.6.0
|
22
|
-
type: :runtime
|
23
24
|
prerelease: false
|
24
|
-
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
25
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
hash: 190425843
|
31
|
+
segments:
|
32
|
+
- 0
|
33
|
+
- 6
|
34
|
+
- 1
|
35
|
+
- rc
|
36
|
+
- 2
|
37
|
+
version: 0.6.1.rc2
|
38
|
+
- - <
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
hash: 5
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
- 7
|
44
|
+
version: "0.7"
|
38
45
|
type: :runtime
|
46
|
+
version_requirements: *id001
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: addressable
|
39
49
|
prerelease: false
|
40
|
-
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ~>
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '2.2'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: caldecott-client
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
49
51
|
none: false
|
50
|
-
requirements:
|
52
|
+
requirements:
|
51
53
|
- - ~>
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
hash: 7
|
56
|
+
segments:
|
57
|
+
- 2
|
58
|
+
- 2
|
59
|
+
version: "2.2"
|
54
60
|
type: :runtime
|
61
|
+
version_requirements: *id002
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: caldecott-client
|
55
64
|
prerelease: false
|
56
|
-
|
65
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
66
|
none: false
|
58
|
-
requirements:
|
67
|
+
requirements:
|
59
68
|
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 27
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
- 0
|
74
|
+
- 2
|
61
75
|
version: 0.0.2
|
62
|
-
- !ruby/object:Gem::Dependency
|
63
|
-
name: rest-client
|
64
|
-
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
|
-
requirements:
|
67
|
-
- - ~>
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '1.6'
|
70
76
|
type: :runtime
|
77
|
+
version_requirements: *id003
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rest-client
|
71
80
|
prerelease: false
|
72
|
-
|
81
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
82
|
none: false
|
74
|
-
requirements:
|
83
|
+
requirements:
|
75
84
|
- - ~>
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
requirements:
|
83
|
-
- - ~>
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version: '2.1'
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
hash: 3
|
87
|
+
segments:
|
88
|
+
- 1
|
89
|
+
- 6
|
90
|
+
version: "1.6"
|
86
91
|
type: :runtime
|
92
|
+
version_requirements: *id004
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: uuidtools
|
87
95
|
prerelease: false
|
88
|
-
|
96
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
89
97
|
none: false
|
90
|
-
requirements:
|
98
|
+
requirements:
|
91
99
|
- - ~>
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
|
94
|
-
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
hash: 1
|
102
|
+
segments:
|
103
|
+
- 2
|
104
|
+
- 1
|
105
|
+
version: "2.1"
|
106
|
+
type: :runtime
|
107
|
+
version_requirements: *id005
|
108
|
+
- !ruby/object:Gem::Dependency
|
95
109
|
name: rake
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
|
-
requirements:
|
99
|
-
- - ~>
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: '0.9'
|
102
|
-
type: :development
|
103
110
|
prerelease: false
|
104
|
-
|
111
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
105
112
|
none: false
|
106
|
-
requirements:
|
113
|
+
requirements:
|
107
114
|
- - ~>
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
requirements:
|
115
|
-
- - ~>
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '2.11'
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
hash: 25
|
117
|
+
segments:
|
118
|
+
- 0
|
119
|
+
- 9
|
120
|
+
version: "0.9"
|
118
121
|
type: :development
|
122
|
+
version_requirements: *id006
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: rspec
|
119
125
|
prerelease: false
|
120
|
-
|
126
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
121
127
|
none: false
|
122
|
-
requirements:
|
128
|
+
requirements:
|
123
129
|
- - ~>
|
124
|
-
- !ruby/object:Gem::Version
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
requirements:
|
131
|
-
- - ~>
|
132
|
-
- !ruby/object:Gem::Version
|
133
|
-
version: '1.9'
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
hash: 21
|
132
|
+
segments:
|
133
|
+
- 2
|
134
|
+
- 11
|
135
|
+
version: "2.11"
|
134
136
|
type: :development
|
137
|
+
version_requirements: *id007
|
138
|
+
- !ruby/object:Gem::Dependency
|
139
|
+
name: webmock
|
135
140
|
prerelease: false
|
136
|
-
|
141
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
137
142
|
none: false
|
138
|
-
requirements:
|
143
|
+
requirements:
|
139
144
|
- - ~>
|
140
|
-
- !ruby/object:Gem::Version
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
requirements:
|
147
|
-
- - ~>
|
148
|
-
- !ruby/object:Gem::Version
|
149
|
-
version: '1.0'
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
hash: 29
|
147
|
+
segments:
|
148
|
+
- 1
|
149
|
+
- 9
|
150
|
+
version: "1.9"
|
150
151
|
type: :development
|
152
|
+
version_requirements: *id008
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rr
|
151
155
|
prerelease: false
|
152
|
-
|
156
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
153
157
|
none: false
|
154
|
-
requirements:
|
158
|
+
requirements:
|
155
159
|
- - ~>
|
156
|
-
- !ruby/object:Gem::Version
|
157
|
-
|
160
|
+
- !ruby/object:Gem::Version
|
161
|
+
hash: 15
|
162
|
+
segments:
|
163
|
+
- 1
|
164
|
+
- 0
|
165
|
+
version: "1.0"
|
166
|
+
type: :development
|
167
|
+
version_requirements: *id009
|
158
168
|
description:
|
159
|
-
email:
|
169
|
+
email:
|
160
170
|
- asuraci@vmware.com
|
161
171
|
executables: []
|
172
|
+
|
162
173
|
extensions: []
|
174
|
+
|
163
175
|
extra_rdoc_files: []
|
164
|
-
|
176
|
+
|
177
|
+
files:
|
165
178
|
- Rakefile
|
166
179
|
- lib/tunnel-cf-plugin/plugin.rb
|
167
180
|
- lib/tunnel-cf-plugin/tunnel.rb
|
@@ -174,31 +187,39 @@ files:
|
|
174
187
|
- spec/spec_helper.rb
|
175
188
|
homepage: http://cloudfoundry.com/
|
176
189
|
licenses: []
|
190
|
+
|
177
191
|
post_install_message:
|
178
192
|
rdoc_options: []
|
179
|
-
|
193
|
+
|
194
|
+
require_paths:
|
180
195
|
- lib
|
181
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
196
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
182
197
|
none: false
|
183
|
-
requirements:
|
184
|
-
- -
|
185
|
-
- !ruby/object:Gem::Version
|
186
|
-
|
187
|
-
segments:
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
hash: 3
|
202
|
+
segments:
|
188
203
|
- 0
|
189
|
-
|
190
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
|
+
version: "0"
|
205
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
206
|
none: false
|
192
|
-
requirements:
|
193
|
-
- -
|
194
|
-
- !ruby/object:Gem::Version
|
195
|
-
|
207
|
+
requirements:
|
208
|
+
- - ">"
|
209
|
+
- !ruby/object:Gem::Version
|
210
|
+
hash: 25
|
211
|
+
segments:
|
212
|
+
- 1
|
213
|
+
- 3
|
214
|
+
- 1
|
215
|
+
version: 1.3.1
|
196
216
|
requirements: []
|
217
|
+
|
197
218
|
rubyforge_project: tunnel-cf-plugin
|
198
|
-
rubygems_version: 1.8.
|
219
|
+
rubygems_version: 1.8.24
|
199
220
|
signing_key:
|
200
221
|
specification_version: 3
|
201
222
|
summary: External access to your services on Cloud Foundry via a Caldecott HTTP tunnel.
|
202
|
-
test_files:
|
223
|
+
test_files:
|
203
224
|
- spec/plugin_spec.rb
|
204
225
|
- spec/spec_helper.rb
|