Sha256: 2b5a81f95f4904027b1505d2e65bafe9342f4d71ced505eec7252be3f01545d0
Contents?: true
Size: 710 Bytes
Versions: 2
Compression:
Stored size: 710 Bytes
Contents
#!/usr/bin/env ruby require 'gem-list' require 'optparse' include GemList options = {:l => nil, :i => nil} optparse = OptionParser.new do |opts| opts.banner = "Usage: gem-list [options] " opts.on('-l', '--list', 'List all the gems installed locally') do options[:l] = true end opts.on('-i', '--isInstalled', 'Find out if a gem is installed locally or not') do |gemName| options[:i] = true end opts.on( '-h', '--help', 'Display this screen' ) do puts opts exit end end optparse.parse! if options[:l] != nil puts list elsif options[:i] != nil ARGV.each do|gemName| puts "#{gemName} : #{isInstalled(gemName) ? :Yes : :No}" end else puts "Not a valid option. See help!" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gem-list-0.2.0 | bin/gem-list |
gem-list-0.1.0 | bin/gem-list |