8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/bundler/patch/cli.rb', line 8
def self.execute
opts = Slop.parse! do
banner "Bundler Patch Version #{Bundler::Patch::VERSION}\nUsage: bundle patch [options] [gems_to_update]\n\nbundler-patch attempts to update gems conservatively.\n"
on '-m', '--minor_preferred', 'Prefer update to the latest minor.release version.'
on '-p', '--prefer_minimal', 'Prefer minimal version updates over most recent release (or minor if -m used).'
on '-s', '--strict_updates', 'Restrict any gem to be upgraded past most recent release (or minor if -m used).'
on '-l', '--list', 'List vulnerable gems and new version target. No updates will be performed.'
on '-v', '--vulnerable_gems_only', 'Only update vulnerable gems.'
on '-a=', '--advisory_db_path=', 'Optional custom advisory db path. `gems` dir will be appended to this path.'
on '-d=', '--ruby_advisory_db_path=', 'Optional path for ruby advisory db. `gems` dir will be appended to this path.'
on '-r', '--ruby', 'Update Ruby version in related files.'
on '--rubies=', 'Supported Ruby versions. Comma delimited or multiple switches.', as: Array, delimiter: ','
on '-h', 'Show this help'
on '--help', 'Show README.md'
end
options = opts.to_hash
options[:gems_to_update] = ARGV
STDERR.puts options.inspect if ENV['DEBUG']
show_help(opts) if options[:h]
show_readme if ARGV.include?('help') || options[:help]
CLI.new.patch(options)
end
|