vmc 0.4.0.beta.58 → 0.4.0.beta.59
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/vmc-ng/lib/vmc/cli/app.rb +29 -22
- data/vmc-ng/lib/vmc/cli/service.rb +12 -1
- data/vmc-ng/lib/vmc/cli/space.rb +1 -1
- data/vmc-ng/lib/vmc/version.rb +1 -1
- metadata +7 -7
data/vmc-ng/lib/vmc/cli/app.rb
CHANGED
@@ -7,8 +7,10 @@ module VMC
|
|
7
7
|
class App < CLI
|
8
8
|
desc "List your applications"
|
9
9
|
group :apps
|
10
|
-
input
|
11
|
-
|
10
|
+
input(:space, :desc => "Show apps in given space",
|
11
|
+
:from_given => by_name("space")) {
|
12
|
+
client.current_space
|
13
|
+
}
|
12
14
|
input :name, :desc => "Filter by name regexp"
|
13
15
|
input :runtime, :desc => "Filter by runtime regexp"
|
14
16
|
input :framework, :desc => "Filter by framework regexp"
|
@@ -16,18 +18,17 @@ module VMC
|
|
16
18
|
input :one_line, :alias => "-l", :type => :boolean, :default => false,
|
17
19
|
:desc => "Single-line tabular format"
|
18
20
|
def apps
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
end
|
21
|
+
msg =
|
22
|
+
if space = input[:space]
|
23
|
+
"Getting applications in #{c(space.name, :name)}"
|
24
|
+
else
|
25
|
+
"Getting applications"
|
26
|
+
end
|
27
|
+
|
28
|
+
apps =
|
29
|
+
with_progress(msg) do
|
30
|
+
client.apps(2)
|
31
|
+
end
|
31
32
|
|
32
33
|
if apps.empty? and !quiet?
|
33
34
|
line
|
@@ -53,7 +54,13 @@ module VMC
|
|
53
54
|
"#{a.total_instances} x #{human_mb(a.memory)}",
|
54
55
|
v2? && (a.production ? "prod" : "dev"),
|
55
56
|
a.runtime.name,
|
56
|
-
a.urls.
|
57
|
+
if a.urls.empty?
|
58
|
+
d("none")
|
59
|
+
elsif a.urls.size == 1
|
60
|
+
a.url
|
61
|
+
else
|
62
|
+
"#{a.url}, ..."
|
63
|
+
end
|
57
64
|
]
|
58
65
|
})
|
59
66
|
else
|
@@ -93,12 +100,12 @@ module VMC
|
|
93
100
|
ask("Instances", :default => 1)
|
94
101
|
}
|
95
102
|
input(:framework, :from_given => find_by_name("framework"),
|
96
|
-
:desc => "Framework to use") { |choices, default,
|
97
|
-
ask_with_other("Framework", choices, default,
|
103
|
+
:desc => "Framework to use") { |all, choices, default, other|
|
104
|
+
ask_with_other("Framework", all, choices, default, other)
|
98
105
|
}
|
99
106
|
input(:runtime, :from_given => find_by_name("runtime"),
|
100
|
-
:desc => "Runtime to use") { |choices, default,
|
101
|
-
ask_with_other("Runtime", choices, default,
|
107
|
+
:desc => "Runtime to use") { |all, choices, default, other|
|
108
|
+
ask_with_other("Runtime", all, choices, default, other)
|
102
109
|
}
|
103
110
|
input(:command, :desc => "Startup command for standalone app") {
|
104
111
|
ask("Startup command")
|
@@ -850,9 +857,9 @@ module VMC
|
|
850
857
|
if detected_framework = detector.detect_framework
|
851
858
|
framework = input[
|
852
859
|
:framework,
|
860
|
+
all_frameworks,
|
853
861
|
[detected_framework],
|
854
862
|
detected_framework,
|
855
|
-
all_frameworks,
|
856
863
|
:other
|
857
864
|
]
|
858
865
|
else
|
@@ -875,9 +882,9 @@ module VMC
|
|
875
882
|
else
|
876
883
|
runtime = input[
|
877
884
|
:runtime,
|
885
|
+
all_runtimes,
|
878
886
|
detected_runtimes,
|
879
887
|
default_runtime,
|
880
|
-
all_runtimes,
|
881
888
|
:other
|
882
889
|
]
|
883
890
|
end
|
@@ -1080,7 +1087,7 @@ module VMC
|
|
1080
1087
|
end
|
1081
1088
|
end
|
1082
1089
|
|
1083
|
-
def ask_with_other(message, choices, default,
|
1090
|
+
def ask_with_other(message, all, choices, default, other)
|
1084
1091
|
choices = choices.sort_by(&:name)
|
1085
1092
|
choices << other if other
|
1086
1093
|
|
@@ -4,6 +4,10 @@ module VMC
|
|
4
4
|
class Service < CLI
|
5
5
|
desc "List your service instances"
|
6
6
|
group :services
|
7
|
+
input(:space, :desc => "Show services in given space",
|
8
|
+
:from_given => by_name("space")) {
|
9
|
+
client.current_space
|
10
|
+
}
|
7
11
|
input :name, :desc => "Filter by name"
|
8
12
|
input :service, :desc => "Filter by service type"
|
9
13
|
input :plan, :desc => "Filter by service plan"
|
@@ -14,8 +18,15 @@ module VMC
|
|
14
18
|
input :one_line, :alias => "-l", :type => :boolean, :default => false,
|
15
19
|
:desc => "Single-line tabular format"
|
16
20
|
def services
|
21
|
+
msg =
|
22
|
+
if space = input[:space]
|
23
|
+
"Getting services in #{c(space.name, :name)}"
|
24
|
+
else
|
25
|
+
"Getting services"
|
26
|
+
end
|
27
|
+
|
17
28
|
instances =
|
18
|
-
with_progress(
|
29
|
+
with_progress(msg) do
|
19
30
|
client.service_instances(2)
|
20
31
|
end
|
21
32
|
|
data/vmc-ng/lib/vmc/cli/space.rb
CHANGED
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: 1905859163
|
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
|
+
- 59
|
12
|
+
version: 0.4.0.beta.59
|
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-10-02 00:00:00 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: json_pure
|
@@ -265,12 +265,12 @@ dependencies:
|
|
265
265
|
requirements:
|
266
266
|
- - ~>
|
267
267
|
- !ruby/object:Gem::Version
|
268
|
-
hash:
|
268
|
+
hash: 89
|
269
269
|
segments:
|
270
270
|
- 0
|
271
271
|
- 3
|
272
|
-
-
|
273
|
-
version: 0.3.
|
272
|
+
- 37
|
273
|
+
version: 0.3.37
|
274
274
|
type: :runtime
|
275
275
|
version_requirements: *id015
|
276
276
|
- !ruby/object:Gem::Dependency
|