Class: GemPublisher::Pusher
- Inherits:
-
Object
- Object
- GemPublisher::Pusher
- Defined in:
- lib/gem_publisher/pusher.rb
Constant Summary collapse
- PUSH_METHODS =
{ "rubygems" => %w[gem push], "gemfury" => %w[fury push] }
Instance Method Summary collapse
-
#initialize(cli_facade = CliFacade.new) ⇒ Pusher
constructor
A new instance of Pusher.
- #push(gem, method, options = {}) ⇒ Object
Constructor Details
Instance Method Details
#push(gem, method, options = {}) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/gem_publisher/pusher.rb', line 14 def push(gem, method, = {}) push_command = PUSH_METHODS[method.to_s] or raise "Unknown Gem push method #{method.inspect}." push_command += [gem] push_command += ["--as", [:as]] if [:as] @cli_facade.execute *push_command end |