bundler-patch 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -2
- data/README.md +2 -0
- data/Rakefile +17 -2
- data/bundler-patch.gemspec +1 -1
- data/lib/bundler/patch/cli.rb +16 -16
- data/lib/bundler/patch/conservative_resolver.rb +3 -1
- data/lib/bundler/patch/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22e0f2d411e2e52b0a3d2ba2344d2f1c9bb9ceca
|
4
|
+
data.tar.gz: 37235b8053d27fa07a6fc48c74934ca8c8d8cf3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e21f129bd9b325e8d5f576f935795c7b6a590cfb0c5c0881e7dcc8742f660964efb2915b4afd9ac999980695dd322486bf2785f2f9e6139b5e24f4d929bc1be
|
7
|
+
data.tar.gz: 380d5b23d3d55da4cff3e7cfc862696bb074867f22e5ccef024d36c469c4f858b0fe532d86b027bf472347cbf8fd741e29d909a6b441a217c7acd27801d9de51
|
data/.travis.yml
CHANGED
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
|
-
|
3
|
+
task :default => 'test:unit'
|
4
|
+
task :test => 'test:unit'
|
4
5
|
|
5
|
-
|
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
|
+
|
data/bundler-patch.gemspec
CHANGED
@@ -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', '~>
|
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'
|
data/lib/bundler/patch/cli.rb
CHANGED
@@ -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
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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] =
|
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
|
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
|
|
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.
|
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-
|
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: '
|
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: '
|
46
|
+
version: '3.0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|