Sha256: e018282c3d5bca87a5d8bdb58185c0ee5ba0a2db18c32f9e645cd0183443b2a6

Contents?: true

Size: 425 Bytes

Versions: 51

Compression:

Stored size: 425 Bytes

Contents

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

51 entries across 49 versions & 3 rubygems

Version Path
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/overcommit-0.46.0/lib/overcommit/hook_loader/built_in_hook_loader.rb
config_gems_initialization_aim-0.1.4 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/overcommit-0.46.0/lib/overcommit/hook_loader/built_in_hook_loader.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/config_gems_initialization_aim-0.1.1/vendor/bundle/ruby/2.5.0/gems/overcommit-0.46.0/lib/overcommit/hook_loader/built_in_hook_loader.rb
config_gems_initialization_aim-0.1.3 vendor/bundle/ruby/2.5.0/gems/overcommit-0.46.0/lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.46.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.45.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.44.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.43.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.42.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.41.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.40.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.39.1 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.39.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.38.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.37.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.36.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.35.0 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.34.2 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.34.1 lib/overcommit/hook_loader/built_in_hook_loader.rb
overcommit-0.34.0 lib/overcommit/hook_loader/built_in_hook_loader.rb