bundler-patch 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e73070d64f11cc9e5a6b723cc54d196ba46bd157
4
- data.tar.gz: 288593a0ed9fe0d9cef8251414fa8773c127cc6f
3
+ metadata.gz: 22e0f2d411e2e52b0a3d2ba2344d2f1c9bb9ceca
4
+ data.tar.gz: 37235b8053d27fa07a6fc48c74934ca8c8d8cf3f
5
5
  SHA512:
6
- metadata.gz: 15e6134b2f6851ae6ecbb9293f61c3a547a3f7be3a32d56ec096c463593dc6713def084b1693ce82bd62540cb2aa5c6d5c00d870f97913162bcb1c6e46312582
7
- data.tar.gz: 7378f5539c13b5af2b9c0190aeca169b1dcf3a120262a7be7b5a6d9a9743123534080a87b60dc091eb04014ae571b3d4b6aa508977bb5503958e5c7be6e37a9f
6
+ metadata.gz: 5e21f129bd9b325e8d5f576f935795c7b6a590cfb0c5c0881e7dcc8742f660964efb2915b4afd9ac999980695dd322486bf2785f2f9e6139b5e24f4d929bc1be
7
+ data.tar.gz: 380d5b23d3d55da4cff3e7cfc862696bb074867f22e5ccef024d36c469c4f858b0fe532d86b027bf472347cbf8fd741e29d909a6b441a217c7acd27801d9de51
data/.travis.yml CHANGED
@@ -1,4 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.4
4
- before_install: gem install bundler -v 1.10.6
3
+ - 2.1.10
4
+ - 2.2.5
5
+ - 2.3.1
6
+ before_install:
7
+ - gem install bundler -v 1.11.2
data/README.md CHANGED
@@ -10,6 +10,8 @@ versions first.
10
10
 
11
11
  Works with Bundler 1.10.x and higher. Last confirmed with 1.12.0.rc.4.
12
12
 
