Module: GemPublisher
- Defined in:
- lib/gem_publisher.rb,
lib/gem_publisher/pusher.rb,
lib/gem_publisher/builder.rb,
lib/gem_publisher/version.rb,
lib/gem_publisher/publisher.rb,
lib/gem_publisher/cli_facade.rb,
lib/gem_publisher/git_remote.rb
Defined Under Namespace
Classes: Builder, CliFacade, GitRemote, Publisher, Pusher
Constant Summary collapse
- VERSION =
"0.0.3"
Class Method Summary collapse
-
.publish_if_updated(gemspec, version, method = :rubygems) ⇒ Object
Publish a gem based on the supplied gemspec and version via method, iff this version has not already been released and tagged in the origin Git repository.
Class Method Details
.publish_if_updated(gemspec, version, method = :rubygems) ⇒ Object
Publish a gem based on the supplied gemspec and version via method, iff this version has not already been released and tagged in the origin Git repository.
If a remote tag matching the version already exists, nothing is done. Otherwise, the gem is built, pushed, and tagged.
Version should be a string of the form “1.2.3”. Tags are expected to be of the form “v1.2.3”, and generated tags follow this pattern.
Method should be one of :rubygems or :gemfury, and the requisite credentials for the corresponding push command line tools must exist.
Returns the gem file name if a gem was published; nil otherwise. A CliFacade::Error will be raised if a command fails.
22 23 24 |
# File 'lib/gem_publisher.rb', line 22 def self.publish_if_updated(gemspec, version, method=:rubygems) Publisher.new(gemspec, version).publish_if_updated(method) end |