Sha256: 1cd473ff4ef6c3b17330b0f85f426e7354ff12bf916bf01aeeb7e2721ffa5635

Contents?: true

Size: 656 Bytes

Versions: 21

Compression:

Stored size: 656 Bytes

Contents

require 'rswag/ui/middleware'
require 'rswag/ui/basic_auth'

module Rswag
  module Ui
    class Engine < ::Rails::Engine
      isolate_namespace Rswag::Ui

      initializer 'rswag-ui.initialize' do |app|
        middleware.use Rswag::Ui::Middleware, Rswag::Ui.config

        if Rswag::Ui.config.basic_auth_enabled
          c = Rswag::Ui.config
          app.middleware.use Rswag::Ui::BasicAuth do |username, password|
            c.config_object[:basic_auth].values == [username, password]
          end
        end
      end

      rake_tasks do
        load File.expand_path('../../../tasks/rswag-ui_tasks.rake', __FILE__)
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
rswag-ui-2.16.0 lib/rswag/ui/engine.rb
rswag-ui-2.15.0 lib/rswag/ui/engine.rb
rswag-ui-2.14.0 lib/rswag/ui/engine.rb
rswag-ui-2.13.0 lib/rswag/ui/engine.rb
rswag-ui-2.12.0 lib/rswag/ui/engine.rb
rswag-ui-2.11.0 lib/rswag/ui/engine.rb
rswag-ui-2.10.1 lib/rswag/ui/engine.rb
rswag-ui-2.10.0 lib/rswag/ui/engine.rb
rswag-ui-2.9.0 lib/rswag/ui/engine.rb
rswag-ui-2.8.0 lib/rswag/ui/engine.rb
rswag-ui-2.7.0 lib/rswag/ui/engine.rb
rswag-ui-2.6.0 lib/rswag/ui/engine.rb
rswag-ui-2.5.1 lib/rswag/ui/engine.rb
rswag-ui-2.5.1.rc1 lib/rswag/ui/engine.rb
rswag-ui-2.5.0 lib/rswag/ui/engine.rb
rswag-ui-2.5.0.rc1 lib/rswag/ui/engine.rb
rswag-ui-2.4.0 lib/rswag/ui/engine.rb
rswag-ui-2.3.3 lib/rswag/ui/engine.rb
rswag-ui-2.3.2 lib/rswag/ui/engine.rb
rswag-ui-2.3.1 lib/rswag/ui/engine.rb