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.10 bin/ameesh
Floppy-amee-2.0.11 bin/ameesh
Floppy-amee-2.0.12 bin/ameesh
Floppy-amee-2.0.13 bin/ameesh
Floppy-amee-2.0.14 bin/ameesh
Floppy-amee-2.0.15 bin/ameesh
Floppy-amee-2.0.16 bin/ameesh
Floppy-amee-2.0.17 bin/ameesh
Floppy-amee-2.0.18 bin/ameesh
Floppy-amee-2.0.19 bin/ameesh
Floppy-amee-2.0.2 bin/ameesh
Floppy-amee-2.0.20 bin/ameesh
Floppy-amee-2.0.21 bin/ameesh
Floppy-amee-2.0.22 bin/ameesh
Floppy-amee-2.0.24 bin/ameesh
Floppy-amee-2.0.3 bin/ameesh
Floppy-amee-2.0.4 bin/ameesh
Floppy-amee-2.0.5 bin/ameesh
Floppy-amee-2.0.6 bin/ameesh
Floppy-amee-2.0.7 bin/ameesh