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

Version Path
rmla-1.0 spec/mebla_helper.rb
mebla-1.1.14 spec/mebla_helper.rb
mebla-1.1.13 spec/mebla_helper.rb
mebla-1.1.12 spec/mebla_helper.rb
mebla-1.1.11 spec/mebla_helper.rb
mebla-1.1.10 spec/mebla_helper.rb
mebla-1.1.9 spec/mebla_helper.rb
mebla-1.1.8 spec/mebla_helper.rb
mebla-1.1.7 spec/mebla_helper.rb
mebla-1.1.6 spec/mebla_helper.rb
mebla-1.1.5 spec/mebla_helper.rb
mebla-1.1.4 spec/mebla_helper.rb
mebla-1.1.2 spec/mebla_helper.rb
mebla-1.1.1 spec/mebla_helper.rb
mebla-1.1.0 spec/mebla_helper.rb
mebla-1.0.3 spec/mebla_helper.rb
mebla-1.0.2 spec/mebla_helper.rb
mebla-1.0.1 spec/mebla_helper.rb
mebla-1.0.0 spec/mebla_helper.rb
mebla-1.0.0.rc2 spec/mebla_helper.rb