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-0.1.1 bin/ameesh
Floppy-amee-0.1.2 bin/ameesh
Floppy-amee-0.1.5 bin/ameesh
Floppy-amee-0.2.1 bin/ameesh
Floppy-amee-0.2.3 bin/ameesh
Floppy-amee-0.3.0 bin/ameesh
Floppy-amee-0.3.1 bin/ameesh
Floppy-amee-0.4.0 bin/ameesh
Floppy-amee-0.4.1 bin/ameesh
Floppy-amee-0.4.10 bin/ameesh
Floppy-amee-0.4.12 bin/ameesh
Floppy-amee-0.4.13 bin/ameesh
Floppy-amee-0.4.14 bin/ameesh
Floppy-amee-0.4.15 bin/ameesh
Floppy-amee-0.4.16 bin/ameesh
Floppy-amee-0.4.17 bin/ameesh
Floppy-amee-0.4.18 bin/ameesh
Floppy-amee-0.4.19 bin/ameesh
Floppy-amee-0.4.2 bin/ameesh
Floppy-amee-0.4.20 bin/ameesh