vmc-ng/lib/vmc/cli/app.rb in vmc-0.4.0.beta.20 vs vmc-ng/lib/vmc/cli/app.rb in vmc-0.4.0.beta.21
- old
+ new
@@ -41,17 +41,21 @@
end
desc "List your applications"
group :apps
+ input :space, :desc => "Show apps in given space",
+ :from_given => proc { |name|
+ client.space_by_name(name) || \
+ fail("Unknown space '#{name}'")
+ }
input :name, :desc => "Filter by name regexp"
input :runtime, :desc => "Filter by runtime regexp"
input :framework, :desc => "Filter by framework regexp"
input :url, :desc => "Filter by url regexp"
def apps(input)
- if v2?
- space = client.current_space
+ if space = input[:space] || client.current_space
apps =
with_progress("Getting applications in #{c(space.name, :name)}") do
space.apps
end
else
@@ -144,10 +148,10 @@
return
end
app = client.app
app.name = name
- app.space = client.current_space if v2?
+ app.space = client.current_space if client.current_space
app.total_instances = input[:instances]
detector = Detector.new(client, path)
frameworks = detector.all_frameworks
detected, default = detector.frameworks