Sha256: 9f748435dda4d4bab5bb104ed34b8f01da88d076a34e27c6e352de9a23821f3f

Contents?: true

Size: 936 Bytes

Versions: 4

Compression:

Stored size: 936 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

4 entries across 4 versions & 1 rubygems

Version Path
keep_up-0.10.1 bin/keep_up
keep_up-0.10.0 bin/keep_up
keep_up-0.9.0 bin/keep_up
keep_up-0.8.1 bin/keep_up