Skip to content

Instantly share code, notes, and snippets.

@rewinfrey
Created February 8, 2013 21:03
Show Gist options
  • Save rewinfrey/4741901 to your computer and use it in GitHub Desktop.
Save rewinfrey/4741901 to your computer and use it in GitHub Desktop.
Sample Rakefile
$:.unshift File.expand_path('../lib/', __FILE__)
require 'ttt/setup'
require 'rake'
require 'rake/testtask'
desc "Running Core Lib specs"
task :lib_specs do
system 'bash -l -c "rvm use default"'
system('rspec spec')
end
desc "Running CLI specs"
task :cli_specs do
system 'bash -l -c "cd cli; rvm use default; rspec spec"'
end
desc "Running Rails specs"
task :rails_specs do
system('cd rails; rake spec; cd ..')
end
desc "Running Limelight Specs"
task :limelight_specs do
system "bash -l -c 'cd limelight; rspec spec'"
end
task :all_specs => [:lib_specs, :cli_specs, :rails_specs, :limelight_specs] do
"Running all specs"
end
task :launch_riak do
puts "launching riak cluster"
puts "-- node 1 starting --"
system "launchctl limit maxfiles 2048 2048; cd ~/riak/rel; riak/bin/riak start"
puts "-- node 2 starting --"
system "launchctl limit maxfiles 2048 2048; cd ~/riak/rel; riak1/bin/riak start"
puts "-- node 3 starting --"
system "launchctl limit maxfiles 2048 2048; cd ~/riak/rel; riak2/bin/riak start"
puts "-- node 4 starting --"
system "launchctl limit maxfiles 2048 2048; cd ~/riak/rel; riak3/bin/riak start"
puts "-- cluster ring forming --"
puts "-- checking ring status --"
system "cd ~/riak/rel; riak/bin/riak-admin ring_status"
puts "-- if status is up, but ring is not ready, Riak is still configuring the ring, but the datastore is accessible"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment