lib/command/info.rb in cpl-1.0.2 vs lib/command/info.rb in cpl-1.0.3
- old
+ new
@@ -110,14 +110,10 @@
result += @app_workloads.keys.map(&:to_s)
result.uniq.sort
end
- def should_app_start_with?(app)
- config.apps[app.to_sym]&.dig(:match_if_app_name_starts_with)
- end
-
def any_app_starts_with?(app)
@app_workloads.keys.find { |app_name| app_matches?(app_name, app, config.apps[app.to_sym]) }
end
def check_any_app_starts_with(app)
@@ -130,20 +126,20 @@
true
end
end
def add_to_missing_workloads(app, workload)
- if should_app_start_with?(app)
+ if config.should_app_start_with?(app)
@missing_apps_starting_with[app] ||= []
@missing_apps_starting_with[app].push(workload)
else
@missing_apps_workloads[app] ||= []
@missing_apps_workloads[app].push(workload)
end
end
def print_app(app, org)
- if should_app_start_with?(app)
+ if config.should_app_start_with?(app)
check_any_app_starts_with(app)
elsif cp.fetch_gvc(app, org).nil?
@missing_apps_workloads[app] = ["gvc"]
puts " - #{Shell.color(app, :red)}"