Class: Gemsmith::Tools::Publisher

Inherits:
Object
  • Object
show all
Defined in:
lib/gemsmith/tools/publisher.rb

Overview

Handles the publication of a gem version.

Constant Summary collapse

STEPS =

Order matters.

[
  Tools::Cleaner.new,
  Tools::Validator.new,
  Tools::Packager.new,
  Tools::Versioner.new,
  Tools::Pusher.new
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(steps: STEPS) ⇒ Publisher

Returns a new instance of Publisher.



20
21
22
# File 'lib/gemsmith/tools/publisher.rb', line 20

def initialize steps: STEPS
  @steps = steps
end

Instance Method Details

#call(specification) ⇒ Object



24
25
26
27
# File 'lib/gemsmith/tools/publisher.rb', line 24

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