Sha256: c54f2c7ac4d4dee4a2a2b1c42eac3f770c447fb7b4400c035c454038eb6c1503

Contents?: true

Size: 456 Bytes

Versions: 28

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

module Overcommit::HookLoader
  # Responsible for loading hooks that ship with Overcommit.
  class BuiltInHookLoader < Base
    def load_hooks
      @config.enabled_builtin_hooks(@context).map do |hook_name|
        underscored_hook_name = Overcommit::Utils.snake_case(hook_name)
        require "overcommit/hook/#{@context.hook_type_name}/#{underscored_hook_name}"
        create_hook(hook_name)
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
overcommit-0.64.1 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.64.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.63.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.62.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.61.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.60.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.59.1 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.59.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-jeygeethanmedia-0.58.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.58.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.57.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.56.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.55.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.54.1 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.54.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-jeygeethanmedia-0.53.1.2 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-jeygeethanmedia-0.53.1.1 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-jeygeethanmedia-0.53.1 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.53.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.52.1 lib/overcommit/hook_loader/built_in_hook_loader.rb