Sha256: 3503763f8bd7a40157ed1ad8883f851b2c460b2e270813275e52fc2b99bb3b0e
Contents?: true
Size: 775 Bytes
Versions: 20
Compression:
Stored size: 775 Bytes
Contents
class MeblaHelper attr_accessor :host, :username, :password def initialize @host = "localhost" @username = "" @password = "" Mebla.configure do |config| index = "mebla" host = "localhost" port = 9200 end if File.exist?("spec/fixtures/mongoid.yml") config = YAML.load(File.open("spec/fixtures/mongoid.yml")) @host = config["host"] @username = config["username"] @password = config["password"] end end def setup_mongoid Mongoid.configure do |config| name = "mebla" host = @host username = @username password = @password config.allow_dynamic_fields = false config.master = Mongo::Connection.new.db(name) end end end
Version data entries
20 entries across 20 versions & 2 rubygems