Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

69 lines (56 sloc) 1.342 kB
require 'rake'
require 'bundler'
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
gem_helper = Bundler::GemHelper.new(Dir.pwd)
desc "Build gem package"
task "build" do
gem_helper.build_gem
end
desc "Install gems"
task "install" do
sh("bundle install")
gem_helper.install_gem
end
desc "Install gems for test"
task "install:test" do
sh("bundle install --without development production")
gem_helper.install_gem
end
desc "Install gems for production"
task "install:production" do
sh("bundle install --without development test")
gem_helper.install_gem
end
desc "Install gems for development"
task "install:development" do
sh("bundle install --without test production")
gem_helper.install_gem
end
end
namespace "test" do
def run_spec
Dir.chdir("spec")
if `ps ax | grep nats-server | grep -v grep` == ""
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.