lib/heroku_db_clone/client.rb
# Internal: Get the configuration of the local development database
Get the configuration of the local development database
Get the configuration of the local development database
def load_db_information 
      raise "config/database.yml does not exist at the current location: #{File.expand_path('.')}" unless File.exists?('config/database.yml')
      dev_db = ::YAML.load_file('config/database.yml')["development"]
      @db_name     = dev_db["database"]
      @db_user     = dev_db['username']
      @db_password = dev_db['password']
      @db_host     = dev_db['host']
    end
def load_db_information raise "config/database.yml does not exist at the current location: #{File.expand_path('.')}" unless File . exists? ( 'config/database.yml' ) dev_db = :: YAML . load_file ( 'config/database.yml' ) [ "development" ] @db_name = dev_db [ "database" ] @db_user = dev_db [ 'username' ] @db_password = dev_db [ 'password' ] @db_host = dev_db [ 'host' ] end
Internal: Get the configuration of the local development database
Internal : Get the configuration of the local development database