Sha256: d554d4e605819c52a9c4fb443c5753c180876d2c30dd38c29d2c8567048f4b20

Contents?: true

Size: 1.54 KB

Versions: 1

Compression:

Stored size: 1.54 KB

Contents

require "doorkeeper/version"
require "doorkeeper/engine"
require "doorkeeper/config"
require "doorkeeper/doorkeeper_for"

module Doorkeeper
  autoload :Validations, "doorkeeper/validations"

  module OAuth
    autoload :Scopes,                     "doorkeeper/oauth/scopes"
    autoload :Error,                      "doorkeeper/oauth/error"
    autoload :ErrorResponse,              "doorkeeper/oauth/error_response"
    autoload :AuthorizationRequest,       "doorkeeper/oauth/authorization_request"
    autoload :AccessTokenRequest,         "doorkeeper/oauth/access_token_request"
    autoload :PasswordAccessTokenRequest, "doorkeeper/oauth/password_access_token_request"
    autoload :ClientCredentialsRequest,   "doorkeeper/oauth/client_credentials_request"
    autoload :Authorization,              "doorkeeper/oauth/authorization"
    autoload :Client,                     "doorkeeper/oauth/client"

    module Helpers
      autoload :ScopeChecker, "doorkeeper/oauth/helpers/scope_checker"
      autoload :URIChecker,   "doorkeeper/oauth/helpers/uri_checker"
      autoload :UniqueToken,  "doorkeeper/oauth/helpers/unique_token"
    end
  end

  module Models
    autoload :Expirable, "doorkeeper/models/expirable"
    autoload :Revocable, "doorkeeper/models/revocable"
    autoload :Scopes,    "doorkeeper/models/scopes"
  end

  def self.configured?
    @config.present?
  end

  def self.database_installed?
    [AccessToken, AccessGrant, Application].all? { |model| model.table_exists? }
  end

  def self.installed?
    configured? && database_installed?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
doorkeeper-0.4.0 lib/doorkeeper.rb