Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

58 lines (46 sloc) 1.09 kb
require 'rake'
desc "Run specs"
task "spec" => ["test:spec"]
desc "Run specs using SimpleCov"
task "spec:rcov" => ["test:spec:rcov"]
desc "Run ci using SimpleCov"
task "spec:ci" => ["test:spec:ci"]
namespace "bundler" do
desc "Install gems"
task "install" do
sh("bundle install")
end
desc "Install gems for test"
task "install:test" do
sh("bundle install --without development production")
end
desc "Install gems for production"
task "install:production" do
sh("bundle install --without development test")
end
desc "Install gems for development"
task "install:development" do
sh("bundle install --without test production")
end
end
namespace "test" do
def run_spec
Dir.chdir("spec")
if `ps ax | grep nats-server | grep -v grep`.empty?
sh "nats-server &"
yield
sh "pkill -f nats-server"
else
yield
end
end
task "spec" do |t|
run_spec{ sh "rake spec" }
end
task "spec:rcov" do |t|
run_spec{ sh "rake simcov" }
end
task "spec:ci" do |t|
run_spec{ sh "rake spec:ci" }
end
end
Jump to Line
Something went wrong with that request. Please try again.