manifests-vmc-plugin 0.4.5 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/manifests-vmc-plugin/version.rb +1 -1
- data/lib/manifests-vmc-plugin.rb +6 -2
- metadata +4 -4
data/lib/manifests-vmc-plugin.rb
CHANGED
|
@@ -135,7 +135,7 @@ module VMCManifests
|
|
|
135
135
|
target_url(ctx)
|
|
136
136
|
|
|
137
137
|
when "target-base"
|
|
138
|
-
|
|
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:
|
|
4
|
+
hash: 3
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 4
|
|
9
|
-
-
|
|
10
|
-
version: 0.4.
|
|
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-
|
|
18
|
+
date: 2012-09-17 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
name: cfoundry
|