13
+ [![Build Status](https://travis-ci.org/livingsocial/bundler-patch.svg?branch=master)](https://travis-ci.org/livingsocial/bundler-patch)
14
+
13
15
  ## Installation
14
16
 
15
17
  $ gem install bundler-patch
data/Rakefile CHANGED
@@ -1,7 +1,22 @@
1
1
  require 'rspec/core/rake_task'
2
2
 
3
- RSpec::Core::RakeTask.new(:spec)
3
+ task :default => 'test:unit'
4
+ task :test => 'test:unit'
4
5
 
5
- task :default => :spec
6
+ namespace :test do
7
+ desc 'Run all RSpec code examples'
8
+ RSpec::Core::RakeTask.new(:all)
9
+
10
+ desc 'Run RSpec unit code examples'
11
+ RSpec::Core::RakeTask.new(:unit) do |t|
12
+ t.pattern = 'spec/bundler/unit/**{,/*/**}/*_spec.rb'
13
+ end
14
+
15
+ desc 'Run RSpec integration code examples'
16
+ RSpec::Core::RakeTask.new(:integration) do |t|
17
+ t.pattern = 'spec/bundler/integration/**{,/*/**}/*_spec.rb'
18
+ end
19
+ end
6
20
 
7
21
  require 'bundler/gem_tasks'
22
+
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_dependency 'bundler-advise', '~> 1.0', '>= 1.0.3'
23
- spec.add_dependency 'slop', '~> 4.0'
23
+ spec.add_dependency 'slop', '~> 3.0'
24
24
  spec.add_dependency 'bundler', '~> 1.10'
25
25
 
26
26
  spec.add_development_dependency 'bundler-fixture', '~> 1.3'
@@ -4,30 +4,30 @@ require 'slop'
4
4
  module Bundler::Patch
5
5
  class CLI
6
6
  def self.execute
7
- opts = Slop.parse do |o|
8
- o.banner = "Bundler Patch Version #{Bundler::Patch::VERSION}\nUsage: bundle patch [options] [gems_to_update]"
9
- o.separator ''
10
- o.separator 'bundler-patch attempts to update gems conservatively.'
11
- o.separator ''
12
- o.bool '-m', '--minor_preferred', 'Prefer update to the latest minor.release version.' # TODO: change to --minor_preferred
13
- o.bool '-p', '--prefer_minimal', 'Prefer minimal version updates over most recent release (or minor if -m used).'
14
- o.bool '-s', '--strict_updates', 'Restrict any gem to be upgraded past most recent release (or minor if -m used).'
15
- o.bool '-l', '--list', 'List vulnerable gems and new version target. No updates will be performed.'
16
- o.bool '-v', '--vulnerable_gems_only', 'Only update vulnerable gems.'
17
- o.string '-a', '--advisory_db_path', 'Optional custom advisory db path. `gems` dir will be appended to this path.'
18
- o.on('-h', 'Show this help') { show_help(o) }
19
- o.on('--help', 'Show README.md') { show_readme }
7
+ opts = Slop.parse! do
8
+ banner "Bundler Patch Version #{Bundler::Patch::VERSION}\nUsage: bundle patch [options] [gems_to_update]\n\nbundler-patch attempts to update gems conservatively.\n"
9
+ on '-m', '--minor_preferred', 'Prefer update to the latest minor.release version.'
10
+ on '-p', '--prefer_minimal', 'Prefer minimal version updates over most recent release (or minor if -m used).'
11
+ on '-s', '--strict_updates', 'Restrict any gem to be upgraded past most recent release (or minor if -m used).'
12
+ on '-l', '--list', 'List vulnerable gems and new version target. No updates will be performed.'
13
+ on '-v', '--vulnerable_gems_only', 'Only update vulnerable gems.'
14
+ on '-a=', '--advisory_db_path=', 'Optional custom advisory db path. `gems` dir will be appended to this path.'
15
+ on '-h', 'Show this help'
16
+ on '--help', 'Show README.md'
20
17
  end
21
18
 
22
- show_readme if opts.arguments.include?('help')
23
19
  options = opts.to_hash
24
- options[:gems_to_update] = opts.arguments
20
+ options[:gems_to_update] = ARGV
21
+ STDERR.puts options.inspect if ENV['DEBUG']
22
+
23
+ show_help(opts) if options[:h]
24
+ show_readme if ARGV.include?('help') || options[:help]
25
25
 
26
26
  CLI.new.patch(options)
27
27
  end
28
28
 
29
29
  def self.show_help(opts)
30
- puts opts.to_s(prefix: ' ')
30
+ puts opts
31
31
  exit
32
32
  end
33
33
 
@@ -17,6 +17,8 @@ module Bundler::Patch
17
17
 
18
18
  dep = dependency.dep unless dependency.is_a? Gem::Dependency
19
19
 
20
+ STDERR.puts "super search_for: #{debug_format_result(dep, res).inspect}" if ENV['DEBUG_RESOLVER']
21
+
20
22
  @conservative_search_for ||= {}
21
23
  res = @conservative_search_for[dep] ||= begin
22
24
  gem_name = dep.name
@@ -28,7 +30,7 @@ module Bundler::Patch
28
30
  (@strict ?
29
31
  filter_specs(res, locked_spec) :
30
32
  sort_specs(res, locked_spec)).tap do |res|
31
- STDERR.puts debug_format_result(dep, res).inspect if ENV['DEBUG_PATCH_RESOLVER']
33
+ STDERR.puts "after search_for: #{debug_format_result(dep, res).inspect}" if ENV['DEBUG_PATCH_RESOLVER']
32
34
  end
33
35
  end
34
36
 
@@ -1,5 +1,5 @@
1
1
  module Bundler
2
2
  module Patch
3
- VERSION = '0.7.1'
3
+ VERSION = '0.7.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bundler-patch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - chrismo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-28 00:00:00.000000000 Z
11
+ date: 2016-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler-advise
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '4.0'
39
+ version: '3.0'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '4.0'
46
+ version: '3.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement