manifests-vmc-plugin 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module VMCManifests
2
- VERSION = "0.4.5"
2
+ VERSION = "0.4.6"
3
3
  end
@@ -135,7 +135,7 @@ module VMCManifests
135
135
  target_url(ctx)
136
136
 
137
137
  when "target-base"
138
- target_url(ctx).sub(/^[^\.]+\./, "")
138
+ target_base(ctx)
139
139
 
140
140
  when "random-word"
141
141
  "%04x" % [rand(0x0100000)]
@@ -160,6 +160,10 @@ module VMCManifests
160
160
  find_symbol("target", ctx) || client_target
161
161
  end
162
162
 
163
+ def target_base(ctx = [])
164
+ target_url(ctx).sub(/^[^\.]+\./, "")
165
+ end
166
+
163
167
  # search for a symbol introduced in the lexical context
164
168
  def find_symbol(sym, ctx)
165
169
  ctx.each do |h|
@@ -377,7 +381,7 @@ module VMCManifests
377
381
  "runtime" => app.runtime.name,
378
382
  "memory" => human_size(app.memory * 1024 * 1024, 0),
379
383
  "instances" => app.total_instances,
380
- "url" => app.url
384
+ "url" => app.url && app.url.sub(target_base, '${target-base}')
381
385
  }
382
386
 
383
387
  unless service_instances.empty?
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manifests-vmc-plugin
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 5
10
- version: 0.4.5
9
+ - 6
10
+ version: 0.4.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Alex Suraci
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-09-12 00:00:00 Z
18
+ date: 2012-09-17 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: cfoundry