Permalink
Browse files

Remove base directory from service repo.

1. Remove base directory.
2. Remove reference to base/bin/nats-util
3. Remove reference to base directory in service code

Change-Id: Id612b87f6995b5490b0c45ba989e7c03ecbeb370
  • Loading branch information...
1 parent 3d65834 commit d154c77dd7d6bd460a4384f6753523fbcb92f6fe felixhoo committed Jun 26, 2012
Showing with 194 additions and 10,282 deletions.
  1. +1 −1 Rakefile
  2. +9 −3 atmos/Rakefile
  3. +0 −13 base/Gemfile
  4. +0 −160 base/Gemfile.lock
  5. +0 −57 base/Rakefile
  6. +0 −19 base/bin/nats-util
  7. +0 −11 base/lib/base/abstract.rb
  8. +0 −31 base/lib/base/api/message.rb
  9. +0 −671 base/lib/base/asynchronous_service_gateway.rb
  10. +0 −205 base/lib/base/backup.rb
  11. +0 −54 base/lib/base/barrier.rb
  12. +0 −151 base/lib/base/base.rb
  13. +0 −5 base/lib/base/base_job.rb
  14. +0 −130 base/lib/base/datamapper_l.rb
  15. +0 −144 base/lib/base/gateway.rb
  16. +0 −67 base/lib/base/job/async_job.rb
  17. +0 −27 base/lib/base/job/config.rb
  18. +0 −142 base/lib/base/job/lock.rb
  19. +0 −350 base/lib/base/job/serialization.rb
  20. +0 −273 base/lib/base/job/snapshot.rb
  21. +0 −450 base/lib/base/node.rb
  22. +0 −118 base/lib/base/node_bin.rb
  23. +0 −1,036 base/lib/base/provisioner.rb
  24. +0 −111 base/lib/base/service_error.rb
  25. +0 −63 base/lib/base/service_message.rb
  26. +0 −63 base/lib/base/simple_aop.rb
  27. +0 −7 base/lib/base/version.rb
  28. +0 −75 base/lib/base/worker_bin.rb
  29. +0 −10 base/lib/vcap_services_base.rb
  30. +0 −49 base/spec/Rakefile
  31. +0 −305 base/spec/function_test/async_gw_spec.rb
  32. +0 −42 base/spec/function_test/backup_spec.rb
  33. +0 −17 base/spec/function_test/base_spec.rb
  34. +0 −105 base/spec/function_test/job_spec.rb
  35. +0 −535 base/spec/function_test/node_spec.rb
  36. +0 −496 base/spec/function_test/provision_spec.rb
  37. +0 −458 base/spec/helper/async_gw_spec_helper.rb
  38. +0 −22 base/spec/helper/backup_spec_helper.rb
  39. +0 −60 base/spec/helper/base_spec_helper.rb
  40. +0 −6 base/spec/helper/job_spec_helper.rb
  41. +0 −447 base/spec/helper/node_spec_helper.rb
  42. +0 −449 base/spec/helper/provision_spec_helper.rb
  43. +0 −219 base/spec/helper/spec_helper.rb
  44. +0 −305 base/spec/unit_test/async_gw_spec.rb
  45. +0 −42 base/spec/unit_test/backup_spec.rb
  46. +0 −17 base/spec/unit_test/base_spec.rb
  47. +0 −118 base/spec/unit_test/job_spec.rb
  48. +0 −794 base/spec/unit_test/node_spec.rb
  49. +0 −1,202 base/spec/unit_test/provision_spec.rb
  50. +0 −31 base/vcap_services_base.gemspec
  51. +3 −3 couchdb/Gemfile
  52. +48 −28 couchdb/Gemfile.lock
  53. +9 −3 couchdb/Rakefile
  54. +0 −3 couchdb/bin/couchdb_gateway
  55. +0 −3 couchdb/bin/couchdb_node
  56. +0 −3 couchdb/lib/couchdb_service/couchdb_error.rb
  57. +0 −3 couchdb/lib/couchdb_service/couchdb_node.rb
  58. +0 −2 couchdb/lib/couchdb_service/couchdb_provisioner.rb
  59. +1 −0 couchdb/spec/spec_helper.rb
  60. BIN couchdb/vendor/cache/rubyzip-0.9.9.gem
  61. BIN couchdb/vendor/cache/vcap_common-1.0.12.gem
  62. BIN couchdb/vendor/cache/vcap_logging-1.0.1.gem
  63. BIN couchdb/vendor/cache/vcap_services_base-0.1.10.gem
  64. +2 −2 elasticsearch/Gemfile
  65. +6 −4 elasticsearch/Gemfile.lock
  66. +9 −3 elasticsearch/Rakefile
  67. BIN elasticsearch/vendor/cache/rubyzip-0.9.9.gem
  68. +9 −3 filesystem/Rakefile
  69. +0 −1 filesystem/spec/provisioner_spec.rb
  70. +9 −3 memcached/Rakefile
  71. +0 −3 memcached/lib/memcached_service/memcached_error.rb
  72. +0 −4 memcached/lib/memcached_service/memcached_node.rb
  73. +0 −2 memcached/lib/memcached_service/memcached_provisioner.rb
  74. +9 −3 mongodb/Rakefile
  75. +9 −3 mysql/Rakefile
  76. +0 −3 mysql/lib/mysql_service/provisioner.rb
  77. +0 −1 mysql/lib/mysql_service/storage_quota.rb
  78. +9 −3 neo4j/Rakefile
  79. +9 −3 postgresql/Rakefile
  80. +0 −3 postgresql/lib/postgresql_service/provisioner.rb
  81. +9 −3 rabbit/Rakefile
  82. +9 −3 redis/Rakefile
  83. +0 −2 redis/lib/redis_service/redis_provisioner.rb
  84. +9 −3 serialization_data_server/Rakefile
  85. +9 −3 service_broker/Rakefile
  86. +7 −7 tools/backup/manager/Rakefile
  87. +9 −3 vblob/Rakefile
