Sha256: fc199c3b92fb1d2c66c50ea4ea8e2d69e539036a6b9f58ebd4d692bb1dc22ceb
Contents?: true
Size: 887 Bytes
Versions: 82
Compression:
Stored size: 887 Bytes
Contents
#!/usr/bin/env ruby shell_lib = File.dirname(__FILE__) + '/../lib/amee/shell' irb_name = RUBY_PLATFORM =~ /mswin32/ ? 'irb.bat' : 'irb' require 'optparse' # Command-line options - get username, password, and server options = {} OptionParser.new do |opts| opts.on("-u USERNAME", "AMEE username") do |u| options[:username] = u end opts.on("-p PASSWORD", "AMEE password") do |p| options[:password] = p end opts.on("-s SERVER", "AMEE server") do |s| options[:server] = s end end.parse! # Set environment variables for irb ENV['AMEE_SERVER'] = options[:server] ENV['AMEE_USERNAME'] = options[:username] ENV['AMEE_PASSWORD'] = options[:password] if options[:server].nil? || options[:username].nil? || options[:password].nil? puts "Please provide connection details. Run 'ameesh --help' for details." else exec "#{irb_name} -r #{shell_lib} --simple-prompt" end
Version data entries
82 entries across 82 versions & 2 rubygems