Sha256: c1f8cf27b94e63948cb010a583d34fddf0e1c3e78f180e002f07365a44a86bef

Contents?: true

Size: 670 Bytes

Versions: 2

Compression:

Stored size: 670 Bytes

Contents

# Ensure we use 'syck' instead of 'psych' in 1.9.2
# RubyGems >= 1.5.0 uses 'psych' on 1.9.2, but
# Psych does not yet support YAML 1.1 merge keys.
# Merge keys is often used in mongoid.yml
# See: http://redmine.ruby-lang.org/issues/show/4300
require 'mongoid/version'

if RUBY_VERSION >= '1.9.2' && RUBY_VERSION < '2.2.0'
  YAML::ENGINE.yamler = 'syck'
end

Mongoid.configure do |config|
  if Mongoid::VERSION >= '5.0.0'
    config.connect_to 'kaminari_test'
  elsif Mongoid::VERSION > '3.0.0'
    config.sessions = {:default => {:hosts => ['0.0.0.0:27017'], :database => 'kaminari_test'}}
  else
    config.master = Mongo::Connection.new.db('kaminari_test')
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/kaminari-0.17.0/spec/fake_app/mongoid/config.rb
kaminari-0.17.0 spec/fake_app/mongoid/config.rb