View
@@ -1,6 +1,6 @@
require 'tmpdir'
-SERVICES_DIR = %w(atmos filesystem memcached mongodb mysql neo4j postgresql rabbit redis service_broker vblob tools/backup/manager)
+SERVICES_DIR = %w(atmos couchdb elasticsearch filesystem memcached mongodb mysql neo4j postgresql rabbit redis service_broker vblob tools/backup/manager)
desc "Run integration tests."
task "tests" do |t|
View
@@ -32,15 +32,21 @@ namespace "bundler" do
end
namespace "test" do
+ def run_spec
+ sh "nats-server &"
+ Dir.chdir("spec"){ yield }
+ sh "pkill -f nats-server"
+ end
+
task "spec" do |t|
- sh("cd spec && ../../base/bin/nats-util start && rake spec && ../../base/bin/nats-util stop")
+ run_spec{ sh "rake spec" }
end
task "spec:rcov" do |t|
- sh("cd spec && ../../base/bin/nats-util start && rake simcov && ../../base/bin/nats-util stop")
+ run_spec{ sh "rake simcov" }
end
task "spec:ci" do |t|
- sh("cd spec && ../../base/bin/nats-util start && rake spec:ci && ../../base/bin/nats-util stop")
+ run_spec{ sh "rake spec:ci" }
end
end
View
@@ -1,13 +0,0 @@
-source "http://rubygems.org"
-
-gemspec
-
-group :test do
- gem "rake"
- gem "sinatra"
- gem "rspec"
- gem "rcov"
- gem "ci_reporter"
- gem "simplecov"
- gem "simplecov-rcov"
-end
View
@@ -1,160 +0,0 @@
-PATH
- remote: .
- specs:
- vcap_services_base (0.1.11)
- 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)
- nats (~> 0.4.22.beta.8)
- 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 (>= 1.0.2)
-
-GEM
- remote: http://rubygems.org/
- specs:
- addressable (2.2.8)
- bcrypt-ruby (2.1.4)
- builder (3.0.0)
- ci_reporter (1.6.4)
- builder (>= 2.1.2)
- curb (0.7.18)
- daemons (1.1.8)
- data_objects (0.10.8)
- addressable (~> 2.1)
- datamapper (1.1.0)
- dm-aggregates (= 1.1.0)
- dm-constraints (= 1.1.0)
- dm-core (= 1.1.0)
- dm-migrations (= 1.1.0)
- dm-serializer (= 1.1.0)
- dm-timestamps (= 1.1.0)
- dm-transactions (= 1.1.0)
- dm-types (= 1.1.0)
- dm-validations (= 1.1.0)
- diff-lcs (1.1.2)
- dm-aggregates (1.1.0)
- dm-core (~> 1.1.0)
- dm-constraints (1.1.0)
- dm-core (~> 1.1.0)
- dm-core (1.1.0)
- addressable (~> 2.2.4)
- dm-migrations (1.1.0)
- dm-core (~> 1.1.0)
- dm-serializer (1.1.0)
- dm-core (~> 1.1.0)
- fastercsv (~> 1.5.4)
- json (~> 1.4.6)
- dm-timestamps (1.1.0)
- dm-core (~> 1.1.0)
- dm-transactions (1.1.0)
- dm-core (~> 1.1.0)
- dm-types (1.1.0)
- bcrypt-ruby (~> 2.1.4)
- dm-core (~> 1.1.0)
- fastercsv (~> 1.5.4)
- json (~> 1.4.6)
- stringex (~> 1.2.0)
- uuidtools (~> 2.1.2)
- dm-validations (1.1.0)
- dm-core (~> 1.1.0)
- do_sqlite3 (0.10.8)
- data_objects (= 0.10.8)
- em-http-request (0.3.0)
- addressable (>= 2.0.0)
- escape_utils
- eventmachine (>= 0.12.9)
- escape_utils (0.2.4)
- eventmachine (0.12.11.cloudfoundry.3)
- eventmachine_httpserver (0.2.1)
- fastercsv (1.5.5)
- json (1.4.6)
- json_pure (1.7.3)
- macaddr (1.5.0)
- systemu (>= 2.4.0)
- multi_json (1.0.4)
- nats (0.4.22)
- daemons (>= 1.1.4)
- eventmachine (>= 0.12.10)
- json_pure (>= 1.6.1)
- thin (>= 1.3.1)
- posix-spawn (0.3.6)
- rack (1.4.1)
- rake (0.8.7)
- rcov (0.9.9)
- redis (2.2.2)
- redis-namespace (1.0.3)
- redis (< 3.0.0)
- redisk (0.2.2)
- redis (>= 0.1.1)
- redis-namespace (>= 0.1.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.3.3)
- redisk (>= 0.2.1)
- resque (~> 1.19)
- uuid (~> 2.3)
- rspec (2.5.0)
- rspec-core (~> 2.5.0)
- rspec-expectations (~> 2.5.0)
- rspec-mocks (~> 2.5.0)
- rspec-core (2.5.1)
- rspec-expectations (2.5.0)
- 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.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.5)
- macaddr (~> 1.0)
- uuidtools (2.1.2)
- vcap_common (1.0.13)
- eventmachine (~> 0.12.11.cloudfoundry.3)
- nats (~> 0.4.22.beta.8)
- posix-spawn (~> 0.3.6)
- thin (~> 1.3.1)
- yajl-ruby (~> 0.8.3)
- vcap_logging (1.0.2)
- rake
- vegas (0.1.11)
- rack (>= 1.0.0)
- yajl-ruby (0.8.3)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- ci_reporter
- rake
- rcov
- rspec
- simplecov
- simplecov-rcov
- sinatra
- vcap_services_base!
View
@@ -1,57 +0,0 @@
-require 'rake'
-require 'bundler'
-
-desc "Run specs"
-task "spec" => ["bundler:install:test", "test:spec"]
-
-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"
- 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
- task "spec" do |t|
- sh("cd spec && ../bin/nats-util start && rake spec && ../bin/nats-util stop")
- end
-
- 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
View
@@ -1,19 +0,0 @@
-#!/usr/bin/env ruby
-
-command = ARGV.first
-opt = RUBY_PLATFORM =~ /linux/ ? '-r' : ''
-
-if command == "start"
- puts "#{$0}: Starting a NATS server"
- pid = fork
- if pid
- Process.detach(pid)
- else
- `nats-server`
- end
-elsif command == "stop"
- puts "#{$0}: Stopping all NATS servers"
- `ps a | grep nats-server | grep -v grep | sed 's/ .*//' | xargs #{opt} kill -9`
-else
- warn "Usage: #{$0} {start, stop}"
-end
View
@@ -1,11 +0,0 @@
-# Copyright (c) 2009-2011 VMware, Inc.
-class Class
- def abstract(*args)
- args.each do |method_name|
- define_method(method_name) do |*args|
- raise NotImplementedError.new("Unimplemented abstract method #{self.class.name}##{method_name}")
- end
- end
- end
-end
-
@@ -1,31 +0,0 @@
-# Copyright (c) 2009-2011 VMware, Inc.
-#
-$:.unshift(File.expand_path("../..", __FILE__))
-require 'json_message'
-require 'base'
-
-class ServiceMessage < JsonMessage
-
- def set_field(field, value)
- field = field.to_sym
- raise ValidationError.new({field => "Unknown field #{field}"}) unless self.class.fields.has_key?(field)
- f = self.class.fields[field]
- # delete an optional field
- if value.nil? and f.required == false
- @msg.delete(field)
- else
- errs = f.schema.validate(value)
- raise ValidationError.new({field => errs}) if errs
- @msg[field] = value
- end
- end
-
- # Return a deep copy of @msg
- def dup
- @msg.deep_dup
- end
-
- def inspect
- @msg.inspect
- end
-end
Oops, something went wrong.

0 comments on commit d154c77

Please sign in to comment.