bin/keep_up in keep_up-0.8.0 vs bin/keep_up in keep_up-0.8.1
- old
+ new
@@ -1,40 +1,40 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
-require 'optparse'
-require_relative '../lib/keep_up'
+require "optparse"
+require_relative "../lib/keep_up"
options = {
local: false,
- test_command: 'bundle exec rake',
+ test_command: "bundle exec rake",
skip: []
}
opt_parser = OptionParser.new do |parser|
- parser.on('--[no-]local', 'Only consider locally installed gems') do |local|
+ parser.on("--[no-]local", "Only consider locally installed gems") do |local|
options[:local] = local
end
- parser.on('--test-command=COMMAND', 'Run COMMAND to test each update') do |command|
+ parser.on("--test-command=COMMAND", "Run COMMAND to test each update") do |command|
options[:test_command] = command
end
- parser.on('--skip=SKIPPED_GEM', 'Do not consider SKIPPED_GEM for updating') do |gemname|
+ parser.on("--skip=SKIPPED_GEM", "Do not consider SKIPPED_GEM for updating") do |gemname|
options[:skip] << gemname
end
- parser.on_tail('-h', '--help', 'Show this message') do
+ parser.on_tail("-h", "--help", "Show this message") do
puts parser
exit
end
- parser.on_tail('-v', '--version', 'Show version') do
+ parser.on_tail("-v", "--version", "Show version") do
puts "#{parser.program_name} #{KeepUp::VERSION}\n"
exit
end
end
opt_parser.parse!
begin
- KeepUp::Application.new(options).run
+ KeepUp::Application.new(**options).run
rescue KeepUp::BailOut => e
warn e.message
exit 1
end