Module: BundlerConservativeUpdate
- Defined in:
- lib/bundler_conservative_update.rb,
lib/bundler_conservative_update/version.rb
Defined Under Namespace
Classes: Hook
Constant Summary collapse
- SKIP_FLAGS =
Flags that suppress the injection, matched exactly.
--conservative is both the "the user already asked for it" case and the recursion guard: the re-executed command carries the flag, so the hook declines the second time around.
--patch, --minor, --major and --strict are explicit update strategies, and --all is an explicit "update everything" request. In all of them the user has already stated how far the update may reach.
--ruby changes what the resolution is about instead of naming gems to update. Combined with an injected --conservative, Bundler's conservative branch finds no explicit gem unlocks and falls back to unlocking every direct dependency, which is the exact outcome this plugin prevents.
%w[--conservative --patch --minor --major --strict --all --ruby].freeze
- SKIP_FLAG_PREFIXES =
Flags suppressed by prefix, so
--source fooand--source=fooare both covered. Same reasoning as --ruby: with an injected --conservative they would unlock all direct dependencies. %w[--bundler --source].freeze
- VALUE_FLAGS =
Global options that take a separate value argument. That value must not be mistaken for the subcommand, as in the
3of--retry 3. %w[--retry -r].freeze
- UPDATE_VALUE_FLAGS =
Options of
bundle updatethat take a separate value argument. That value must not be mistaken for a gem name, as in the4of--jobs 4. %w[--gemfile --jobs -j --cooldown --retry -r].freeze
- DISABLE_ENV =
Escape hatch: set to "1" or "true" to run a genuinely unrestricted
bundle updatewhen transitive updates are intended. "BUNDLER_CONSERVATIVE_UPDATE_DISABLE"- VERSION =
"1.0.0"