Sha256: 12e769f0b7c3b05cdf965bf4a8bf913a5f6f2c7e2b2bb1c60a6b92b2dc3c30a5
Contents?: true
Size: 853 Bytes
Versions: 15
Compression:
Stored size: 853 Bytes
Contents
module Coherent module Commands class Source def initialize(base_command) @base_command = base_command end def options OptionParser.new do |o| o.set_summary_indent(' ') o.banner = "Usage: #{@base_command.script_name} source REPOSITORY [REPOSITORY [REPOSITORY]...]" o.define_head "Add new repositories to the default search list." end end def parse!(args) options.parse!(args) count = 0 args.each do |uri| if Repositories.instance.add(uri) puts "added: #{uri.ljust(50)}" if $verbose count += 1 else puts "failed: #{uri.ljust(50)}" end end Repositories.instance.save puts "Added #{count} repositories." end end end end
Version data entries
15 entries across 15 versions & 1 rubygems