diff options
author | chrismo <chrismo@clabs.org> | 2016-06-16 07:30:52 -0500 |
---|---|---|
committer | chrismo <chrismo@clabs.org> | 2016-07-08 19:35:57 -0500 |
commit | 100c3bbdf937e1efd423556957a79de84af11f37 (patch) | |
tree | 830bc09f82facbe2e388e1990eb91fd1240f20ad /lib/bundler/cli | |
parent | a404dad1e3804fbde807a40a1c2a370e72a96c23 (diff) | |
download | bundler-100c3bbdf937e1efd423556957a79de84af11f37.tar.gz |
minor/patch resolution code invokable.
Prior commit added in the code but it only worked in the default :major
case by staying out of the way, so it at least didn't break existing
functionality. But the GemsToPatch class hadn't been brought over from
bundler-patch yet, so none of the patch/minor code could work as it was
referencing an ivar that didn't exist yet.
Bundler-patch not only will handle an update to whatever is the latest
patch/minor version, but will also handle an update to a version
specified in an advisory from ruby-advisory-db. At this point I don't
believe we'll be adding the advisory behavior to Bundler proper, so this
commit can bring over simply the array of gem names being updated
without the GemsToPatch class or the extra sorting code that takes a
specific version number into account.
With these simplifications, the starter update_spec can run without
exception, though for some reason it's behaving as if the :minor level
were specified, instead of :patch.
Rather than keep debugging from an integration level, it's time to start
bringing over resolver tests.
Diffstat (limited to 'lib/bundler/cli')
-rw-r--r-- | lib/bundler/cli/update.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bundler/cli/update.rb b/lib/bundler/cli/update.rb index aae08a73..5e2d6b33 100644 --- a/lib/bundler/cli/update.rb +++ b/lib/bundler/cli/update.rb @@ -39,7 +39,8 @@ module Bundler Bundler.definition(:gems => gems, :sources => sources, :ruby => options[:ruby]) end - Bundler.definition.update_opts.level = [:major, :minor, :patch].detect { |v| options.keys.include?(v) } + patch_level = [:major, :minor, :patch].detect { |v| options.keys.include?(v.to_s) } + Bundler.definition.update_opts.level = patch_level Bundler::Fetcher.disable_endpoint = options["full-index"] |