Sha256: 8a218f9a68c4ccf982a00d240b76fb9147cc0c5303a81cc6fd6a6cfb0774883a

Contents?: true

Size: 803 Bytes

Versions: 42

Compression:

Stored size: 803 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


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

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

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
utils-0.0.87 bin/irb_connect
utils-0.0.86 bin/irb_connect
utils-0.0.85 bin/irb_connect
utils-0.0.84 bin/irb_connect
utils-0.0.83 bin/irb_connect
utils-0.0.82 bin/irb_connect
utils-0.0.81 bin/irb_connect
utils-0.0.80 bin/irb_connect
utils-0.0.79 bin/irb_connect
utils-0.0.78 bin/irb_connect
utils-0.0.77 bin/irb_connect
utils-0.0.76 bin/irb_connect
utils-0.0.75 bin/irb_connect
utils-0.0.74 bin/irb_connect
utils-0.0.73 bin/irb_connect
utils-0.0.72 bin/irb_connect
utils-0.0.71 bin/irb_connect
utils-0.0.70 bin/irb_connect
utils-0.0.69 bin/irb_connect
utils-0.0.68 bin/irb_connect