Sha256: 7ac713cb0da5c46eca9ad45ad6b599fbde84dd8f57103a89d7d86d83c6aad0a2

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 KB

Contents

require 'bundler'
Bundler.require(:default)

require File.expand_path(File.join(File.dirname(__FILE__), "collection/version"))

require File.expand_path(File.join(File.dirname(__FILE__), "collection/attributes"))
require File.expand_path(File.join(File.dirname(__FILE__), "collection/models/resource"))
require File.expand_path(File.join(File.dirname(__FILE__), "collection/models/snapshot"))
require File.expand_path(File.join(File.dirname(__FILE__), "collection/application"))

module Overwatch
  module Collection
  end  
  class << self
    def config_path=(path)
      @config_path = path
    end
    
    def config_path
      @config_path ||= File.expand_path(File.dirname(__FILE__)) + "/../../config/overwatch.yml"
    end
    
    def config
      @config ||= {}
      @config.merge!(YAML.load_file(config_path))
    end
  end

end

$redis = Redis.new(
  :host => Overwatch.config['collection']['storage']['host'],
  :port => Overwatch.config['collection']['storage']['port'],
  :db => Overwatch.config['collection']['storage']['db']
)

DataMapper.setup(:default, { 
  :adapter => "redis",
  :host => Overwatch.config['collection']['storage']['host'],
  :port => Overwatch.config['collection']['storage']['port'],
  :db => Overwatch.config['collection']['storage']['db']
})

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
overwatch-collection-0.1.1 lib/overwatch/collection.rb