lib/gemsmith/tools/versioner.rb in gemsmith-21.10.0 vs lib/gemsmith/tools/versioner.rb in gemsmith-22.0.0
- old
+ new
@@ -5,11 +5,10 @@
module Gemsmith
module Tools
# Versions (tags: local and remote) current project.
class Versioner
- include Import[:configuration]
include Dry::Monads[:result]
def initialize(
publisher: Milestoner::Tags::Publisher.new,
model: Milestoner::Configuration::Model,
@@ -18,15 +17,10 @@
super(**)
@publisher = publisher
@model = model
end
- def call specification
- publisher.call specification.version
- Success specification
- rescue Milestoner::Error => error
- Failure error.message
- end
+ def call(specification) = publisher.call(specification.version).fmap { specification }
private
attr_reader :publisher, :model
end