Sha256: 0bb7e2370a7063689b6effe1d2d3d164be5cb4e66a9f974a51264760f1c9311b

Contents?: true

Size: 957 Bytes

Versions: 5

Compression:

Stored size: 957 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib') # TODO: remove this
require 'cukeq'

case ARGV.shift
when 'slave'
  CukeQ::Slave.execute(ARGV.dup)
when 'master'
  CukeQ::Master.execute(ARGV.dup)
when 'run'
  CukeQ::Runner.execute(ARGV.dup)
when 'clear-jobs'
  CukeQ::JobClearer.execute(ARGV.dup)
when 'setup'
  # TODO - make password configurable

  puts `rabbitmqctl add_vhost /cukeq`

  # create users with password 'cukeq123'
  %w[cukeq-master cukeq-slave].each do |user|
    puts `rabbitmqctl add_user #{user} cukeq123`
    # puts `rabbitmqctl map_user_vhost #{user} /cukeq`

    # the three regex's map to config, write, read permissions respectively
    puts `rabbitmqctl set_permissions -p /cukeq #{user} ".*" ".*" ".*"`
  end

  puts `rabbitmqctl list_users`
  puts `rabbitmqctl list_vhosts`
  puts `rabbitmqctl list_permissions -p /cukeq`
else
  abort "USAGE: #{File.basename $0} [slave|master|run|setup]"
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cukeq-0.0.1.dev5 bin/cukeq
cukeq-0.0.1.dev4 bin/cukeq
cukeq-0.0.1.dev3 bin/cukeq
cukeq-0.0.1.dev2 bin/cukeq
cukeq-0.0.1.dev bin/cukeq