<commit_before>require 'rubygems/tasks/sign/task'

module Gem
  class Tasks
    module Sign
      #
      # The `sign:pgp` task.
      #
      class PGP < Task

        #
        # Initializes the `sign` task.
        #
        # @param [Hash] options
        #   Digest options.
        #
        def initialize(options={})
          super()

          yield self if block_given?
          define
        end

        #
        # Defines the `sign:pgp` task.
        #
        def define
          sign_task :pgp

          task :pgp => 'sign:pgp'
        end

        #
        # PGP signs a package.
        #
        # @param [String] path
        #   The path to the package.
        #
        # @api semipublic
        #
        def sign(path)
          status "Signing #{File.basename(path)} ..."

          run 'gpg', '-a', '--sign', path
        end<commit_msg>Use --armor --detach-sign for portable PGP signatures.<commit_after>require 'rubygems/tasks/sign/task'

module Gem
  class Tasks
    module Sign
      #
      # The `sign:pgp` task.
      #
      class PGP < Task

        #
        # Initializes the `sign` task.
        #
        # @param [Hash] options
        #   Digest options.
        #
        def initialize(options={})
          super()

          yield self if block_given?
          define
        end

        #
        # Defines the `sign:pgp` task.
        #
        def define
          sign_task :pgp

          task :pgp => 'sign:pgp'
        end

        #
        # PGP signs a package.
        #
        # @param [String] path
        #   The path to the package.
        #
        # @api semipublic
        #
        def sign(path)
          status "Signing #{File.basename(path)} ..."

          run 'gpg', '--sign', '--detach-sign', '--armor', path
        end
{'fraction_non_alphanumeric': 0.10704381586245147, 'fraction_numerical': 0.0, 'mean_word_length': 1.194647201946472, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6062278', 'n_tokens_mistral': 556, 'n_tokens_neox': 538, 'n_words': 144}