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

Commit

Permalink
Merge branch 'services-r10' into services-r11
Browse files Browse the repository at this point in the history
Conflicts:
	atmos/vendor/cache/vcap_services_base-0.1.8.gem
	filesystem/vendor/cache/vcap_services_base-0.1.8.gem
	mongodb/vendor/cache/vcap_services_base-0.1.8.gem
	mysql/vendor/cache/vcap_services_base-0.1.8.gem
	neo4j/spec/neo4j_node_bind_spec.rb
	neo4j/spec/neo4j_node_provision_spec.rb
	neo4j/vendor/cache/vcap_services_base-0.1.8.gem
	postgresql/vendor/cache/vcap_services_base-0.1.8.gem
	rabbit/vendor/cache/vcap_services_base-0.1.8.gem
	redis/vendor/cache/vcap_services_base-0.1.8.gem
	service_broker/vendor/cache/vcap_services_base-0.1.8.gem
	vblob/vendor/cache/vcap_services_base-0.1.8.gem

Change-Id: Ifae0157df66d4c95044bc40376582ef37e833ae4
  • Loading branch information
Tang Rui committed Apr 9, 2012
2 parents 0e5dad5 + 1d5dafe commit b57a7e4
Show file tree
Hide file tree
Showing 378 changed files with 3,999 additions and 1,980 deletions.
4 changes: 2 additions & 2 deletions Rakefile
@@ -1,4 +1,4 @@
SERVICES_DIR = %w(atmos filesystem mongodb mysql neo4j postgresql rabbit redis service_broker vblob)
SERVICES_DIR = %w(atmos filesystem mongodb mysql neo4j postgresql rabbit redis service_broker vblob tools/backup/manager)

desc "Run integration tests."
task "tests" do |t|
Expand All @@ -8,7 +8,7 @@ end
namespace "bundler" do
desc "Update base gem"
task "update_base" do
system "cd base && rake bundler:install"
system "cd base && rm -rf pkg && rake bundler:install"
SERVICES_DIR.each do |dir|
puts ">>>>>>>> enter #{dir}"
system "rm -f #{dir}/vendor/cache/vcap_services_base-*.gem && cp base/pkg/vcap_services_base-*.gem #{dir}/vendor/cache && cd #{dir} && bundle install --local"
Expand Down
2 changes: 2 additions & 0 deletions atmos/Gemfile
Expand Up @@ -19,5 +19,7 @@ group :test do
gem "rake"
gem "rspec"
gem "rcov"
gem "simplecov"
gem "simplecov-rcov"
gem "ci_reporter"
end
31 changes: 18 additions & 13 deletions atmos/Gemfile.lock
Expand Up @@ -64,9 +64,6 @@ GEM
fastercsv (1.5.4)
json (1.4.6)
json_pure (1.6.5)
little-plugger (1.1.3)
logging (1.6.1)
little-plugger (>= 1.1.2)
macaddr (1.5.0)
systemu (>= 2.4.0)
multi_json (1.0.4)
Expand All @@ -85,15 +82,15 @@ GEM
redisk (0.2.2)
redis (>= 0.1.1)
redis-namespace (>= 0.1.0)
resque (1.19.0)
resque (1.20.0)
multi_json (~> 1.0)
redis-namespace (~> 1.0.2)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
resque-status (0.2.4)
resque-status (0.3.2)
redisk (>= 0.2.1)
resque (>= 1.3.1)
uuid (>= 2.0.2)
resque (~> 1.19)
uuid (~> 2.3)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
Expand All @@ -103,17 +100,23 @@ GEM
diff-lcs (~> 1.1.2)
rspec-mocks (2.5.0)
ruby-hmac (0.4.0)
simplecov (0.5.4)
multi_json (~> 1.0.3)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
simplecov-rcov (0.2.3)
simplecov (>= 0.4.1)
sinatra (1.2.7)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
stringex (1.2.1)
systemu (2.4.2)
systemu (2.5.0)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.3.3)
uuid (2.3.4)
uuid (2.3.5)
macaddr (~> 1.0)
uuidtools (2.1.2)
vcap_common (1.0.8)
Expand All @@ -123,24 +126,24 @@ GEM
thin (~> 1.3.1)
yajl-ruby (~> 0.8.3)
vcap_logging (0.1.3)
vcap_services_base (0.1.8)
vcap_services_base (0.1.9)
curb (~> 0.7.16)
datamapper (~> 1.1.0)
do_sqlite3 (~> 0.10.3)
em-http-request (~> 0.3.0)
eventmachine (~> 0.12.11.cloudfoundry.3)
eventmachine_httpserver (~> 0.2.1)
json (~> 1.4.6)
logging (>= 1.5.0)
nats (~> 0.4.22.beta.8)
resque-status (~> 0.2.4)
resque (~> 1.20)
resque-status (~> 0.3.2)
ruby-hmac (~> 0.4.0)
sinatra (~> 1.2.3)
thin (~> 1.3.1)
uuidtools (~> 2.1.2)
vcap_common (>= 1.0.8)
vcap_logging (>= 0.1.3)
vegas (0.1.8)
vegas (0.1.11)
rack (>= 1.0.0)
xml-simple (1.0.15)
yajl-ruby (0.8.3)
Expand All @@ -159,6 +162,8 @@ DEPENDENCIES
rcov
rspec
ruby-hmac
simplecov
simplecov-rcov
sinatra
thin
uuidtools
Expand Down
13 changes: 10 additions & 3 deletions atmos/Rakefile
Expand Up @@ -3,9 +3,12 @@ require 'rake'
desc "Run specs"
task "spec" => ["bundler:install:test", "test:spec"]

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

