Class: Samus::Publisher
- Inherits:
-
Object
- Object
- Samus::Publisher
- Defined in:
- lib/samus/publisher.rb
Instance Method Summary collapse
-
#initialize(dir) ⇒ Publisher
constructor
A new instance of Publisher.
- #publish(dry_run = false) ⇒ Object
Constructor Details
#initialize(dir) ⇒ Publisher
Returns a new instance of Publisher.
7 8 9 10 |
# File 'lib/samus/publisher.rb', line 7 def initialize(dir) @dir = dir @stage = 'publish' end |
Instance Method Details
#publish(dry_run = false) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/samus/publisher.rb', line 12 def publish(dry_run = false) Dir.chdir(@dir) do actions.map do |action| PublishAction.new( dry_run: dry_run, arguments: { 'VERSION' => manifest['version'] } ).load(action) end.each(&:run) end end |