Sha256: 9389a5214543bc2ec89a53bfd7ca91d4176b2cdbcc8fe4930dace64e2e208b94

Contents?: true

Size: 804 Bytes

Versions: 20

Compression:

Stored size: 804 Bytes

Contents

#!/usr/bin/env ruby
# encoding: UTF-8

require 'tins/xt'
include Tins::GO
require 'utils/irb'
require 'drb'

def usage
  puts <<-EOT
Usage: #{File.basename($0)} [OPTS]

Options are

  -e CODE       CODE is execute on the remote irb
  -l PATH       load file PATH into remote irb context
  -r HOSTNAME   name of the remote host (defaults to #{Utils::IRB::Service.hostname})
  -p PORTNUMBER number of the remote port (defaults to #{Utils::IRB::Service.port})
  -h            display this help

Version is #{File.basename($0)} #{Utils::VERSION}.
  EOT
  exit 1
end


$opts = go 'e:r:p:l:h'
$opts[?h] and usage

proxy = Utils::IRB::Service.connect($opts[?r], $opts[?p])
case
when load_path = $opts[?l]
  proxy.load(load_path)
when code = $opts[?e]
  p proxy.eval(code)
else
  puts proxy.eval(STDIN.read)
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
utils-0.22.1 bin/irb_connect
utils-0.22.0 bin/irb_connect
utils-0.21.2 bin/irb_connect
utils-0.21.1 bin/irb_connect
utils-0.21.0 bin/irb_connect
utils-0.20.0 bin/irb_connect
utils-0.19.0 bin/irb_connect
utils-0.18.1 bin/irb_connect
utils-0.18.0 bin/irb_connect
utils-0.17.0 bin/irb_connect
utils-0.16.0 bin/irb_connect
utils-0.15.1 bin/irb_connect
utils-0.15.0 bin/irb_connect
utils-0.14.0 bin/irb_connect
utils-0.13.0 bin/irb_connect
utils-0.12.0 bin/irb_connect
utils-0.11.0 bin/irb_connect
utils-0.10.1 bin/irb_connect
utils-0.10.0 bin/irb_connect
utils-0.9.0 bin/irb_connect