Module: Carson::Runtime::Deliver
- Included in:
- Carson::Runtime
- Defined in:
- lib/carson/runtime/deliver.rb
Constant Summary collapse
- DELIVER_MERGE_ATTEMPT_CAP =
3
Instance Method Summary collapse
-
#deliver!(title: nil, body_file: nil, commit_message: nil, json_output: false) ⇒ Object
Entry point for ‘carson deliver`.
Instance Method Details
#deliver!(title: nil, body_file: nil, commit_message: nil, json_output: false) ⇒ Object
Entry point for ‘carson deliver`. Delegates to the OO domain model: Warehouse → Courier → Waybill. The Courier orchestrates the delivery; Carson renders the result.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/carson/runtime/deliver.rb', line 11 def deliver!( title: nil, body_file: nil, commit_message: nil, json_output: false ) warehouse = Warehouse.new( path: work_dir, main_label: config.main_branch, bureau_address: config.git_remote, compliance_checker: method( :deliver_compliance_checker ) ) parcel = Parcel.new( label: current_branch, head: current_head ) courier = Courier.new( warehouse, ledger: ledger, merge_method: config.govern_merge_method, poll_interval_at_registry: config.poll_interval_at_registry ) result = courier.deliver( parcel, title: title, body_file: body_file, commit_message: ) deliver_oo_finish( result: result, json_output: json_output ) end |