class Monolith::RepositoryCreator
Constants
- BRANCH
- COMMIT
Public Class Methods
new(repo)
click to toggle source
# File lib/monolith/repository_creator.rb 10 def initialize(repo) 11 @repo = repo 12 end
Public Instance Methods
create()
click to toggle source
# File lib/monolith/repository_creator.rb 14 def create 15 within_working_dir do 16 initialize_git_repo 17 generate_first_commit 18 checkout_monolith_branch 19 end 20 end
Private Instance Methods
checkout_monolith_branch()
click to toggle source
# File lib/monolith/repository_creator.rb 32 def checkout_monolith_branch 33 run!("checkout -b #{BRANCH}") 34 end
generate_first_commit()
click to toggle source
# File lib/monolith/repository_creator.rb 28 def generate_first_commit 29 run!("commit --allow-empty -m '#{COMMIT}'") 30 end
initialize_git_repo()
click to toggle source
# File lib/monolith/repository_creator.rb 24 def initialize_git_repo 25 run!("init .") 26 end