Class: Monolith::Generator
- Inherits:
-
Object
- Object
- Monolith::Generator
- Extended by:
- Forwardable
- Includes:
- Logger
- Defined in:
- lib/monolith/generator.rb
Instance Method Summary collapse
- #clone ⇒ Object
- #generate ⇒ Object
-
#initialize(monolith) ⇒ Generator
constructor
A new instance of Generator.
Methods included from Logger
Constructor Details
#initialize(monolith) ⇒ Generator
Returns a new instance of Generator.
8 9 10 |
# File 'lib/monolith/generator.rb', line 8 def initialize(monolith) @monolith = monolith end |
Instance Method Details
#clone ⇒ Object
12 13 14 15 16 17 |
# File 'lib/monolith/generator.rb', line 12 def clone repositories.each do |repo| log("Cloning repository #{repo.name.blue}") repo.clone end end |
#generate ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/monolith/generator.rb', line 19 def generate clone fetch_all_remotes run_after_clone_hooks create_monolith add_remotes_to_monolith prepare_branches_for_merge merge_branches_into_monolith remove_remotes_from_monolith checkout_master_on_monolith run_after_generate_hooks end |