lib/milestoner/publisher.rb in milestoner-0.5.0 vs lib/milestoner/publisher.rb in milestoner-1.0.0
- old
+ new
@@ -1,17 +1,15 @@
module Milestoner
# Handles the tagging and pushing of a milestone to a remote repository.
class Publisher
- def initialize tagger, pusher
+ def initialize tagger: Tagger.new, pusher: Pusher.new
@tagger = tagger
@pusher = pusher
end
def publish version, sign: false
tagger.create version, sign: sign
pusher.push
- ensure
- tagger.destroy
end
private
attr_reader :tagger, :pusher