<commit_before>class MCollective::Application::Puppetenvsh<MCollective::Application
    description "Puppet dynamic environment manager (shell edition)"

    usage <<-END_OF_USAGE
mco puppetenvsh <ACTION> [ENVIRONMENT] [filters]
mco puppetenvsh <list|update-all> [filters]
mco puppetenvsh <add|update|rm> <ENVIRONMENT> [filters]"
END_OF_USAGE

    def handle_message(action, message, *args)
        messages = {
            1 => "Please specify action",
            2 => "Action must be list, add, update, rm or update-all",
            3 => "Environment is required for add, update and rm actions",
            4 => "Unexpected extra arguments, aborting for safety",
        }
        send(action, messages[message] % args)
    end

    def post_option_parser(configuration)
        if ARGV.size < 1
            handle_message(:raise, 1)
        else
            generic_actions     = ['list','update-all']
            environment_actions = ['add','update','rm']<commit_msg>Remove errant quotation mark<commit_after>class MCollective::Application::Puppetenvsh<MCollective::Application
    description "Puppet dynamic environment manager (shell edition)"

    usage <<-END_OF_USAGE
mco puppetenvsh <ACTION> [ENVIRONMENT] [filters]
mco puppetenvsh <list|update-all> [filters]
mco puppetenvsh <add|update|rm> <ENVIRONMENT> [filters]
END_OF_USAGE

    def handle_message(action, message, *args)
        messages = {
            1 => "Please specify action",
            2 => "Action must be list, add, update, rm or update-all",
            3 => "Environment is required for add, update and rm actions",
            4 => "Unexpected extra arguments, aborting for safety",
        }
        send(action, messages[message] % args)
    end

    def post_option_parser(configuration)
        if ARGV.size < 1
            handle_message(:raise, 1)
        else
            generic_actions     = ['list','update-all']
            environment_actions = ['add','update','rm']
{'fraction_non_alphanumeric': 0.10743380855397149, 'fraction_numerical': 0.006109979633401222, 'mean_word_length': 2.9939024390243905, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6508382', 'n_tokens_mistral': 567, 'n_tokens_neox': 546, 'n_words': 158}