lib/gemsmith/cli/actions/publish.rb in gemsmith-20.1.0 vs lib/gemsmith/cli/actions/publish.rb in gemsmith-20.2.0
- old
+ new
@@ -8,11 +8,11 @@
module Gemsmith
module CLI
module Actions
# Handles the publish action.
class Publish < Sod::Action
- include Gemsmith::Import[:logger]
+ include Import[:logger]
include Dry::Monads[:result]
description "Publish gem to remote gem server."
ancillary "Optionally computes gem package based on current directory."
@@ -25,12 +25,11 @@
super(**)
@publisher = publisher
@loader = loader
end
- # :reek:ControlParameter
- def call name = nil
- case publisher.call loader.call("#{name || default}.gemspec")
+ def call name = default
+ case publisher.call loader.call("#{name}.gemspec")
in Success(spec) then logger.info { "Published: #{spec.package_name}." }
in Failure(message) then log_error { message }
else log_error { "Unable to handle publish action." }
end
end