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
Publish the gem.
Constructor Details
Instance Method Details
#push(gem, method, options = {}) ⇒ Object
Publish the gem.
Supported options:
:as - specify a shared account to publish the gem (Gemfury only)
18 19 20 21 22 23 |
# File 'lib/gem_publisher/pusher.rb', line 18 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 |