class Thegarage::Gitx::Configuration

Constants

CONFIG_FILE
DEFAULT_CONFIG

Attributes

config[R]

Public Class Methods

new(root_dir) click to toggle source
# File lib/thegarage/gitx/configuration.rb, line 15
def initialize(root_dir)
  @config = Thor::CoreExt::HashWithIndifferentAccess.new(DEFAULT_CONFIG)
  config_file_path = File.join(root_dir, CONFIG_FILE)
  if File.exists?(config_file_path)
    @config.merge!(::YAML::load_file(config_file_path))
  end
end

Public Instance Methods

aggregate_branch?(branch) click to toggle source
# File lib/thegarage/gitx/configuration.rb, line 26
def aggregate_branch?(branch)
  aggregate_branches.include?(branch)
end
aggregate_branches() click to toggle source
# File lib/thegarage/gitx/configuration.rb, line 23
def aggregate_branches
  config[:aggregate_branches]
end
reserved_branch?(branch) click to toggle source
# File lib/thegarage/gitx/configuration.rb, line 34
def reserved_branch?(branch)
  reserved_branches.include?(branch)
end
reserved_branches() click to toggle source
# File lib/thegarage/gitx/configuration.rb, line 30
def reserved_branches
  config[:reserved_branches]
end
taggable_branch?(branch) click to toggle source
# File lib/thegarage/gitx/configuration.rb, line 42
def taggable_branch?(branch)
  taggable_branches.include?(branch)
end
taggable_branches() click to toggle source
# File lib/thegarage/gitx/configuration.rb, line 38
def taggable_branches
  config[:taggable_branches]
end