Sha256: 851bb613dfb529f2aa79848f7c303000442ec79f301df256b603771f7a209a2f

Contents?: true

Size: 668 Bytes

Versions: 6

Compression:

Stored size: 668 Bytes

Contents

# frozen_string_literal: true

module Milestoner
  module Tags
    # Handles the tagging and pushing of a tag to a remote repository.
    class Publisher
      def initialize tagger: Tags::Creator.new, pusher: Tags::Pusher.new, container: Container
        @tagger = tagger
        @pusher = pusher
        @container = container
      end

      def call configuration = CLI::Configuration::Loader.call
        tagger.call configuration
        pusher.call configuration
        logger.info { "Published: #{configuration.version}!" }
      end

      private

      attr_reader :tagger, :pusher, :container

      def logger = container[__method__]
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
milestoner-13.3.1 lib/milestoner/tags/publisher.rb
milestoner-13.3.0 lib/milestoner/tags/publisher.rb
milestoner-13.2.0 lib/milestoner/tags/publisher.rb
milestoner-13.1.0 lib/milestoner/tags/publisher.rb
milestoner-13.0.1 lib/milestoner/tags/publisher.rb
milestoner-13.0.0 lib/milestoner/tags/publisher.rb