Sha256: c89803989da4b21fa336e0de7e6053e87cfdfc8fee8b805bd7203c11ee7e62a3

Contents?: true

Size: 537 Bytes

Versions: 17

Compression:

Stored size: 537 Bytes

Contents

module Annex
  EXTENSIONS = []
  AUTHORIZATION_ADAPTERS = {}

  # Extend Annex
  #
  # The extension may define various adapters (e.g., for authorization) and
  # register those via the options hash.
  def self.add_extension(extension_key, extension_definition, options = {})
    options.assert_valid_keys(:authorization, :configuration, :auditing)

    EXTENSIONS << extension_key

    if(authorization = options[:authorization])
      AUTHORIZATION_ADAPTERS[extension_key] = extension_definition::AuthorizationAdapter
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
annex-cms-0.5.0 lib/annex/extension.rb
annex-cms-0.4.0 lib/annex/extension.rb
annex-cms-0.3.8 lib/annex/extension.rb
annex-cms-0.3.7 lib/annex/extension.rb
annex-cms-0.3.6 lib/annex/extension.rb
annex-cms-0.3.5 lib/annex/extension.rb
annex-cms-0.3.4 lib/annex/extension.rb
annex-cms-0.3.2 lib/annex/extension.rb
annex-cms-0.3.1 lib/annex/extension.rb
annex-cms-0.3.0 lib/annex/extension.rb
annex-cms-0.2.1 lib/annex/extension.rb
annex-cms-0.2.0 lib/annex/extension.rb
annex-cms-0.1.8 lib/annex/extension.rb
annex-cms-0.1.7 lib/annex/extension.rb
annex-cms-0.1.5 lib/annex/extension.rb
annex-cms-0.1.2 lib/annex/extension.rb
annex-cms-0.1.0 lib/annex/extension.rb