Sha256: 45c0a368b76811a153873ed223d1231c975eb4372d86b217ed570d4ff4713074

Contents?: true

Size: 934 Bytes

Versions: 3

Compression:

Stored size: 934 Bytes

Contents

#!/usr/bin/env ruby
# frozen_string_literal: true

require 'optparse'
require_relative '../lib/keep_up'

options = {
  local: false,
  test_command: 'bundle exec rake',
  skip: []
}

opt_parser = OptionParser.new do |parser|
  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|
    options[:test_command] = command
  end
  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
    puts parser
    exit
  end
  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
rescue KeepUp::BailOut => e
  warn e.message
  exit 1
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
keep_up-0.8.0 bin/keep_up
keep_up-0.7.1 bin/keep_up
keep_up-0.7.0 bin/keep_up