Class: GemPublisher::Publisher
- Inherits:
-
Object
- Object
- GemPublisher::Publisher
- Defined in:
- lib/gem_publisher/publisher.rb
Instance Attribute Summary collapse
-
#builder ⇒ Object
Returns the value of attribute builder.
-
#git_remote ⇒ Object
Returns the value of attribute git_remote.
-
#pusher ⇒ Object
Returns the value of attribute pusher.
Instance Method Summary collapse
-
#initialize(gemspec, version) ⇒ Publisher
constructor
A new instance of Publisher.
- #publish_if_updated(method) ⇒ Object
Constructor Details
Instance Attribute Details
#builder ⇒ Object
Returns the value of attribute builder.
7 8 9 |
# File 'lib/gem_publisher/publisher.rb', line 7 def builder @builder end |
#git_remote ⇒ Object
Returns the value of attribute git_remote.
7 8 9 |
# File 'lib/gem_publisher/publisher.rb', line 7 def git_remote @git_remote end |
#pusher ⇒ Object
Returns the value of attribute pusher.
7 8 9 |
# File 'lib/gem_publisher/publisher.rb', line 7 def pusher @pusher end |
Instance Method Details
#publish_if_updated(method) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/gem_publisher/publisher.rb', line 17 def publish_if_updated(method) return unless version_bumped? @builder.build(@gemspec).tap { |gem| @pusher.push gem, method @git_remote.add_tag "v#@version" } end |