Sha256: f00800d1e915581c75ce680536898734c4e34896fe6dc92b3de3fa355aa50671

Contents?: true

Size: 1.02 KB

Versions: 19

Compression:

Stored size: 1.02 KB

Contents

#!/usr/bin/env ruby

# Copyright (C) 2008-2011 AMEE UK Ltd. - http://www.amee.com
# Released as Open Source Software under the BSD 3-Clause license. See LICENSE.txt for details.

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

19 entries across 19 versions & 1 rubygems

Version Path
amee-4.4.0 bin/ameesh
amee-4.3.2 bin/ameesh
amee-4.3.1 bin/ameesh
amee-4.3.0 bin/ameesh
amee-4.2.0 bin/ameesh
amee-3.2.1 bin/ameesh
amee-3.2.0 bin/ameesh
amee-4.1.7 bin/ameesh
amee-4.1.6 bin/ameesh
amee-4.1.5 bin/ameesh
amee-4.1.4 bin/ameesh
amee-4.1.3 bin/ameesh
amee-3.1.2 bin/ameesh
amee-3.1.1 bin/ameesh
amee-4.1.2 bin/ameesh
amee-4.1.1 bin/ameesh
amee-4.1.0 bin/ameesh
amee-4.0.0 bin/ameesh
amee-3.0.1 bin/ameesh