Sha256: 68cf978ea08dc4b008334e67fa540300657e9b0ab810912e5d5af4f47c2f2511

Contents?: true

Size: 557 Bytes

Versions: 32

Compression:

Stored size: 557 Bytes

Contents

require 'database_cleaner/generic/base'
module DatabaseCleaner
  module Sequel
    def self.available_strategies
      %w[truncation transaction]
    end

    module Base
      include ::DatabaseCleaner::Generic::Base

      def db=(desired_db)
        @db = desired_db
      end

      def db
        return @db if @db && @db != :default
        raise "As you have more than one active sequel database you have to specify the one to use manually!" if ::Sequel::DATABASES.count > 1 
        ::Sequel::DATABASES.first || :default
      end
    end
  end
end

Version data entries

32 entries across 21 versions & 5 rubygems

Version Path
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/sequel/base.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/database_cleaner-1.2.0/lib/database_cleaner/sequel/base.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/sequel/base.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/sequel/base.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/database_cleaner-1.2.0/lib/database_cleaner/sequel/base.rb
apl-library-0.0.90 vendor/bundle/ruby/1.9.1/gems/database_cleaner-1.2.0/lib/database_cleaner/sequel/base.rb
raffle_v1-0.0.5 lib/database_cleaner-0.7.2/lib/database_cleaner/sequel/base.rb
database_cleaner-1.3.0 lib/database_cleaner/sequel/base.rb
database_cleaner-1.2.0 lib/database_cleaner/sequel/base.rb
database_cleaner-1.1.1 lib/database_cleaner/sequel/base.rb
database_cleaner-1.1.0 lib/database_cleaner/sequel/base.rb
database_cleaner-1.0.1 lib/database_cleaner/sequel/base.rb
database_cleaner-1.0.0.RC1 lib/database_cleaner/sequel/base.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.9.1/lib/database_cleaner/sequel/base.rb
database_cleaner-0.9.1 lib/database_cleaner/sequel/base.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/lib/database_cleaner/sequel/base.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/lib/database_cleaner/sequel/base.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/lib/database_cleaner/sequel/base.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/lib/database_cleaner/sequel/base.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/rails-uploader-0.0.1/vendor/bundle/ruby/1.9.1/gems/database_cleaner-0.7.2/lib/database_cleaner/sequel/base.rb