Sha256: 7e4f5f0ffc9ba816ca5d2a2710874c87878b65e52f755b5db7bd1b427b9c4585

Contents?: true

Size: 637 Bytes

Versions: 3

Compression:

Stored size: 637 Bytes

Contents

# frozen_string_literal: true

module Milestoner
  module Tags
    # Handles the tagging and pushing of a tag to a remote repository.
    class Publisher
      include Import[:logger]

      def initialize creator: Tags::Creator.new, pusher: Tags::Pusher.new, **dependencies
        super(**dependencies)
        @creator = creator
        @pusher = pusher
      end

      def call configuration = Container[:configuration]
        creator.call configuration
        pusher.call configuration
        logger.info { "Published: #{configuration.version}!" }
      end

      private

      attr_reader :creator, :pusher
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
milestoner-15.2.0 lib/milestoner/tags/publisher.rb
milestoner-15.1.0 lib/milestoner/tags/publisher.rb
milestoner-15.0.0 lib/milestoner/tags/publisher.rb