class ProcfileSplit::Spliter
Public Class Methods
branches_exists?(names)
click to toggle source
# File lib/procfile_split/split.rb, line 3 def self.branches_exists?(names) branches = Git.list_branch names.each do |name| if branches.include?(name) raise "abort: branch \"#{name}\" already exist!" end end end
perform(processes)
click to toggle source
# File lib/procfile_split/split.rb, line 12 def self.perform(processes) processes.keys.each do |process| # create branch Git.checkout process # overwrite procfile Procfile.create_procfile "Procfile", process, processes[process] # commit changes Git.add_and_commit "Procfile", "update Procfile for #{process}" end end