Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Merge branch 'master' into router_v2
Browse files Browse the repository at this point in the history
Conflicts:
	router/Gemfile.lock
	router/Rakefile
	router/spec/Rakefile
	router/spec/functional/router_spec.rb
	router/spec/functional/spec_helper.rb

Change-Id: I5c91bf1bab78855b05350948dfdfd4e13557432e
  • Loading branch information
Anfernee Gui committed Apr 13, 2012
2 parents 735c259 + 2cb8182 commit 7fd7517
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 59 deletions.
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ GEM
posix-spawn (~> 0.3.6)
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
vcap_logging (0.1.3)
vcap_logging (1.0.0)
rake
yajl-ruby (0.8.3)

PLATFORMS
Expand Down
68 changes: 10 additions & 58 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,67 +1,19 @@
require 'rake'
require 'ci/reporter/rake/rspec'
require 'rspec/core/rake_task'

desc "Run specs"
task "spec" => ["bundler:install:test", "test:spec"]

desc "Run specs in CI mode"
# FIXME - Router specs currently fail on some platforms if they
# share a bundle directory with the rest of the core.
# Some kind of tricky interaction around the --without flag?
task "ci" do
sh("BUNDLE_PATH=$HOME/.vcap_router_gems bundle install --without production")
Dir.chdir("spec") do
sh("BUNDLE_PATH=$HOME/.vcap_router_gems bundle exec rake spec")
end
namespace :ci do
desc "Run specs producing results for CI"
task "spec" => ["ci:setup:rspec", "^spec"]
end

desc "Run specs producing results for CI"
task "ci-report" => ["ci:spec"]

desc "Run specs using RCov"
task "spec:rcov" => ["bundler:install:test", "test:spec:rcov"]

desc "Synonym for spec"
task :test => :spec
desc "Synonym for spec"
task :tests => :spec

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
reports_dir = File.expand_path(File.join(File.dirname(__FILE__), "spec_reports"))

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
task "test" do |t|
sh("cd spec && rake test")
end

namespace "test" do
task "spec" do |t|
sh("cd spec && rake spec")
end

task "test" do |t|
sh("cd spec && rake test")
end

task "spec:rcov" do |t|
sh("cd spec && rake spec:rcov")
end
task "spec" do |t|
sh("cd spec && rake spec")
end

namespace :ci do
task "spec" => ["ci:setup:rspec", "^spec"]
end
ENV['CI_REPORTS'] = reports_dir

0 comments on commit 7fd7517

Please sign in to comment.