initial import

This commit is contained in:
2010-07-19 00:57:23 +03:00
commit afd6265288
17 changed files with 360 additions and 0 deletions

34
Rakefile Normal file
View File

@@ -0,0 +1,34 @@
require "rubygems"
require "spec"
require "spec/rake/spectask"
REDIS_DIR = File.expand_path(File.join("..", "spec"), __FILE__)
REDIS_CNF = File.join(REDIS_DIR, "redis-test.conf")
REDIS_PID = File.join(REDIS_DIR, "db", "redis.pid")
task :default => [:start, :spec, :stop]
# define the spec task
Spec::Rake::SpecTask.new do |t|
t.spec_opts = %w(--format specdoc --colour)
t.libs = ["spec"]
end
desc "Start the Redis test server"
task :start do
unless File.exists?(REDIS_PID)
system "redis-server #{REDIS_CNF}"
end
end
desc "Stop the Redis test server"
task :stop do
if File.exists?(REDIS_PID)
system "kill #{File.read(REDIS_PID)}"
system "rm #{REDIS_PID}"
end
end