Sha256: 8ab2b5e328f4039f67e3e490bcec9e48fc8e1bc2011ab7100cad5ff59a248283

Contents?: true

Size: 733 Bytes

Versions: 11

Compression:

Stored size: 733 Bytes

Contents

require 'database_cleaner/mongoid/base'
require 'database_cleaner/generic/truncation'
require 'database_cleaner/mongo/truncation_mixin'
require 'database_cleaner/moped/truncation_base'
require 'mongoid/version'

module DatabaseCleaner
  module Mongoid
    class Truncation
      include ::DatabaseCleaner::Mongoid::Base
      include ::DatabaseCleaner::Generic::Truncation

      if ::Mongoid::VERSION < '3'

        include ::DatabaseCleaner::Mongo::TruncationMixin

        private

        def database
          ::Mongoid.database
        end

      else

        include ::DatabaseCleaner::Moped::TruncationBase

        private

        def session
          ::Mongoid.default_session
        end

      end

    end
  end
end

Version data entries

11 entries across 6 versions & 2 rubygems

Version Path
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/database_cleaner-1.2.0/lib/database_cleaner/mongoid/truncation.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/database_cleaner-1.2.0/lib/database_cleaner/mongoid/truncation.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/database_cleaner-1.2.0/lib/database_cleaner/mongoid/truncation.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.8/gems/database_cleaner-1.2.0/lib/database_cleaner/mongoid/truncation.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.9.1/gems/database_cleaner-1.2.0/lib/database_cleaner/mongoid/truncation.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/database_cleaner-1.2.0/lib/database_cleaner/mongoid/truncation.rb
database_cleaner-1.3.0 lib/database_cleaner/mongoid/truncation.rb
database_cleaner-1.2.0 lib/database_cleaner/mongoid/truncation.rb
database_cleaner-1.1.1 lib/database_cleaner/mongoid/truncation.rb
database_cleaner-1.1.0 lib/database_cleaner/mongoid/truncation.rb
database_cleaner-1.0.1 lib/database_cleaner/mongoid/truncation.rb