Class: Emeril::Releaser
- Inherits:
-
Object
- Object
- Emeril::Releaser
- Defined in:
- lib/emeril/releaser.rb
Overview
Tags a git commit with a version string and (optionally) pushes the cookbook to the Community Site.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Releaser
constructor
Creates a new instance.
-
#run ⇒ Object
Tags and releases a cookbook.
Constructor Details
#initialize(options = {}) ⇒ Releaser
Creates a new instance.
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/emeril/releaser.rb', line 35 def initialize( = {}) @logger = [:logger] @tag_prefix = [:tag_prefix] @source_path = .fetch(:source_path, Dir.pwd) @metadata = .fetch(:metadata) { } @category = .fetch(:category) { default_category } @git_tagger = .fetch(:git_tagger) { default_git_tagger } @publish_to_supermarket = .fetch( :publish_to_supermarket, .fetch(:publish_to_community, true) ) setup_publisher(.fetch(:publisher, nil)) end |
Instance Method Details
#run ⇒ Object
Tags and releases a cookbook.
51 52 53 54 |
# File 'lib/emeril/releaser.rb', line 51 def run git_tagger.run publisher.run if publish_to_supermarket end |