desc "Run ci using SimpleCov"
task "spec:ci" => ["bundler:install:test", "test:spec:ci"]

namespace "bundler" do
desc "Install gems"
task "install" do
Expand Down Expand Up @@ -33,7 +36,11 @@ namespace "test" do
sh("cd spec && ../../base/bin/nats-util start && rake spec && ../../base/bin/nats-util stop")
end

task "spec:rcov" do |t|
sh("cd spec && rake spec:rcov")
task "spec:rcov" do |t|
sh("cd spec && ../../base/bin/nats-util start && rake simcov && ../../base/bin/nats-util stop")
end

task "spec:ci" do |t|
sh("cd spec && ../../base/bin/nats-util start && rake spec:ci && ../../base/bin/nats-util stop")
end
end
38 changes: 23 additions & 15 deletions atmos/spec/Rakefile
Expand Up @@ -9,33 +9,41 @@ require 'rspec'
require 'rspec/core/rake_task'
require 'ci/reporter/rake/rspec'

require "simplecov"
require "simplecov-rcov"

coverage_dir = File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_coverage"))
reports_dir = File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_reports"))
dump_file = File.join(Dir.tmpdir, "atmos.rcov")
ignore_pattern = 'spec,[.]bundle,[/]gems[/]'

ENV['CI_REPORTS'] = reports_dir

desc "Run specs using RCov"
task "spec:rcov" => ["ci:setup:rspec", "spec:rcov_internal", "convert_rcov_to_clover"]
task "spec:ci" => ["ci:setup:rspec", "simcov"]

RSpec::Core::RakeTask.new do |t|
t.pattern = "**/*_spec.rb"
t.rspec_opts = ["--format", "documentation", "--colour"]
end

desc "Run specs using RCov (internal, use spec:rcov instead)"
RSpec::Core::RakeTask.new("spec:rcov_internal") do |t|
sh("rm -f #{dump_file}")
t.pattern = "**/*_spec.rb"
t.rspec_opts = ["--format", "progress", "--colour"]
t.rcov = true
t.rcov_opts = ['--aggregate', dump_file, '--exclude', ignore_pattern, '--output', coverage_dir]
desc "Run spec with coverage"
task "simcov" => "cleanup_coverage" do
class SimpleCov::Formatter::CombinedFormatter
def format(result)
SimpleCov::Formatter::RcovFormatter.new.format(result)
end
end

