Sha256: 53cf79adca5412b3345bbeba993fa35eb489d6adbb3a8481ecd64cc96baeed5b

Contents?: true

Size: 648 Bytes

Versions: 62

Compression:

Stored size: 648 Bytes

Contents

# frozen_string_literal: true

require "dry/monads"

module Gemsmith
  module Tools
    # Handles the publication of a gem version.
    class Publisher
      include Dry::Monads[:result, :do]

      # Order matters.
      STEPS = [
        Tools::Cleaner.new,
        Tools::Validator.new,
        Tools::Packager.new,
        Tools::Versioner.new,
        Tools::Pusher.new
      ].freeze

      def initialize steps: STEPS
        @steps = steps
      end

      def call specification
        steps.each { |step| yield step.call(specification) }
        Success specification
      end

      private

      attr_reader :steps
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
gemsmith-23.1.0 lib/gemsmith/tools/publisher.rb
gemsmith-23.0.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.10.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.9.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.8.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.7.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.6.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.5.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.4.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.3.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.2.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.1.0 lib/gemsmith/tools/publisher.rb
gemsmith-22.0.0 lib/gemsmith/tools/publisher.rb
gemsmith-21.10.0 lib/gemsmith/tools/publisher.rb
gemsmith-21.9.0 lib/gemsmith/tools/publisher.rb
gemsmith-21.6.0 lib/gemsmith/tools/publisher.rb
gemsmith-21.5.1 lib/gemsmith/tools/publisher.rb
gemsmith-21.5.0 lib/gemsmith/tools/publisher.rb
gemsmith-21.4.0 lib/gemsmith/tools/publisher.rb
gemsmith-21.3.0 lib/gemsmith/tools/publisher.rb