Sha256: 28d86fc4b8e24bd82382daa93ae7b08295a510aa033fb870c8aab99483be3a94

Contents?: true

Size: 616 Bytes

Versions: 3

Compression:

Stored size: 616 Bytes

Contents

sources = ['redis://localhost:8045', 'http://localhost:3073/']
execs = ['/usr/bin/ruby', '/usr/local/bin/ruby']

def run_command *args
  cmd = '%s -rubygems %s %s' % args
  ret, status = `#{cmd}`, $?.exitstatus
  puts cmd, "(#{status}) #{ret}", $/
  [status, ret]
end

sources.each do |source|
  ENV['BONE_SOURCE'] = source
  puts '-' * 20, source, '-' * 20
  execs.each do |ruby|
    status, token = *run_command(ruby, 'bin/bone', :generate)
    next unless status.zero?
    ENV['BONE_TOKEN'] = token
    status, ret = *run_command(ruby, 'bin/bone', :token)
    next unless token == ret
    p 1
    break
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bone-0.3.2 try/manual_cli.rb
bone-0.3.1 try/manual_cli.rb
bone-0.3.0 try/manual_cli.rb