Sha256: ad97fcfe1c814931a8910cbd3df5ce319fd8d9f31593c630b9d38dbbeaa18c7e

Contents?: true

Size: 1020 Bytes

Versions: 19

Compression:

Stored size: 1020 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  class Engine < Rails::Engine
    initializer "doorkeeper.params.filter" do |app|
      parameters = %w[client_secret code authentication_token access_token refresh_token]
      app.config.filter_parameters << /^(#{Regexp.union parameters})$/
    end

    initializer "doorkeeper.routes" do
      Doorkeeper::Rails::Routes.install!
    end

    initializer "doorkeeper.helpers" do
      ActiveSupport.on_load(:action_controller) do
        include Doorkeeper::Rails::Helpers
      end
    end

    if defined?(Sprockets) && Sprockets::VERSION.chr.to_i >= 4
      initializer "doorkeeper.assets.precompile" do |app|
        # Force users to use:
        #    //= link doorkeeper/admin/application.css
        # in Doorkeeper 5 for Sprockets 4 instead of precompile.
        # Add note to official docs & Wiki
        app.config.assets.precompile += %w[
          doorkeeper/application.css
          doorkeeper/admin/application.css
        ]
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
doorkeeper-5.1.2 lib/doorkeeper/engine.rb
doorkeeper-5.2.6 lib/doorkeeper/engine.rb
doorkeeper-5.3.3 lib/doorkeeper/engine.rb
doorkeeper-5.1.1 lib/doorkeeper/engine.rb
doorkeeper-5.4.0.rc2 lib/doorkeeper/engine.rb
doorkeeper-5.2.5 lib/doorkeeper/engine.rb
doorkeeper-5.3.2 lib/doorkeeper/engine.rb
doorkeeper-5.4.0.rc1 lib/doorkeeper/engine.rb
doorkeeper-5.2.4 lib/doorkeeper/engine.rb
doorkeeper-5.3.1 lib/doorkeeper/engine.rb
doorkeeper-5.3.0 lib/doorkeeper/engine.rb
doorkeeper-5.2.3 lib/doorkeeper/engine.rb
doorkeeper-5.2.2 lib/doorkeeper/engine.rb
doorkeeper-5.2.1 lib/doorkeeper/engine.rb
doorkeeper-5.2.0 lib/doorkeeper/engine.rb
doorkeeper-5.2.0.rc3 lib/doorkeeper/engine.rb
doorkeeper-5.2.0.rc2 lib/doorkeeper/engine.rb
doorkeeper-5.2.0.rc1 lib/doorkeeper/engine.rb
doorkeeper-5.1.0 lib/doorkeeper/engine.rb