SimpleCov.formatter = SimpleCov::Formatter::CombinedFormatter
SimpleCov.root('..')
SimpleCov.coverage_dir('spec_coverage')
SimpleCov.start do
add_filter "/spec/"
spec_dir = File.expand_path("..", __FILE__)
Rspec::Core::Runner.disable_autorun!
Rspec::Core::Runner.run([spec_dir], STDERR, STDOUT)
end
end

task "convert_rcov_to_clover" do |t|
analyzer = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "..", "tests", "common", "rcov_analyzer.rb"))
clover_output = File.join(coverage_dir, "clover.xml")
sh("ruby #{analyzer} #{dump_file} #{ignore_pattern} > #{clover_output}")
sh("rm -f #{dump_file}")
task "cleanup_coverage" do
rm_rf coverage_dir
end
Binary file removed atmos/vendor/cache/little-plugger-1.1.3.gem
Binary file not shown.
Binary file removed atmos/vendor/cache/logging-1.6.1.gem
Binary file not shown.
Binary file removed atmos/vendor/cache/resque-1.19.0.gem
Binary file not shown.
Binary file added atmos/vendor/cache/resque-1.20.0.gem
Binary file not shown.
Binary file removed atmos/vendor/cache/resque-status-0.2.4.gem
Binary file not shown.
Binary file added atmos/vendor/cache/resque-status-0.3.2.gem
Binary file not shown.
Binary file added atmos/vendor/cache/simplecov-0.5.4.gem
Binary file not shown.
Binary file added atmos/vendor/cache/simplecov-html-0.5.3.gem
Binary file not shown.
Binary file added atmos/vendor/cache/simplecov-rcov-0.2.3.gem
Binary file not shown.
Binary file removed atmos/vendor/cache/systemu-2.4.2.gem
Binary file not shown.
Binary file added atmos/vendor/cache/systemu-2.5.0.gem
Binary file not shown.
Binary file added atmos/vendor/cache/uuid-2.3.5.gem
Binary file not shown.
Binary file removed atmos/vendor/cache/vcap_services_base-0.1.8.gem
Binary file not shown.
Binary file added atmos/vendor/cache/vcap_services_base-0.1.9.gem
Binary file not shown.
Binary file added atmos/vendor/cache/vegas-0.1.11.gem
Binary file not shown.
2 changes: 2 additions & 0 deletions base/Gemfile
Expand Up @@ -8,4 +8,6 @@ group :test do
gem "rspec"
gem "rcov"
gem "ci_reporter"
gem "simplecov"
gem "simplecov-rcov"
end
41 changes: 23 additions & 18 deletions base/Gemfile.lock
@@ -1,17 +1,17 @@
PATH
remote: .
specs:
vcap_services_base (0.1.8)
vcap_services_base (0.1.9)
curb (~> 0.7.16)
datamapper (~> 1.1.0)
do_sqlite3 (~> 0.10.3)
em-http-request (~> 0.3.0)
eventmachine (~> 0.12.11.cloudfoundry.3)
eventmachine_httpserver (~> 0.2.1)
json (~> 1.4.6)
logging (>= 1.5.0)
nats (~> 0.4.22.beta.8)
resque-status (~> 0.2.4)
resque (~> 1.20)
resque-status (~> 0.3.2)
ruby-hmac (~> 0.4.0)
sinatra (~> 1.2.3)
thin (~> 1.3.1)
Expand All @@ -22,14 +22,14 @@ PATH
GEM
remote: http://rubygems.org/
specs:
addressable (2.2.6)
addressable (2.2.7)
bcrypt-ruby (2.1.4)
builder (3.0.0)
ci_reporter (1.6.4)
builder (>= 2.1.2)
curb (0.7.16)
daemons (1.1.8)
data_objects (0.10.7)
data_objects (0.10.8)
addressable (~> 2.1)
datamapper (1.1.0)
dm-aggregates (= 1.1.0)
Expand Down Expand Up @@ -67,8 +67,8 @@ GEM
uuidtools (~> 2.1.2)
dm-validations (1.1.0)
dm-core (~> 1.1.0)
do_sqlite3 (0.10.7)
data_objects (= 0.10.7)
do_sqlite3 (0.10.8)
data_objects (= 0.10.8)
em-http-request (0.3.0)
addressable (>= 2.0.0)
escape_utils
Expand All @@ -79,13 +79,10 @@ GEM
fastercsv (1.5.4)
json (1.4.6)
json_pure (1.6.5)
little-plugger (1.1.3)
logging (1.6.1)
little-plugger (>= 1.1.2)
macaddr (1.5.0)
systemu (>= 2.4.0)
multi_json (1.0.4)
nats (0.4.22.beta.8)
nats (0.4.22)
daemons (>= 1.1.4)
eventmachine (>= 0.12.10)
json_pure (>= 1.6.1)
Expand All @@ -100,15 +97,15 @@ GEM
redisk (0.2.2)
redis (>= 0.1.1)
redis-namespace (>= 0.1.0)
resque (1.19.0)
resque (1.20.0)
multi_json (~> 1.0)
redis-namespace (~> 1.0.2)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
resque-status (0.2.4)
resque-status (0.3.2)
redisk (>= 0.2.1)
resque (>= 1.3.1)
uuid (>= 2.0.2)
resque (~> 1.19)
uuid (~> 2.3)
rspec (2.5.0)
rspec-core (~> 2.5.0)
rspec-expectations (~> 2.5.0)
Expand All @@ -118,17 +115,23 @@ GEM
diff-lcs (~> 1.1.2)
rspec-mocks (2.5.0)
ruby-hmac (0.4.0)
simplecov (0.5.4)
multi_json (~> 1.0.3)
simplecov-html (~> 0.5.3)
simplecov-html (0.5.3)
simplecov-rcov (0.2.3)
simplecov (>= 0.4.1)
sinatra (1.2.3)
rack (~> 1.1)
tilt (>= 1.2.2, < 2.0)
stringex (1.2.2)
systemu (2.4.2)
systemu (2.5.0)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
tilt (1.2.2)
uuid (2.3.4)
uuid (2.3.5)
macaddr (~> 1.0)
uuidtools (2.1.2)
vcap_common (1.0.10)
Expand All @@ -139,7 +142,7 @@ GEM
yajl-ruby (~> 0.8.3)
vcap_logging (1.0.0)
rake
vegas (0.1.8)
vegas (0.1.11)
rack (>= 1.0.0)
yajl-ruby (0.8.3)

Expand All @@ -151,5 +154,7 @@ DEPENDENCIES
rake
rcov
rspec
simplecov
simplecov-rcov
sinatra
vcap_services_base!
13 changes: 10 additions & 3 deletions base/Rakefile
Expand Up @@ -4,9 +4,12 @@ require 'bundler'
desc "Run specs"
task "spec" => ["bundler:install:test", "test:spec"]

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

desc "Run ci using SimpleCov"
task "spec:ci" => ["bundler:install:test", "test:spec:ci"]

namespace "bundler" do
gem_helper = Bundler::GemHelper.new(Dir.pwd)
desc "Build gem package"
Expand Down Expand Up @@ -44,7 +47,11 @@ namespace "test" do
sh("cd spec && ../bin/nats-util start && rake spec && ../bin/nats-util stop")
end

task "spec:rcov" do |t|
sh("cd spec && rake spec:rcov")
task "spec:rcov" do |t|
sh("cd spec && ../bin/nats-util start && rake simcov && ../bin/nats-util stop")
end

task "spec:ci" do |t|
sh("cd spec && ../bin/nats-util start && rake spec:ci && ../bin/nats-util stop")
end
end

0 comments on commit b57a7e4

Please sign in to comment.