class Milestoner::Tags::Publisher

Handles the tagging and pushing of a tag to a remote repository.

Attributes

creator[R]
pusher[R]

Public Class Methods

new(creator: Tags::Creator.new, pusher: Tags::Pusher.new, **) click to toggle source
Calls superclass method
# File lib/milestoner/tags/publisher.rb, line 12
def initialize(creator: Tags::Creator.new, pusher: Tags::Pusher.new, **)
  super(**)
  @creator = creator
  @pusher = pusher
end

Public Instance Methods

call(version) click to toggle source
# File lib/milestoner/tags/publisher.rb, line 18
def call version
  creator.call(version)
         .bind { pusher.call version }
         .bind { log_info version }
end

Private Instance Methods

log_info(version) click to toggle source
# File lib/milestoner/tags/publisher.rb, line 28
def log_info version
  logger.info { "Published: #{version}" }
  Success version
end