Module: GitTools::Branches

Defined in:
lib/git_tools/branches/cleaner.rb

Defined Under Namespace

Classes: ActionExecutor, Branch, Cleaner

Constant Summary collapse

KEEP_LIST =
%w(master develop development testing stable release production)
KEEP_BRANCH_FILENAME =
File.join(CUSTOM_DIR, 'keep_branches')

Class Method Summary collapse

Class Method Details

.default_keep_listObject



17
18
19
# File 'lib/git_tools/branches/cleaner.rb', line 17

def self.default_keep_list
  KEEP_LIST + git_keep_branches_from_file
end

.git_keep_branches_from_fileObject



9
10
11
12
13
14
15
# File 'lib/git_tools/branches/cleaner.rb', line 9

def self.git_keep_branches_from_file
  if File.exists?(KEEP_BRANCH_FILENAME)
    File.readlines(KEEP_BRANCH_FILENAME).each { |line| line.strip! }
  else
    []
  end
end