Top Level Namespace

Defined Under Namespace

Modules: CodebaseSan

Constant Summary collapse

HEROKU_CONFIG_FILE =
Rails.root.join('config', 'heroku.yml')

Instance Method Summary collapse

Instance Method Details

#git_config_variable(name) ⇒ Object



77
78
79
80
81
82
83
84
# File 'lib/codebase_san/tasks.rb', line 77

def git_config_variable(name)
  if name.is_a?(Symbol)
    r = `git config codebase.#{name.to_s}`.chomp
  else
    r = `git config #{name.to_s}`.chomp
  end
  r.empty? ? nil : r
end

#heroku_settingsObject



88
89
90
91
92
93
94
# File 'lib/codebase_san/tasks.rb', line 88

def heroku_settings
  if File.exists?(HEROKU_CONFIG_FILE)
    YAML.load_file(HEROKU_CONFIG_FILE) 
  else
    {} 
  end
end