Sha256: 53cf79adca5412b3345bbeba993fa35eb489d6adbb3a8481ecd64cc96baeed5b

Contents?: true

Size: 648 Bytes

Versions: 63

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

63 entries across 63 versions & 1 rubygems

Version Path
gemsmith-21.3.0 lib/gemsmith/tools/publisher.rb
gemsmith-21.2.0 lib/gemsmith/tools/publisher.rb
gemsmith-21.1.0 lib/gemsmith/tools/publisher.rb
gemsmith-21.0.0 lib/gemsmith/tools/publisher.rb
gemsmith-20.7.0 lib/gemsmith/tools/publisher.rb
gemsmith-20.6.1 lib/gemsmith/tools/publisher.rb
gemsmith-20.6.0 lib/gemsmith/tools/publisher.rb
gemsmith-20.5.0 lib/gemsmith/tools/publisher.rb
gemsmith-20.4.0 lib/gemsmith/tools/publisher.rb
gemsmith-20.3.0 lib/gemsmith/tools/publisher.rb
gemsmith-20.2.1 lib/gemsmith/tools/publisher.rb
gemsmith-20.2.0 lib/gemsmith/tools/publisher.rb
gemsmith-20.1.0 lib/gemsmith/tools/publisher.rb
gemsmith-20.0.0 lib/gemsmith/tools/publisher.rb
gemsmith-19.8.0 lib/gemsmith/tools/publisher.rb
gemsmith-19.7.0 lib/gemsmith/tools/publisher.rb
gemsmith-19.6.0 lib/gemsmith/tools/publisher.rb
gemsmith-19.5.2 lib/gemsmith/tools/publisher.rb
gemsmith-19.5.1 lib/gemsmith/tools/publisher.rb
gemsmith-19.5.0 lib/gemsmith/tools/publisher.rb