Module: BundlerSkills::Hook
- Defined in:
- lib/bundler_skills/hook.rb
Overview
Registers the after-install-all hook.
The hook itself holds no logic: it guards on Disabling (skip in production/CI), then delegates to Synchronizer. Any error is logged as a warning so it never aborts the user’s ‘bundle install`.
NOTE: the block argument of after-install-all is an Array<Bundler::Dependency>, NOT specs. We intentionally ignore it and read Bundler.load.specs inside the Synchronizer instead.
Class Method Summary collapse
Class Method Details
.call ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/bundler_skills/hook.rb', line 22 def call config = Config.load return if Disabling.disabled?(config: config) Synchronizer.new(config: config).sync rescue StandardError => e Bundler.ui.warn("[bundler-skills] skipped: #{e.class}: #{e.}") end |
.register ⇒ Object
16 17 18 19 20 |
# File 'lib/bundler_skills/hook.rb', line 16 def register Bundler::Plugin.add_hook("after-install-all") do |_dependencies| call end end |