lib/command/info.rb in cpl-1.4.0 vs lib/command/info.rb in cpl-2.2.0

- old
+ new

@@ -74,11 +74,11 @@ if config.org result.push(config.org) else config.apps.each do |_, app_options| - org = app_options[:cpln_org] + org = app_org(app_options) result.push(org) if org && !result.include?(org) end end result.sort @@ -88,15 +88,19 @@ result = [] config.apps.each do |app_name, app_options| next if config.app && !config.app_matches?(config.app, app_name, app_options) - app_org = app_options[:cpln_org] - result.push(app_name.to_s) if app_org == org + current_app_org = app_org(app_options) + result.push(app_name.to_s) if current_app_org == org end result += @app_workloads.keys.map(&:to_s) result.uniq.sort + end + + def app_org(app_options) + app_options[:cpln_org] end def any_app_starts_with?(app) @app_workloads.keys.find { |app_name| config.app_matches?(app_name, app, config.apps[app.to_sym]) } end