Module: Hooks

Defined in:
lib/hooks.rb,
lib/hooks/app/api.rb,
lib/hooks/version.rb,
lib/hooks/core/log.rb,
lib/hooks/security.rb,
lib/hooks/core/stats.rb,
lib/hooks/app/helpers.rb,
lib/hooks/core/builder.rb,
lib/hooks/core/failbot.rb,
lib/hooks/app/auth/auth.rb,
lib/hooks/utils/normalize.rb,
lib/hooks/plugins/auth/base.rb,
lib/hooks/plugins/auth/hmac.rb,
lib/hooks/plugins/lifecycle.rb,
lib/hooks/core/config_loader.rb,
lib/hooks/core/plugin_loader.rb,
lib/hooks/core/logger_factory.rb,
lib/hooks/app/endpoints/health.rb,
lib/hooks/app/rack_env_builder.rb,
lib/hooks/app/endpoints/version.rb,
lib/hooks/core/component_access.rb,
lib/hooks/core/config_validator.rb,
lib/hooks/plugins/handlers/base.rb,
lib/hooks/app/endpoints/catchall.rb,
lib/hooks/core/global_components.rb,
lib/hooks/plugins/handlers/error.rb,
lib/hooks/core/network/ip_filtering.rb,
lib/hooks/plugins/instruments/stats.rb,
lib/hooks/plugins/auth/shared_secret.rb,
lib/hooks/plugins/instruments/failbot.rb,
lib/hooks/plugins/instruments/stats_base.rb,
lib/hooks/plugins/auth/timestamp_validator.rb,
lib/hooks/plugins/instruments/failbot_base.rb

Overview

Main Hooks module containing version information

Defined Under Namespace

Modules: App, Core, Log, Plugins, Security, Utils

Constant Summary collapse

VERSION =

Current version of the Hooks webhook framework

Returns:

  • (String)

    The version string following semantic versioning

"0.8.0".freeze

Class Method Summary collapse

Class Method Details

.build(config: nil, log: nil, **extra_components) ⇒ Object

Build a Rack-compatible webhook server application

Parameters:

  • config (String, Hash) (defaults to: nil)

    Path to config file or config hash

  • log (Logger) (defaults to: nil)

    Custom logger instance (optional)

  • **extra_components (Hash)

    Arbitrary user-defined components to make available to handlers

Returns:

  • (Object)

    Rack-compatible application



37
38
39
40
41
42
43
# File 'lib/hooks.rb', line 37

def self.build(config: nil, log: nil, **extra_components)
  Core::Builder.new(
    config:,
    log:,
    **extra_components
  ).build
end