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.
@@ -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
- token = client.login(email, password)
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
 
@@ -2,6 +2,6 @@ module VMC
2
2
  module Cli
3
3
  # This version number is used as the RubyGem release version.
4
4
  # The internal VMC version number is VMC::VERSION.
5
- VERSION = '0.3.18'
5
+ VERSION = '0.3.19'
6
6
  end
7
7
  end
@@ -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.name == domain_name
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
@@ -90,7 +90,7 @@ module VMC
90
90
  end
91
91
  end
92
92
 
93
- def run(name)
93
+ def execute(cmd, argv, global = {})
94
94
  if input[:help]
95
95
  invoke :help, :command => cmd.name.to_s
96
96
  else
@@ -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
- thd.kill
136
+ thd_group.list.each(&:kill)
135
137
  end
136
138
  ensure
137
139
  $stdin = before_in
@@ -1,3 +1,3 @@
1
1
  module VMC
2
- VERSION = "0.4.0.beta.41"
2
+ VERSION = "0.4.0.beta.42"
3
3
  end
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: -259037938
4
+ hash: 3401249061
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
9
  - 0
10
10
  - beta
11
- - 41
12
- version: 0.4.0.beta.41
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-08-31 00:00:00 Z
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: rake
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: *id009
195
+ version_requirements: *id010
180
196
  - !ruby/object:Gem::Dependency
181
197
  name: rspec
182
198
  prerelease: false
183
- requirement: &id010 !ruby/object:Gem::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: *id010
211
+ version_requirements: *id011
196
212
  - !ruby/object:Gem::Dependency
197
213
  name: webmock
198
214
  prerelease: false
199
- requirement: &id011 !ruby/object:Gem::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: *id011
227
+ version_requirements: *id012
212
228
  - !ruby/object:Gem::Dependency
213
229
  name: json_pure
214
230
  prerelease: false
215
- requirement: &id012 !ruby/object:Gem::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: *id012
243
+ version_requirements: *id013
228
244
  - !ruby/object:Gem::Dependency
229
245
  name: interact
230
246
  prerelease: false
231
- requirement: &id013 !ruby/object:Gem::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: *id013
259
+ version_requirements: *id014
244
260
  - !ruby/object:Gem::Dependency
245
261
  name: cfoundry
246
262
  prerelease: false
247
- requirement: &id014 !ruby/object:Gem::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: 37
268
+ hash: 43
253
269
  segments:
254
270
  - 0
255
271
  - 3
256
- - 27
257
- version: 0.3.27
272
+ - 28
273
+ version: 0.3.28
258
274
  type: :runtime
259
- version_requirements: *id014
275
+ version_requirements: *id015
260
276
  - !ruby/object:Gem::Dependency
261
277
  name: mothership
262
278
  prerelease: false
263
- requirement: &id015 !ruby/object:Gem::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: 27
284
+ hash: 31
269
285
  segments:
270
286
  - 0
271
287
  - 1
272
- - 0
273
- version: 0.1.0
288
+ - 2
289
+ version: 0.1.2
274
290
  type: :runtime
275
- version_requirements: *id015
291
+ version_requirements: *id016
276
292
  - !ruby/object:Gem::Dependency
277
293
  name: manifests-vmc-plugin
278
294
  prerelease: false
279
- requirement: &id016 !ruby/object:Gem::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: *id016
307
+ version_requirements: *id017
292
308
  - !ruby/object:Gem::Dependency
293
309
  name: tunnel-dummy-vmc-plugin
294
310
  prerelease: false
295
- requirement: &id017 !ruby/object:Gem::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: *id017
323
+ version_requirements: *id018
308
324
  - !ruby/object:Gem::Dependency
309
325
  name: multi_json
310
326
  prerelease: false
311
- requirement: &id018 !ruby/object:Gem::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: *id018
339
+ version_requirements: *id019
324
340
  - !ruby/object:Gem::Dependency
325
341
  name: rake
326
342
  prerelease: false
327
- requirement: &id019 !ruby/object:Gem::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: *id019
356
+ version_requirements: *id020
341
357
  - !ruby/object:Gem::Dependency
342
358
  name: rspec
343
359
  prerelease: false
344
- requirement: &id020 !ruby/object:Gem::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: *id020
372
+ version_requirements: *id021
357
373
  - !ruby/object:Gem::Dependency
358
374
  name: simplecov
359
375
  prerelease: false
360
- requirement: &id021 !ruby/object:Gem::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: *id021
388
+ version_requirements: *id022
373
389
  description:
374
390
  email: support@vmware.com
375
391
  executables: