jdc 0.2.3.pre → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jdc/cli/app/delete.rb +1 -1
- data/lib/jdc/cli/route/map.rb +4 -1
- data/lib/jdc/cli/space/switch.rb +1 -2
- data/lib/jdc/cli/start/target.rb +1 -1
- data/lib/jdc/cli.rb +5 -3
- metadata +52 -52
data/lib/jdc/cli/app/delete.rb
CHANGED
@@ -8,7 +8,7 @@ module JDC::App
|
|
8
8
|
group :apps, :manage
|
9
9
|
input :apps, :desc => "Applications to delete", :argument => :splat,
|
10
10
|
:singular => :app, :from_given => by_name(:app)
|
11
|
-
input :routes, :desc => "Delete associated routes", :default =>
|
11
|
+
input :routes, :desc => "Delete associated routes", :default => true
|
12
12
|
input :delete_orphaned, :desc => "Delete orphaned services",
|
13
13
|
:aliases => "-o", :default => proc { force? ? false : interact },
|
14
14
|
:forget => true
|
data/lib/jdc/cli/route/map.rb
CHANGED
@@ -23,6 +23,8 @@ module JDC::Route
|
|
23
23
|
|
24
24
|
route = find_or_create_route(domain, host, space)
|
25
25
|
|
26
|
+
fail "Invalid host '#{host}'" unless route
|
27
|
+
|
26
28
|
bind_route(route, app) if app
|
27
29
|
end
|
28
30
|
|
@@ -35,7 +37,8 @@ module JDC::Route
|
|
35
37
|
end
|
36
38
|
|
37
39
|
def find_or_create_route(domain, host, space)
|
38
|
-
find_route(domain, host) || create_route(domain, host, space)
|
40
|
+
#find_route(domain, host) || create_route(domain, host, space)
|
41
|
+
find_route(domain, host)
|
39
42
|
end
|
40
43
|
|
41
44
|
def find_route(domain, host)
|
data/lib/jdc/cli/space/switch.rb
CHANGED
data/lib/jdc/cli/start/target.rb
CHANGED
@@ -19,7 +19,7 @@ module JDC::Start
|
|
19
19
|
|
20
20
|
if input.has?(:url)
|
21
21
|
target = sane_target_url(input[:url])
|
22
|
-
with_progress("Setting target to #{c(target, :name)}") do
|
22
|
+
with_progress("Setting target to #{c(target, :name)}\n") do
|
23
23
|
begin
|
24
24
|
build_client(target).info # check that it's valid before setting
|
25
25
|
rescue JFoundry::TargetRefused
|
data/lib/jdc/cli.rb
CHANGED
@@ -363,8 +363,10 @@ EOS
|
|
363
363
|
def sane_target_url(url)
|
364
364
|
unless url =~ /^https?:\/\//
|
365
365
|
begin
|
366
|
-
TCPSocket.new(url, Net::HTTP.https_default_port)
|
367
|
-
url = "https://#{url}"
|
366
|
+
#TCPSocket.new(url, Net::HTTP.https_default_port)
|
367
|
+
#url = "https://#{url}"
|
368
|
+
TCPSocket.new(url, Net::HTTP.http_default_port)
|
369
|
+
url = "http://#{url}"
|
368
370
|
rescue Errno::ECONNREFUSED, SocketError, Timeout::Error
|
369
371
|
url = "http://#{url}"
|
370
372
|
end
|
@@ -496,7 +498,7 @@ EOS
|
|
496
498
|
end
|
497
499
|
|
498
500
|
def build_client(target)
|
499
|
-
client = JFoundry::V2::Client.new(target, ENV['ACCESS_KEY'], ENV['SECRET_KEY'], JDC::VERSION)
|
501
|
+
client = JFoundry::V2::Client.new(target, ENV['ACCESS_KEY'], ENV['SECRET_KEY'], JDC::VERSION, "jdc")
|
500
502
|
client.http_proxy = input[:http_proxy] || ENV['HTTP_PROXY'] || ENV['http_proxy']
|
501
503
|
client.https_proxy = input[:https_proxy] || ENV['HTTPS_PROXY'] || ENV['https_proxy']
|
502
504
|
client
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jdc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.3
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.3
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jing Dong Foundry Team
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-09-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|
17
|
-
requirement: &
|
17
|
+
requirement: &19463900 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '2.2'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *19463900
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: caldecott-client
|
28
|
-
requirement: &
|
28
|
+
requirement: &19462080 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,21 +33,21 @@ dependencies:
|
|
33
33
|
version: 0.0.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *19462080
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: jfoundry
|
39
|
-
requirement: &
|
39
|
+
requirement: &19804100 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - =
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version: 0.1.
|
44
|
+
version: 0.1.4
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *19804100
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: interact
|
50
|
-
requirement: &
|
50
|
+
requirement: &19803640 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0.5'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *19803640
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: json_pure
|
61
|
-
requirement: &
|
61
|
+
requirement: &19803180 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ~>
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '1.6'
|
67
67
|
type: :runtime
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *19803180
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: mothership
|
72
|
-
requirement: &
|
72
|
+
requirement: &19802700 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -80,10 +80,10 @@ dependencies:
|
|
80
80
|
version: '1.0'
|
81
81
|
type: :runtime
|
82
82
|
prerelease: false
|
83
|
-
version_requirements: *
|
83
|
+
version_requirements: *19802700
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: multi_json
|
86
|
-
requirement: &
|
86
|
+
requirement: &19801980 !ruby/object:Gem::Requirement
|
87
87
|
none: false
|
88
88
|
requirements:
|
89
89
|
- - ~>
|
@@ -91,10 +91,10 @@ dependencies:
|
|
91
91
|
version: '1.3'
|
92
92
|
type: :runtime
|
93
93
|
prerelease: false
|
94
|
-
version_requirements: *
|
94
|
+
version_requirements: *19801980
|
95
95
|
- !ruby/object:Gem::Dependency
|
96
96
|
name: rest-client
|
97
|
-
requirement: &
|
97
|
+
requirement: &19801520 !ruby/object:Gem::Requirement
|
98
98
|
none: false
|
99
99
|
requirements:
|
100
100
|
- - ~>
|
@@ -102,10 +102,10 @@ dependencies:
|
|
102
102
|
version: '1.6'
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
|
-
version_requirements: *
|
105
|
+
version_requirements: *19801520
|
106
106
|
- !ruby/object:Gem::Dependency
|
107
107
|
name: uuidtools
|
108
|
-
requirement: &
|
108
|
+
requirement: &19801060 !ruby/object:Gem::Requirement
|
109
109
|
none: false
|
110
110
|
requirements:
|
111
111
|
- - ~>
|
@@ -113,10 +113,10 @@ dependencies:
|
|
113
113
|
version: '2.1'
|
114
114
|
type: :runtime
|
115
115
|
prerelease: false
|
116
|
-
version_requirements: *
|
116
|
+
version_requirements: *19801060
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: blue-shell
|
119
|
-
requirement: &
|
119
|
+
requirement: &19800600 !ruby/object:Gem::Requirement
|
120
120
|
none: false
|
121
121
|
requirements:
|
122
122
|
- - ! '>='
|
@@ -124,10 +124,10 @@ dependencies:
|
|
124
124
|
version: 0.2.1
|
125
125
|
type: :development
|
126
126
|
prerelease: false
|
127
|
-
version_requirements: *
|
127
|
+
version_requirements: *19800600
|
128
128
|
- !ruby/object:Gem::Dependency
|
129
129
|
name: factory_girl
|
130
|
-
requirement: &
|
130
|
+
requirement: &19800220 !ruby/object:Gem::Requirement
|
131
131
|
none: false
|
132
132
|
requirements:
|
133
133
|
- - ! '>='
|
@@ -135,10 +135,10 @@ dependencies:
|
|
135
135
|
version: '0'
|
136
136
|
type: :development
|
137
137
|
prerelease: false
|
138
|
-
version_requirements: *
|
138
|
+
version_requirements: *19800220
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: fakefs
|
141
|
-
requirement: &
|
141
|
+
requirement: &19799680 !ruby/object:Gem::Requirement
|
142
142
|
none: false
|
143
143
|
requirements:
|
144
144
|
- - ~>
|
@@ -146,10 +146,10 @@ dependencies:
|
|
146
146
|
version: 0.4.2
|
147
147
|
type: :development
|
148
148
|
prerelease: false
|
149
|
-
version_requirements: *
|
149
|
+
version_requirements: *19799680
|
150
150
|
- !ruby/object:Gem::Dependency
|
151
151
|
name: ffaker
|
152
|
-
requirement: &
|
152
|
+
requirement: &19799180 !ruby/object:Gem::Requirement
|
153
153
|
none: false
|
154
154
|
requirements:
|
155
155
|
- - =
|
@@ -157,10 +157,10 @@ dependencies:
|
|
157
157
|
version: '1.15'
|
158
158
|
type: :development
|
159
159
|
prerelease: false
|
160
|
-
version_requirements: *
|
160
|
+
version_requirements: *19799180
|
161
161
|
- !ruby/object:Gem::Dependency
|
162
162
|
name: gem-release
|
163
|
-
requirement: &
|
163
|
+
requirement: &19798800 !ruby/object:Gem::Requirement
|
164
164
|
none: false
|
165
165
|
requirements:
|
166
166
|
- - ! '>='
|
@@ -168,10 +168,10 @@ dependencies:
|
|
168
168
|
version: '0'
|
169
169
|
type: :development
|
170
170
|
prerelease: false
|
171
|
-
version_requirements: *
|
171
|
+
version_requirements: *19798800
|
172
172
|
- !ruby/object:Gem::Dependency
|
173
173
|
name: rake
|
174
|
-
requirement: &
|
174
|
+
requirement: &19798260 !ruby/object:Gem::Requirement
|
175
175
|
none: false
|
176
176
|
requirements:
|
177
177
|
- - ~>
|
@@ -179,10 +179,10 @@ dependencies:
|
|
179
179
|
version: '0.9'
|
180
180
|
type: :development
|
181
181
|
prerelease: false
|
182
|
-
version_requirements: *
|
182
|
+
version_requirements: *19798260
|
183
183
|
- !ruby/object:Gem::Dependency
|
184
184
|
name: rspec
|
185
|
-
requirement: &
|
185
|
+
requirement: &19797760 !ruby/object:Gem::Requirement
|
186
186
|
none: false
|
187
187
|
requirements:
|
188
188
|
- - ~>
|
@@ -190,10 +190,10 @@ dependencies:
|
|
190
190
|
version: '2.14'
|
191
191
|
type: :development
|
192
192
|
prerelease: false
|
193
|
-
version_requirements: *
|
193
|
+
version_requirements: *19797760
|
194
194
|
- !ruby/object:Gem::Dependency
|
195
195
|
name: rspec-instafail
|
196
|
-
requirement: &
|
196
|
+
requirement: &19797300 !ruby/object:Gem::Requirement
|
197
197
|
none: false
|
198
198
|
requirements:
|
199
199
|
- - ~>
|
@@ -201,10 +201,10 @@ dependencies:
|
|
201
201
|
version: 0.2.4
|
202
202
|
type: :development
|
203
203
|
prerelease: false
|
204
|
-
version_requirements: *
|
204
|
+
version_requirements: *19797300
|
205
205
|
- !ruby/object:Gem::Dependency
|
206
206
|
name: webmock
|
207
|
-
requirement: &
|
207
|
+
requirement: &19796840 !ruby/object:Gem::Requirement
|
208
208
|
none: false
|
209
209
|
requirements:
|
210
210
|
- - ~>
|
@@ -212,10 +212,10 @@ dependencies:
|
|
212
212
|
version: '1.9'
|
213
213
|
type: :development
|
214
214
|
prerelease: false
|
215
|
-
version_requirements: *
|
215
|
+
version_requirements: *19796840
|
216
216
|
- !ruby/object:Gem::Dependency
|
217
217
|
name: httpclient
|
218
|
-
requirement: &
|
218
|
+
requirement: &19796380 !ruby/object:Gem::Requirement
|
219
219
|
none: false
|
220
220
|
requirements:
|
221
221
|
- - ~>
|
@@ -223,10 +223,10 @@ dependencies:
|
|
223
223
|
version: '2.3'
|
224
224
|
type: :development
|
225
225
|
prerelease: false
|
226
|
-
version_requirements: *
|
226
|
+
version_requirements: *19796380
|
227
227
|
- !ruby/object:Gem::Dependency
|
228
228
|
name: yajl-ruby
|
229
|
-
requirement: &
|
229
|
+
requirement: &19796000 !ruby/object:Gem::Requirement
|
230
230
|
none: false
|
231
231
|
requirements:
|
232
232
|
- - ! '>='
|
@@ -234,10 +234,10 @@ dependencies:
|
|
234
234
|
version: '0'
|
235
235
|
type: :development
|
236
236
|
prerelease: false
|
237
|
-
version_requirements: *
|
237
|
+
version_requirements: *19796000
|
238
238
|
- !ruby/object:Gem::Dependency
|
239
239
|
name: nats
|
240
|
-
requirement: &
|
240
|
+
requirement: &19457180 !ruby/object:Gem::Requirement
|
241
241
|
none: false
|
242
242
|
requirements:
|
243
243
|
- - ! '>='
|
@@ -245,10 +245,10 @@ dependencies:
|
|
245
245
|
version: '0'
|
246
246
|
type: :development
|
247
247
|
prerelease: false
|
248
|
-
version_requirements: *
|
248
|
+
version_requirements: *19457180
|
249
249
|
- !ruby/object:Gem::Dependency
|
250
250
|
name: typhoeus
|
251
|
-
requirement: &
|
251
|
+
requirement: &19455720 !ruby/object:Gem::Requirement
|
252
252
|
none: false
|
253
253
|
requirements:
|
254
254
|
- - ! '>='
|
@@ -256,10 +256,10 @@ dependencies:
|
|
256
256
|
version: '0'
|
257
257
|
type: :development
|
258
258
|
prerelease: false
|
259
|
-
version_requirements: *
|
259
|
+
version_requirements: *19455720
|
260
260
|
- !ruby/object:Gem::Dependency
|
261
261
|
name: anchorman
|
262
|
-
requirement: &
|
262
|
+
requirement: &19454320 !ruby/object:Gem::Requirement
|
263
263
|
none: false
|
264
264
|
requirements:
|
265
265
|
- - ! '>='
|
@@ -267,7 +267,7 @@ dependencies:
|
|
267
267
|
version: '0'
|
268
268
|
type: :development
|
269
269
|
prerelease: false
|
270
|
-
version_requirements: *
|
270
|
+
version_requirements: *19454320
|
271
271
|
description:
|
272
272
|
email:
|
273
273
|
- jae@jd.com
|
@@ -411,9 +411,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
411
411
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
412
412
|
none: false
|
413
413
|
requirements:
|
414
|
-
- - ! '
|
414
|
+
- - ! '>='
|
415
415
|
- !ruby/object:Gem::Version
|
416
|
-
version:
|
416
|
+
version: '0'
|
417
417
|
requirements: []
|
418
418
|
rubyforge_project: jdc
|
419
419
|
rubygems_version: 1.8.11
|