class ChefCLI::Command::Diff
def parse_server_comparison(args)
def parse_server_comparison(args) comparison_string = args.last if comparison_string.include?("...") old_pgroup, new_pgroup, *extra = comparison_string.split("...") @old_base, @new_base = [old_pgroup, new_pgroup].map do |g| Policyfile::ComparisonBase::PolicyGroup.new(g, policy_name, http_client) end unless extra.empty? ui.err("Unable to parse policy group comparison `#{comparison_string}`. Only 2 references can be specified.") return false end else @old_base = Policyfile::ComparisonBase::PolicyGroup.new(comparison_string, policy_name, http_client) @new_base = Policyfile::ComparisonBase::Local.new(policyfile_lock_relpath) end true end