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

Version Path
Floppy-amee-2.0.8 bin/ameesh
Floppy-amee-2.0.9 bin/ameesh
amee-2.7.0 bin/ameesh
amee-2.6.0 bin/ameesh
amee-2.5.1 bin/ameesh
amee-2.5.0 bin/ameesh
amee-2.4.0 bin/ameesh
amee-2.3.1 bin/ameesh
amee-2.3.0 bin/ameesh
amee-2.2.1 bin/ameesh
amee-2.2.0 bin/ameesh
amee-2.0.35 bin/ameesh
amee-2.0.34 bin/ameesh
amee-2.0.33 bin/ameesh
amee-2.0.32 bin/ameesh
amee-2.0.31 bin/ameesh
amee-2.0.30 bin/ameesh
amee-2.0.29 bin/ameesh
amee-2.0.28 bin/ameesh
amee-2.0.27 bin/ameesh