<commit_before>module MCollective
  class Application::Plugin<Application

    exclude_argument_sections "common", "filter", "rpc"

    description "MCollective Plugin Application"
    usage <<-END_OF_USAGE
mco plugin package [options] <directory>
       mco plugin info <directory>
       mco plugin doc <plugin>
       mco plugin doc <type/plugin>
       mco plugin generate agent <pluginname> [actions=val,val]
       mco plugin generate data <pluginname> [outputs=val,val]

          info : Display plugin information including package details.
       package : Create all available plugin packages.
           doc : Display documentation for a specific plugin.
    END_OF_USAGE

    option :pluginname,
           :description => 'Plugin name',
           :arguments   => ['-n', '--name NAME'],
           :type        => String

    option :postinstall,
           :description => 'Post install script',
           :arguments   => ['--postinstall POSTINSTALL'],
           :type        => String

    option :preinstall,
           :description => 'Pre install script',
           :arguments   => ['--preinstall PREINSTALL'],
           :type        => String

    option :revision,
           :description => 'Revision number',
           :arguments   => ['--revision REVISION'],
           :type        => String

    option :iteration,
           :description => 'DEPRECATED - Use --revision instead',
           :arguments   => ['--iteration ITERATION'],
           :type        => String

    option :vendor,
           :description => 'Vendor name',
           :arguments   => ['--vendor VENDOR'],
           :type        => String

    option :pluginpath,
           :description => 'MCollective plugin path',
           :arguments   => ['--pluginpath PATH'],
           :type        => String

    option :mcname,
           :description => 'MCollective type (mcollective, pe-mcollective) that the packages depend on',
           :arguments   => ['--mcname NAME'],
           :type        => String

    option :mcversion,
           :description => 'Version of MCollective that the packages depend on',
           :arguments   => ['--mcversion MCVERSION'],
           :type        => String

    option :dependency,
           :description => 'Adds a dependency to the plugin',
           :arguments   => ['--dependency DEPENDENCIES'],
           :type        => :array

    option :format,
           :description => 'Package output format. Defaults to rpmpackage or debpackage',
           :arguments   => ['--format OUTPUTFORMAT'],
           :type        => String

    option :sign,
           :description => 'Embed a signature in the package',
           :arguments   => ['--sign'],
           :type        => :boolean

    option :rpctemplate,
           :description => 'Template to use.',
           :arguments   => ['--template HELPTEMPLATE'],
           :type        => String

    option :description,
           :description => 'Plugin description',
           :arguments   => ['--description DESCRIPTION'],
           :type        => String

    option :author,
           :description => 'The author of the plugin',
           :arguments   => ['--author AUTHOR'],
           :type        => String

    option :license,
           :description => 'The license under which the plugin is distributed',
           :arguments   => ['--license LICENSE'],
           :type        => String

    option :version,
           :description => 'The version of the plugin',
           :arguments   => ['--pluginversion VERSION'],
           :type        => String

    option :url,
           :description => 'Url at which information about the plugin can be found',
           :arguments   => ['--url URL'],
           :type        => String

    option :timeout,
           :description => "The plugin's timeout",
           :arguments   => ['--timeout TIMEOUT'],
           :type        => Integer

    option :actions,
           :description => 'Actions to be generated for an Agent Plugin',
           :arguments   => ['--actions [ACTIONS]'],
           :type        => Array

    option :outputs,
           :description => 'Outputs to be generated for an Data Plugin',
           :arguments   => ['--outputs [OUTPUTS]'],
           :type        => Array

    option :keep_artifacts,
           :dsecription => "Don't remove artifacts after building packages",
           :arguments   => ['--keep-artifacts'],
           :type        => :boolean

    # Handle alternative format that optparser can't parse.
    def post_option_parser(configuration)
      if ARGV.length >= 1
        configuration[:action] = ARGV.delete_at(0)

        configuration[:target] = ARGV.delete_at(0) || "."<commit_msg>maint - fix typo in plugin application<commit_after>module MCollective
  class Application::Plugin<Application

    exclude_argument_sections "common", "filter", "rpc"

    description "MCollective Plugin Application"
    usage <<-END_OF_USAGE
