Class: GitWorkflow::Configuration

Inherits:
Object
  • Object
show all
Includes:
Git, Singleton
Defined in:
lib/git_workflow/configuration.rb

Defined Under Namespace

Classes: Convention

Instance Method Summary collapse

Methods included from Git

#checkout_or_create_branch, #get_config_value_for, #get_config_value_for!, #in_git_branch, #merge_branch, #repository, #set_config_value

Instance Method Details

#api_tokenObject



85
86
87
# File 'lib/git_workflow/configuration.rb', line 85

def api_token
  @api_token ||= get_config_value_for!('pt.token')
end

#ignore_git_global?Boolean

Returns:

  • (Boolean)


89
90
91
# File 'lib/git_workflow/configuration.rb', line 89

def ignore_git_global?
  ENV['IGNORE_GIT_GLOBAL']
end

#local_branch_conventionObject



73
74
75
# File 'lib/git_workflow/configuration.rb', line 73

def local_branch_convention
  @local_branch_convention ||= Convention.new(get_config_value_for!('workflow.localbranchconvention'))
end

#project_idObject



81
82
83
# File 'lib/git_workflow/configuration.rb', line 81

def project_id
  @project_id ||= get_config_value_for!('pt.projectid')
end

#remote_branch_conventionObject



77
78
79
# File 'lib/git_workflow/configuration.rb', line 77

def remote_branch_convention
  @remote_branch_convention ||= Convention.new(get_config_value_for!('workflow.remotebranchconvention'))
end

#usernameObject



69
70
71
# File 'lib/git_workflow/configuration.rb', line 69

def username
  @username ||= get_config_value_for('pt.username') || get_config_value_for!('user.name')
end