class Gemsmith::Tools::Packager
Builds a gem package for distribution.
Attributes
command[R]
Public Class Methods
new(command: Gem::CommandManager.new)
click to toggle source
# File lib/gemsmith/tools/packager.rb, line 15 def initialize command: Gem::CommandManager.new @command = command end
Public Instance Methods
call(specification)
click to toggle source
:reek: TooManyStatements
# File lib/gemsmith/tools/packager.rb, line 20 def call specification command.run ["build", "#{specification.name}.gemspec"] specification.package_path.then { |path| path.make_ancestors.basename.copy path.parent } Success specification rescue Gem::Exception => error Failure error.message end