Class: MKBrut::Segments::Heroku
- Defined in:
- lib/mkbrut/segments/heroku.rb
Constant Summary
Constants included from MKBrut
Class Method Summary collapse
Instance Method Summary collapse
- #add! ⇒ Object
-
#initialize(app_options:, current_dir:, templates_dir:) ⇒ Heroku
constructor
A new instance of Heroku.
- #other_operations ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(app_options:, current_dir:, templates_dir:) ⇒ Heroku
4 5 6 7 8 |
# File 'lib/mkbrut/segments/heroku.rb', line 4 def initialize(app_options:, current_dir:, templates_dir:) @project_root = current_dir / .app_name @templates_dir = templates_dir / "segments" / "Heroku" @erb_binding = MKBrut::ErbBindingDelegate.new() end |
Class Method Details
.friendly_name ⇒ Object
2 |
# File 'lib/mkbrut/segments/heroku.rb', line 2 def self.friendly_name = "Heroku-based Deployment" |
Instance Method Details
#add! ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/mkbrut/segments/heroku.rb', line 10 def add! operations = copy_files(@templates_dir, @project_root) + other_operations operations.each do |operation| operation.call end end |
#other_operations ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/mkbrut/segments/heroku.rb', line 19 def other_operations [ MKBrut::Ops::AppendToFile.new( file: @project_root / ".gitignore", content: %{ # These are generated by bin/deploy deploy/Dockerfile.* } ) ] end |