mco plugin package [options] <directory>
       mco plugin info <directory>
       mco plugin doc <plugin>
       mco plugin doc <type/plugin>
       mco plugin generate agent <pluginname> [actions=val,val]
       mco plugin generate data <pluginname> [outputs=val,val]

          info : Display plugin information including package details.
       package : Create all available plugin packages.
           doc : Display documentation for a specific plugin.
    END_OF_USAGE

    option :pluginname,
           :description => 'Plugin name',
           :arguments   => ['-n', '--name NAME'],
           :type        => String

    option :postinstall,
           :description => 'Post install script',
           :arguments   => ['--postinstall POSTINSTALL'],
           :type        => String

    option :preinstall,
           :description => 'Pre install script',
           :arguments   => ['--preinstall PREINSTALL'],
           :type        => String

    option :revision,
           :description => 'Revision number',
           :arguments   => ['--revision REVISION'],
           :type        => String

    option :iteration,
           :description => 'DEPRECATED - Use --revision instead',
           :arguments   => ['--iteration ITERATION'],
           :type        => String

    option :vendor,
           :description => 'Vendor name',
           :arguments   => ['--vendor VENDOR'],
           :type        => String

    option :pluginpath,
           :description => 'MCollective plugin path',
           :arguments   => ['--pluginpath PATH'],
           :type        => String

    option :mcname,
           :description => 'MCollective type (mcollective, pe-mcollective) that the packages depend on',
           :arguments   => ['--mcname NAME'],
           :type        => String

    option :mcversion,
           :description => 'Version of MCollective that the packages depend on',
           :arguments   => ['--mcversion MCVERSION'],
           :type        => String

    option :dependency,
           :description => 'Adds a dependency to the plugin',
           :arguments   => ['--dependency DEPENDENCIES'],
           :type        => :array

    option :format,
           :description => 'Package output format. Defaults to rpmpackage or debpackage',
           :arguments   => ['--format OUTPUTFORMAT'],
           :type        => String

    option :sign,
           :description => 'Embed a signature in the package',
           :arguments   => ['--sign'],
           :type        => :boolean

    option :rpctemplate,
           :description => 'Template to use.',
           :arguments   => ['--template HELPTEMPLATE'],
           :type        => String

    option :description,
           :description => 'Plugin description',
           :arguments   => ['--description DESCRIPTION'],
           :type        => String

    option :author,
           :description => 'The author of the plugin',
           :arguments   => ['--author AUTHOR'],
           :type        => String

    option :license,
           :description => 'The license under which the plugin is distributed',
           :arguments   => ['--license LICENSE'],
           :type        => String

    option :version,
           :description => 'The version of the plugin',
           :arguments   => ['--pluginversion VERSION'],
           :type        => String

    option :url,
           :description => 'Url at which information about the plugin can be found',
           :arguments   => ['--url URL'],
           :type        => String

    option :timeout,
           :description => "The plugin's timeout",
           :arguments   => ['--timeout TIMEOUT'],
           :type        => Integer

    option :actions,
           :description => 'Actions to be generated for an Agent Plugin',
           :arguments   => ['--actions [ACTIONS]'],
           :type        => Array

    option :outputs,
           :description => 'Outputs to be generated for an Data Plugin',
           :arguments   => ['--outputs [OUTPUTS]'],
           :type        => Array

    option :keep_artifacts,
           :description => "Don't remove artifacts after building packages",
           :arguments   => ['--keep-artifacts'],
           :type        => :boolean

    # Handle alternative format that optparser can't parse.
    def post_option_parser(configuration)
      if ARGV.length >= 1
        configuration[:action] = ARGV.delete_at(0)

        configuration[:target] = ARGV.delete_at(0) || "."
{'fraction_non_alphanumeric': 0.11838631323265392, 'fraction_numerical': 0.0006336466363924385, 'mean_word_length': 1.8524096385542168, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 149, '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': '7545900', 'n_tokens_mistral': 2369, 'n_tokens_neox': 2267, 'n_words': 743}