Sha256: df38ab4b182061c5bd509c36e598d700e9469fd7f9f6e1b7417a93e3a77f910b

Contents?: true

Size: 965 Bytes

Versions: 2

Compression:

Stored size: 965 Bytes

Contents

module Doorkeeper
  module Orm
    module MongoMapper
      def self.initialize_models!
        install_dependencies!

        require 'doorkeeper/orm/mongo_mapper/access_grant'
        require 'doorkeeper/orm/mongo_mapper/access_token'
        require 'doorkeeper/orm/mongo_mapper/application'
      end

      def self.initialize_application_owner!
        require 'doorkeeper/models/concerns/ownership'

        Doorkeeper::Application.send :include, Doorkeeper::Models::Ownership
      end

      def self.check_requirements!(_config); end

      def self.install_dependencies!
        if ::ActiveModel::VERSION::MAJOR >= 5
          begin
            require 'activemodel-serializers-xml'
          rescue LoadError
            $stderr.print 'Failed to load ActiveModel::Serializers::Xml. ' \
                          "You need to add 'activemodel-serializers-xml' gem to your Gemfile."
            raise
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
doorkeeper-mongodb-4.0.1 lib/doorkeeper/orm/mongo_mapper.rb
doorkeeper-mongodb-4.0.0 lib/doorkeeper/orm/mongo_mapper.rb