Sha256: cb5738119205c6b53d1086d2e4a6413385086df159dd65815a93c56bc12acaf4

Contents?: true

Size: 1.17 KB

Versions: 1

Compression:

Stored size: 1.17 KB

Contents

module Doorkeeper
  class Engine < Rails::Engine
    isolate_namespace Doorkeeper

    config.generators do |g|
      g.test_framework :rspec, :view_specs => false
    end

    initializer "doorkeeper.deprecations" do
      if Doorkeeper.installed?
        if Doorkeeper.configuration.authorization_scopes.present?
          warning = <<-WARN
[DOORKEEPER]
  Configuration for `authorization_scopes` will no longer be supported. Use default_scopes/optional_scopes instead.
  ATTENTION: The :description option could not be migrated because doorkeeper now uses localization files.
  Place this in your config/locales/en.yml
en:
  doorkeeper:
    scopes:
WARN
          puts warning
          Doorkeeper.configuration.authorization_scopes.translations.each do |scope, translation|
            puts "      #{scope}: #{translation}"
          end
        end

        if Doorkeeper::AccessToken.columns_hash["resource_owner_id"].null == false
          warn <<-WARN
[DOORKEEPER]
  In order to use the Client Credentials flow, you have to migrate the oauth_access_tokens table:
  change_column :oauth_access_tokens, :resource_owner_id, :integer, :null => true
WARN
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
doorkeeper-0.4.0 lib/doorkeeper/engine.rb