Ruby client for range
Ruby Shell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
t
.gitignore
LICENSE.md
README.md
doit.sh
rangeclient.gemspec

README.md

rangeclient synopsis

rangehost = ARGV.shift
rangearg = ARGV.shift

# Create range object for communication with ranged
r = Range::Client.new({:host => rangehost})

# use ranged to expand the range expression into an Array
# "foo10..12" => [ foo10, foo11, foo12 ] OR %foo => [ foo10, foo11, foo12 ]
hosts =  r.expand(rangearg)

# use ranged to compress the array of hostnames into a range expression
# [ foo10, foo11, foo12 ] => "foo10..12"
range_exp = r.compress(hosts)

Imported from https://github.com/square/prodeng.