module GitHub::Config

Keeps all the configuration stuff

Constants

Options
Path

Constant with defined all the paths used in the application

Secrets

Secrets array, uses env vars if defined

VERSION
Version

Public Class Methods

reset() click to toggle source
# File lib/github-api-client/config.rb, line 67
def self.reset
  File.delete Path[:dbfile]
  setup
end
setup() click to toggle source

Sets up the database and migrates it @return [nil]

# File lib/github-api-client/config.rb, line 55
def self.setup
  Dir.mkdir GitHub::Config::Path[:dir] rescue nil
  ActiveRecord::Base.establish_connection(
    :adapter => 'sqlite3', 
    :database => GitHub::Config::Path[:dbfile]
  )
  ActiveRecord::Migrator.migrate(
    GitHub::Config::Path[:migrations], 
    nil
  ) if not File.exists? GitHub::Config::Path[:dbfile]
end