Sha256: 6d90cc1d7e341d9dd74c9223080d810b7dde0efcf669575eb708a1dc79c0c488
Contents?: true
Size: 468 Bytes
Versions: 2
Compression:
Stored size: 468 Bytes
Contents
require 'rubygems' begin require 'couch_foo' rescue LoadError => e raise MissingLibrary, "CouchFoo could not be loaded (is it installed?): #{e.message}" end require 'yaml' require 'logger' module Capcode module Resource end Base = CouchFoo::Base class << self def db_connect( dbfile, logfile ) dbconfig = YAML::load(File.open(dbfile)).keys_to_sym Base.set_database(dbconfig) Base.logger = Logger.new(logfile) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
Capcode-0.8.9 | lib/capcode/base/couchdb.rb |
Capcode-0.8.8 | lib/capcode/base/couchdb.rb |