vmc 0.4.0.beta.41 → 0.4.0.beta.42
Sign up to get free protection for your applications and to get access to all the features.
- data/vmc/lib/cli/commands/user.rb +4 -1
- data/vmc/lib/cli/version.rb +1 -1
- data/vmc-ng/lib/vmc/cli/app.rb +9 -9
- data/vmc-ng/lib/vmc/cli.rb +1 -1
- data/vmc-ng/lib/vmc/spec_helpers.rb +3 -1
- data/vmc-ng/lib/vmc/version.rb +1 -1
- metadata +52 -36
@@ -1,3 +1,5 @@
|
|
1
|
+
require "cfoundry"
|
2
|
+
|
1
3
|
module VMC::Cli::Command
|
2
4
|
|
3
5
|
class User < Base
|
@@ -56,7 +58,8 @@ module VMC::Cli::Command
|
|
56
58
|
private
|
57
59
|
|
58
60
|
def login_and_save_token(email, password)
|
59
|
-
|
61
|
+
cfoundry = CFoundry::Client.new(client.target)
|
62
|
+
token = cfoundry.login(:username => email, :password => password)
|
60
63
|
VMC::Cli::Config.store_token(token, @options[:token_file])
|
61
64
|
end
|
62
65
|
|
data/vmc/lib/cli/version.rb
CHANGED
data/vmc-ng/lib/vmc/cli/app.rb
CHANGED
@@ -209,7 +209,7 @@ module VMC
|
|
209
209
|
app.create!
|
210
210
|
end
|
211
211
|
|
212
|
-
invoke :map, :app => app, :url => url if v2?
|
212
|
+
invoke :map, :app => app, :url => url if url && v2?
|
213
213
|
|
214
214
|
bindings = []
|
215
215
|
|
@@ -506,8 +506,6 @@ module VMC
|
|
506
506
|
input :path, :argument => true, :default => "/",
|
507
507
|
:desc => "Path of file to read"
|
508
508
|
def file
|
509
|
-
no_v2
|
510
|
-
|
511
509
|
app = input[:app]
|
512
510
|
|
513
511
|
file =
|
@@ -528,8 +526,6 @@ module VMC
|
|
528
526
|
input :path, :argument => true, :default => "/",
|
529
527
|
:desc => "Path of directory to list"
|
530
528
|
def files
|
531
|
-
no_v2
|
532
|
-
|
533
529
|
app = input[:app]
|
534
530
|
|
535
531
|
files =
|
@@ -618,14 +614,18 @@ module VMC
|
|
618
614
|
if v2?
|
619
615
|
host, domain_name = simple.split(".", 2)
|
620
616
|
|
617
|
+
domain =
|
618
|
+
client.current_space.domains.find { |d|
|
619
|
+
d.name == domain_name
|
620
|
+
}
|
621
|
+
|
622
|
+
fail "Invalid domain '#{domain_name}'" unless domain
|
623
|
+
|
621
624
|
route = client.routes.find { |r|
|
622
|
-
r.host == host && r.domain
|
625
|
+
r.host == host && r.domain == domain
|
623
626
|
}
|
624
627
|
|
625
628
|
unless route
|
626
|
-
domain = client.domain_by_name(domain_name)
|
627
|
-
fail "Invalid domain '#{domain_name}'" unless domain
|
628
|
-
|
629
629
|
route = client.route
|
630
630
|
|
631
631
|
with_progress("Creating route #{c(simple, :name)}") do
|
data/vmc-ng/lib/vmc/cli.rb
CHANGED
@@ -104,7 +104,9 @@ module VMCHelpers
|
|
104
104
|
|
105
105
|
main = Thread.current
|
106
106
|
|
107
|
+
thd_group = ThreadGroup.new
|
107
108
|
thd = Thread.new do
|
109
|
+
thd_group.add(thd)
|
108
110
|
begin
|
109
111
|
VMC::CLI.new.invoke(command, inputs, given, :quiet => true)
|
110
112
|
rescue SystemExit => e
|
@@ -131,7 +133,7 @@ EOF
|
|
131
133
|
|
132
134
|
$vmc_event.should complete
|
133
135
|
ensure
|
134
|
-
|
136
|
+
thd_group.list.each(&:kill)
|
135
137
|
end
|
136
138
|
ensure
|
137
139
|
$stdin = before_in
|
data/vmc-ng/lib/vmc/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3401249061
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
9
|
- 0
|
10
10
|
- beta
|
11
|
-
-
|
12
|
-
version: 0.4.0.beta.
|
11
|
+
- 42
|
12
|
+
version: 0.4.0.beta.42
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- VMware
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2012-
|
20
|
+
date: 2012-09-04 00:00:00 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: json_pure
|
@@ -164,9 +164,25 @@ dependencies:
|
|
164
164
|
type: :runtime
|
165
165
|
version_requirements: *id008
|
166
166
|
- !ruby/object:Gem::Dependency
|
167
|
-
name:
|
167
|
+
name: cfoundry
|
168
168
|
prerelease: false
|
169
169
|
requirement: &id009 !ruby/object:Gem::Requirement
|
170
|
+
none: false
|
171
|
+
requirements:
|
172
|
+
- - ~>
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
hash: 37
|
175
|
+
segments:
|
176
|
+
- 0
|
177
|
+
- 3
|
178
|
+
- 27
|
179
|
+
version: 0.3.27
|
180
|
+
type: :runtime
|
181
|
+
version_requirements: *id009
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: rake
|
184
|
+
prerelease: false
|
185
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
170
186
|
none: false
|
171
187
|
requirements:
|
172
188
|
- - ">="
|
@@ -176,11 +192,11 @@ dependencies:
|
|
176
192
|
- 0
|
177
193
|
version: "0"
|
178
194
|
type: :development
|
179
|
-
version_requirements: *
|
195
|
+
version_requirements: *id010
|
180
196
|
- !ruby/object:Gem::Dependency
|
181
197
|
name: rspec
|
182
198
|
prerelease: false
|
183
|
-
requirement: &
|
199
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
184
200
|
none: false
|
185
201
|
requirements:
|
186
202
|
- - ~>
|
@@ -192,11 +208,11 @@ dependencies:
|
|
192
208
|
- 0
|
193
209
|
version: 1.3.0
|
194
210
|
type: :development
|
195
|
-
version_requirements: *
|
211
|
+
version_requirements: *id011
|
196
212
|
- !ruby/object:Gem::Dependency
|
197
213
|
name: webmock
|
198
214
|
prerelease: false
|
199
|
-
requirement: &
|
215
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
200
216
|
none: false
|
201
217
|
requirements:
|
202
218
|
- - ~>
|
@@ -208,11 +224,11 @@ dependencies:
|
|
208
224
|
- 0
|
209
225
|
version: 1.5.0
|
210
226
|
type: :development
|
211
|
-
version_requirements: *
|
227
|
+
version_requirements: *id012
|
212
228
|
- !ruby/object:Gem::Dependency
|
213
229
|
name: json_pure
|
214
230
|
prerelease: false
|
215
|
-
requirement: &
|
231
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
216
232
|
none: false
|
217
233
|
requirements:
|
218
234
|
- - ~>
|
@@ -224,11 +240,11 @@ dependencies:
|
|
224
240
|
- 5
|
225
241
|
version: 1.6.5
|
226
242
|
type: :runtime
|
227
|
-
version_requirements: *
|
243
|
+
version_requirements: *id013
|
228
244
|
- !ruby/object:Gem::Dependency
|
229
245
|
name: interact
|
230
246
|
prerelease: false
|
231
|
-
requirement: &
|
247
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
232
248
|
none: false
|
233
249
|
requirements:
|
234
250
|
- - ~>
|
@@ -240,43 +256,43 @@ dependencies:
|
|
240
256
|
- 8
|
241
257
|
version: 0.4.8
|
242
258
|
type: :runtime
|
243
|
-
version_requirements: *
|
259
|
+
version_requirements: *id014
|
244
260
|
- !ruby/object:Gem::Dependency
|
245
261
|
name: cfoundry
|
246
262
|
prerelease: false
|
247
|
-
requirement: &
|
263
|
+
requirement: &id015 !ruby/object:Gem::Requirement
|
248
264
|
none: false
|
249
265
|
requirements:
|
250
266
|
- - ~>
|
251
267
|
- !ruby/object:Gem::Version
|
252
|
-
hash:
|
268
|
+
hash: 43
|
253
269
|
segments:
|
254
270
|
- 0
|
255
271
|
- 3
|
256
|
-
-
|
257
|
-
version: 0.3.
|
272
|
+
- 28
|
273
|
+
version: 0.3.28
|
258
274
|
type: :runtime
|
259
|
-
version_requirements: *
|
275
|
+
version_requirements: *id015
|
260
276
|
- !ruby/object:Gem::Dependency
|
261
277
|
name: mothership
|
262
278
|
prerelease: false
|
263
|
-
requirement: &
|
279
|
+
requirement: &id016 !ruby/object:Gem::Requirement
|
264
280
|
none: false
|
265
281
|
requirements:
|
266
282
|
- - ~>
|
267
283
|
- !ruby/object:Gem::Version
|
268
|
-
hash:
|
284
|
+
hash: 31
|
269
285
|
segments:
|
270
286
|
- 0
|
271
287
|
- 1
|
272
|
-
-
|
273
|
-
version: 0.1.
|
288
|
+
- 2
|
289
|
+
version: 0.1.2
|
274
290
|
type: :runtime
|
275
|
-
version_requirements: *
|
291
|
+
version_requirements: *id016
|
276
292
|
- !ruby/object:Gem::Dependency
|
277
293
|
name: manifests-vmc-plugin
|
278
294
|
prerelease: false
|
279
|
-
requirement: &
|
295
|
+
requirement: &id017 !ruby/object:Gem::Requirement
|
280
296
|
none: false
|
281
297
|
requirements:
|
282
298
|
- - ~>
|
@@ -288,11 +304,11 @@ dependencies:
|
|
288
304
|
- 4
|
289
305
|
version: 0.4.4
|
290
306
|
type: :runtime
|
291
|
-
version_requirements: *
|
307
|
+
version_requirements: *id017
|
292
308
|
- !ruby/object:Gem::Dependency
|
293
309
|
name: tunnel-dummy-vmc-plugin
|
294
310
|
prerelease: false
|
295
|
-
requirement: &
|
311
|
+
requirement: &id018 !ruby/object:Gem::Requirement
|
296
312
|
none: false
|
297
313
|
requirements:
|
298
314
|
- - ~>
|
@@ -304,11 +320,11 @@ dependencies:
|
|
304
320
|
- 1
|
305
321
|
version: 0.0.1
|
306
322
|
type: :runtime
|
307
|
-
version_requirements: *
|
323
|
+
version_requirements: *id018
|
308
324
|
- !ruby/object:Gem::Dependency
|
309
325
|
name: multi_json
|
310
326
|
prerelease: false
|
311
|
-
requirement: &
|
327
|
+
requirement: &id019 !ruby/object:Gem::Requirement
|
312
328
|
none: false
|
313
329
|
requirements:
|
314
330
|
- - ~>
|
@@ -320,11 +336,11 @@ dependencies:
|
|
320
336
|
- 6
|
321
337
|
version: 1.3.6
|
322
338
|
type: :runtime
|
323
|
-
version_requirements: *
|
339
|
+
version_requirements: *id019
|
324
340
|
- !ruby/object:Gem::Dependency
|
325
341
|
name: rake
|
326
342
|
prerelease: false
|
327
|
-
requirement: &
|
343
|
+
requirement: &id020 !ruby/object:Gem::Requirement
|
328
344
|
none: false
|
329
345
|
requirements:
|
330
346
|
- - ~>
|
@@ -337,11 +353,11 @@ dependencies:
|
|
337
353
|
- 2
|
338
354
|
version: 0.9.2.2
|
339
355
|
type: :development
|
340
|
-
version_requirements: *
|
356
|
+
version_requirements: *id020
|
341
357
|
- !ruby/object:Gem::Dependency
|
342
358
|
name: rspec
|
343
359
|
prerelease: false
|
344
|
-
requirement: &
|
360
|
+
requirement: &id021 !ruby/object:Gem::Requirement
|
345
361
|
none: false
|
346
362
|
requirements:
|
347
363
|
- - ~>
|
@@ -353,11 +369,11 @@ dependencies:
|
|
353
369
|
- 0
|
354
370
|
version: 2.11.0
|
355
371
|
type: :development
|
356
|
-
version_requirements: *
|
372
|
+
version_requirements: *id021
|
357
373
|
- !ruby/object:Gem::Dependency
|
358
374
|
name: simplecov
|
359
375
|
prerelease: false
|
360
|
-
requirement: &
|
376
|
+
requirement: &id022 !ruby/object:Gem::Requirement
|
361
377
|
none: false
|
362
378
|
requirements:
|
363
379
|
- - ~>
|
@@ -369,7 +385,7 @@ dependencies:
|
|
369
385
|
- 4
|
370
386
|
version: 0.6.4
|
371
387
|
type: :development
|
372
|
-
version_requirements: *
|
388
|
+
version_requirements: *id022
|
373
389
|
description:
|
374
390
|
email: support@vmware.com
|
375
391
|
executables:
|