Method: BigKeeper::ModuleService#add

Defined in:
lib/big_keeper/service/module_service.rb

#add(path, user, module_name, name, type) ⇒ Object



74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/big_keeper/service/module_service.rb', line 74

def add(path, user, module_name, name, type)
  home_branch_name = "#{GitflowType.name(type)}/#{name}"
  Logger.highlight("Add branch '#{home_branch_name}' for module '#{module_name}'...")


  verify_module(path, user, module_name, home_branch_name, type)

  module_path = BigkeeperParser.module_path(user, module_name)
  PodfileOperator.new.find_and_replace("#{path}/Podfile",
                                       module_name,
                                       ModuleType::PATH,
                                       module_path)
end