diff --git a/.gitmodules b/.gitmodules index b9270e6..10c267d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "src/admin_ui"] path = src/admin_ui url = https://github.com/cloudfoundry-incubator/admin-ui.git -[submodule "src/vcap-common"] - path = src/vcap-common - url = https://github.com/cloudfoundry/vcap-common.git diff --git a/config/blobs.yml b/config/blobs.yml index 0845f86..e14a3a6 100644 --- a/config/blobs.yml +++ b/config/blobs.yml @@ -1,12 +1,12 @@ --- -ruby/bundler-1.2.1.gem: - object_id: 458d4d9f-aa0e-488d-94d9-ca8b50d6dfb3 - sha: 0cbe6ad7a41f064d6c11c1058465fffb1bd58069 - size: 226816 -ruby/ruby-1.9.3-p448.tar.gz: - object_id: 3fe8a983-f754-44c4-8694-0fba414eb5a7 - sha: c7f736e3bc1ca1e6619a9121837dd0840aad77ce - size: 12559260 +ruby/ruby-2.3.3.tar.gz: + object_id: 1debe2c2-c008-4eeb-ace9-bdf1938e4e60 + sha: 1014ee699071aa2ddd501907d18cbe15399c997d + size: 17813577 +ruby/bundler-1.14.6.gem: + object_id: ae911c63-3747-4cf1-a5ca-dee6f1f2103b + sha: 3e84d3a4dd43bfaec988b029f45c0d7ffa205ab8 + size: 319488 ruby/rubygems-1.8.24.tgz: object_id: 824b70e4-8269-4e4b-a347-de17333f7971 sha: 30f27047e74f7943117736a0d3e224994fee0905 @@ -27,18 +27,6 @@ mysqlclient/mysql-connector-c-6.1.6-src.tar.gz: object_id: e640b8d3-ae0f-4103-8d44-c0f9644d7c41 sha: 2444586365c2c58e7ca2397d4617e5fe19f9f246 size: 3475044 -libyaml/yaml-0.1.5.tar.gz: - object_id: 3b7b6111-e9a6-468b-8035-46ff800224fd - sha: 8b78cb9f759c7d80db8a7328c0ebecfe34fde737 - size: 504897 -ruby/bundler-1.11.2.gem: - object_id: 2c164a12-252b-402b-a21d-bc73cab1b438 - sha: 8eb956dec72da753d3d2a2126c78508b17af434e - size: 263168 -ruby/ruby-2.2.4.tar.gz: - object_id: df2a8e6d-04cd-4801-b657-9f975aeca8c5 - sha: 818e5e157f76d4912ba3a7c7b4fc5156105e83c3 - size: 16638151 libyaml/yaml-0.1.6.tar.gz: object_id: 5b63285a-fb3f-4508-bbbe-d5beedb7c109 sha: f3d404e11bec3c4efcddfd14c42d46f1aabe0b5d diff --git a/jobs/admin_ui/templates/cf-registrar_ctl.erb b/jobs/admin_ui/templates/cf-registrar_ctl.erb index 843102d..5800cba 100755 --- a/jobs/admin_ui/templates/cf-registrar_ctl.erb +++ b/jobs/admin_ui/templates/cf-registrar_ctl.erb @@ -4,7 +4,7 @@ export PATH=/var/vcap/packages/ruby/bin:$PATH RUN_DIR=/var/vcap/sys/run/admin_ui LOG_DIR=/var/vcap/sys/log/admin_ui PIDFILE=$RUN_DIR/cf-registrar.pid -VCAP_COMMON_PATH=/var/vcap/packages/admin_ui/vcap-common +VCAP_COMMON_PATH=/var/vcap/packages/admin_ui/vcap_common source /var/vcap/packages/common/utils.sh diff --git a/packages/admin_ui/packaging b/packages/admin_ui/packaging index 9b856c2..e2b257e 100644 --- a/packages/admin_ui/packaging +++ b/packages/admin_ui/packaging @@ -5,7 +5,8 @@ bundle_cmd=/var/vcap/packages/ruby/bin/bundle mysqlclient_dir=/var/vcap/packages/mysqlclient libpq_dir=/var/vcap/packages/libpq -cp -a ${BOSH_COMPILE_TARGET}/{admin_ui,vcap-common} ${BOSH_INSTALL_TARGET} +cp -a ${BOSH_COMPILE_TARGET}/{admin_ui,vcap_common} ${BOSH_INSTALL_TARGET} +cp -a ${BOSH_COMPILE_TARGET}/admin_ui_gems/vendor ${BOSH_INSTALL_TARGET}/admin_ui cd ${BOSH_INSTALL_TARGET}/admin_ui $bundle_cmd config build.mysql2 --with-mysql-config=$mysqlclient_dir/bin/mysql_config @@ -14,5 +15,5 @@ $bundle_cmd config build.sequel_pg --with-pg-lib=$libpq_dir/lib --with-pg-includ $bundle_cmd config build.sqlite3 --with-sqlite3-dir=/var/vcap/packages/sqlite $bundle_cmd install --local --deployment --without=development test -cd ${BOSH_INSTALL_TARGET}/vcap-common -$bundle_cmd install --local --deployment --without=development test +cd ${BOSH_INSTALL_TARGET}/vcap_common +$bundle_cmd install --local --deployment --binstubs --without=development test diff --git a/packages/admin_ui/pre_packaging b/packages/admin_ui/pre_packaging deleted file mode 100644 index 5ebd79e..0000000 --- a/packages/admin_ui/pre_packaging +++ /dev/null @@ -1,8 +0,0 @@ -# abort script on any command that exits with a non zero value -set -e - -cd ${BUILD_DIR}/admin_ui -BUNDLE_WITHOUT=development:test bundle package --all - -cd ${BUILD_DIR}/vcap-common -BUNDLE_WITHOUT=development:test bundle package --all \ No newline at end of file diff --git a/packages/admin_ui/spec b/packages/admin_ui/spec index f8a9f81..86d8845 100644 --- a/packages/admin_ui/spec +++ b/packages/admin_ui/spec @@ -1,13 +1,12 @@ --- name: admin_ui - dependencies: - - ruby - - libpq - - sqlite - - mysqlclient - +- ruby +- libpq +- sqlite +- mysqlclient files: - - admin_ui/{Gemfile,Gemfile.lock} - - admin_ui/{lib,bin,db}/**/* - - vcap-common/**/* +- admin_ui/{Gemfile,Gemfile.lock} +- admin_ui/{lib,bin,db}/**/* +- admin_ui_gems/**/* +- vcap_common/**/* diff --git a/packages/ruby/packaging b/packages/ruby/packaging index 02bcfba..b207408 100644 --- a/packages/ruby/packaging +++ b/packages/ruby/packaging @@ -1,10 +1,10 @@ set -e -x -tar xzf ruby/ruby-2.2.4.tar.gz -pushd ruby-2.2.4 +tar xzf ruby/ruby-2.3.3.tar.gz +pushd ruby-2.3.3 ./configure --prefix=${BOSH_INSTALL_TARGET} --disable-install-doc --with-opt-dir=/var/vcap/packages/libyaml make make install popd -${BOSH_INSTALL_TARGET}/bin/gem install ruby/bundler-1.11.2.gem --no-ri --no-rdoc \ No newline at end of file +${BOSH_INSTALL_TARGET}/bin/gem install ruby/bundler-1.14.6.gem --no-ri --no-rdoc diff --git a/packages/ruby/spec b/packages/ruby/spec index 6798d27..40f527c 100644 --- a/packages/ruby/spec +++ b/packages/ruby/spec @@ -1,8 +1,7 @@ - --- name: ruby dependencies: - - libyaml +- libyaml files: -- ruby/ruby-2.2.4.tar.gz -- ruby/bundler-1.11.2.gem \ No newline at end of file +- ruby/ruby-2.3.3.tar.gz +- ruby/bundler-1.14.6.gem diff --git a/packages/uaac/pre_packaging b/packages/uaac/pre_packaging deleted file mode 100644 index f113df0..0000000 --- a/packages/uaac/pre_packaging +++ /dev/null @@ -1,5 +0,0 @@ -# abort script on any command that exits with a non zero value -set -e - -cd ${BUILD_DIR}/uaac -bundle package --all diff --git a/packages/uaac/spec b/packages/uaac/spec index 39ed3c1..a79d77b 100644 --- a/packages/uaac/spec +++ b/packages/uaac/spec @@ -1,7 +1,6 @@ --- name: uaac dependencies: - - ruby +- ruby files: - - uaac/Gemfile* - +- uaac/**/* diff --git a/releases/admin-ui b/releases/admin-ui deleted file mode 120000 index 945c9b4..0000000 --- a/releases/admin-ui +++ /dev/null @@ -1 +0,0 @@ -. \ No newline at end of file diff --git a/releases/admin-ui-1.yml b/releases/admin-ui/admin-ui-1.yml similarity index 100% rename from releases/admin-ui-1.yml rename to releases/admin-ui/admin-ui-1.yml diff --git a/releases/admin-ui-10.yml b/releases/admin-ui/admin-ui-10.yml similarity index 100% rename from releases/admin-ui-10.yml rename to releases/admin-ui/admin-ui-10.yml diff --git a/releases/admin-ui-11.yml b/releases/admin-ui/admin-ui-11.yml similarity index 100% rename from releases/admin-ui-11.yml rename to releases/admin-ui/admin-ui-11.yml diff --git a/releases/admin-ui-2.yml b/releases/admin-ui/admin-ui-2.yml similarity index 100% rename from releases/admin-ui-2.yml rename to releases/admin-ui/admin-ui-2.yml diff --git a/releases/admin-ui-3.yml b/releases/admin-ui/admin-ui-3.yml similarity index 100% rename from releases/admin-ui-3.yml rename to releases/admin-ui/admin-ui-3.yml diff --git a/releases/admin-ui-4.yml b/releases/admin-ui/admin-ui-4.yml similarity index 100% rename from releases/admin-ui-4.yml rename to releases/admin-ui/admin-ui-4.yml diff --git a/releases/admin-ui-5.yml b/releases/admin-ui/admin-ui-5.yml similarity index 100% rename from releases/admin-ui-5.yml rename to releases/admin-ui/admin-ui-5.yml diff --git a/releases/admin-ui-6.yml b/releases/admin-ui/admin-ui-6.yml similarity index 100% rename from releases/admin-ui-6.yml rename to releases/admin-ui/admin-ui-6.yml diff --git a/releases/admin-ui-7.yml b/releases/admin-ui/admin-ui-7.yml similarity index 100% rename from releases/admin-ui-7.yml rename to releases/admin-ui/admin-ui-7.yml diff --git a/releases/admin-ui-8.yml b/releases/admin-ui/admin-ui-8.yml similarity index 100% rename from releases/admin-ui-8.yml rename to releases/admin-ui/admin-ui-8.yml diff --git a/releases/admin-ui-9.yml b/releases/admin-ui/admin-ui-9.yml similarity index 100% rename from releases/admin-ui-9.yml rename to releases/admin-ui/admin-ui-9.yml diff --git a/releases/index.yml b/releases/admin-ui/index.yml similarity index 100% rename from releases/index.yml rename to releases/admin-ui/index.yml diff --git a/src/admin_ui b/src/admin_ui index 27b5524..20645b4 160000 --- a/src/admin_ui +++ b/src/admin_ui @@ -1 +1 @@ -Subproject commit 27b552466851d7b87c583c2b24796c954b4d4053 +Subproject commit 20645b43e72440495767d215d391fb575ba80f89 diff --git a/src/admin_ui_gems/.bundle/config b/src/admin_ui_gems/.bundle/config new file mode 100644 index 0000000..e510192 --- /dev/null +++ b/src/admin_ui_gems/.bundle/config @@ -0,0 +1,3 @@ +--- +BUNDLE_CACHE_ALL: "true" +BUNDLE_WITHOUT: "development:test" diff --git a/src/admin_ui_gems/Gemfile b/src/admin_ui_gems/Gemfile new file mode 120000 index 0000000..ee1102e --- /dev/null +++ b/src/admin_ui_gems/Gemfile @@ -0,0 +1 @@ +../admin_ui/Gemfile \ No newline at end of file diff --git a/src/admin_ui_gems/Gemfile.lock b/src/admin_ui_gems/Gemfile.lock new file mode 120000 index 0000000..18dd394 --- /dev/null +++ b/src/admin_ui_gems/Gemfile.lock @@ -0,0 +1 @@ +../admin_ui/Gemfile.lock \ No newline at end of file diff --git a/src/admin_ui_gems/vendor/cache/eventmachine-1.2.3.gem b/src/admin_ui_gems/vendor/cache/eventmachine-1.2.3.gem new file mode 100644 index 0000000..bf55235 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/eventmachine-1.2.3.gem differ diff --git a/src/admin_ui_gems/vendor/cache/faye-websocket-0.10.7.gem b/src/admin_ui_gems/vendor/cache/faye-websocket-0.10.7.gem new file mode 100644 index 0000000..0f6ed97 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/faye-websocket-0.10.7.gem differ diff --git a/src/admin_ui_gems/vendor/cache/membrane-1.1.0.gem b/src/admin_ui_gems/vendor/cache/membrane-1.1.0.gem new file mode 100644 index 0000000..396f546 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/membrane-1.1.0.gem differ diff --git a/src/admin_ui_gems/vendor/cache/mysql2-0.3.20.gem b/src/admin_ui_gems/vendor/cache/mysql2-0.3.20.gem new file mode 100644 index 0000000..3009e15 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/mysql2-0.3.20.gem differ diff --git a/src/admin_ui_gems/vendor/cache/nats-0.8.0.gem b/src/admin_ui_gems/vendor/cache/nats-0.8.0.gem new file mode 100644 index 0000000..fa6f9ae Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/nats-0.8.0.gem differ diff --git a/src/admin_ui_gems/vendor/cache/net-sftp-2.1.2.gem b/src/admin_ui_gems/vendor/cache/net-sftp-2.1.2.gem new file mode 100644 index 0000000..604969e Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/net-sftp-2.1.2.gem differ diff --git a/src/admin_ui_gems/vendor/cache/net-ssh-4.1.0.gem b/src/admin_ui_gems/vendor/cache/net-ssh-4.1.0.gem new file mode 100644 index 0000000..2f147aa Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/net-ssh-4.1.0.gem differ diff --git a/src/admin_ui_gems/vendor/cache/parse-cron-0.1.4.gem b/src/admin_ui_gems/vendor/cache/parse-cron-0.1.4.gem new file mode 100644 index 0000000..e78ecd8 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/parse-cron-0.1.4.gem differ diff --git a/src/admin_ui_gems/vendor/cache/pg-0.19.0.gem b/src/admin_ui_gems/vendor/cache/pg-0.19.0.gem new file mode 100644 index 0000000..d51e429 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/pg-0.19.0.gem differ diff --git a/src/admin_ui_gems/vendor/cache/rack-1.6.5.gem b/src/admin_ui_gems/vendor/cache/rack-1.6.5.gem new file mode 100644 index 0000000..aea5dd7 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/rack-1.6.5.gem differ diff --git a/src/admin_ui_gems/vendor/cache/rack-protection-1.5.3.gem b/src/admin_ui_gems/vendor/cache/rack-protection-1.5.3.gem new file mode 100644 index 0000000..5a00e8e Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/rack-protection-1.5.3.gem differ diff --git a/src/admin_ui_gems/vendor/cache/rack-ssl-1.4.1.gem b/src/admin_ui_gems/vendor/cache/rack-ssl-1.4.1.gem new file mode 100644 index 0000000..8c3ff21 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/rack-ssl-1.4.1.gem differ diff --git a/src/admin_ui_gems/vendor/cache/ruby_protobuf-0.4.11.gem b/src/admin_ui_gems/vendor/cache/ruby_protobuf-0.4.11.gem new file mode 100644 index 0000000..8f83203 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/ruby_protobuf-0.4.11.gem differ diff --git a/src/admin_ui_gems/vendor/cache/sequel-4.44.0.gem b/src/admin_ui_gems/vendor/cache/sequel-4.44.0.gem new file mode 100644 index 0000000..7e6e1ed Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/sequel-4.44.0.gem differ diff --git a/src/admin_ui_gems/vendor/cache/sequel_pg-1.6.17.gem b/src/admin_ui_gems/vendor/cache/sequel_pg-1.6.17.gem new file mode 100644 index 0000000..fdf67b2 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/sequel_pg-1.6.17.gem differ diff --git a/src/admin_ui_gems/vendor/cache/sinatra-1.4.8.gem b/src/admin_ui_gems/vendor/cache/sinatra-1.4.8.gem new file mode 100644 index 0000000..92fb7a8 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/sinatra-1.4.8.gem differ diff --git a/src/admin_ui_gems/vendor/cache/sqlite3-1.3.13.gem b/src/admin_ui_gems/vendor/cache/sqlite3-1.3.13.gem new file mode 100644 index 0000000..b740815 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/sqlite3-1.3.13.gem differ diff --git a/src/admin_ui_gems/vendor/cache/tilt-2.0.6.gem b/src/admin_ui_gems/vendor/cache/tilt-2.0.6.gem new file mode 100644 index 0000000..2f775eb Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/tilt-2.0.6.gem differ diff --git a/src/admin_ui_gems/vendor/cache/websocket-driver-0.6.5.gem b/src/admin_ui_gems/vendor/cache/websocket-driver-0.6.5.gem new file mode 100644 index 0000000..e3a0776 Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/websocket-driver-0.6.5.gem differ diff --git a/src/admin_ui_gems/vendor/cache/websocket-extensions-0.1.2.gem b/src/admin_ui_gems/vendor/cache/websocket-extensions-0.1.2.gem new file mode 100644 index 0000000..59ad4be Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/websocket-extensions-0.1.2.gem differ diff --git a/src/admin_ui_gems/vendor/cache/yajl-ruby-1.3.0.gem b/src/admin_ui_gems/vendor/cache/yajl-ruby-1.3.0.gem new file mode 100644 index 0000000..bcc975d Binary files /dev/null and b/src/admin_ui_gems/vendor/cache/yajl-ruby-1.3.0.gem differ diff --git a/src/uaac/.bundle/config b/src/uaac/.bundle/config new file mode 100644 index 0000000..319e998 --- /dev/null +++ b/src/uaac/.bundle/config @@ -0,0 +1,3 @@ +--- +BUNDLE_CACHE_ALL: true +BUNDLE_WITHOUT: development:test diff --git a/src/uaac/vendor/cache/addressable-2.4.0.gem b/src/uaac/vendor/cache/addressable-2.4.0.gem new file mode 100644 index 0000000..5f23fd9 Binary files /dev/null and b/src/uaac/vendor/cache/addressable-2.4.0.gem differ diff --git a/src/uaac/vendor/cache/cf-uaa-lib-3.2.5.gem b/src/uaac/vendor/cache/cf-uaa-lib-3.2.5.gem new file mode 100644 index 0000000..4dcd1b5 Binary files /dev/null and b/src/uaac/vendor/cache/cf-uaa-lib-3.2.5.gem differ diff --git a/src/uaac/vendor/cache/cf-uaac-3.1.5.gem b/src/uaac/vendor/cache/cf-uaac-3.1.5.gem new file mode 100644 index 0000000..8d030ff Binary files /dev/null and b/src/uaac/vendor/cache/cf-uaac-3.1.5.gem differ diff --git a/src/uaac/vendor/cache/cookiejar-0.3.0.gem b/src/uaac/vendor/cache/cookiejar-0.3.0.gem new file mode 100644 index 0000000..9dce60b Binary files /dev/null and b/src/uaac/vendor/cache/cookiejar-0.3.0.gem differ diff --git a/src/uaac/vendor/cache/em-http-request-1.1.3.gem b/src/uaac/vendor/cache/em-http-request-1.1.3.gem new file mode 100644 index 0000000..c736920 Binary files /dev/null and b/src/uaac/vendor/cache/em-http-request-1.1.3.gem differ diff --git a/src/uaac/vendor/cache/em-socksify-0.3.1.gem b/src/uaac/vendor/cache/em-socksify-0.3.1.gem new file mode 100644 index 0000000..35a6bab Binary files /dev/null and b/src/uaac/vendor/cache/em-socksify-0.3.1.gem differ diff --git a/src/uaac/vendor/cache/eventmachine-1.0.9.1.gem b/src/uaac/vendor/cache/eventmachine-1.0.9.1.gem new file mode 100644 index 0000000..214c02d Binary files /dev/null and b/src/uaac/vendor/cache/eventmachine-1.0.9.1.gem differ diff --git a/src/uaac/vendor/cache/highline-1.6.21.gem b/src/uaac/vendor/cache/highline-1.6.21.gem new file mode 100644 index 0000000..8ec6132 Binary files /dev/null and b/src/uaac/vendor/cache/highline-1.6.21.gem differ diff --git a/src/uaac/vendor/cache/http_parser.rb-0.6.0.gem b/src/uaac/vendor/cache/http_parser.rb-0.6.0.gem new file mode 100644 index 0000000..3d3d508 Binary files /dev/null and b/src/uaac/vendor/cache/http_parser.rb-0.6.0.gem differ diff --git a/src/uaac/vendor/cache/json_pure-1.8.3.gem b/src/uaac/vendor/cache/json_pure-1.8.3.gem new file mode 100644 index 0000000..287ac37 Binary files /dev/null and b/src/uaac/vendor/cache/json_pure-1.8.3.gem differ diff --git a/src/uaac/vendor/cache/launchy-2.4.3.gem b/src/uaac/vendor/cache/launchy-2.4.3.gem new file mode 100644 index 0000000..e7b99df Binary files /dev/null and b/src/uaac/vendor/cache/launchy-2.4.3.gem differ diff --git a/src/uaac/vendor/cache/multi_json-1.11.2.gem b/src/uaac/vendor/cache/multi_json-1.11.2.gem new file mode 100644 index 0000000..b65fbbb Binary files /dev/null and b/src/uaac/vendor/cache/multi_json-1.11.2.gem differ diff --git a/src/uaac/vendor/cache/rack-1.5.5.gem b/src/uaac/vendor/cache/rack-1.5.5.gem new file mode 100644 index 0000000..488f5c0 Binary files /dev/null and b/src/uaac/vendor/cache/rack-1.5.5.gem differ diff --git a/src/vcap-common b/src/vcap-common deleted file mode 160000 index bdd2eac..0000000 --- a/src/vcap-common +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bdd2eac66b6e4f43ff5b943d94cb462a60323a35 diff --git a/src/vcap_common/.bundle/config b/src/vcap_common/.bundle/config new file mode 100644 index 0000000..e510192 --- /dev/null +++ b/src/vcap_common/.bundle/config @@ -0,0 +1,3 @@ +--- +BUNDLE_CACHE_ALL: "true" +BUNDLE_WITHOUT: "development:test" diff --git a/src/vcap_common/Gemfile b/src/vcap_common/Gemfile new file mode 100644 index 0000000..8436eb4 --- /dev/null +++ b/src/vcap_common/Gemfile @@ -0,0 +1,7 @@ +source "https://rubygems.org" + +gem "vcap_common", + :git => "https://github.com/cloudfoundry/vcap-common.git", + :ref => "bdd2eac66b6e4f43ff5b943d94cb462a60323a35" + +gem "cf-registrar" diff --git a/src/vcap_common/Gemfile.lock b/src/vcap_common/Gemfile.lock new file mode 100644 index 0000000..5460176 --- /dev/null +++ b/src/vcap_common/Gemfile.lock @@ -0,0 +1,91 @@ +GIT + remote: https://github.com/cloudfoundry/vcap-common.git + revision: bdd2eac66b6e4f43ff5b943d94cb462a60323a35 + ref: bdd2eac66b6e4f43ff5b943d94cb462a60323a35 + specs: + vcap_common (2.3.0) + addressable (~> 2.2) + em-http-request (~> 1.0) + eventmachine + httpclient + membrane (~> 0.0.2) + mime-types + multipart-post + nats (>= 0.5.0.beta.12, < 0.6) + posix-spawn (~> 0.3.6) + squash_ruby + steno + thin + uuidtools + vmstat (~> 2.0) + yajl-ruby + +GEM + remote: https://rubygems.org/ + specs: + addressable (2.5.0) + public_suffix (~> 2.0, >= 2.0.2) + cf-message-bus (0.3.4) + eventmachine (~> 1.0.0) + nats (>= 0.5.0, < 0.6) + vcap-concurrency + yajl-ruby + cf-registrar (1.0.3) + cf-message-bus (~> 0.3.0) + eventmachine (~> 1.0.0) + steno + vcap-concurrency + cookiejar (0.3.3) + daemons (1.2.4) + em-http-request (1.1.5) + addressable (>= 2.3.4) + cookiejar (!= 0.3.1) + em-socksify (>= 0.3) + eventmachine (>= 1.0.3) + http_parser.rb (>= 0.6.0) + em-socksify (0.3.1) + eventmachine (>= 1.0.0.beta.4) + eventmachine (1.0.7) + fluent-logger (0.6.2) + msgpack (>= 0.5.6, < 2) + http_parser.rb (0.6.0) + httpclient (2.8.3) + json (2.0.3) + json_pure (1.8.6) + membrane (0.0.5) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + msgpack (1.1.0) + multipart-post (2.0.0) + nats (0.5.1) + daemons (~> 1.1, >= 1.2.2) + eventmachine (~> 1.0, = 1.0.7) + json_pure (~> 1.8, >= 1.8.1) + thin (~> 1.6, >= 1.6.3) + posix-spawn (0.3.13) + public_suffix (2.0.5) + rack (2.0.1) + squash_ruby (2.0.1) + json + steno (1.3.4) + fluent-logger + yajl-ruby (~> 1.0) + thin (1.7.0) + daemons (~> 1.0, >= 1.0.9) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + uuidtools (2.1.5) + vcap-concurrency (0.1.0) + vmstat (2.3.0) + yajl-ruby (1.3.0) + +PLATFORMS + ruby + +DEPENDENCIES + cf-registrar + vcap_common! + +BUNDLED WITH + 1.14.6 diff --git a/src/vcap_common/vendor/cache/addressable-2.5.0.gem b/src/vcap_common/vendor/cache/addressable-2.5.0.gem new file mode 100644 index 0000000..cc16bae Binary files /dev/null and b/src/vcap_common/vendor/cache/addressable-2.5.0.gem differ diff --git a/src/vcap_common/vendor/cache/cf-message-bus-0.3.4.gem b/src/vcap_common/vendor/cache/cf-message-bus-0.3.4.gem new file mode 100644 index 0000000..86ec1c7 Binary files /dev/null and b/src/vcap_common/vendor/cache/cf-message-bus-0.3.4.gem differ diff --git a/src/vcap_common/vendor/cache/cf-registrar-1.0.3.gem b/src/vcap_common/vendor/cache/cf-registrar-1.0.3.gem new file mode 100644 index 0000000..7a4f084 Binary files /dev/null and b/src/vcap_common/vendor/cache/cf-registrar-1.0.3.gem differ diff --git a/src/vcap_common/vendor/cache/cookiejar-0.3.3.gem b/src/vcap_common/vendor/cache/cookiejar-0.3.3.gem new file mode 100644 index 0000000..8812496 Binary files /dev/null and b/src/vcap_common/vendor/cache/cookiejar-0.3.3.gem differ diff --git a/src/vcap_common/vendor/cache/daemons-1.2.4.gem b/src/vcap_common/vendor/cache/daemons-1.2.4.gem new file mode 100644 index 0000000..b4e29db Binary files /dev/null and b/src/vcap_common/vendor/cache/daemons-1.2.4.gem differ diff --git a/src/vcap_common/vendor/cache/em-http-request-1.1.5.gem b/src/vcap_common/vendor/cache/em-http-request-1.1.5.gem new file mode 100644 index 0000000..1d01ef5 Binary files /dev/null and b/src/vcap_common/vendor/cache/em-http-request-1.1.5.gem differ diff --git a/src/vcap_common/vendor/cache/em-socksify-0.3.1.gem b/src/vcap_common/vendor/cache/em-socksify-0.3.1.gem new file mode 100644 index 0000000..35a6bab Binary files /dev/null and b/src/vcap_common/vendor/cache/em-socksify-0.3.1.gem differ diff --git a/src/vcap_common/vendor/cache/eventmachine-1.0.7.gem b/src/vcap_common/vendor/cache/eventmachine-1.0.7.gem new file mode 100644 index 0000000..47332a7 Binary files /dev/null and b/src/vcap_common/vendor/cache/eventmachine-1.0.7.gem differ diff --git a/src/vcap_common/vendor/cache/fluent-logger-0.6.2.gem b/src/vcap_common/vendor/cache/fluent-logger-0.6.2.gem new file mode 100644 index 0000000..f884792 Binary files /dev/null and b/src/vcap_common/vendor/cache/fluent-logger-0.6.2.gem differ diff --git a/src/vcap_common/vendor/cache/http_parser.rb-0.6.0.gem b/src/vcap_common/vendor/cache/http_parser.rb-0.6.0.gem new file mode 100644 index 0000000..3d3d508 Binary files /dev/null and b/src/vcap_common/vendor/cache/http_parser.rb-0.6.0.gem differ diff --git a/src/vcap_common/vendor/cache/httpclient-2.8.3.gem b/src/vcap_common/vendor/cache/httpclient-2.8.3.gem new file mode 100644 index 0000000..9c19ad4 Binary files /dev/null and b/src/vcap_common/vendor/cache/httpclient-2.8.3.gem differ diff --git a/src/vcap_common/vendor/cache/json-2.0.3.gem b/src/vcap_common/vendor/cache/json-2.0.3.gem new file mode 100644 index 0000000..56ab32d Binary files /dev/null and b/src/vcap_common/vendor/cache/json-2.0.3.gem differ diff --git a/src/vcap_common/vendor/cache/json_pure-1.8.6.gem b/src/vcap_common/vendor/cache/json_pure-1.8.6.gem new file mode 100644 index 0000000..7380e49 Binary files /dev/null and b/src/vcap_common/vendor/cache/json_pure-1.8.6.gem differ diff --git a/src/vcap_common/vendor/cache/membrane-0.0.5.gem b/src/vcap_common/vendor/cache/membrane-0.0.5.gem new file mode 100644 index 0000000..69e635a Binary files /dev/null and b/src/vcap_common/vendor/cache/membrane-0.0.5.gem differ diff --git a/src/vcap_common/vendor/cache/mime-types-3.1.gem b/src/vcap_common/vendor/cache/mime-types-3.1.gem new file mode 100644 index 0000000..142b7d6 Binary files /dev/null and b/src/vcap_common/vendor/cache/mime-types-3.1.gem differ diff --git a/src/vcap_common/vendor/cache/mime-types-data-3.2016.0521.gem b/src/vcap_common/vendor/cache/mime-types-data-3.2016.0521.gem new file mode 100644 index 0000000..7b90077 Binary files /dev/null and b/src/vcap_common/vendor/cache/mime-types-data-3.2016.0521.gem differ diff --git a/src/vcap_common/vendor/cache/msgpack-1.1.0.gem b/src/vcap_common/vendor/cache/msgpack-1.1.0.gem new file mode 100644 index 0000000..5a35c29 Binary files /dev/null and b/src/vcap_common/vendor/cache/msgpack-1.1.0.gem differ diff --git a/src/vcap_common/vendor/cache/multipart-post-2.0.0.gem b/src/vcap_common/vendor/cache/multipart-post-2.0.0.gem new file mode 100644 index 0000000..abfff3d Binary files /dev/null and b/src/vcap_common/vendor/cache/multipart-post-2.0.0.gem differ diff --git a/src/vcap_common/vendor/cache/nats-0.5.1.gem b/src/vcap_common/vendor/cache/nats-0.5.1.gem new file mode 100644 index 0000000..4570482 Binary files /dev/null and b/src/vcap_common/vendor/cache/nats-0.5.1.gem differ diff --git a/src/vcap_common/vendor/cache/posix-spawn-0.3.13.gem b/src/vcap_common/vendor/cache/posix-spawn-0.3.13.gem new file mode 100644 index 0000000..d3580f3 Binary files /dev/null and b/src/vcap_common/vendor/cache/posix-spawn-0.3.13.gem differ diff --git a/src/vcap_common/vendor/cache/public_suffix-2.0.5.gem b/src/vcap_common/vendor/cache/public_suffix-2.0.5.gem new file mode 100644 index 0000000..7511d95 Binary files /dev/null and b/src/vcap_common/vendor/cache/public_suffix-2.0.5.gem differ diff --git a/src/vcap_common/vendor/cache/rack-2.0.1.gem b/src/vcap_common/vendor/cache/rack-2.0.1.gem new file mode 100644 index 0000000..96edfca Binary files /dev/null and b/src/vcap_common/vendor/cache/rack-2.0.1.gem differ diff --git a/src/vcap_common/vendor/cache/squash_ruby-2.0.1.gem b/src/vcap_common/vendor/cache/squash_ruby-2.0.1.gem new file mode 100644 index 0000000..6718b5b Binary files /dev/null and b/src/vcap_common/vendor/cache/squash_ruby-2.0.1.gem differ diff --git a/src/vcap_common/vendor/cache/steno-1.3.4.gem b/src/vcap_common/vendor/cache/steno-1.3.4.gem new file mode 100644 index 0000000..2d1f38d Binary files /dev/null and b/src/vcap_common/vendor/cache/steno-1.3.4.gem differ diff --git a/src/vcap_common/vendor/cache/thin-1.7.0.gem b/src/vcap_common/vendor/cache/thin-1.7.0.gem new file mode 100644 index 0000000..b5365b2 Binary files /dev/null and b/src/vcap_common/vendor/cache/thin-1.7.0.gem differ diff --git a/src/vcap_common/vendor/cache/uuidtools-2.1.5.gem b/src/vcap_common/vendor/cache/uuidtools-2.1.5.gem new file mode 100644 index 0000000..ce32956 Binary files /dev/null and b/src/vcap_common/vendor/cache/uuidtools-2.1.5.gem differ diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.bundle/config b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.bundle/config new file mode 100644 index 0000000..e69de29 diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.bundlecache b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.bundlecache new file mode 100644 index 0000000..e69de29 diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.gitignore b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.gitignore new file mode 100644 index 0000000..ce35fac --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.gitignore @@ -0,0 +1,3 @@ +/*.gem +.idea/ +Gemfile.lock diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.rspec b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.rspec new file mode 100644 index 0000000..0912718 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.rspec @@ -0,0 +1,2 @@ +--color +--order random diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.ruby-version b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.ruby-version new file mode 100644 index 0000000..7a895c2 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.ruby-version @@ -0,0 +1 @@ +1.9.3-p484 diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.travis.yml b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.travis.yml new file mode 100644 index 0000000..9e8272a --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/.travis.yml @@ -0,0 +1,6 @@ +language: ruby + +rvm: + - 1.9.3-p484 + +script: bundle exec rake --trace spec diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/Gemfile b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/Gemfile new file mode 100644 index 0000000..b90499f --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/Gemfile @@ -0,0 +1,6 @@ +source 'http://rubygems.org' + +gemspec + +gem 'vcap-concurrency', github: 'cloudfoundry/vcap-concurrency' +gem 'cf-message-bus', github: 'cloudfoundry/cf-message-bus' diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/LICENSE b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/LICENSE new file mode 100644 index 0000000..ab692fc --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/LICENSE @@ -0,0 +1,3624 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +======================================================================= + +cf-vcap-common: + +cf-vcap-common: includes a number of subcomponents with separate copyright +notices and license terms. The product that includes this file +does not necessarily use all the open source subcomponents referred +to below. Your use of the source code for the these subcomponents +is subject to the terms and conditions of the following licenses. + + +SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES + + >>> activesupport-4.0.0 + >>> backports-3.3.0 + >>> backports-3.3.3 + >>> builder-3.2.2 + >>> crack-0.3.2 + >>> crack-0.4.0 + >>> daemons-1.0.9 + >>> daemons-1.1.5 + >>> daemons-1.1.9 + >>> debugger-1.6.0 + >>> debugger-linecache-1.2.0 + >>> debugger-ruby_core_source-1.2.1 + >>> debugger-ruby_core_source-1.2.3 + >>> descendants_tracker-0.0.1 + >>> diff-lcs-1.1.3 + >>> diff-lcs-1.2.4 + >>> em-http-request-1.1.0 + >>> em-socksify-0.3.0 + >>> grape-0.5.0 + >>> grape-0.6.1 + >>> hashie-1.2.0 + >>> hashie-2.0.5 + >>> http_parser.rb-0.6.0.beta.2 + >>> i18n-0.6.4 + >>> i18n-0.6.5 + >>> mime-types-1.25 + >>> minitest-4.2 + >>> minitest-4.7.5 + >>> multi_json-1.3 + >>> multi_json-1.8.0 + >>> multi_xml-0.5.2 + >>> multi_xml-0.5.5 + >>> multipart-post-1.2.0 + >>> nats-0.4.26 + >>> posix-spawn-0.3.6 + >>> rack-0.4 + >>> rack-1.0.0 + >>> rack-1.3.0 + >>> rack-1.4.0 + >>> rack-1.5.2 + >>> rack-accept-0.4.5 + >>> rack-mount-0.8.3 + >>> rack-protection-1.4.0 + >>> rack-protection-1.5.0 + >>> rake-0.9.2 + >>> rake-0.9.6 + >>> rspec-2.13.0 + >>> rspec-core-2.13.0 + >>> rspec-core-2.13.1 + >>> rspec-expectations-2.13.0 + >>> rspec-mocks-2.13.0 + >>> rspec-mocks-2.13.1 + >>> safe_yaml-0.9.0 + >>> safe_yaml-0.9.3 + >>> sinatra-1.4.3 + >>> tilt-1.3.4 + >>> tilt-1.4.1 + >>> tzinfo-0.3.37 + >>> virtus-0.5.5 + >>> virtus-1.0.0 + >>> vmstat-2.0.0 + >>> webmock-1.12.3 + >>> yajl-ruby-1.0.0 + >>> yajl-ruby-1.1.0 + + + +SECTION 2: Apache License, V2.0 + + >>> addressable-2.2.7 + >>> addressable-2.3.4 + >>> addressable-2.3.5 + >>> atomic-1.1.13 + >>> atomic-1.1.14 + >>> fluent-logger-0.4.6 + >>> membrane-0.0.2 + >>> msgpack-0.4.4 + >>> msgpack-0.5.5 + >>> squash_ruby-1.2.0 + >>> thread_safe-0.1 + >>> thread_safe-0.1.2 + >>> uuidtools-2.1.4 + + + +SECTION 3: GNU General Public License, V2.0 + + >>> columnize-0.3.1 + + + +SECTION 4: Ruby Clause-6 + + >>> columnize-0.3.6 + >>> cookiejar-0.3.0 + >>> eventmachine-0.12.10 + >>> eventmachine-0.12.6 + >>> eventmachine-1.0.0 + >>> eventmachine-1.0.3 + >>> httpclient-2.3.4.1 + >>> json-1.8.0 + >>> json_pure-1.7.3 + >>> json_pure-1.8.0 + >>> thin-1.4.1 + >>> thin-1.5.1 + + + +APPENDIX. Standard License Files + + >>> Ruby Clause-6 + + >>> GNU General Public License, V2.0 + + >>> GNU Lesser General Public License, V3.0 + + +--------------- SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ---------- + +BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s). + + +>>> activesupport-4.0.0 + +Copyright (c) 2005-2013 David Heinemeier Hansson + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> backports-3.3.0 + +Copyright (c) 2009 Marc-Andre Lafortune + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> backports-3.3.3 + +Copyright (c) 2009 Marc-Andre Lafortune + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +UNKNOWN + +>>> builder-3.2.2 + +Copyright (c) 2003-2012 Jim Weirich (jim.weirich@gmail.com) + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> crack-0.3.2 + +Copyright (c) 2009 John Nunemaker + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> crack-0.4.0 + +Copyright (c) 2009 John Nunemaker + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> daemons-1.0.9 + +Copyright (c) 2005-2011 Thomas Uehlinger + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +>>> daemons-1.1.5 + +Copyright (c) 2005-2011 Thomas Uehlinger + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +>>> daemons-1.1.9 + +Copyright (c) 2005-2012 Thomas Uehlinger + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +>>> debugger-1.6.0 + +Copyright (C) 2005 Kent Sibilev +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +ADDITIONAL LICENSE INFORMATION: + +> GPL 2.0 + +debugger-1.6.0.gem\data.tar.gz\data.tar\emacs\rdebug-annotate.el + + rdebug-annotate.el --- Ruby debugger output filtering - which + includes annotation handling. + +Copyright (C) 2008 Rocky Bernstein (rocky@gnu.org) +Copyright (C) 2008 Anders Lindgren + +$Id: rdebug-annotate.el 786 2008-04-02 00:50:27Z rockyb $ + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + + +>>> debugger-linecache-1.2.0 + +Copyright (c) 2012 Gabriel Horner + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +ADDITIONAL LICENSE INFORMATION : + +> GPL 2.0 + + +debugger-linecache-1.2.0.gem\data.tar.gz\data.tar\lib\linecache19.rb + +Copyright (C) 2007, 2008 Rocky Bernstein + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + +>>> debugger-ruby_core_source-1.2.1 + +The MIT LICENSE +Copyright (c) 2012 Gabriel Horner +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +ADDITIONAL LICENSE INFORMATION: + +>BSD Style + +debugger-ruby_core_source-1.2.1.tar.gz\debugger-ruby_core_source-1.2.1.tar\debugger-ruby_core_source-1.2.1\lib\debugger\ruby_core_source\ruby-1.9.2-p290\regenc.h + +Copyright (c) 2002-2008 K.Kosako +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +>RUBY CLAUSE-6 LICENSE + +debugger-ruby_core_source-1.2.1.tar.gz\debugger-ruby_core_source-1.2.1.tar\debugger-ruby_core_source-1.2.1\RUBY_LICENSE + +[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE RUBY CLAUSE 6 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Ruby is copyrighted free software by Yukihiro Matsumoto . +You can redistribute it and/or modify it under either the terms of the +2-clause BSDL (see the file BSDL), or the conditions below: + +1. You may make and give away verbatim copies of the source form of the +software without restriction, provided that you duplicate all of the +original copyright notices and associated disclaimers. + +2. You may modify your copy of the software in any way, provided that +you do at least ONE of the following: + +a) place your modifications in the Public Domain or otherwise +make them Freely Available, such as by posting said +modifications to Usenet or an equivalent medium, or by allowing +the author to include your modifications in the software. + +b) use the modified software only within your corporation or +organization. + +c) give non-standard binaries non-standard names, with +instructions on where to get the original software distribution. + +d) make other distribution arrangements with the author. + +3. You may distribute the software in object code or binary form, +provided that you do at least ONE of the following: + +a) distribute the binaries and library files of the software, +together with instructions (in the manual page or equivalent) +on where to get the original distribution. + +b) accompany the distribution with the machine-readable source of +the software. + +c) give non-standard binaries non-standard names, with +instructions on where to get the original software distribution. + +d) make other distribution arrangements with the author. + +4. You may modify and include the part of the software into any other +software (possibly commercial). But some files in the distribution +are not written by the author, so that they are not under these terms. + +For the list of those files and their copying conditions, see the +file LEGAL. + + +>>> debugger-ruby_core_source-1.2.3 + +Copyright (c) 2002-2007 K.Kosako +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + + +>>> descendants_tracker-0.0.1 + +Copyright (c) 2009-2012 Dan Kubb +Copyright (c) 2012 Markus Schirp (packaging) + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> diff-lcs-1.1.3 + +[PLEASE NOTE: PIVOTAL SOFTWARE INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + + +== License + +This software is available under three licenses: the GNU GPL version 2 (or at +your option, a later version), the Perl Artistic license, or the MIT license. +Note that my preference for licensing is the MIT license, but Algorithm::Diff +was dually originally licensed with the Perl Artistic and the GNU GPL ("the +same terms as Perl itself") and that the Ruby implementation hews pretty +closely to the Perl version, so I must maintain the additional licensing terms. + +* Copyright 20042011 Austin Ziegler. +* Adapted from Algorithm::Diff (Perl) by Ned Konz and a Smalltalk versionby + Mario I. Wolczko + +=== MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=== Perl Artistic License (version 2) +See the file docs/artistic.txt in the main distribution. + +=== GNU GPL version 2 +See the file docs/COPYING.txt in the main distribution. + + +>>> diff-lcs-1.2.4 + +[PLEASE NOTE: PIVOTAL SOFTWARE INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +== License + +This software is available under three licenses: the GNU GPL version 2 (or at +your option, a later version), the Perl Artistic license, or the MIT license. +Note that my preference for licensing is the MIT license, but Algorithm::Diff +was dually originally licensed with the Perl Artistic and the GNU GPL ("the +same terms as Perl itself") and given that the Ruby implementation originally +hewed pretty closely to the Perl version, I must maintain the additional +licensing terms. + +* Copyright 20042013 Austin Ziegler. +* Adapted from Algorithm::Diff (Perl) by Ned Konz and a Smalltalk version by + Mario I. Wolczko. + +=== MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=== Perl Artistic License (version 2) +See the file docs/artistic.txt in the main distribution. + +=== GNU GPL version 2 +See the file docs/COPYING.txt in the main distribution. + + +>>> em-http-request-1.1.0 + +License + +(MIT License) - Copyright (c) 2011 Ilya Grigorik + + +>>> em-socksify-0.3.0 + +License : MIT + + +>>> grape-0.5.0 + +Copyright (c) 2010 Michael Bleigh and Intridea, Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> grape-0.6.1 + +MIT License +Copyright (c) 2010 Michael Bleigh and Intridea, Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> hashie-1.2.0 + +Copyright (c) 2009 Intridea, Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> hashie-2.0.5 + +Copyright (c) 2009 Intridea, Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> http_parser.rb-0.6.0.beta.2 + +Copyright 2009,2010 Marc-Andr Cournoyer +Copyright 2010,2011 Aman Gupta + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +>>> i18n-0.6.4 + +Copyright (c) 2008 The Ruby I18n team + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +ADDITIONAL LICENSE INFORMATION: + +> Ruby License + +i18n-0.6.1.gem.tar\data.tar.gz\data.tar\lib\i18n\gettext\po_parser.rb + +Copyright (C) 2003-2009 Masao Mutoh + + You may redistribute it and/or modify it under the same + license terms as Ruby. + +1. You may make and give away verbatim copies of the source form of the + software without restriction, provided that you duplicate all of the + original copyright notices and associated disclaimers. + + 2. You may modify your copy of the software in any way, provided that + you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise + make them Freely Available, such as by posting said + modifications to Usenet or an equivalent medium, or by allowing + the author to include your modifications in the software. + + b) use the modified software only within your corporation or + organization. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the author. + + 3. You may distribute the software in object code or binary form, + provided that you do at least ONE of the following: + + a) distribute the binaries and library files of the software, + together with instructions (in the manual page or equivalent) + on where to get the original distribution. + + b) accompany the distribution with the machine-readable source of + the software. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the author. + + 4. You may modify and include the part of the software into any other + software (possibly commercial). But some files in the distribution + are not written by the author, so that they are not under these terms. + + For the list of those files and their copying conditions, see the + file LEGAL. + + 5. The scripts and library files supplied as input to or produced as + output from the software do not automatically fall under the + copyright of the software, but belong to whomever generated them, + and may be sold commercially, and may be aggregated with this + software. + + 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. + + +>>> i18n-0.6.5 + +MIT License +Copyright (c) 2008 The Ruby I18n team + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> mime-types-1.25 + +[PLEASE NOTE: Pivotal Software, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE MIT LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +> \mime-types-1.25.gem\data.tar.gz\data.tar\ Licence.rdoc +== Licence + +This software is available under three licenses: the GNU GPL version 2 (or at +your option, a later version), the Perl Artistic license, or the MIT license. +Note that my preference for licensing is the MIT license, but the original Perl +MIME::Types was dually originally licensed with the Perl Artistic and the GNU +GPL ("the same terms as Perl itself") and given that the Ruby implementation +hewed pretty closely to the Perl version, I must maintain the additional +licensing terms. + +* Copyright 20032013 Austin Ziegler. +* Adapted from MIME::Types (Perl) by Mark Overmeer. + +=== MIT License + +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +=== Perl Artistic License (version 2) +See the file docs/artistic.txt in the main distribution. + +=== GNU GPL version 2 +See the file docs/COPYING.txt in the main distribution. + + +>>> minitest-4.2 + +Copyright (c) Ryan Davis, seattle.rb + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> minitest-4.7.5 + +Copyright (c) Ryan Davis, seattle.rb + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> multi_json-1.3 + +Copyright (c) 2010 Michael Bleigh, Josh Kalderimis, Erik Michaels-Ober, and Intridea, Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> multi_json-1.8.0 + +MIT License +Copyright (c) 2010-2013 Michael Bleigh, Josh Kalderimis, Erik Michaels-Ober, Pavel Pravosud + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> multi_xml-0.5.2 + +Copyright (c) 2010-2013 Erik Michaels-Ober + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> multi_xml-0.5.5 + +Copyright (c) 2010-2013 Erik Michaels-Ober + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> multipart-post-1.2.0 + +Copyright (c) 2007-2012 Nick Sieger nick@nicksieger.com + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> nats-0.4.26 + +Copyright (c) 2010, 2011 Derek Collison . All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +>>> posix-spawn-0.3.6 + +Copyright (c) 2011 by Ryan Tomayko + and Aman Gupta + +Permission is hereby granted, free of charge, to any person ob- +taining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restric- +tion, including without limitation the rights to use, copy, modi- +fy, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is fur- +nished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONIN- +FRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +A small portion of the environ dup'ing code in ext/posix-spawn.c +was taken from glibc and is maybe +Copyright (c) 2011 by The Free Software Foundation or maybe +by others mentioned in the glibc LICENSES file. glibc is +distributed under the terms of the LGPL license. + + +>>> rack-0.4 + +Copyright (c) 2007 Christian Neukirchen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rack-1.0.0 + +Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 Christian Neukirchen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +ADDITIONAL LICENSE INFORMATION: + +> MIT STYLE + +Copyright (C) 2007, 2008, 2009, 2010 Christian Neukirchen + + Rack is freely distributable under the terms of an MIT-style license. + See COPYING or http://www.opensource.org/licenses/mit-license.php. + + The Rack main module, serving as a namespace for all core Rack + modules and classes. + All modules meant for use in your application are autoloaded here, + so it should be enough just to require rack.rb in your code. + + +>>> rack-1.3.0 + +Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 Christian Neukirchen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rack-1.4.0 + +Copyright (c) 2009 Joshua Peek + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rack-1.5.2 + +Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 Christian Neukirchen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rack-accept-0.4.5 + +License + +Copyright 2012 Michael Jackson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +The software is provided "as is", without warranty of any kind, express or +implied, including but not limited to the warranties of merchantability, +fitness for a particular purpose and noninfringement. In no event shall the +authors or copyright holders be liable for any claim, damages or other +liability, whether in an action of contract, tort or otherwise, arising from, +out of or in connection with the software or the use or other dealings in +the software. + + +>>> rack-mount-0.8.3 + +Copyright (c) 2009 Joshua Peek + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rack-protection-1.4.0 + +Copyright (c) 2011 Konstantin Haase + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rack-protection-1.5.0 + +Copyright (c) 2011 Konstantin Haase + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rake-0.9.2 + +Copyright (c) 2003, 2004 Jim Weirich + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rake-0.9.6 + +Copyright (c) 2011 Konstantin Haase + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rspec-2.13.0 + +(The MIT License) + +Copyright (c) 2009 Chad Humphries, David Chelimsky +Copyright (c) 2006 David Chelimsky, The RSpec Development Team +Copyright (c) 2005 Steven Baker + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rspec-core-2.13.0 + +(The MIT License) +Copyright (c) 2009 Chad Humphries, David Chelimsky +Copyright (c) 2006 David Chelimsky, The RSpec Development Team +Copyright (c) 2005 Steven Baker + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rspec-core-2.13.1 + +(The MIT License) + +Copyright (c) 2009 Chad Humphries, David Chelimsky +Copyright (c) 2006 David Chelimsky, The RSpec Development Team +Copyright (c) 2005 Steven Baker + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rspec-expectations-2.13.0 + +(The MIT License) + +Copyright (c) 2006 David Chelimsky, The RSpec Development Team +Copyright (c) 2005 Steven Baker + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rspec-mocks-2.13.0 + +(The MIT License) + +Copyright (c) 2006 David Chelimsky, The RSpec Development Team +Copyright (c) 2005 Steven Baker + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> rspec-mocks-2.13.1 + +(The MIT License) + +Copyright (c) 2006 David Chelimsky, The RSpec Development Team +Copyright (c) 2005 Steven Baker + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> safe_yaml-0.9.0 + +Copyright (c) 2013 Dan Tao + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> safe_yaml-0.9.3 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + + +>>> sinatra-1.4.3 + +Copyright (c) 2007, 2008, 2009, 2010, 2011 Blake Mizerany + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + + +>>> tilt-1.3.4 + +Copyright (c) 2010 Ryan Tomayko + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> tilt-1.4.1 + +Copyright (c) 2010 Ryan Tomayko + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> tzinfo-0.3.37 + +Copyright (c) 2005-2006 Philip Ross + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +>>> virtus-0.5.5 + +Copyright (c) 2011-2012 Piotr Solnica + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> virtus-1.0.0 + +MIT License +Copyright (c) 2011-2013 Piotr Solnica + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> vmstat-2.0.0 + +Copyright (c) 2012 Vincent Landgraf + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> webmock-1.12.3 + +Copyright (c) 2009-2010 Bartosz Blimke + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +>>> yajl-ruby-1.0.0 + +Copyright (c) 2008-2011 Brian Lopez - http://github.com/brianmario + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +ADDITIONAL LICENSE INFORMATION: + + +> BSD + +yajl-ruby-1.0.0.gem\data.tar.gz\data.tar\ext\yajl\yajl_parser.h + +Copyright 2010, Lloyd Hilaiel. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. + +3. Neither the name of Lloyd Hilaiel nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +>>> yajl-ruby-1.1.0 + +Copyright (c) 2008-2011 Brian Lopez - http://github.com/brianmario + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +ADDITIONAL LICENSE INFORMATION: + +> BSD + +yajl-ruby-1.1.0.gem\data.tar.gz\data.tar\ext\yajl\yajl_parser.h + + +Copyright 2010, Lloyd Hilaiel. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in +the documentation and/or other materials provided with the +distribution. + +3. Neither the name of Lloyd Hilaiel nor the names of its +contributors may be used to endorse or promote products derived +from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +--------------- SECTION 2: Apache License, V2.0 ---------- + +Apache License, V2.0 is applicable to the following component(s). + + +>>> addressable-2.2.7 + +Copyright (C) 2006-2011 Bob Aman + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +>>> addressable-2.3.4 + +Copyright (C) 2006-2011 Bob Aman + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +>>> addressable-2.3.5 + +coding: utf-8 +Copyright (C) 2006-2013 Bob Aman + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +>>> atomic-1.1.13 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +>>> atomic-1.1.14 + +Apache License Version 2.0 + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +>>> fluent-logger-0.4.6 + +Copyright (C) 2011 FURUHASHI Sadayuki + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +>>> membrane-0.0.2 + +License: Apache 2.0 + + +>>> msgpack-0.4.4 + +Copyright (C) 2008-2010 FURUHASHI Sadayuki + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +>>> msgpack-0.5.5 + +Copyright (C) 2008-2012 FURUHASHI Sadayuki + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +>>> squash_ruby-1.2.0 + +Copyright 2012 Square Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +>>> thread_safe-0.1 + +LICENSE : APACHE 2.0 + +ADDITIONAL LICENSE INFORMATION : + +thread_safe-0.1.0.gem\data.tar.gz\data.tar\lib\thread_safe\ atomic_reference_cache_backend.rb + +A Ruby port of the Doug Lea's jsr166e.ConcurrentHashMapV8 class version 1.59 available in public domain. + + +>>> thread_safe-0.1.2 + +License: Apache 2.0 + +ADDITIONAL LICENSE INFORMATION: + +> Public Domain + +thread_safe-0.1.2.tar.gz\thread_safe-0.1.2.tar\thread_safe-0.1.2\ext\org\jruby\ext\thread_safe\jsr166e\ConcurrentHashMapV8.java + +Written by Doug Lea with assistance from members of JCP JSR-166 +Expert Group and released to the public domain, as explained at +http://creativecommons.org/publicdomain/zero/1.0/ + + +>>> uuidtools-2.1.4 + +Copyright (C) 2005-2012 Bob Aman + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + + +--------------- SECTION 3: GNU General Public License, V2.0 ---------- + +GNU General Public License, V2.0 is applicable to the following component(s). + + +>>> columnize-0.3.1 + +Copyright (C) 2007, 2008, 2009 Rocky Bernstein + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + + +--------------- SECTION 4: Ruby Clause-6 ---------- + +Ruby Clause-6 is applicable to the following component(s). + + +>>> columnize-0.3.6 + +[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE RUBYCLAUSE-6 LICENSE. PLEASE SEE BELOW FOR THE FULL TEXT OF THE RUBYCLAUSE-6 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +You can redistribute it and/or modify it under either the terms of the GPL +version 2 (see the file GPL), or the conditions below: + + 1. You may make and give away verbatim copies of the source form of the + software without restriction, provided that you duplicate all of the + original copyright notices and associated disclaimers. + + 2. You may modify your copy of the software in any way, provided that + you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise + make them Freely Available, such as by posting said + modifications to Usenet or an equivalent medium, or by allowing + the author to include your modifications in the software. + + b) use the modified software only within your corporation or + organization. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the author. + + 3. You may distribute the software in object code or binary form, + provided that you do at least ONE of the following: + + a) distribute the binaries and library files of the software, + together with instructions (in the manual page or equivalent) + on where to get the original distribution. + + b) accompany the distribution with the machine-readable source of + the software. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the author. + + 4. You may modify and include the part of the software into any other + software (possibly commercial). But some files in the distribution + are not written by the author, so that they are not under these terms. + + For the list of those files and their copying conditions, see the + file LEGAL. + + 5. The scripts and library files supplied as input to or produced as + output from the software do not automatically fall under the + copyright of the software, but belong to whomever generated them, + and may be sold commercially, and may be aggregated with this + software. + + 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. + + +>>> cookiejar-0.3.0 + +[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE Ruby Clause 6. PLEASE SEE BELOW FOR THE FULL TEXT OF THE Ruby Clause 6. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + + +CookieJar is copyright 2009 David Waite + +You can redistribute it and/or modify it under either the terms of the GPL +(see COPYING.txt file), or the conditions below: + +1. You may make and give away verbatim copies of the source form of the +software without restriction, provided that you duplicate all of the +original copyright notices and associated disclaimers. + +2. You may modify your copy of the software in any way, provided that +you do at least ONE of the following: + +a) place your modifications in the Public Domain or otherwise +make them Freely Available, such as by posting said +modifications to Usenet or an equivalent medium, or by allowing +the author to include your modifications in the software. + +b) use the modified software only within your corporation or +organization. + +c) rename any non-standard executables so the names do not conflict +with standard executables, which must also be provided. + +d) make other distribution arrangements with the author. + +3. You may distribute the software in object code or executable +form, provided that you do at least ONE of the following: + +a) distribute the executables and library files of the software, +together with instructions (in the manual page or equivalent) +on where to get the original distribution. + +b) accompany the distribution with the machine-readable source of +the software. + +c) give non-standard executables non-standard names, with +instructions on where to get the original software distribution. + +d) make other distribution arrangements with the author. + +4. The scripts and library files supplied as input to or produced as +output from the software do not automatically fall under the +copyright of the software, but belong to whomever generated them, +and may be sold commercially, and may be aggregated with this +software. + +5. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. + + +>>> eventmachine-0.12.10 + +[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE RubyClause-6. PLEASE SEE THE APPENDIX TO REVIEW THE FULL TEXT OF THE RubyClause-6. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + + +LEGAL NOTICE INFORMATION +------------------------ + +EventMachine is Copyright (C) 2006-07 by Francis Cianfrocca. + +EventMachine is copyrighted software owned by Francis Cianfrocca +(blackhedd ... gmail.com). You may redistribute and/or modify this +software as long as you comply with either the terms of the GPL +(see the file GPL), or Ruby's license (see the file COPYING). + +Your use of all the files in this distribution is controlled by these +license terms, except for those files specifically mentioned below: +EventMachine is copyrighted free software owned by Francis Cianfrocca +(blackhedd ... gmail.com). The Owner of this software permits you to +redistribute and/or modify the software under either the terms of the GPL +version 2 (see the file GPL), or the conditions below ("Ruby License"): + + 1. You may make and give away verbatim copies of the source form of this + software without restriction, provided that you retain ALL of the + original copyright notices and associated disclaimers. + + 2. You may modify your copy of the software in any way, provided that + you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise + make them Freely Available, such as by posting said + modifications to Usenet or an equivalent medium, or by allowing + the author to include your modifications in the software. + + b) use the modified software only within your corporation or + organization. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the Owner. + + 3. You may distribute the software in object code or binary form, + provided that you do at least ONE of the following: + + a) distribute the binaries and library files of the software, + together with instructions (in a manual page or equivalent) + on where to get the original distribution. + + b) accompany the distribution with the machine-readable source of + the software. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the Owner. + + 4. You may modify and include parts of the software into any other + software (possibly commercial), provided you comply with the terms in + Sections 1, 2, and 3 above. But some files in the distribution + are not written by the Owner, so they may be made available to you + under different terms. + + For the list of those files and their copying conditions, see the + file LEGAL. + + 5. The scripts and library files supplied as input to or produced as + output from the software do not automatically fall under the + copyright of the software, but belong to whoever generated them, + and may be sold commercially, and may be aggregated with this + software. + + +> Ruby Clause 6 + +lib/em/buftok.rb +This file is Copyright (C) 2007 by Tony Arcieri. This file is +covered by the terms of Ruby's License (see the file COPYING). + + +>>> eventmachine-0.12.6 + +[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE RubyClause-6. PLEASE SEE THE APPENDIX TO REVIEW THE FULL TEXT OF THE RubyClause-6. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + + +LEGAL NOTICE INFORMATION +------------------------ + +EventMachine is Copyright (C) 2006-07 by Francis Cianfrocca. + +EventMachine is copyrighted software owned by Francis Cianfrocca +(blackhedd ... gmail.com). You may redistribute and/or modify this +software as long as you comply with either the terms of the GPL +(see the file GPL), or Ruby's license (see the file COPYING). + +Your use of all the files in this distribution is controlled by these +license terms, except for those files specifically mentioned below: +EventMachine is copyrighted free software owned by Francis Cianfrocca +(blackhedd ... gmail.com). The Owner of this software permits you to +redistribute and/or modify the software under either the terms of the GPL +version 2 (see the file GPL), or the conditions below ("Ruby License"): + + 1. You may make and give away verbatim copies of the source form of this + software without restriction, provided that you retain ALL of the + original copyright notices and associated disclaimers. + + 2. You may modify your copy of the software in any way, provided that + you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise + make them Freely Available, such as by posting said + modifications to Usenet or an equivalent medium, or by allowing + the author to include your modifications in the software. + + b) use the modified software only within your corporation or + organization. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the Owner. + + 3. You may distribute the software in object code or binary form, + provided that you do at least ONE of the following: + + a) distribute the binaries and library files of the software, + together with instructions (in a manual page or equivalent) + on where to get the original distribution. + + b) accompany the distribution with the machine-readable source of + the software. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the Owner. + + 4. You may modify and include parts of the software into any other + software (possibly commercial), provided you comply with the terms in + Sections 1, 2, and 3 above. But some files in the distribution + are not written by the Owner, so they may be made available to you + under different terms. + + For the list of those files and their copying conditions, see the + file LEGAL. + + 5. The scripts and library files supplied as input to or produced as + output from the software do not automatically fall under the + copyright of the software, but belong to whoever generated them, + and may be sold commercially, and may be aggregated with this + software. + + +>>> eventmachine-1.0.0 + +[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE RUBY CLAUSE 6. PLEASE SEE THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + + +EventMachine is copyrighted free software owned by Francis Cianfrocca +(blackhedd ... gmail.com). The Owner of this software permits you to +redistribute and/or modify the software under either the terms of the GPL +version 2 (see the file GPL), or the conditions below ("Ruby License"): + +1. You may make and give away verbatim copies of the source form of this +software without restriction, provided that you retain ALL of the +original copyright notices and associated disclaimers. + +2. You may modify your copy of the software in any way, provided that +you do at least ONE of the following: + +a) place your modifications in the Public Domain or otherwise +make them Freely Available, such as by posting said +modifications to Usenet or an equivalent medium, or by allowing +the author to include your modifications in the software. + +b) use the modified software only within your corporation or +organization. + +c) give non-standard binaries non-standard names, with +instructions on where to get the original software distribution. + +d) make other distribution arrangements with the Owner. + +3. You may distribute the software in object code or binary form, +provided that you do at least ONE of the following: + +a) distribute the binaries and library files of the software, +together with instructions (in a manual page or equivalent) +on where to get the original distribution. + +b) accompany the distribution with the machine-readable source of +the software. + +c) give non-standard binaries non-standard names, with +instructions on where to get the original software distribution. + +d) make other distribution arrangements with the Owner. + +4. You may modify and include parts of the software into any other +software (possibly commercial), provided you comply with the terms in +Sections 1, 2, and 3 above. But some files in the distribution +are not written by the Owner, so they may be made available to you +under different terms. + +For the list of those files and their copying conditions, see the +file LEGAL. + +5. The scripts and library files supplied as input to or produced as +output from the software do not automatically fall under the +copyright of the software, but belong to whoever generated them, +and may be sold commercially, and may be aggregated with this +software. + +6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. + + +>>> eventmachine-1.0.3 + +[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE RubyClause-6. PLEASE SEE THE APPENDIX TO REVIEW THE FULL TEXT OF THE RubyClause-6. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + + +LEGAL NOTICE INFORMATION +------------------------ + +EventMachine is Copyright (C) 2006-07 by Francis Cianfrocca. + +EventMachine is copyrighted software owned by Francis Cianfrocca +(blackhedd ... gmail.com). You may redistribute and/or modify this +software as long as you comply with either the terms of the GPL +(see the file GPL), or Ruby's license (see the file COPYING). + +Your use of all the files in this distribution is controlled by these +license terms, except for those files specifically mentioned below: +EventMachine is copyrighted free software owned by Francis Cianfrocca +(blackhedd ... gmail.com). The Owner of this software permits you to +redistribute and/or modify the software under either the terms of the GPL +version 2 (see the file GPL), or the conditions below ("Ruby License"): + + 1. You may make and give away verbatim copies of the source form of this + software without restriction, provided that you retain ALL of the + original copyright notices and associated disclaimers. + + 2. You may modify your copy of the software in any way, provided that + you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise + make them Freely Available, such as by posting said + modifications to Usenet or an equivalent medium, or by allowing + the author to include your modifications in the software. + + b) use the modified software only within your corporation or + organization. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the Owner. + + 3. You may distribute the software in object code or binary form, + provided that you do at least ONE of the following: + + a) distribute the binaries and library files of the software, + together with instructions (in a manual page or equivalent) + on where to get the original distribution. + + b) accompany the distribution with the machine-readable source of + the software. + + c) give non-standard binaries non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the Owner. + + 4. You may modify and include parts of the software into any other + software (possibly commercial), provided you comply with the terms in + Sections 1, 2, and 3 above. But some files in the distribution + are not written by the Owner, so they may be made available to you + under different terms. + + For the list of those files and their copying conditions, see the + file LEGAL. + + 5. The scripts and library files supplied as input to or produced as + output from the software do not automatically fall under the + copyright of the software, but belong to whoever generated them, + and may be sold commercially, and may be aggregated with this + software. + + +>>> httpclient-2.3.4.1 + +HTTPClient - HTTP client library. + Copyright (C) 2000-2009 NAKAMURA, Hiroshi . + + This program is copyrighted free software by NAKAMURA, Hiroshi. You can + redistribute it and/or modify it under the same terms of Ruby's license; + either the dual license version in 2003, or any later version. + + +>>> json-1.8.0 + +[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE RUBYCLAUSE-6 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE] + + +Ruby is copyrighted free software by Yukihiro Matsumoto . +You can redistribute it and/or modify it under either the terms of the GPL +(see GPL file), or the conditions below: + + 1. You may make and give away verbatim copies of the source form of the + software without restriction, provided that you duplicate all of the + original copyright notices and associated disclaimers. + + 2. You may modify your copy of the software in any way, provided that + you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise + make them Freely Available, such as by posting said + modifications to Usenet or an equivalent medium, or by allowing + the author to include your modifications in the software. + + b) use the modified software only within your corporation or + organization. + + c) rename any non-standard executables so the names do not conflict + with standard executables, which must also be provided. + + d) make other distribution arrangements with the author. + + 3. You may distribute the software in object code or executable + form, provided that you do at least ONE of the following: + + a) distribute the executables and library files of the software, + together with instructions (in the manual page or equivalent) + on where to get the original distribution. + + b) accompany the distribution with the machine-readable source of + the software. + + c) give non-standard executables non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the author. + + 4. You may modify and include the part of the software into any other + software (possibly commercial). But some files in the distribution + are not written by the author, so that they are not under this terms. + + They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some + files under the ./missing directory. See each file for the copying + condition. + + 5. The scripts and library files supplied as input to or produced as + output from the software do not automatically fall under the + copyright of the software, but belong to whomever generated them, + and may be sold commercially, and may be aggregated with this + software. + + 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. + + +ADDITIONALL LICENSE INFORMATION : + + +> MIT Style + + +json-1.8.0.gem\data.tar.gz\data.tar\data\prototype.js + + +(c) 2005-2007 Sam Stephenson + +Prototype is freely distributable under the terms of an MIT-style license. +For details, see the Prototype web site: http://www.prototypejs.org + + +>>> json_pure-1.7.3 + +[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE RUBY CLAUSE-6 LICENSE .PLEASE SEE BELOW FOR THE FULL TEXT OF THE OF THE RUBY CLAUSE-6 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] + +Ruby is copyrighted free software by Yukihiro Matsumoto . + +You can redistribute it and/or modify it under either the terms of the GPL (see GPL file), or the conditions below: +1. You may make and give away verbatim copies of the source form of the software without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. + +2. You may modify your copy of the software in any way, provided that you do at least ONE of the following: +a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or by allowing the author to include your modifications in the software. + +b) use the modified software only within your corporation or organization. + +c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided. + +d) make other distribution arrangements with the author. + +3. You may distribute the software in object code or executable form, provided that you do at least ONE of the following: + +a) distribute the executables and library files of the software, together with instructions (in the manual page or equivalent) on where to get the original distribution. + +b) accompany the distribution with the machine-readable source of the software. + +c) give non-standard executables non-standard names, with instructions on where to get the original software distribution. + +d) make other distribution arrangements with the author. + +4. You may modify and include the part of the software into any other software (possibly commercial). But some files in the distribution are not written by the author, so that they are not under this terms. + +They are gc.c(partly), utils. c(partly), regex.[ch], st.[ch] and some files under the ./missing directory. See each file for the copying condition. + +5. The scripts and library files supplied as input to or produced as output from the software do not automatically fall under the copyright of the software, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this software. + +6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + + +ADDITIONAL LICENSE INFORMATION: + +> MIT + +json_pure-1.7.3.gem\data.tar.gz\data.tar\data\prototype.js + +(c) 2005-2007 Sam Stephenson + +Prototype is freely distributable under the terms of an MIT-style license. For details, see the Prototype web site: http://www.prototypejs.org/ + + +> MIT Style License + +json_pure-1.7.3.gem\data.tar.gz\data.tar\ext\json\ext\generator\generator.c + +Copyright 2001-2004 Unicode, Inc. + +Disclaimer + +This source code is provided as is by Unicode, Inc. No claims are made as to fitness for any particular purpose. No warranties of any kind are expressed or implied. The recipient agrees to determine applicability of information provided. If this file has been purchased on magnetic or optical media from Unicode, Inc., the sole remedy for any claim will be exchange of defective media within 90 days of receipt. + +Limitations on Rights to Redistribute This Code + +Unicode, Inc. hereby grants the right to freely use the information supplied in this file in the creation of products supporting the Unicode Standard, and to make copies of this file in any form for internal or external distribution as long as this notice remains attached. + + +>>> json_pure-1.8.0 + +[PLEASE NOTE: PIVOTAL SOFTWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE RUBYCLAUSE-6 LICENSE. PLEASE SEE THE APPENDIX TO REVIEW THE FULL TEXT OF THE RUBYCLAUSE-6 LICENSE. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE] + +This code is copyrighted work by Daniel Luz . + +Distributed under the Ruby and GPLv2 licenses; see COPYING and GPL files +for details. + + +>>> thin-1.4.1 + +Copyright (c) 2005 Zed A. Shaw +You can redistribute it and/or modify it under the same terms as Ruby. + + +>>> thin-1.5.1 + +Orignal version Copyright (c) 2005 Zed A. Shaw +You can redistribute it and/or modify it under the same terms as Ruby. + + +=============== APPENDIX. Standard License Files ============== + + + +--------------- SECTION 1: Ruby Clause-6 ----------- + +Ruby is copyrighted free software by Yukihiro Matsumoto . +You can redistribute it and/or modify it under either the terms of the GPL +(see COPYING.txt file), or the conditions below: + + 1. You may make and give away verbatim copies of the source form of the + software without restriction, provided that you duplicate all of the + original copyright notices and associated disclaimers. + + + 2. You may modify your copy of the software in any way, provided that + you do at least ONE of the following: + + a) place your modifications in the Public Domain or otherwise + make them Freely Available, such as by posting said + modifications to Usenet or an equivalent medium, or by allowing + the author to include your modifications in the software. + + b) use the modified software only within your corporation or + organization. + + c) rename any non-standard executables so the names do not conflict + with standard executables, which must also be provided. + + d) make other distribution arrangements with the author. + + + 3. You may distribute the software in object code or executable + form, provided that you do at least ONE of the following: + + a) distribute the executables and library files of the software, + together with instructions (in the manual page or equivalent) + on where to get the original distribution. + + b) accompany the distribution with the machine-readable source of + the software. + + c) give non-standard executables non-standard names, with + instructions on where to get the original software distribution. + + d) make other distribution arrangements with the author. + + + 4. You may modify and include the part of the software into any other + software (possibly commercial). But some files in the distribution + are not written by the author, so that they are not under this terms. + + They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some + files under the ./missing directory. See each file for the copying + condition. + + + 5. The scripts and library files supplied as input to or produced as + output from the software do not automatically fall under the + copyright of the software, but belong to whomever generated them, + and may be sold commercially, and may be aggregated with this + software. + + + 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. + + + +--------------- SECTION 2: GNU General Public License, V2.0 ----------- + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +--------------- SECTION 3: GNU Lesser General Public License, V3.0 ----------- + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + +================================================ + +To the extent any open source components are licensed under the +GPL and/or LGPL, or other similar licenses that require the +source code and/or modifications to source code to be made +available (as would be noted above), you may obtain a copy of +the source code corresponding to the binaries for such open +source components and modifications thereto, if any, (the +"Source Files"), by downloading the Source Files from Pivotal抯 website at +http://www.gopivotal.com/open-source, or by sending a request, with your name +and address to: Pivotal Software, Inc., 1900 S. Norfolk Street #125, San Mateo, +CA 94403, Attention: General Counsel. All such requests should clearly specify: +OPEN SOURCE FILES REQUEST,Attention General Counsel. Pivotal shall mail a copy of the +Source Files to you on a CD or equivalent physical medium. This +offer to obtain a copy of the Source Files is valid for three +years from the date you acquired this Software product. +Alternatively, the Source Files may accompany the Pivotal product. + + +[CFVCAPCOMMON11152013VN122013] diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/NOTICE b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/NOTICE new file mode 100644 index 0000000..0395e33 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/NOTICE @@ -0,0 +1,10 @@ +cf-vcap-common + +Copyright (c) 2013 Pivotal Software, Inc. All Rights Reserved. + +This product is licensed to you under the Apache License, Version 2.0 (the "License"). +You may not use this product except in compliance with the License. + +This product may include a number of subcomponents with separate copyright notices +and license terms. Your use of these subcomponents is subject to the terms and +conditions of the subcomponent's license, as noted in the LICENSE file. diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/README.md b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/README.md new file mode 100644 index 0000000..a6a67c7 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/README.md @@ -0,0 +1 @@ +[![Build Status](https://travis-ci.org/cloudfoundry/vcap-common.png)](https://travis-ci.org/cloudfoundry/vcap-common) diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/Rakefile b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/Rakefile new file mode 100644 index 0000000..7a99a64 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/Rakefile @@ -0,0 +1,7 @@ +require 'rspec/core/rake_task' + +task default: :spec + +RSpec::Core::RakeTask.new do |t| + t.rspec_opts = ['--format', 'documentation', '--colour'] +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/bin/cf-registrar b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/bin/cf-registrar new file mode 100755 index 0000000..a9b9941 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/bin/cf-registrar @@ -0,0 +1,59 @@ +#!/usr/bin/env ruby +require "rubygems" +require "yaml" + +require "cf/registrar" +require "steno" +require "securerandom" + +if ARGV.empty? + puts "Usage: cf-registrar -- -- ...\n\nModes can be --register-with-router and --register-varz-credentials" + exit +end + +config_file = ENV["CONFIG_FILE"] || File.expand_path("../config/registrar.example.yml", File.dirname(__FILE__)) +config = YAML.load_file(config_file) + +Steno.init(Steno::Config.from_hash(config["logging"])) +logger = Steno.logger("cf-registrar") + +unless config["varz"]["file"].nil? + varz_config = YAML.load_file(config["varz"]["file"]) + unless varz_config.nil? + logger.info "Reading varz config from #{config["varz"]["file"]}" + config["varz"] = varz_config["varz"] + end +end + +logger.debug("Config #{config.inspect}") + +EM.run do + cf_registrar = Cf::Registrar.new({ + :message_bus_servers => config["message_bus_servers"], + :host => config["host"], + :port => config["port"], + :uri => config["uri"], + :tags => config["tags"], + :index => config["index"], + :varz => config["varz"], + :private_instance_id => SecureRandom.uuid + }) + if ARGV.include?("--register-with-router") || ARGV.include?("--register_with_router") + cf_registrar.register_with_router + end + + if ARGV.include?("--register-varz-credentials") || ARGV.include?("--register_varz_credentials") + cf_registrar.register_varz_credentials + end + + %w[TERM INT QUIT].each do |signal| + trap signal do + logger.info("Shutting down") + if ARGV.include? "--register-with-router" + cf_registrar.shutdown { exit } + else + exit + end + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/bin/fetch_gems b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/bin/fetch_gems new file mode 100755 index 0000000..9ef49b3 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/bin/fetch_gems @@ -0,0 +1,63 @@ +#!/usr/bin/env ruby + +require 'rubygems' +require 'bundler' +require 'fileutils' +require 'logger' + +# Provides functionality similar to `bundle package`, but without needing +# to install any gems. + +unless ARGV.length == 3 + puts "Usage: fetch_gems [/path/to/Gemfile] [/path/to/Gemfile.lock] [/path/to/store]" + exit 1 +end + +gemfile_path, lockfile_path, gem_store_dir = ARGV.map {|path| File.expand_path(path) } + +ENV['BUNDLE_GEMFILE'] = gemfile_path + +lockfile_contents = File.read(lockfile_path) +parser = Bundler::LockfileParser.new(lockfile_contents) + +logger = Logger.new(STDOUT) + +if parser.specs.empty? + logger.info("No gems found") + exit 0 +end + +FileUtils.mkdir_p(gem_store_dir) + +to_fetch = [] +parser.specs.each do |spec| + gem_basename = "#{spec.name}-#{spec.version}.gem" + dst_path = File.join(gem_store_dir, gem_basename) + if spec.source.kind_of?(Bundler::Source::Path) && (spec.source.path.to_s == '.') + logger.info("Skipping '#{gem_basename}', Gemfile.lock appears to belong to it") + elsif File.exist?(dst_path) + logger.info("Skipping '#{gem_basename}', found in '#{gem_store_dir}'") + else + logger.info("Need to download '#{gem_basename}'") + to_fetch << gem_basename + end +end + +unless to_fetch.empty? + urls = to_fetch.map do |gem_basename| + "http://production.s3.rubygems.org/gems/#{gem_basename}" + end.join(' ') + + cmd = "wget --quiet --retry-connrefused --connect-timeout=5" + cmd += " --no-check-certificate --directory-prefix #{gem_store_dir} #{urls}" + + logger.info("Fetching #{to_fetch.join(', ')} from rubygems") + logger.info("Executing '#{cmd}'") + + unless system(cmd) + logger.error("#{cmd} failed with status #{$?}!") + exit $?.exitstatus + end +end + +logger.info("Done") diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/bin/transform_git_source b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/bin/transform_git_source new file mode 100755 index 0000000..cee280c --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/bin/transform_git_source @@ -0,0 +1,161 @@ +#!/usr/bin/env ruby +# vim: fileencoding=utf-8 +# vim: ts=2 sw=2 sts=2 et + +require 'rubygems' +require 'bundler' +require 'fileutils' +require 'logger' + +# Rewrite git sources in Gemfile and lock files to paths +# +# Usage: transform_git_source path/to/dir_w_Gemfile path/to/git/checkout + +def `(cmd) + @logger.debug "executing #{cmd}" + result = super + raise RuntimeError, "error while attempting to execute #{cmd}" unless $?.exitstatus == 0 + result +end + +def checkout(spec, path) + unless path.join('.git').exist? + path.parent.mkpath + path.rmtree if path.exist? + %x(git clone --no-checkout #{spec.source.uri} #{path}) + end + Dir.chdir(path) do + %x(git fetch --quiet --tags #{spec.source.uri}) + # This is gross, but why do they keep this private? + revision = spec.source.send(:revision) + %x(git reset --hard #{revision}) + end +end + +# Derived from Bundler::Definition#to_lock +# Copyright Bundler contributors +# Portions copyright (c) 2010 André Arko +# Portions copyright (c) 2009 Engine Yard +def to_lock(specs, platforms, dependencies) + out = "" + + specs.map {|s| s.source}.sort_by { |s| s.class.to_s }.uniq.each do |source| + # Add the source header + out << source.to_lock + # Find all specs for this source + specs. + select { |s| s.source == source }. + # This needs to be sorted by full name so that + # gems with the same name, but different platform + # are ordered consistantly + sort_by { |s| s.full_name }. + each do |spec| + next if spec.name == 'bundler' + out << spec.to_lock + end + out << "\n" + end + + out << "PLATFORMS\n" + + platforms.map { |p| p.to_s }.sort.each do |p| + out << " #{p}\n" + end + + out << "\n" + out << "DEPENDENCIES\n" + + handled = [] + dependencies. + sort_by { |d| d.to_s }. + each do |dep| + next if handled.include?(dep.name) + out << dep.to_lock + handled << dep.name + end + + out +end + +def rewrite_lockfile(lockfile, checkout_base) + parser = Bundler::LockfileParser.new(lockfile.read) + + candidates = parser.specs.select { |s| Bundler::Source::Git === s.source } + if candidates.empty? + @logger.info 'Nothing to see here, move along' + return + end + + gemsrc = parser.sources.find { |s| Bundler::Source::Rubygems === s } || + Bundler::Source::Rubygems.from_lock('remote' => 'http://rubygems.org') + lockfile.parent.join('vendor', 'cache').mkpath + candidates.each do |spec| + # TODO: shall i sanitize spec.name? + checkout_dir = checkout_base.join(spec.name) + checkout(spec, checkout_dir) + # TODO error handling + gem_dir = Pathname.glob("#{checkout_dir}/**/#{spec.name}.gemspec")[0].parent + Dir.chdir(gem_dir) do |dir| + %x(gem build #{spec.name}.gemspec) + gempath = gem_dir.join("#{spec.name}-#{spec.version}.gem") + FileUtils.link([gempath.to_s], lockfile.parent.join('vendor', 'cache').to_s, :verbose => true) + end + spec.source = gemsrc + # make the dependency have "no specified source" + parser.dependencies.find { |d| d.name == spec.name }.source = nil + end + + lockfile.open('w') do |f| + f.puts to_lock(parser.specs, parser.platforms, parser.dependencies) + end +end + +# We don't attempt to be a full ruby parser, only rewrite Gemfiles we wrote +def rewrite_gemfile(gemfile, checkout_base) + out = '' + probe = Object.new + class << probe + attr_reader :name, :version, :options, :path + def gem(name, *args) + @name = name + @options = args.last.is_a?(Hash) ? args.pop : {} + @version = args + unless @options.include?(:git) + raise ArgumentError, ':git option expected, none found' + end + end + end + + gemfile.each_line do |line| + case line + when /^\s*gem.*:git/ + if line =~ /#.*:git/ && line !~ /^[^#]+:git/ + out << line + next + end + probe.instance_eval(line) + out << "gem #{probe.name.inspect}" + out << ", #{probe.version.map(&:inspect).join(', ')}" unless probe.version.empty? + out << "\n" + else + out << line + end + end + gemfile.open('w') { |f| f.write(out) } +end + +if __FILE__ == $0 + unless ARGV.length == 2 + puts <<-USAGE +Incorrect number of arguments! Usage: + #{File.basename(__FILE__)} path/to/dir_with_Gemfile path/to/place/git/checkouts + USAGE + exit 1 + end + + @logger = Logger.new(STDERR) + project_dir, checkout_base = ARGV.map { |x| Pathname.new(x).expand_path } + ENV['BUNDLE_GEMFILE'] = project_dir.join('Gemfile').to_s + rewrite_lockfile(project_dir.join('Gemfile.lock'), checkout_base) + rewrite_gemfile(project_dir.join('Gemfile'), checkout_base) +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/config/registrar.example.yml b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/config/registrar.example.yml new file mode 100644 index 0000000..7750c13 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/config/registrar.example.yml @@ -0,0 +1,18 @@ +--- +logging: + level: all +message_bus_servers: + - nats://localhost:4222 +uri: test.vcap.me +# Alternatively, multiple urls are support like so +# uri: +# - test.vcap.me +# - abc.vcap.me +host: localhost +port: 80 +varz: + type: new_component + username: varz + password: varzclientpassword +# Absolute path to file containing the varz credentials +# file: /tmp/uaa.yml diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/git/hooks-wrapper b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/git/hooks-wrapper new file mode 100755 index 0000000..48340e1 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/git/hooks-wrapper @@ -0,0 +1,9 @@ +#!/bin/bash +if [ -x $0.local ]; then + $0.local "$@" || exit $? +fi + +REPO_DIR=$(dirname $GIT_DIR) +if [ -x $REPO_DIR/git/tracked_hooks/$(basename $0) ]; then + $REPO_DIR/git/tracked_hooks/$(basename $0) "$@" || exit $? +fi \ No newline at end of file diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/git/install-hook-symlinks b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/git/install-hook-symlinks new file mode 100755 index 0000000..7a0f708 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/git/install-hook-symlinks @@ -0,0 +1,28 @@ +#!/bin/bash +HOOK_NAMES=" +applypatch-msg +pre-applypatch +post-applypatch +pre-commit +prepare-commit-msg +commit-msg +post-commit +pre-rebase +post-checkout +post-merge +pre-receive +update +post-receive +post-update +pre-auto-gc +" + +HOOK_SRC=$(dirname $0) +HOOK_DIR=$(git rev-parse --git-dir)/hooks || exit $? + +for hook in $HOOK_NAMES; do + if [ ! -h $HOOK_DIR/$hook -a -x $HOOK_DIR/$hook ]; then + mv $HOOK_DIR/$hook $HOOK_DIR/$hook.local + fi + ln -s -f ../../git/hooks-wrapper $HOOK_DIR/$hook +done diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/git/tracked_hooks/pre-commit b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/git/tracked_hooks/pre-commit new file mode 100755 index 0000000..d01dd0f --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/git/tracked_hooks/pre-commit @@ -0,0 +1,11 @@ +#!/bin/sh + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +exec git diff-index --check --cached $against -- diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/cf/registrar.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/cf/registrar.rb new file mode 100644 index 0000000..8909539 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/cf/registrar.rb @@ -0,0 +1,135 @@ +require "eventmachine" +require "steno" +require "securerandom" +require "cf_message_bus/message_bus" + +module Cf + class Registrar + DISCOVER_TOPIC = "vcap.component.discover" + ANNOUNCE_TOPIC = "vcap.component.announce" + ROUTER_START_TOPIC = "router.start" + ROUTER_GREET_TOPIC = "router.greet" + ROUTER_REGISTER_TOPIC = "router.register" + ROUTER_UNREGISTER_TOPIC = "router.unregister" + + attr_reader :logger, :message_bus_servers, :type, :host, :port, + :username, :password, :uri, :tags, :uuid, :index, :private_instance_id + + def initialize(config) + @logger = Steno.logger("cf.registrar") + + config = symbolize_keys(config) + + @message_bus_servers = config[:message_bus_servers] + @host = config[:host] + @port = config[:port] + @uri = config[:uri] + @tags = config[:tags] + @index = config[:index] || 0 + @private_instance_id = config[:private_instance_id] + + if config[:varz] + @type = config[:varz][:type] + @username = config[:varz][:username] + @password = config[:varz][:password] + @uuid = config[:varz][:uuid] || SecureRandom.uuid + end + end + + def register_varz_credentials + discover_msg = { + :type => type, + :host => "#{host}:#{port}", + :index => index, + :uuid => "#{index}-#{uuid}", + :credentials => [username, password] + } + + if username.nil? || password.nil? + logger.error("Could not register nil varz credentials") + else + logger.info("Connected to NATS - varz registration") + + message_bus.subscribe(DISCOVER_TOPIC) do |_, reply| + logger.debug("Received #{DISCOVER_TOPIC} publishing #{reply.inspect} #{discover_msg.inspect}") + message_bus.publish(reply, discover_msg) + end + + logger.info("Announcing start up #{ANNOUNCE_TOPIC}") + message_bus.publish(ANNOUNCE_TOPIC, discover_msg) + end + end + + def register_with_router + logger.info("Connected to NATS - router registration") + + message_bus.subscribe(ROUTER_START_TOPIC) do |message| + handle_router_greeting(message) + end + + message_bus.request(ROUTER_GREET_TOPIC) do |message| + handle_router_greeting(message) + end + + send_registration_message + end + + def shutdown(&block) + send_unregistration_message(&block) + end + + private + + def handle_router_greeting(message) + send_registration_message + + if (interval = message["minimumRegisterIntervalInSeconds"]) + setup_interval(interval) + end + end + + def message_bus + @message_bus ||= CfMessageBus::MessageBus.new( + servers: message_bus_servers, + logger: logger) + end + + def send_registration_message + logger.debug("Sending registration: #{registry_message}") + message_bus.publish(ROUTER_REGISTER_TOPIC, registry_message) + end + + def send_unregistration_message(&block) + logger.info("Sending unregistration: #{registry_message}") + message_bus.publish(ROUTER_UNREGISTER_TOPIC, registry_message, &block) + end + + def registry_message + { + :host => host, + :port => port, + :uris => Array(uri), + :tags => tags, + :index => index, + :private_instance_id => private_instance_id + } + end + + def setup_interval(interval) + EM.cancel_timer(@registration_timer) if @registration_timer + + @registration_timer = EM.add_periodic_timer(interval) do + send_registration_message + end + end + + def symbolize_keys(hash) + return hash unless hash.is_a? Hash + Hash[ + hash.each_pair.map do |k, v| + [k.to_sym, symbolize_keys(v)] + end + ] + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/cf/version.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/cf/version.rb new file mode 100644 index 0000000..e13c171 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/cf/version.rb @@ -0,0 +1,3 @@ +module Cf + VERSION = "2.3.0".freeze +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/json_message.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/json_message.rb new file mode 100644 index 0000000..fe38015 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/json_message.rb @@ -0,0 +1,190 @@ +# Copyright (c) 2009-2011 VMware, Inc +require 'rubygems' +require 'yajl' +require 'membrane' + +class JsonMessage + # Base error class that all other JsonMessage related errors should + # inherit from + class Error < StandardError + end + + # Fields not defined properly. + class DefinitionError < Error + end + + # Failed to parse json during +decode+ + class ParseError < Error + end + + # One or more field's values didn't match their schema + class ValidationError < Error + attr_reader :errors + + def initialize(errors) + @errors = errors + end + + def to_s + err_strs = @errors.map { |f, e| "Field: #{f}, Error: #{e}" } + err_strs.join(', ') + end + end + + class Field + attr_reader :name, :schema, :required, :default + + def initialize(name, options = {}, &blk) + blk ||= lambda { |*_| options[:schema] || any } + + @name = name + @schema = Membrane::SchemaParser.parse(&blk) + @required = options[:required] || false + @default = options[:default] + + if @required && @default + raise DefinitionError, \ + "Cannot define a default value for required field #{name}" + end + + validate(@default) if @default + end + + def validate(value) + begin + @schema.validate(value) + rescue Membrane::SchemaValidationError => e + raise ValidationError.new( { name => e.message } ) + end + end + end + + class << self + def fields + @fields ||= {} + end + + def decode(json) + begin + dec_json = Yajl::Parser.parse(json) + rescue => e + raise ParseError, e.to_s + end + + from_decoded_json(dec_json) + end + + def from_decoded_json(dec_json) + raise ParseError, "Decoded JSON cannot be nil" unless dec_json + + errs = {} + + # Treat null values as if the keys aren't present. This isn't as strict + # as one would like, but conforms to typical use cases. + dec_json.delete_if {|k, v| v == nil} + + # Collect errors by field + fields.each do |name, field| + err = nil + if dec_json.has_key?(name.to_s) + begin + field.validate(dec_json[name.to_s]) + rescue ValidationError => e + err = e.errors[name] + end + elsif field.required + err = "Missing field #{name}" + end + + errs[name] = err if err + end + + raise ValidationError.new(errs) unless errs.empty? + + new(dec_json) + end + + def required(name, schema = nil, &blk) + define_field(name, :schema => schema, :required => true, &blk) + end + + def optional(name, schema = nil, default = nil, &blk) + define_field(name, :schema => schema, :default => default, &blk) + end + + protected + + def define_field(name, options = {}, &blk) + name = name.to_sym + + fields[name] = Field.new(name, options, &blk) + + define_method(name) do + set_default(name) + @msg[name] + end + + define_method("#{name}=") do |value| + set_field(name, value) + end + end + end + + def initialize(fields={}) + @msg = {} + fields.each { |name, value| set_field(name, value) } + set_defaults + end + + def encode + set_defaults + + missing_fields = {} + + self.class.fields.each do |name, field| + if field.required && !@msg.has_key?(name) + missing_fields[name] = "Missing field #{name}" + end + end + + raise ValidationError.new(missing_fields) unless missing_fields.empty? + + Yajl::Encoder.encode(@msg) + end + + def extract(opts = {}) + hash = @msg.dup + if opts[:stringify_keys] + hash = hash.inject({}) { |memo,(k,v)| memo[k.to_s] = v; memo }.freeze + end + + hash.freeze + end + + protected + + def set_field(name, value) + name = name.to_sym + field = self.class.fields[name] + + return unless field + + field.validate(value) + @msg[name] = value + end + + def set_defaults + self.class.fields.each do |name, _| + set_default(name) + end + end + + def set_default(name) + unless @msg.has_key?(name) + field = self.class.fields[name] + if field + @msg[name] = field.default unless field.default.nil? + end + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api.rb new file mode 100644 index 0000000..0b7377d --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api.rb @@ -0,0 +1,6 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require 'services/api/async_requests' +require 'services/api/const' +require 'services/api/messages' +require 'services/api/clients/service_gateway_client' +require 'services/api/util' diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/async_requests.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/async_requests.rb new file mode 100644 index 0000000..b041f53 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/async_requests.rb @@ -0,0 +1,87 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require 'eventmachine' +require 'em-http-request' +require 'fiber' +require 'httpclient' + +require 'services/api/const' + +module VCAP + module Services + module Api + end + end +end + +module VCAP::Services::Api + class AsyncHttpRequest + class << self + def new(url, token, verb, timeout, msg=VCAP::Services::Api::EMPTY_REQUEST) + + req = { + :head => { + VCAP::Services::Api::GATEWAY_TOKEN_HEADER => token, + 'Content-Type' => 'application/json', + }, + :body => msg.encode, + } + if timeout + EM::HttpRequest.new(url, :inactivity_timeout => timeout).send(verb.to_sym, req) + else + EM::HttpRequest.new(url).send(verb.to_sym, req) + end + end + + def request(url, token, verb, timeout, msg=VCAP::Services::Api::EMPTY_REQUEST) + req = new(url, token, verb, timeout, msg) + f = Fiber.current + req.callback { f.resume(req) } + req.errback { f.resume(req) } + http = Fiber.yield + raise UnexpectedResponse, "Error sending request #{msg.extract.to_json} to gateway #{@url}: #{http.error}" unless http.error.empty? + code = http.response_header.status.to_i + body = http.response + [code, body] + end + end + end + + module SynchronousHttpRequest + def self.request(url, token, verb, timeout, msg=VCAP::Services::Api::EMPTY_REQUEST) + header = { + VCAP::Services::Api::GATEWAY_TOKEN_HEADER => token, + 'Content-Type' => 'application/json', + } + body = msg.encode + client = HTTPClient.new + msg = client.request(verb.to_sym, url, :body => body, :header => header) + [msg.code, msg.body] + end + end + + class AsyncHttpMultiPartUpload + class << self + def new(url, timeout, multipart, head={}) + req = { + :head => head, + :body => "", + :multipart => multipart + } + + if timeout + EM::HttpRequest.new(url, :inactivity_timeout => timeout).post req + else + EM::HttpRequest.new(url).post req + end + end + + def fibered(url, timeout, multipart, head={}) + req = new(url, timeout, multipart, head) + f = Fiber.current + req.callback { f.resume(req) } + req.errback {f.resume(req)} + Fiber.yield + end + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/clients/service_gateway_client.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/clients/service_gateway_client.rb new file mode 100644 index 0000000..e8eb1ed --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/clients/service_gateway_client.rb @@ -0,0 +1,199 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require 'net/http' +require 'uri' + +require 'services/api/const' +require 'services/api/messages' +require 'services/api/async_requests' + +module VCAP + module Services + module Api + end + end +end + +module VCAP::Services::Api + class ServiceGatewayClient + # Public: Indicate gateway client encounter an unexpected error, + # such as can't connect to gateway or can't decode response. + # + class UnexpectedResponse < StandardError; end + + # Public: Indicate an error response from gateway + # + class ErrorResponse < StandardError + attr_reader :status, :error + + # status - the http status + # error - a ServiceErrorResponse object + # + def initialize(status, error) + @status = status + @error = error + end + + def to_s + "#{self.class.name}: #{error.description}" + end + + def to_h + { + 'error' => error.extract(stringify_keys: true).merge( + 'backtrace' => backtrace, + 'types' => self.class.ancestors.map(&:name) - Exception.ancestors.map(&:name) + ) + } + end + end + + class NotFoundResponse < ErrorResponse + def initialize(error) + super(404, error) + end + end + + class GatewayInternalResponse < ErrorResponse + def initialize(error) + super(503, error) + end + end + + attr_reader :http_client + + def initialize(url, token, timeout, request_id) + @http_client = HttpClient.new(url, token, timeout, request_id) + end + + def provision(args) + msg = GatewayProvisionRequest.new(args) + resp = http_client.perform_request(:post, '/gateway/v1/configurations', msg) + GatewayHandleResponse.decode(resp) + end + + def unprovision(args) + http_client.perform_request(:delete, "/gateway/v1/configurations/#{args[:service_id]}") + EMPTY_REQUEST + end + + def bind(args) + msg = GatewayBindRequest.new(args) + resp = http_client.perform_request(:post, "/gateway/v1/configurations/#{msg.service_id}/handles", msg) + GatewayHandleResponse.decode(resp) + end + + def unbind(args) + msg = GatewayUnbindRequest.new(args) + http_client.perform_request(:delete, "/gateway/v1/configurations/#{msg.service_id}/handles/#{msg.handle_id}", msg) + EMPTY_REQUEST + end + + #------------------ + # Snapshotting has never been enabled in production - we can probably remove these + #------------------ + + def job_info(args) + resp = http_client.perform_request(:get, "/gateway/v1/configurations/#{args[:service_id]}/jobs/#{args[:job_id]}") + Job.decode(resp) + end + + def create_snapshot(args) + resp = http_client.perform_request(:post, "/gateway/v1/configurations/#{args[:service_id]}/snapshots") + Job.decode(resp) + end + + def enum_snapshots(args) + resp = http_client.perform_request(:get, "/gateway/v1/configurations/#{args[:service_id]}/snapshots") + SnapshotList.decode(resp) + end + + def snapshot_details(args) + resp = http_client.perform_request(:get, "/gateway/v1/configurations/#{args[:service_id]}/snapshots/#{args[:snapshot_id]}") + Snapshot.decode(resp) + end + + def update_snapshot_name(args) + http_client.perform_request(:post, "/gateway/v1/configurations/#{args[:service_id]}/snapshots/#{args[:snapshot_id]}/name", args[:msg]) + EMPTY_REQUEST + end + + def rollback_snapshot(args) + resp = http_client.perform_request(:put, "/gateway/v1/configurations/#{args[:service_id]}/snapshots/#{args[:snapshot_id]}") + Job.decode(resp) + end + + def delete_snapshot(args) + resp = http_client.perform_request(:delete, "/gateway/v1/configurations/#{args[:service_id]}/snapshots/#{args[:snapshot_id]}") + Job.decode(resp) + end + + def create_serialized_url(args) + resp = http_client.perform_request(:post, "/gateway/v1/configurations/#{args[:service_id]}/serialized/url/snapshots/#{args[:snapshot_id]}") + Job.decode(resp) + end + + def serialized_url(args) + resp = http_client.perform_request(:get, "/gateway/v1/configurations/#{args[:service_id]}/serialized/url/snapshots/#{args[:snapshot_id]}") + SerializedURL.decode(resp) + end + + def import_from_url(args) + resp = http_client.perform_request(:put, "/gateway/v1/configurations/#{args[:service_id]}/serialized/url", args[:msg]) + Job.decode(resp) + end + + class HttpClient + METHODS_MAP = { + get: Net::HTTP::Get, + post: Net::HTTP::Post, + put: Net::HTTP::Put, + delete: Net::HTTP::Delete, + } + + attr_reader :uri, :timeout, :token, :headers + + def initialize(uri, token, timeout, request_id) + @uri = URI.parse(uri) + @timeout = timeout + @token = token + @headers = { + 'Content-Type' => 'application/json', + GATEWAY_TOKEN_HEADER => token, + "X-VCAP-Request-ID" => request_id.to_s + } + end + + def perform_request(http_method, path, msg = EMPTY_REQUEST) + klass = METHODS_MAP[http_method] + request = klass.new(path, headers) + request.body = msg.encode + + opts = {} + if uri.scheme == "https" + opts[:use_ssl] = true + end + + response = Net::HTTP.start(uri.host, uri.port, opts) do |http| + http.request(request) + end + + code = response.code.to_i + body = response.body + + return body if code == 200 + + begin + err = ServiceErrorResponse.decode(body) + rescue JsonMessage::Error + raise UnexpectedResponse, "Can't decode gateway response. status code: #{code}, response body: #{body}" + end + + case code + when 404 then raise NotFoundResponse.new(err) + when 503 then raise GatewayInternalResponse.new(err) + else raise ErrorResponse.new(code, err) + end + end + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/const.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/const.rb new file mode 100644 index 0000000..a9a94dd --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/const.rb @@ -0,0 +1,9 @@ +# Copyright (c) 2009-2011 VMware, Inc. +module VCAP + module Services + module Api + GATEWAY_TOKEN_HEADER = 'X-VCAP-Service-Token' + SERVICE_LABEL_REGEX = /^\S+-\S+$/ + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/messages.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/messages.rb new file mode 100644 index 0000000..814fc2c --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/messages.rb @@ -0,0 +1,215 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require 'uri' + +require 'services/api/const' +require 'membrane' +require 'json_message' + +module VCAP + module Services + module Api + + class EmptyRequest < JsonMessage + end + EMPTY_REQUEST = EmptyRequest.new.freeze + + # + # Tell the CloudController about a service + # NB: Deleting an offering takes all args in the url + # + class ServiceOfferingRequest < JsonMessage + required :label, SERVICE_LABEL_REGEX + required :url, URI::regexp(%w(http https)) + required :supported_versions, [String] + required :version_aliases, Hash + + optional :description, String + optional :info_url, URI::regexp(%w(http https)) + optional :tags, [String] + optional :plan_details do + [ + { + "name" => String, + "free" => bool, + optional("description") => String, + optional("extra") => String, + optional("unique_id") => String, + } + ] + end + optional :plans, [String] + optional :plan_descriptions + optional :cf_plan_id + optional :plan_options + optional :binding_options + optional :acls + optional :active + optional :timeout, Integer + optional :provider, String + optional :default_plan, String + optional :extra, String + optional :unique_id, String + end + + class ProxiedServiceOfferingRequest < JsonMessage + required :label, SERVICE_LABEL_REGEX + required :options, [{"name" => String, "credentials" => Hash}] + optional :description, String + end + + class HandleUpdateRequest < JsonMessage + required :service_id, String + required :configuration + required :credentials + end + + class HandleUpdateRequestV2 < JsonMessage + required :token, String + required :gateway_data + required :credentials + end + + class ListHandlesResponse < JsonMessage + required :handles, [Object] + end + + class ListProxiedServicesResponse < JsonMessage + required :proxied_services, [{"label" => String, "description" => String, "acls" => {"users" => [String], "wildcards" => [String]}}] + end + + # + # Provision a service instance + # NB: Unprovision takes all args in the url + # + class CloudControllerProvisionRequest < JsonMessage + required :label, SERVICE_LABEL_REGEX + required :name, String + required :plan, String + required :version, String + + optional :plan_option + optional :provider, String + end + + class GatewayProvisionRequest < JsonMessage + required :unique_id, String + required :name, String + + optional :email, String + optional :provider, String + optional :label, String + optional :plan, String + optional :version, String + optional :organization_guid, String + optional :space_guid, String + optional :plan_option + end + + # Provision and bind response use the same format + class GatewayHandleResponse < JsonMessage + required :service_id, String + required :configuration + required :credentials + + optional :dashboard_url, String + optional :syslog_drain_url, String + end + + # + # Bind a previously provisioned service to an app + # + class CloudControllerBindRequest < JsonMessage + required :service_id, String + required :app_id, Integer + required :binding_options + end + + class GatewayBindRequest < JsonMessage + required :service_id, String + required :label, String + required :email, String + required :binding_options + + optional :app_id, String + end + + class GatewayUnbindRequest < JsonMessage + required :service_id, String + required :handle_id, String + required :binding_options + end + + class CloudControllerBindResponse < JsonMessage + required :label, SERVICE_LABEL_REGEX + required :binding_token, String + end + + # Bind app_name using binding_token + class BindExternalRequest < JsonMessage + required :binding_token, String + required :app_id, Integer + end + + class BindingTokenRequest < JsonMessage + required :service_id, String + required :binding_options + end + + class Snapshot < JsonMessage + required :snapshot_id, String + required :date, String + required :size, Integer + required :name, String + end + + class SnapshotList < JsonMessage + required :snapshots, [Object] + end + + class CreateSnapshotV2Request < JsonMessage + required :name, /./ + end + + class SnapshotV2 < JsonMessage + required :snapshot_id, String + required :name, String + required :state, String + required :size, Integer + + optional :created_time, String + optional :restored_time, String + end + + class SnapshotListV2 < JsonMessage + required :snapshots, [Object] + end + + class UpdateSnapshotNameRequest < JsonMessage + required :name, String + end + + class Job < JsonMessage + required :job_id, String + required :status, String + required :start_time, String + optional :description, String + optional :complete_time, String + optional :result, Object + end + + class SerializedURL < JsonMessage + required :url, URI::regexp(%w(http https)) + end + + class SerializedData < JsonMessage + required :data, String + end + + class ServiceErrorResponse < JsonMessage + required :code, Integer + required :description, String + optional :error, Hash + end + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/util.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/util.rb new file mode 100644 index 0000000..6c99d14 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/services/api/util.rb @@ -0,0 +1,17 @@ +# Copyright (c) 2009-2011 VMware, Inc. +module VCAP + module Services + module Api + end + end +end + +class VCAP::Services::Api::Util + class << self + def parse_label(label) + raise ArgumentError, "Invalid label" unless label.match(/-/) + name, _, version = label.rpartition(/-/) + [name, version] + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/close_fds b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/close_fds new file mode 100755 index 0000000..293722e --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/close_fds @@ -0,0 +1,48 @@ +#!/usr/bin/env ruby +# Copyright (c) 2009-2011 VMware, Inc. + +require "fileutils" + +def close_fds + 3.upto(get_max_open_fd) do |fd| + begin + IO.for_fd(fd, "r").close + rescue + end + end +end + +def get_max_open_fd + max = 0 + + dir = nil + if File.directory?("/proc/self/fd/") # Linux + dir = "/proc/self/fd/" + elsif File.directory?("/dev/fd/") # Mac + dir = "/dev/fd/" + end + + if dir + Dir.foreach(dir) do |entry| + begin + pid = Integer(entry) + max = pid if pid > max + rescue + end + end + else + max = 65535 + end + + max +end + +close_fds + +# deletes itself when run by the DEA +delete_script = ARGV.shift +if delete_script == "true" + FileUtils.rm(__FILE__) +end + +exec(*ARGV) diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/common.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/common.rb new file mode 100644 index 0000000..35ec362 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/common.rb @@ -0,0 +1,253 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require 'fileutils' +require 'socket' +require 'uuidtools' + +# VMware's Cloud Application Platform + +module VCAP + + WINDOWS = RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/ + A_ROOT_SERVER = '198.41.0.4' + + def self.local_ip(route = A_ROOT_SERVER) + route ||= A_ROOT_SERVER + orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true + UDPSocket.open {|s| s.connect(route, 1); s.addr.last } + ensure + Socket.do_not_reverse_lookup = orig + end + + def self.secure_uuid + result = UUIDTools::UUID.random_create.to_s.delete('-') + end + + def self.grab_ephemeral_port + socket = TCPServer.new('0.0.0.0', 0) + socket.setsockopt(Socket::SOL_SOCKET, Socket::SO_REUSEADDR, true) + orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lookup, true + port = socket.addr[1] + socket.close + return port + ensure + Socket.do_not_reverse_lookup = orig + end + + def self.uptime_string(delta) + num_seconds = delta.to_i + days = num_seconds / (60 * 60 * 24); + num_seconds -= days * (60 * 60 * 24); + hours = num_seconds / (60 * 60); + num_seconds -= hours * (60 * 60); + minutes = num_seconds / 60; + num_seconds -= minutes * 60; + "#{days}d:#{hours}h:#{minutes}m:#{num_seconds}s" + end + + def self.uptime_string_to_seconds(string) + parts = string.split(":", 4).map { |i| i.to_i} + raise ArgumentError.new("Invalid format") unless parts.size == 4 + days, hours, mins, secs = parts + secs + (mins * 60) + (hours * 3600) + (days * 24 * 3600) + end + + def self.num_cores + if RUBY_PLATFORM =~ /linux/ + return `cat /proc/cpuinfo | grep processor | wc -l`.to_i + elsif RUBY_PLATFORM =~ /darwin/ + `hwprefs cpu_count`.strip.to_i + elsif RUBY_PLATFORM =~ /freebsd|netbsd/ + `sysctl hw.ncpu`.strip.to_i + elsif WINDOWS + (ENV['NUMBER_OF_PROCESSORS'] || 1).to_i + else + return 1 # unknown.. + end + rescue + # hwprefs doesn't always exist, and so the block above can fail. + # In any case, let's always assume that there is 1 core + 1 + end + + def self.defer(*args, &blk) + if args[0].kind_of?(Hash) + op = blk + opts = args[0] + else + op = args[0] || blk + opts = args[1] || {} + end + + callback = opts[:callback] + logger = opts[:logger] + nobacktrace = opts[:nobacktrace] + + wrapped_operation = exception_wrap_block(op, logger, nobacktrace) + wrapped_callback = callback ? exception_wrap_block(callback, logger, nobacktrace) : nil + EM.defer(wrapped_operation, wrapped_callback) + end + + def self.exception_wrap_block(op, logger, nobacktrace=false) + Proc.new do |*args| + begin + op.call(*args) + rescue => e + err_str = "#{e} - #{e.backtrace.join("\n")}" unless nobacktrace + err_str = "#{e}" if nobacktrace + if logger + logger.fatal(err_str) + else + $stderr.puts(err_str) + end + end + end + end + + def self.process_running?(pid) + return false unless pid && (pid > 0) + if WINDOWS + output = %x[tasklist /nh /fo csv /fi "pid eq #{pid}"] + else + output = %x[ps -o rss= -p #{pid}] + end + return true if ($? == 0 && !output.empty?) + # fail otherwise.. + return false + end + + def self.pp_bytesize(bsize) + units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'] + base = 1000 + bsize = bsize.to_f() + quotient = unit = nil + units.each_with_index do |u, i| + unit = u + quotient = bsize / (base ** i) + break if quotient < base + end + "%0.2f%s" % [quotient, unit] + end + + def self.symbolize_keys(hash) + if hash.is_a? Hash + new_hash = {} + hash.each {|k, v| new_hash[k.to_sym] = symbolize_keys(v) } + new_hash + else + hash + end + end + + # Helper class to atomically create/update pidfiles and ensure that only one instance of a given + # process is running at all times. + # + # NB: Ruby doesn't have real destructors so if you want to be polite and clean up after yourself + # be sure to call unlink() before your process exits. + # + # usage: + # + # begin + # pidfile = VCAP::PidFile.new('/tmp/foo') + # rescue => e + # puts "Error creating pidfile: %s" % (e) + # exit(1) + # end + class PidFile + class ProcessRunningError < StandardError + end + + def initialize(pid_file, create_parents=true) + @pid_file = pid_file + @dirty = true + write(create_parents) + end + + # Removes the created pidfile + def unlink() + return unless @dirty + + # Swallowing exception here is fine. Removing the pid files is a courtesy. + begin + File.unlink(@pid_file) + @dirty = false + rescue + end + self + end + + # Removes the created pidfile upon receipt of the supplied signals + def unlink_on_signals(*sigs) + return unless @dirty + + sigs.each do |s| + Signal.trap(s) { unlink() } + end + self + end + + def unlink_at_exit() + at_exit { unlink() } + self + end + + def to_s() + @pid_file + end + + protected + + # Atomically writes the pidfile. + # NB: This throws exceptions if the pidfile contains the pid of another running process. + # + # +create_parents+ If true, all parts of the path up to the file's dirname will be created. + # + def write(create_parents=true) + FileUtils.mkdir_p(File.dirname(@pid_file)) if create_parents + + # Protip from Wilson: binary mode keeps things sane under Windows + # Closing the fd releases our lock + File.open(@pid_file, 'a+b', 0644) do |f| + f.flock(File::LOCK_EX) + + # Check if process is already running + pid = f.read().strip().to_i() + if pid == Process.pid() + return + elsif VCAP.process_running?(pid) + raise ProcessRunningError.new("Process already running (pid=%d)." % (pid)) + end + + # We're good to go, write our pid + f.truncate(0) + f.rewind() + f.write("%d\n" % (Process.pid())) + f.flush() + end + end + end # class PidFile + +end # module VCAP + +# Make the patch here for proper bytesize +if RUBY_VERSION <= "1.8.6" + class String #:nodoc: + def bytesize; self.size; end + end +end + +# FIXME, we should ditch ruby logger. +# Monkey Patch to get rid of some deadlocks under load in CC, make it available for all. + +require 'logger' + +STDOUT.sync = true + +class Logger::LogDevice + def write(message) + @dev.syswrite(message) + end + + def close + @dev.close + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/component.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/component.rb new file mode 100644 index 0000000..2915d87 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/component.rb @@ -0,0 +1,237 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require "base64" +require "eventmachine" +require "monitor" +require "nats/client" +require "set" +require "thin" +require "yajl" +require "vcap/stats" + +module VCAP + + RACK_JSON_HDR = { 'Content-Type' => 'application/json' } + RACK_TEXT_HDR = { 'Content-Type' => 'text/plaintext' } + + class Varz + def initialize(logger) + @logger = logger + end + + def call(env) + @logger.debug "varz access" + varz = Yajl::Encoder.encode(Component.updated_varz, :pretty => true, :terminator => "\n") + [200, { 'Content-Type' => 'application/json', 'Content-Length' => varz.length.to_s }, varz] + rescue => e + @logger.error "varz error #{e.inspect} #{e.backtrace.join("\n")}" + raise e + end + end + + class Healthz + def initialize(logger) + @logger = logger + end + + def call(env) + @logger.debug "healthz access" + healthz = Component.updated_healthz + [200, { 'Content-Type' => 'application/json', 'Content-Length' => healthz.length.to_s }, healthz] + rescue => e + @logger.error "healthz error #{e.inspect} #{e.backtrace.join("\n")}" + raise e + end + end + + # Common component setup for discovery and monitoring + class Component + + # We will suppress these from normal varz reporting by default. + CONFIG_SUPPRESS = Set.new([:message_bus_servers, :mbus, :service_mbus, :keys, :database_environment, :password, :pass, :token]) + + class SafeHash < BasicObject + def initialize(hash = {}) + @hash = hash + end + + def class + SafeHash + end + + def threadsafe! + @monitor = ::Monitor.new + end + + def synchronize + if @monitor + @monitor.synchronize do + begin + @thread = ::Thread.current + yield + ensure + @thread = nil + end + end + else + yield + end + end + + def method_missing(sym, *args, &blk) + if @monitor && @thread != ::Thread.current + ::Kernel.raise "Lock required" + end + + @hash.__send__(sym, *args, &blk) + end + end + + class << self + def varz + @varz ||= SafeHash.new + end + + attr_accessor :healthz + + def updated_varz + @last_varz_update ||= 0 + + if Time.now.to_f - @last_varz_update >= 1 + rss, pcpu = Stats.process_memory_and_cpu + + # Update varz + varz.synchronize do + @last_varz_update = Time.now.to_f + + varz[:uptime] = VCAP.uptime_string(Time.now - varz[:start]) + varz[:mem] = rss.to_i + varz[:cpu] = pcpu.to_f + + varz[:mem_used_bytes] = Stats.memory_used_bytes + varz[:mem_free_bytes] = Stats.memory_free_bytes + + varz[:cpu_load_avg] = Stats.cpu_load_average + + # Return duplicate while holding lock + return varz.dup + end + else + # Return duplicate while holding lock + varz.synchronize do + return varz.dup + end + end + end + + def updated_healthz + @last_healthz_update ||= 0 + + if Time.now.to_f - @last_healthz_update >= 1 + @last_healthz_update = Time.now.to_f + end + + healthz.dup + end + + def start_http_server(host, port, auth, logger) + http_server = Thin::Server.new(host, port, :signals => false) do + Thin::Logging.silent = true + use Rack::Auth::Basic do |username, password| + [username, password] == auth + end + map '/healthz' do + run Healthz.new(logger) + end + map '/varz' do + run Varz.new(logger) + end + end + http_server.start! + end + + def uuid + @discover[:uuid] + end + + # Announces the availability of this component to NATS. + # Returns the published configuration of the component, + # including the ephemeral port and credentials. + def register(opts) + uuid = VCAP.secure_uuid + type = opts[:type] + index = opts[:index] + uuid = "#{index}-#{uuid}" if index + host = opts[:host] || VCAP.local_ip + port = opts[:port] || VCAP.grab_ephemeral_port + nats = opts[:nats] || NATS + auth = [opts[:user] || VCAP.secure_uuid, opts[:password] || VCAP.secure_uuid] + logger = opts[:logger] || Logger.new(nil) + log_counter = opts[:log_counter] + + # Discover message limited + @discover = { + :type => type, + :index => index, + :uuid => uuid, + :host => "#{host}:#{port}", + :credentials => auth, + :start => Time.now + } + + # Varz is customizable + varz.synchronize do + varz.merge!(@discover.dup) + varz[:num_cores] = VCAP.num_cores + varz[:config] = sanitize_config(opts[:config]) if opts[:config] + varz[:log_counts] = log_counter if log_counter + end + + @healthz = "ok\n".freeze + + # Next steps require EM + raise "EventMachine reactor needs to be running" if !EventMachine.reactor_running? + + # Startup the http endpoint for /varz and /healthz + start_http_server(host, port, auth, logger) + + # Listen for discovery requests + nats.subscribe('vcap.component.discover') do |msg, reply| + update_discover_uptime + nats.publish(reply, @discover.to_json) + end + + # Also announce ourselves on startup.. + nats.publish('vcap.component.announce', @discover.to_json) + + @discover + end + + def update_discover_uptime + @discover[:uptime] = VCAP.uptime_string(Time.now - @discover[:start]) + end + + def clear_level(h) + h.each do |k, v| + if CONFIG_SUPPRESS.include?(k.to_sym) + h.delete(k) + else + clear_level(h[k]) if v.instance_of? Hash + end + end + end + + def sanitize_config(config) + # Can't Marshal/Deep Copy logger instances that services use + if config[:logger] + config = config.dup + config.delete(:logger) + end + # Deep copy + config = Marshal.load(Marshal.dump(config)) + clear_level(config) + config + end + + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/config.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/config.rb new file mode 100644 index 0000000..9442c64 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/config.rb @@ -0,0 +1,31 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require 'yaml' + +require 'vcap/common' +require 'membrane' + +module VCAP + class Config + class << self + attr_reader :schema + + def define_schema(&blk) + @schema = Membrane::SchemaParser.parse(&blk) + end + + def from_file(filename, symbolize_keys=true) + config = YAML.load_file(filename) + config = VCAP.symbolize_keys(config) if symbolize_keys + @schema.validate(config) + config + end + + def to_file(config, out_filename) + @schema.validate(config) + File.open(out_filename, 'w+') do |f| + YAML.dump(config, f) + end + end + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/fiber_tracing.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/fiber_tracing.rb new file mode 100644 index 0000000..b81bb37 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/fiber_tracing.rb @@ -0,0 +1,45 @@ +# Copyright (c) 2009-2011 VMware, Inc. +class Fiber + attr_accessor :trace_id + alias_method :orig_resume, :resume + + class << self + @io=nil + + alias_method :orig_yield, :yield + + def enable_tracing(io) + raise ArgumentError, "You must pass in IO object, #{io.class} given" unless io.is_a? IO + @io = io + end + + def yield(*args) + log_action('yield') + begin + orig_yield(*args) + rescue FiberError => fe + Fiber.log_action('yield_error', self) + raise fe + end + end + + def log_action(action, f=nil) + return unless @io + f ||= Fiber.current + trace_id = f.trace_id || '-' + cname = Kernel.caller[1] + @io.puts("FT %-14s %-20s %-30s %s" % [action, trace_id, f.object_id, cname]) + @io.flush + end + end + + def resume(*args) + Fiber.log_action('resume', self) + begin + orig_resume(*args) + rescue FiberError => fe + Fiber.log_action('resume_error', self) + raise fe + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/priority_queue.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/priority_queue.rb new file mode 100644 index 0000000..4618154 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/priority_queue.rb @@ -0,0 +1,164 @@ +#a priority queue with the added twist of FIFO behavior for elements with equal priorities +#implementation using binary max-heap on top of a ruby array. +#the FIFO behavior is implemented by storing a FIFO bucket of same-priority values + +#The implementation is not meant to be high-performance, just decent, with two goals: +#1. clean interface +#2. proper time/space complexity of a binary heap +#3. no silly memory leaks (Ah, three weapons of the Spanish Inquisition) + +#additionally, we implement a PrioritySet, that is a PriorityQueue +#into which an element can only be inserted once. This PrioritySet +#allows specifying identity for the object with a separate object. +#The identity is for determining whether an object being inserted is a +#duplicate, e.g. + +# q.insert("boo", 1, "key") +# q.insert("zah", 1, "key") + +#will result in just one object in the queue, "boo" +# +#See spec/unit/priority_queue_set for +#other examples + +require 'set' +require 'pp' + +module VCAP + class PriorityQueueFIFO + + attr_reader :size + + def initialize + @heap_arr = [] + @p2b = {} #hash mapping priorities to buckets + @size = 0 + end + + def empty? + size == 0 + end + + def insert(item, priority = 0) + raise ArgumentError, "priority can not be negative: #{priority}" if priority < 0 + + unless append_to_existing_priority_bucket(item, priority) + add_bucket_at_the_end_and_shift_up(item, priority) + end + @size += 1 + end + + def remove + return nil if empty? + bucket = top_bucket + priority = top_priority + elem = bucket.shift + @size -= 1 + if empty? + @heap_arr.clear + @p2b.clear + elsif bucket.empty? + @heap_arr[0] = @heap_arr.pop + @p2b.delete(priority) + shift_down + else + #do nothing, we just shifted a value from a bucket and it still isn't empty, so no rearrangement is needed + end + elem + end + + private + + def add_bucket_at_the_end_and_shift_up(item, priority) + bucket = [item] + @p2b[priority] = bucket + + #normal binary heap operation + @heap_arr.push priority + shift_up + end + + def append_to_existing_priority_bucket(item, priority) + return false unless @p2b[priority] + @p2b[priority] << item + return true + end + + def top_bucket + @p2b[top_priority] + end + + def top_priority + priority_at(0) + end + + def priority_at(index) + return -1 if index >= @heap_arr.size + @heap_arr[index] + end + + def parent_index(index) + (index+1) / 2 - 1 + end + + def left_child_index(index) + (index+1) * 2 - 1 + end + + def right_child_index(index) + (index+1) * 2 + end + + def any_children_at?(index) + left_child_index(index) < @heap_arr.length + end + + def shift_up + cur_index = @heap_arr.length - 1 + while cur_index > 0 && priority_at(cur_index) > priority_at(parent_index(cur_index)) do + next_cur_index = parent_index cur_index + swap_at(cur_index, next_cur_index) + cur_index = next_cur_index + end + end + + def index_of_max_priority_child_at(index) + #raise(ArgumentError, "no children at #{index}") unless any_children_at?(index) + l = left_child_index(index) + r = right_child_index(index) + return r if priority_at(r) > priority_at(l) #this is safe since priority will return -1 for non-existent right child + return l + end + + def shift_down + cur_index = 0 + while any_children_at?(cur_index) && priority_at(cur_index) < priority_at(index_of_max_priority_child_at(cur_index)) do + next_cur_index = index_of_max_priority_child_at cur_index + swap_at(cur_index, next_cur_index) + cur_index = next_cur_index + end + end + + def swap_at(i,j) + @heap_arr[i], @heap_arr[j] = @heap_arr[j], @heap_arr[i] + end + end + + + class PrioritySet < PriorityQueueFIFO + def initialize + super + @set = Set.new #the set is used to check for duplicates + end + + def insert(elem, priority = 0, key = nil) + super([elem,key], priority) if @set.add?(key || elem) + end + + def remove + elem, key = super + @set.delete(key || elem) + elem + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/process_utils.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/process_utils.rb new file mode 100644 index 0000000..a6f55d1 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/process_utils.rb @@ -0,0 +1,43 @@ +require 'thread' + +require 'vcap/subprocess' + +module VCAP + module ProcessUtils + STAT_FIELDS = [ + {:name => :rss, :parse_method => :to_i}, + {:name => :vsize, :parse_method => :to_i}, + {:name => :pcpu, :parse_method => :to_f}, + ] + + class << self + + def get_stats(pid=nil) + pid ||= Process.pid + + flags = STAT_FIELDS.map {|f| "-o #{f[:name]}=" }.join(' ') + begin + stdout, stderr, status = VCAP::Subprocess.run("ps #{flags} -p #{pid}") + rescue VCAP::SubprocessStatusError => se + # Process not running + if se.status.exitstatus == 1 + return nil + else + raise se + end + end + + ret = {} + stdout.split.each_with_index do |val, ii| + field = STAT_FIELDS[ii] + ret[field[:name]] = val.send(field[:parse_method]) + end + + ret + end + + end # class << self + end # ProcessUtils +end # VCAP + + diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/quota.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/quota.rb new file mode 100644 index 0000000..ec902b9 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/quota.rb @@ -0,0 +1,152 @@ +module VCAP + module Quota + + class Command + class ValidationError < StandardError; end + + def run + validate + command = build_command + result = execute(command) + parse_result(result) + end + + def validate + nil + end + + def build_command + raise NotImplementedError + end + + def execute(command) + stdout = `#{command}` + [$?, stdout] + end + + def parse_result(result) + result + end + + private + + def assert_at_least_one_of(*fields) + for field in fields + has_value = send(field.to_sym) + return if has_value + end + raise ValidationError, "At least one of {#{fields.join(', ')}} must be set" + end + + def assert_at_most_one_of(*fields) + existing_fields = fields.inject([]) do |accum, field| + accum << field unless send(field.to_sym) + accum + end + unless existing_fields.length == 1 + raise ValidationError, "At most one of #{fields.join(', ')} must be set" + end + end + end + + class SetQuota < Command + attr_accessor :user + attr_accessor :group + attr_accessor :filesystem + attr_accessor :quotas + + def initialize + @quotas = { + :block => { + :soft => 0, + :hard => 0, + }, + :inode => { + :soft => 0, + :hard => 0, + }, + } + end + + def validate + assert_at_least_one_of(:user) + assert_at_least_one_of(:filesystem) + assert_at_least_one_of(:quotas) + end + + private + + def build_command + cmd = ['setquota'] + cmd << ['-u', self.user] if self.user + cmd << ['-g', self.group] if self.group + cmd << [self.quotas[:block][:soft], self.quotas[:block][:hard], + self.quotas[:inode][:soft], self.quotas[:inode][:hard]] + cmd << self.filesystem + cmd.flatten.join(' ') + end + end + + class RepQuota < Command + attr_accessor :report_groups + attr_accessor :report_users + attr_accessor :ids_only + attr_accessor :filesystem + + def initialize + @report_users = true + end + + def validate + assert_at_least_one_of(:report_groups, :report_users) + assert_at_least_one_of(:filesystem) + end + + def build_command + cmd = ['repquota', '-p'] # -p reports grace as 0 when unset + cmd << '-u' if self.report_users + cmd << '-g' if self.report_groups + cmd << '-n' if self.ids_only + cmd << self.filesystem + cmd = cmd.flatten.join(' ') + cmd + end + + def parse_result(result) + if result[0] == 0 + quota_info = {} + result[1].lines.each do |line| + next unless line.match(/[^\s]+\s+[+-]+\s+\d+/) + fields = line.split(/\s+/) + if self.ids_only + match = fields[0].match(/^#(\d+)$/) + uid = match[1].to_i + else + uid = fields[0] + end + quota_info[uid] = { + :usage => { + :block => fields[2].to_i, + :inode => fields[6].to_i + }, + :quotas => { + :block => { + :soft => fields[3].to_i, + :hard => fields[4].to_i, + }, + :inode => { + :soft => fields[7].to_i, + :hard => fields[8].to_i, + }, + } + } + end + [true, quota_info] + else + [false, result] + end + end + end + + end # VCAP::Quota +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/rolling_metric.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/rolling_metric.rb new file mode 100644 index 0000000..1e7228b --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/rolling_metric.rb @@ -0,0 +1,74 @@ +require "monitor" + +module VCAP + + class RollingMetric + + def initialize(duration, num_buckets = 60) + @duration = duration + num_buckets = [@duration, num_buckets].min + @bucket_duration = (@duration / num_buckets).to_i + @eviction_duration = @bucket_duration * 2 + @buckets = [] + num_buckets.times do + @buckets << {:timestamp => 0, :value => 0, :samples => 0} + end + end + + def <<(value) + timestamp = Time.now.to_i + bucket = @buckets[(timestamp / @bucket_duration) % @buckets.length] + if timestamp - bucket[:timestamp] > @eviction_duration + bucket[:timestamp] = timestamp + bucket[:value] = value + bucket[:samples] = 1 + else + bucket[:value] += value + bucket[:samples] += 1 + end + end + + def value + timestamp = Time.now.to_i + min_timestamp = timestamp - @duration + + value = 0 + samples = 0 + + @buckets.each do |bucket| + if bucket[:timestamp] > min_timestamp + value += bucket[:value] + samples += bucket[:samples] + end + end + + { + :value => value, + :samples => samples + } + end + + def to_json + Yajl::Encoder.encode(value) + end + + end + + class ThreadSafeRollingMetric < RollingMetric + + def initialize(*args) + super(*args) + @lock = Monitor.new + end + + def <<(*args) + @lock.synchronize { super(*args) } + end + + def value(*args) + @lock.synchronize { super(*args) } + end + + end + +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/sorted_set_utils.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/sorted_set_utils.rb new file mode 100644 index 0000000..160e7bb --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/sorted_set_utils.rb @@ -0,0 +1,42 @@ +# Copyright (c) 2009-2012 VMware, Inc. +# +# These two methods provide support for transfering an integer sorted set to/from +# array. When encoded into JSON format, the to_int_array method is space efficient +# comparing to the native to_a method of sorted set. +# +# For example, the following set +# [12345, 12456, 13457, 13567, 14203, 14214] +# +# After encoded by to_int_array, it becomes +# [12345, 111, 1, 90, 636, 11] +# +# The JSON format will save lots of space +# + +require 'set' + +class SortedSet + def to_int_array + array = [] + + former = 0 + self.each do |i| + array << i - former + former = i + end + + array + end + + def self.from_int_array(array) + set = SortedSet.new + + current = 0 + array.each do |i| + current += i + set << current + end + + set + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/em.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/em.rb new file mode 100644 index 0000000..ac73308 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/em.rb @@ -0,0 +1,32 @@ +# Copyright (c) 2009-2011 VMware, Inc. +module VCAP + + module Spec + + module EM + + def em(options = {}) + raise "no block given" unless block_given? + timeout = options[:timeout] ||= 1.0 + + ::EM.run { + quantum = 0.005 + ::EM.set_quantum(quantum * 1000) # Lowest possible timer resolution + ::EM.set_heartbeat_interval(quantum) # Timeout connections asap + ::EM.add_timer(timeout) { raise "timeout" } + yield + } + end + + def done + raise "reactor not running" if !::EM.reactor_running? + + ::EM.next_tick { + # Assert something to show a spec-pass + :done.should == :done + ::EM.stop_event_loop + } + end + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/forked_component.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/forked_component.rb new file mode 100644 index 0000000..09292f8 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/forked_component.rb @@ -0,0 +1,2 @@ +require 'vcap/spec/forked_component/base' +require 'vcap/spec/forked_component/nats_server' diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/forked_component/base.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/forked_component/base.rb new file mode 100644 index 0000000..45cbfd7 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/forked_component/base.rb @@ -0,0 +1,92 @@ +require 'vcap/common' + + +module VCAP + module Spec + module ForkedComponent + end + end +end + +class VCAP::Spec::ForkedComponent::Base + attr_reader :pid, :pid_filename, :output_basedir, :name, :cmd + + attr_accessor :reopen_stdio, :daemon + + # @param cmd String Command to run + # @param name String Short name for this component (e.g. 'redis') + # @param output_basedir String Stderr/stdout will be placed under this directory + # @param pid_filename String If not nil, we ready the pid from this file instead + # of using the pid returned from fork + def initialize(cmd, name, output_basedir='/tmp', pid_filename=nil) + @cmd = cmd + @name = name + @output_basedir = output_basedir + @pid_filename = pid_filename + + @reopen_stdio = true + @daemon = false + + end + + def start + pid = fork do + + if @reopen_stdio + fn = File.join(@output_basedir, "#{@name}.#{Process.pid}.out") + outfile = File.new(fn, 'w+') + $stderr.reopen(outfile) + $stdout.reopen(outfile) + end + + exec(@cmd) + end + + if @pid_filename + wait_for(5) { File.exists?(@pid_filename) } + @pid = File.read(@pid_filename).chomp.to_i + else + @pid = pid + end + + self + end + + def stop + return unless @pid && VCAP.process_running?(@pid) + if @daemon + Process.kill('KILL', @pid) + else + Process.kill('TERM', @pid) + Process.waitpid(@pid, 0) + end + FileUtils.rm_f(@pid_filename) if @pid_filename + @pid = nil + + self + end + + def running? + VCAP.process_running?(@pid) + end + + def ready? + raise NotImplementedError + end + + def wait_ready(timeout=1) + wait_for { ready? } + end + + private + + def wait_for(timeout=1, &predicate) + start = Time.now() + cond_met = predicate.call() + while !cond_met && ((Time.new() - start) < timeout) + cond_met = predicate.call() + sleep(0.2) + end + cond_met + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/forked_component/nats_server.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/forked_component/nats_server.rb new file mode 100644 index 0000000..124e4d0 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/spec/forked_component/nats_server.rb @@ -0,0 +1,28 @@ +require 'nats/client' +require 'uri' + +require 'vcap/spec/forked_component/base' + +module VCAP + module Spec + module ForkedComponent + end + end +end + +class VCAP::Spec::ForkedComponent::NatsServer < VCAP::Spec::ForkedComponent::Base + + attr_reader :uri, :port, :parsed_uri + + def initialize(pid_filename, port, output_basedir='tmp') + cmd = "ruby -S bundle exec nats-server -p #{port} -P #{pid_filename} -V -D" + super(cmd, 'nats', output_basedir, pid_filename) + @port = port + @uri = "nats://127.0.0.1:#{@port}" + @parsed_uri = URI.parse(@uri) + end + + def ready? + running? && NATS.server_running?(@parsed_uri) + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/stats.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/stats.rb new file mode 100644 index 0000000..6679373 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/stats.rb @@ -0,0 +1,106 @@ +require 'vcap/common' +require 'vmstat' + +module VCAP + class Stats + class << self + def process_memory_and_cpu + if WINDOWS + rss = windows_process_memory + pcpu = windows_process_cpu + else + rss, pcpu = `ps -o rss=,pcpu= -p #{Process.pid}`.split + end + [rss, pcpu] + end + + def memory_used_bytes + if WINDOWS + mem = windows_memory_used + mem[:total] - mem[:available] + else + mem = Vmstat.memory + mem.active_bytes + mem.wired_bytes + end + end + + def memory_free_bytes + if WINDOWS + mem = windows_memory_used + mem[:available] + else + mem = Vmstat.memory + mem.inactive_bytes + mem.free_bytes + end + end + + def cpu_load_average + if WINDOWS + windows_cpu_load + else + Vmstat.load_average.one_minute + end + end + + private + + def windows_memory_used + mem_ary = system_memory_list.split + mem = Hash.new + mem[:total] = (mem_ary[3].gsub(',', '').to_i * 1024) * 1024 + mem[:available] = (mem_ary[8].gsub(',', '').to_i * 1024) * 1024 + mem + end + + def windows_cpu_load + avg_load = %x[powershell -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned "Get-WmiObject win32_processor | Measure-Object -property LoadPercentage -Average | Foreach {$_.Average}"] + avg_load.to_i + end + + def windows_process_memory + out_ary = memory_list.split + out_ary[4].delete(',').to_i + end + + def windows_process_cpu + pcpu = 0 + process_ary = process_list + pid = Process.pid + idx_of_process = -1 + process_line_ary = process_ary.split("\n") + ary_to_search = process_line_ary[2].split(',') + ary_to_search.each_with_index { |val, idx| + pid_s = val.gsub(/"/, '') + pid_to_i = pid_s.to_i + if pid == pid_to_i + idx_of_process = idx + end + } + if idx_of_process >= 0 + cpu_ary = process_time + cpu_line_ary = cpu_ary.split("\n") + ary_to_search = cpu_line_ary[2].split(',') + cpu = ary_to_search[idx_of_process] + pcpu = cpu.gsub(/"/, '').to_f + end + pcpu + end + + def system_memory_list + %x[systeminfo | findstr "\\\\"] + end + + def memory_list + %x[tasklist /nh /fi "pid eq #{Process.pid}"] + end + + def process_time + %x[typeperf -sc 1 "\\Process(ruby*)\\% processor time"] + end + + def process_list + %x[typeperf -sc 1 "\\Process(ruby*)\\ID Process"] + end + end + end +end \ No newline at end of file diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/subprocess.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/subprocess.rb new file mode 100644 index 0000000..e3ba913 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/lib/vcap/subprocess.rb @@ -0,0 +1,211 @@ +require 'posix-spawn' + +module VCAP + class SubprocessError < StandardError; end + + # Command exited with unexpected status code + class SubprocessStatusError < SubprocessError + attr_reader :command, :status, :stdout, :stderr + + def initialize(command, stdout, stderr, status) + @command = command + @status = status + @stdout = stdout + @stderr = stderr + end + + def to_s + "ERROR: Command '#{@command}' exited with status '#{status.exitstatus}'" + end + end + + # Command ran longer than allowed + class SubprocessTimeoutError < SubprocessError + attr_reader :command, :timeout, :stdout, :stderr + + def initialize(timeout, command, stdout, stderr) + @command = command + @timeout = timeout + @stdout = stdout + @stderr = stderr + end + + def to_s + "ERROR: Command '#{@command}' timed out" + end + end + + # Failure reading from stdin/stdout + class SubprocessReadError < SubprocessError + attr_reader :command, :stdout, :stderr + + def initialize(failed_iostr, command, stdout, stderr) + @failed_iostr = failed_iostr + @command = command + @stdout = stdout + @stderr = stderr + end + + def to_s + "ERROR: Failed reading from #{@failed_iostr} while executing '#{@command}'" + end + end + + # Utility class providing: + # - Ability to capture stdout/stderr of a command + # - Exceptions when commands fail (useful for running a chain of commands) + # - Easier integration with unit tests. + class Subprocess + READ_SIZE = 4096 + + def self.run(*args) + VCAP::Subprocess.new.run(*args) + end + + # Runs the supplied command in a subshell. + # + # @param command String The command to be run + # @param expected_exit_status Integer The expected exit status of the command in [0, 255] + # @param timeout Integer How long the command should be allowed to run for + # nil indicates no timeout + # @param options Hash Options to be passed to Posix::Spawn + # See https://github.com/rtomayko/posix-spawn + # @param env Hash Environment to be passed to Posix::Spawn + # See https://github.com/rtomayko/posix-spawn + # + # @raise VCAP::SubprocessStatusError Thrown if the exit status does not match the expected + # exit status. + # @raise VCAP::SubprocessTimeoutError Thrown if a timeout occurs. + # @raise VCAP::SubprocessReadError Thrown if there is an error reading from any of the pipes + # to the child. + # + # @return Array An array of [stdout, stderr, status]. Note that status + # is an instance of Process::Status. + # + def run(command, expected_exit_status=0, timeout=nil, options={}, env={}) + # We use a pipe to ourself to time out long running commands (if desired) as follows: + # 1. Set up a pipe to ourselves + # 2. Install a signal handler that writes to one end of our pipe on SIGCHLD + # 3. Select on the read end of our pipe and check if our process exited + sigchld_r, sigchld_w = IO.pipe + prev_sigchld_handler = install_sigchld_handler(sigchld_w) + + start = Time.now.to_i + child_pid, stdin, stdout, stderr = POSIX::Spawn.popen4(env, command, options) + stdin.close + + # Used to look up the name of an io object when an errors occurs while + # reading from it, as well as to look up the corresponding buffer to + # append to. + io_map = { + stderr => { :name => 'stderr', :buf => '' }, + stdout => { :name => 'stdout', :buf => '' }, + sigchld_r => { :name => 'sigchld_r', :buf => '' }, + sigchld_w => { :name => 'sigchld_w', :buf => '' }, + } + + status = nil + time_left = timeout + read_cands = [stdout, stderr, sigchld_r] + error_cands = read_cands.dup + + begin + while read_cands.length > 0 + active_ios = IO.select(read_cands, nil, error_cands, time_left) + + # Check if timeout was hit + if timeout + time_left = timeout - (Time.now.to_i - start) + unless active_ios && (time_left > 0) + raise VCAP::SubprocessTimeoutError.new(timeout, + command, + io_map[stdout][:buf], + io_map[stderr][:buf]) + end + end + + # Read as much as we can from the readable ios before blocking + for io in active_ios[0] + begin + io_map[io][:buf] << io.read_nonblock(READ_SIZE) + rescue IO::WaitReadable + # Reading would block, so put ourselves back on the loop + rescue EOFError + # Pipe has no more data, remove it from the readable/error set + # NB: We cannot break from the loop here, as the other pipes may have data to be read + read_cands.delete(io) + error_cands.delete(io) + end + + # Our signal handler notified us that >= 1 children have exited; + # check if our child has exited. + if (io == sigchld_r) && Process.waitpid(child_pid, Process::WNOHANG) + status = $? + read_cands.delete(sigchld_r) + error_cands.delete(sigchld_r) + end + end + + # Error reading from one or more pipes. + unless active_ios[2].empty? + io_names = active_ios[2].map {|io| io_map[io][:name] } + raise SubprocessReadError.new(io_names.join(', '), + command, + io_map[stdout][:buf], + io_map[stderr][:buf]) + end + end + + rescue + # A timeout or an error occurred while reading from one or more pipes. + # Kill the process if we haven't reaped its exit status already. + kill_pid(child_pid) unless status + raise + + ensure + # Make sure we reap the child's exit status, close our fds, and restore + # the previous SIGCHLD handler + unless status + Process.waitpid(child_pid) + status = $? + end + io_map.each_key {|io| io.close unless io.closed? } + trap('CLD') { prev_sigchld_handler.call } if prev_sigchld_handler + end + + unless status.exitstatus == expected_exit_status + raise SubprocessStatusError.new(command, + io_map[stdout][:buf], + io_map[stderr][:buf], + status) + end + + [io_map[stdout][:buf], io_map[stderr][:buf], status] + end + + private + + def install_sigchld_handler(write_pipe) + prev_handler = trap('CLD') do + begin + # Notify select loop that a child exited. We use a nonblocking write + # to avoid writing more than PIPE_BUF bytes before we have the chance + # to drain the pipe. Note that we only need to write a single byte + # to detect if our child has exited. + write_pipe.write_nonblock('x') unless write_pipe.closed? + rescue IO::WaitWritable + end + prev_handler.call if prev_handler + end + prev_handler + end + + def kill_pid(pid) + begin + Process.kill('KILL', pid) + rescue Errno::ESRCH + end + end + end + +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/fixtures/invalid_config.yml b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/fixtures/invalid_config.yml new file mode 100644 index 0000000..1e65c0d --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/fixtures/invalid_config.yml @@ -0,0 +1,4 @@ +--- +name: test_config +nums: + - 1.1 diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/fixtures/valid_config.yml b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/fixtures/valid_config.yml new file mode 100644 index 0000000..213bf08 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/fixtures/valid_config.yml @@ -0,0 +1,8 @@ +--- +name: test_config +nums: + - 1 + - 2 + - 3 +not_needed: + float: 1.1 diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/functional/component_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/functional/component_spec.rb new file mode 100644 index 0000000..783793f --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/functional/component_spec.rb @@ -0,0 +1,276 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require "spec_helper" +require "vcap/spec/em" +require "em-http/version" +require 'webmock' + +describe VCAP::Component, unix_only: true do + include VCAP::Spec::EM + + before :each do + WebMock.allow_net_connect! + end + + let(:nats) do + NATS.connect(:uri => "nats://localhost:4223", :autostart => true) + end + + let(:default_options) { { :type => "type", :nats => nats } } + + after :all do + if File.exists? NATS::AUTOSTART_PID_FILE + pid = File.read(NATS::AUTOSTART_PID_FILE).chomp.to_i + `kill -9 #{pid}` + FileUtils.rm_f NATS::AUTOSTART_PID_FILE + end + end + + it "should publish an announcement" do + em(:timeout => 2) do + nats.subscribe("vcap.component.announce") do |msg| + body = Yajl::Parser.parse(msg, :symbolize_keys => true) + body[:type].should == "type" + done + end + + VCAP::Component.register(default_options) + end + end + + it "should listen for discovery messages" do + em(timeout: 2.0) do + VCAP::Component.register(default_options) + + nats.request("vcap.component.discover") do |msg| + body = Yajl::Parser.parse(msg, :symbolize_keys => true) + body[:type].should == "type" + done + end + end + end + + it "should allow you to set an index" do + em(timeout: 2.0) do + options = default_options + options[:index] = 5 + + VCAP::Component.register(options) + + nats.request("vcap.component.discover") do |msg| + body = Yajl::Parser.parse(msg, :symbolize_keys => true) + body[:type].should == "type" + body[:index].should == 5 + body[:uuid].should =~ /^5-.*/ + done + end + end + end + + describe 'process information' do + before do + VCAP::Component.instance_eval do + remove_instance_variable(:@last_varz_update) if instance_variable_defined?(:@last_varz_update) + end + + em do + VCAP::Component.register(:nats => nats) + done + end + end + + it 'includes memory information' do + Vmstat.stub_chain(:memory, :active_bytes).and_return 75 + Vmstat.stub_chain(:memory, :wired_bytes).and_return 25 + Vmstat.stub_chain(:memory, :inactive_bytes).and_return 660 + Vmstat.stub_chain(:memory, :free_bytes).and_return 340 + + VCAP::Component.updated_varz[:mem_used_bytes].should == 100 + VCAP::Component.updated_varz[:mem_free_bytes].should == 1000 + end + + it 'includes CPU information' do + Vmstat.stub_chain(:load_average, :one_minute).and_return 2.0 + + VCAP::Component.updated_varz[:cpu_load_avg].should == 2.0 + end + end + + describe 'suppression of keys in config information in varz' do + it 'should suppress certain keys in the top level config' do + em do + options = { :type => 'suppress_test', :nats => nats } + options[:config] = { + :message_bus_servers => ['nats://user:pass@localhost:4223'], + :keys => 'sekret!keys', + :password => 'crazy', + :pass => 'crazy', + :database_environment => { :stuff => 'should not see' }, + :token => 't0ken' + } + VCAP::Component.register(options) + done + end + VCAP::Component.varz.should include(:config => {}) + end + + it 'should suppress certain keys at any level in config' do + em do + options = { :type => 'suppress_test', :nats => nats } + options[:config] = { + :message_bus_servers => ['nats://user:pass@localhost:4223'], + :keys => 'sekret!keys', + :password => 'crazy', + :pass => 'crazy', + :database_environment => { :stuff => 'should not see' }, + :this_is_ok => { :password => 'sekret!', :pass => 'sekret!', :test => 'ok', :token => 't0ken'} + } + VCAP::Component.register(options) + done + end + VCAP::Component.varz.should include(:config => { :this_is_ok => { :test => 'ok'}} ) + end + + it 'should leave config its passed untouched' do + em do + options = { :type => 'suppress_test', :nats => nats } + options[:config] = { + :message_bus_servers => ['nats://user:pass@localhost:4223'], + :keys => 'sekret!keys', + :mysql => { :user => 'derek', :password => 'sekret!', :pass => 'sekret!' }, + :password => 'crazy', + :pass => 'crazy', + :database_environment => { :stuff => 'should not see' }, + :this_is_ok => { :password => 'sekret!', :pass => 'sekret!', :mysql => 'sekret!', :test => 'ok', :token => 't0ken'} + } + VCAP::Component.register(options) + + options.should include(:config => { + :message_bus_servers => ['nats://user:pass@localhost:4223'], + :keys => 'sekret!keys', + :mysql => { :user => 'derek', :password => 'sekret!', :pass => 'sekret!' }, + :password => 'crazy', + :pass => 'crazy', + :database_environment => { :stuff => 'should not see' }, + :this_is_ok => { :password => 'sekret!', :pass => 'sekret!', :mysql => 'sekret!', :test => 'ok', :token => 't0ken'} + }) + done + end + end + end + + describe "http endpoint" do + let(:host) { VCAP::Component.varz[:host] } + let(:authorization) { { :head => { "authorization" => VCAP::Component.varz[:credentials] } } } + + it "should let you specify the port" do + em do + port = 18123 + options = default_options.merge(:port => port) + + VCAP::Component.register(options) + VCAP::Component.varz[:host].split(':').last.to_i.should == port + + request = make_em_httprequest(:get, host, "/varz", authorization) + request.callback do + request.response_header.status.should == 200 + done + end + end + end + + it "should not truncate varz on second request" do + em(:timeout => 2) do + options = default_options + + VCAP::Component.register(options) + + request = make_em_httprequest(:get, host, "/varz", authorization) + request.callback do + request.response_header.status.should == 200 + content_length = request.response_header['CONTENT_LENGTH'].to_i + + VCAP::Component.varz[:var] = 'var' + + request2 = make_em_httprequest(:get, host, "/varz", authorization) + request2.callback do + request2.response_header.status.should == 200 + content_length2 = request2.response_header['CONTENT_LENGTH'].to_i + content_length2.should == request2.response.length + content_length2.should > content_length + done + end + end + end + end + + it "should not truncate healthz on second request" do + em do + options = default_options + + VCAP::Component.register(options) + + request = make_em_httprequest(:get, host, "/healthz", authorization) + request.callback do + request.response_header.status.should == 200 + + VCAP::Component.healthz = 'healthz' + + request2 = make_em_httprequest(:get, host, "/healthz", authorization) + request2.callback do + request2.response_header.status.should == 200 + content_length2 = request2.response_header['CONTENT_LENGTH'].to_i + content_length2.should == request2.response.length + content_length2.should == 'healthz'.length + done + end + end + end + end + + it "should let you specify the auth" do + em do + options = default_options + options[:user] = "foo" + options[:password] = "bar" + + VCAP::Component.register(options) + + VCAP::Component.varz[:credentials].should == ["foo", "bar"] + + request = make_em_httprequest(:get, host, "/varz", authorization) + request.callback do + request.response_header.status.should == 200 + done + end + end + end + + it "should return 401 on unauthorized requests" do + em do + VCAP::Component.register(default_options) + + request = make_em_httprequest(:get, host, "/varz") + request.callback do + request.response_header.status.should == 401 + done + end + end + end + + it "should return 400 on malformed authorization header" do + em do + VCAP::Component.register(default_options) + + request = make_em_httprequest(:get, host, "/varz", :head => { "authorization" => "foo" }) + request.callback do + request.response_header.status.should == 400 + done + end + end + end + end + + def make_em_httprequest(method, host, path, opts={}) + ::EM::HttpRequest.new("http://#{host}#{path}").send(method, opts) + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/functional/quota_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/functional/quota_spec.rb new file mode 100644 index 0000000..0a01bb5 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/functional/quota_spec.rb @@ -0,0 +1,42 @@ +$:.unshift(File.dirname(__FILE__),'..') + +require 'spec_helper' + +describe VCAP::Quota, :needs_root => true, :needs_quota => true do + before :all do + @test_fs = ENV['QUOTA_TEST_FS'] + @test_user = ENV['QUOTA_TEST_USER'] + @test_uid = Etc.getpwnam(@test_user).uid + end + + it 'should set and retrieve quotas' do + cmd = VCAP::Quota::SetQuota.new + cmd.filesystem = @test_fs + cmd.user = @test_user + cmd.quotas[:block][:hard] = 123456 + status, stdout = cmd.run + status.should == 0 + + cmd = VCAP::Quota::RepQuota.new + cmd.filesystem = @test_fs + success, details = cmd.run + success.should be_true + details[@test_user][:quotas][:block][:hard].should == 123456 + end + + it 'should return uids as integer keys when asked' do + cmd = VCAP::Quota::SetQuota.new + cmd.filesystem = @test_fs + cmd.user = @test_user + cmd.quotas[:block][:hard] = 123456 + status, stdout = cmd.run + status.should == 0 + + cmd = VCAP::Quota::RepQuota.new + cmd.filesystem = @test_fs + cmd.ids_only = true + success, details = cmd.run + success.should be_true + details[@test_uid][:quotas][:block][:hard].should == 123456 + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/spec_helper.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/spec_helper.rb new file mode 100644 index 0000000..5875513 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/spec_helper.rb @@ -0,0 +1,49 @@ +# Copyright (c) 2009-2011 VMware, Inc. +$:.unshift File.expand_path("../../lib", __FILE__) +require "bundler" +Bundler.require(:default, :spec) + +require "vcap/common" +require "vcap/component" +require "vcap/rolling_metric" +require "vcap/subprocess" +require "vcap/process_utils" +require "vcap/config" +require "vcap/priority_queue" +require 'vcap/quota' +require 'vcap/sorted_set_utils' +require 'services/api/clients/service_gateway_client' +require 'services/api/async_requests' +require 'benchmark' + +RSpec::Matchers.define :take_less_than do |n| + chain :seconds do; end + match do |block| + @elapsed = Benchmark.realtime do + block.call + end + @elapsed <= n + end +end + +RSpec.configure do |c| + # declare an exclusion filter + if Process.uid != 0 + c.filter_run_excluding :needs_root => true + end + + unless ENV['QUOTA_TEST_USER'] && ENV['QUOTA_TEST_FS'] + c.filter_run_excluding :needs_quota => true + end + + if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/ + c.filter_run_excluding :unix_only => true + else + c.filter_run_excluding :windows_only => true + end +end + +def fixture_path(*args) + base = File.expand_path("../", __FILE__) + File.join(base, 'fixtures', *args) +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/common_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/common_spec.rb new file mode 100644 index 0000000..3d2de25 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/common_spec.rb @@ -0,0 +1,171 @@ +require "spec_helper" + +describe VCAP do + describe ".uptime_string_to_seconds" do + it "takes a string in dhms format and returns seconds" do + uptime_in_seconds = VCAP.uptime_string_to_seconds("0d:0h:0m:0s") + expect(uptime_in_seconds).to eq(0) + end + + it "parses seconds" do + uptime_in_seconds = VCAP.uptime_string_to_seconds("0d:0h:0m:16s") + expect(uptime_in_seconds).to eq(16) + end + + it "parses min" do + uptime_in_seconds = VCAP.uptime_string_to_seconds("0d:0h:16m:0s") + expect(uptime_in_seconds).to eq(16 * 60) + end + + it "parses hours" do + uptime_in_seconds = VCAP.uptime_string_to_seconds("0d:16h:0m:0s") + expect(uptime_in_seconds).to eq(16* 3600) + end + + it "parses days" do + uptime_in_seconds = VCAP.uptime_string_to_seconds("16d:0h:0m:0s") + expect(uptime_in_seconds).to eq(16 * 24 * 3600) + end + + it "parses everything" do + uptime_in_seconds = VCAP.uptime_string_to_seconds("1d:1h:1m:1s") + expect(uptime_in_seconds).to eq(1 * 24 * 3600 + 1 * 3600 + 1 * 60 + 1) + end + + it "raises an exception if the string is in the wrong format" do + expect { + VCAP.uptime_string_to_seconds("hello") + }.to raise_error(ArgumentError) + end + + end + + describe '.num_cores' do + + describe 'linux' do + it 'returns number of cores' do + stub_const('RUBY_PLATFORM', 'x86_64 linux') + subject.should_receive(:'`').with('cat /proc/cpuinfo | grep processor | wc -l').and_return('4') + expect(VCAP.num_cores).to eq 4 + end + end + + describe 'darwin' do + + context 'when hwprefs is available' do + it 'returns number of cores' do + stub_const('RUBY_PLATFORM', 'x86_64 darwin') + subject.should_receive(:'`').with('hwprefs cpu_count').and_return('4') + expect(VCAP.num_cores).to eq 4 + end + end + + context 'when hwprefs is not available' do + it 'returns default number of cores' do + stub_const('RUBY_PLATFORM', 'x86_64 darwin') + subject.should_receive(:'`').with('hwprefs cpu_count').and_raise(Errno::ENOENT) + expect(VCAP.num_cores).to eq 1 + end + end + + end + + describe 'freebsd' do + it 'returns number of cores' do + stub_const('RUBY_PLATFORM', 'x86_64 freebsd') + subject.should_receive(:'`').with('sysctl hw.ncpu').and_return('4') + expect(VCAP.num_cores).to eq 4 + end + end + + describe 'netbsd' do + it 'returns number of cores' do + stub_const('RUBY_PLATFORM', 'x86_64 netbsd') + subject.should_receive(:'`').with('sysctl hw.ncpu').and_return('4') + expect(VCAP.num_cores).to eq 4 + end + end + + describe 'windows' do + + before do + stub_const('RUBY_PLATFORM', 'foo') + stub_const('VCAP::WINDOWS', true) + end + + context 'when NUMBER_OF_PROCESSORS is set' do + it 'returns number of cores' do + ENV.stub(:[]).with('NUMBER_OF_PROCESSORS').and_return('7') + + expect(VCAP.num_cores).to eq 7 + end + end + + context 'when NUMBER_OF_PROCESSORS is not set' do + it 'returns default number of cores' do + ENV.stub(:[]).with('NUMBER_OF_PROCESSORS').and_return(nil) + expect(VCAP.num_cores).to eq(1) + end + end + end + + describe 'unknown' do + it 'returns default number of cores' do + stub_const('RUBY_PLATFORM', 'foo') + stub_const('VCAP::WINDOWS', false) + expect(VCAP.num_cores).to eq(1) + end + end + + end + + describe '.process_running?' do + before do + allow_message_expectations_on_nil + end + + describe 'invalid pid' do + it 'should return false with negative pid' do + expect(VCAP.process_running?(-5)).to be_false + end + it 'should return false with nil pid' do + expect(VCAP.process_running?(nil)).to be_false + end + end + + describe 'unix' do + before do + stub_const('VCAP::WINDOWS', false) + $?.stub(:'==').with(0) { true } + end + + it 'With a running process' do + subject.should_receive(:'`').with('ps -o rss= -p 12').and_return('some output') + expect(VCAP.process_running?(12)).to be_true + end + + it 'Without a running process' do + subject.should_receive(:'`').with('ps -o rss= -p 12').and_return('') + expect(VCAP.process_running?(12)).to be_false + end + end + + + describe 'windows' do + before do + stub_const('VCAP::WINDOWS', true) + $?.stub(:'==').with(0) { true } + end + + it 'With a running process' do + subject.should_receive(:'`').with('tasklist /nh /fo csv /fi "pid eq 12"').and_return('some output') + expect(VCAP.process_running?(12)).to be_true + end + + it 'Without a running process' do + subject.should_receive(:'`').with('tasklist /nh /fo csv /fi "pid eq 12"').and_return('') + expect(VCAP.process_running?(12)).to be_false + end + end + end +end \ No newline at end of file diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/component_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/component_spec.rb new file mode 100644 index 0000000..d0f91c4 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/component_spec.rb @@ -0,0 +1,102 @@ +# Copyright (c) 2009-2012 VMware, Inc. + +require "spec_helper" + +require "vcap/component" + +describe VCAP::Component do + + let(:nats) do + nats_mock = double("nats") + nats_mock.stub(:subscribe) + nats_mock.stub(:publish) + nats_mock + end + + def cleanup + VCAP::Component.instance_eval do + if instance_variables.include?(:@varz) + remove_instance_variable(:@varz) + end + + if instance_variables.include?(:@healthz) + remove_instance_variable(:@healthz) + end + + if instance_variables.include?(:@last_varz_update) + remove_instance_variable(:@last_varz_update) + end + end + end + + before do + cleanup + end + + after do + cleanup + end + + describe "regular #varz" do + it "should not raise on get" do + expect do + VCAP::Component.varz[:foo] + end.to_not raise_error + end + end + + describe "thread-safe #varz" do + before do + VCAP::Component.varz.threadsafe! + end + + it "should raise on get when the lock is not held" do + expect do + VCAP::Component.varz[:foo] + end.to raise_error(/lock/i) + end + + it "should not raise on get when the lock is held" do + VCAP::Component.varz.synchronize do + expect do + VCAP::Component.varz[:foo] + end.to_not raise_error + end + end + end + + describe "register" do + it "adds log_counter to varz when passed as an option" do + EventMachine.stub(:reactor_running?).and_return(true) + VCAP::Component.stub(:start_http_server) + + foo = Object.new + options = {:log_counter => foo, :nats => nats} + VCAP::Component.register(options) + expect(VCAP::Component.varz[:log_counts]).to eq foo + end + end + + describe '.updated_varz' do + before do + EventMachine.stub(:reactor_running?).and_return(true) + VCAP::Component.stub(:start_http_server) + VCAP::Component.register(:nats => nats) + + VCAP::Stats.stub( + :process_memory_and_cpu => [55792, 12], + :memory_used_bytes => 2399141888, + :memory_free_bytes => 6189744128, + :cpu_load_average => 24 + ) + end + + it 'includes memory/cpu/avg cpu load information' do + expect(VCAP::Component.updated_varz[:mem]).to eq 55792 + expect(VCAP::Component.updated_varz[:cpu].should).to eq 12 + expect(VCAP::Component.updated_varz[:cpu_load_avg]).to eq 24 + expect(VCAP::Component.updated_varz[:mem_used_bytes]).to eq 2399141888 + expect(VCAP::Component.updated_varz[:mem_free_bytes]).to eq 6189744128 + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/config_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/config_spec.rb new file mode 100644 index 0000000..d7b3e47 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/config_spec.rb @@ -0,0 +1,49 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require 'spec_helper' + +describe VCAP::Config do + describe '.define_schema' do + it 'should build the corresponding membrane schema' do + class MyConfig < VCAP::Config + define_schema do + [Integer] + end + end + + MyConfig.schema.should be_instance_of(Membrane::Schema::List) + MyConfig.schema.elem_schema.should be_instance_of(Membrane::Schema::Class) + MyConfig.schema.elem_schema.klass.should == Integer + end + end + + describe '.from_file' do + it 'should load and validate a config from a yaml file' do + class TestConfig < VCAP::Config + define_schema do + { :name => String, + :nums => [Integer], + optional(:not_needed) => { + :float => Float + } + } + end + end + + # Valid config + exp_cfg = { + :name => 'test_config', + :nums => [1, 2, 3], + :not_needed => { + :float => 1.1, + } + } + cfg = TestConfig.from_file(fixture_path('valid_config.yml')) + cfg.should == exp_cfg + + # Invalid config + expect { + TestConfig.from_file(fixture_path('invalid_config.yml')) + }.to raise_error(Membrane::SchemaValidationError) + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/em_fiber_wrap.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/em_fiber_wrap.rb new file mode 100644 index 0000000..feb7b9a --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/em_fiber_wrap.rb @@ -0,0 +1,14 @@ +#wrap code that needs a fiber pool/reactor to run but doesn't have one +#yet e.g. for startup and testing. +require 'fiber' +require 'eventmachine' +def em_fiber_wrap + EventMachine.run { + Fiber.new { + yield + EventMachine.stop + }.resume + } +end + + diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/json_message_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/json_message_spec.rb new file mode 100644 index 0000000..3d4372a --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/json_message_spec.rb @@ -0,0 +1,273 @@ +# Copyright (c) 2009-2012 VMware, Inc +require 'spec_helper' + +describe JsonMessage::Field do + it 'should raise an error when a required field is defined with a default' do + expect { + JsonMessage::Field.new("key", :schema => String, :required => true, :default => "default") + }.to raise_error { |error| + error.should be_an_instance_of(JsonMessage::DefinitionError) + error.message.size.should > 0 + } + end + + expected = 'should raise a schema validation error when schema validation' + expected << ' fails for the default value of an optional field' + it expected do + expect { + JsonMessage::Field.new("optional", :schema => Hash, :required => false, :default => "default") + }.to raise_error { |error| + error.should be_an_instance_of(JsonMessage::ValidationError) + error.message.size.should > 0 + } + end + + expected = 'should not raise a schema validation error when default value' + expected << ' is absent for an optional field' + it expected do + expect { + JsonMessage::Field.new("optional", :schema => String, :required => false) + }.to_not raise_error + end + + it "can use a block to define the schema" do + field = JsonMessage::Field.new("integer") { Integer } + + expect do + field.validate("string") + end.to raise_error(JsonMessage::ValidationError) + + expect do + field.validate(1) + end.to_not raise_error + end +end + +describe JsonMessage do + describe '#required' do + before :each do + @klass = Class.new(JsonMessage) + end + + it 'should define the field accessor' do + @klass.required :required, String + msg = @klass.new + msg.required.should == nil + expect { msg.required = "required" }.to_not raise_error + end + + it 'should define the field to be required' do + @klass.required :required, String + msg = @klass.new + + expect { + msg.encode + }.to raise_error { |error| + error.should be_an_instance_of(JsonMessage::ValidationError) + error.message.size.should > 0 + } + end + + it 'should assume wildcard when schema is not defined' do + @klass.required :required + msg = @klass.new + expect { msg.required = Object.new }.to_not raise_error + end + end + + describe '#optional' do + before :each do + @klass = Class.new(JsonMessage) + end + + it 'should define the field accessor' do + @klass.optional :optional, String + msg = @klass.new + msg.optional.should == nil + expect { msg.optional = "optional" }.to_not raise_error + end + + it 'should define the field to be optional' do + @klass.optional :optional, String + msg = @klass.new + expect { msg.encode }.to_not raise_error + end + + it 'should define a default value' do + @klass.optional :optional, String, "default" + msg = @klass.new + msg.optional.should == "default" + end + + expected = 'should assume nil as default value when not defined' + it expected do + @klass.optional :optional, String + msg = @klass.new + msg.encode.should == Yajl::Encoder.encode({}) + end + + it 'should assume wildcard when schema is not defined' do + @klass.optional :optional + msg = @klass.new + expect { msg.optional = Object.new }.to_not raise_error + end + end + + describe '#initialize' do + before :each do + @klass = Class.new(JsonMessage) + end + + it 'does not raise an exception when an unknown field is given' do + expect { + @klass.new({"unknown" => "unknown"}) + }.not_to raise_error + end + + it 'does not add unknown fields to the result' do + @klass.new({"unknown" => "unknown"}).should_not respond_to(:unknown) + end + + expected = 'should set default value for optional field which is' + expected << ' defined, but not initialized in constructor' + it expected do + @klass.optional :optional, String, "default" + msg = @klass.new + msg.optional.should == "default" + end + + expected = 'should set default value for optional field defined after' + expected << ' object is initialized' + it expected do + msg = @klass.new + @klass.optional :optional, String, "default" + msg.optional.should == "default" + end + + it 'should replace a default value with a defined value' do + @klass.optional :optional, String, "default" + msg = @klass.new({"optional" => "defined"}) + msg.optional.should == "defined" + end + + it 'should not set a default for a field without a default value' do + @klass.optional :optional, String + msg = @klass.new + msg.optional.should == nil + end + + it 'should set the default value for a required field with false default value' do + @klass.optional :enabled, -> { bool }, false + msg = @klass.new + msg.enabled.should == false + end + end + + describe '#encode' do + before :each do + @klass = Class.new(JsonMessage) + end + + it 'should encode uninitialized optional attribute with default value' do + msg = @klass.new + @klass.optional :optional, String, "default" + msg.encode.should == Yajl::Encoder.encode({"optional" => "default"}) + end + + it 'should raise validation errors when required fields are missing' do + @klass.required :required_one, String + @klass.required :required_two, String + msg = @klass.new + + expect { msg.encode }.to raise_error { |error| + error.should be_a(JsonMessage::ValidationError) + error.message.should be_an_instance_of(String) + error.message.size.should > 0 + } + end + + it 'should encode fields' do + @klass.required :required, String + @klass.optional :with_default, String, "default" + @klass.optional :no_default, String + + msg = @klass.new + msg.required = "required" + msg.no_default = "defined" + + expected = { + "required" => "required", + "with_default" => "default", + "no_default" => "defined" + } + received = Yajl::Parser.parse(msg.encode) + received.should == expected + end + end + + describe '#decode' do + before :each do + @klass = Class.new(JsonMessage) + end + + it 'should raise a parse error when malformed json is passed' do + expect { @klass.decode("blah") }.to raise_error { |error| + error.should be_an_instance_of(JsonMessage::ParseError) + error.message.size.should > 0 + } + end + + it 'should raise a parse error when json passed is nil' do + expect { @klass.decode(nil) }.to raise_error { |error| + error.should be_an_instance_of(JsonMessage::ParseError) + error.message.size.should > 0 + } + end + + it 'should raise validation errors when required fields are missing' do + @klass.required :required_one, String + @klass.required :required_two, String + + expect { + @klass.decode(Yajl::Encoder.encode({})) + }.to raise_error { |error| + error.should be_a(JsonMessage::ValidationError) + error.message.size.should > 0 + } + end + + it 'should decode json' do + @klass.required :required, String + @klass.optional :with_default, String, "default" + @klass.optional :no_default, String + msg = @klass.new + encoded = Yajl::Encoder.encode({ + "required" => "required", + "no_default" => "defined" + }) + decoded = @klass.decode(encoded) + decoded.required.should == "required" + decoded.with_default.should == "default" + decoded.no_default.should == "defined" + end + end + + describe '#extract' do + before :each do + @klass = Class.new(JsonMessage) + end + + it 'should extract fields' do + @klass.required :required, String + @klass.optional :optional, String, "default" + msg = @klass.new + msg.required = "required" + + extracted = msg.extract + extracted.should == {:required => "required", :optional => "default"} + + extracted = msg.extract(:stringify_keys => true) + extracted.should == {"required" => "required", "optional" => "default"} + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/pid_file_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/pid_file_spec.rb new file mode 100644 index 0000000..cab3429 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/pid_file_spec.rb @@ -0,0 +1,85 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require "spec_helper" + +describe 'PidFile Tests' do + before :all do + @pid_file = "/tmp/pidfile_test_%d_%d_%d" % [Process.pid(), Time.now().to_i(), rand(1000)] + end + + after :each do + FileUtils.rm_f(@pid_file) + end + + it "should create a pidfile if one doesn't exist" do + VCAP::PidFile.new(@pid_file) + File.exists?(@pid_file).should be_true + end + + + it "should overwrite pid file if pid file exists and contained pid isn't running", unix_only: true do + fork { VCAP::PidFile.new(@pid_file) } + + Process.wait() + VCAP::PidFile.new(@pid_file) + pid = File.open(@pid_file) {|f| pid = f.read().strip().to_i()} + pid.should == Process.pid() + end + + it "should throw exception if pid file exists and contained pid has running process", unix_only: true do + child_pid = fork { + VCAP::PidFile.new(@pid_file) + Signal.trap('HUP') { exit } + while true; end + } + sleep(1) + thrown = false + begin + VCAP::PidFile.new(@pid_file) + rescue VCAP::PidFile::ProcessRunningError => e + thrown = true + end + Process.kill('HUP', child_pid) + Process.wait() + thrown.should be_true + end + + it "shouldn't throw an exception if current process's pid is in pid file" do + p1 = VCAP::PidFile.new(@pid_file) + p2 = VCAP::PidFile.new(@pid_file) + end + + it "unlink() should remove pidfile correctly" do + pf = VCAP::PidFile.new(@pid_file) + pf.unlink() + File.exists?(@pid_file).should be_false + end + + it "unlink_at_exit() should remove pidfile upon exit", unix_only: true do + child_pid = fork { + pf = VCAP::PidFile.new(@pid_file) + pf.unlink_at_exit() + Signal.trap('HUP') { exit } + while true; end + } + sleep 1 + Process.kill('HUP', child_pid) + Process.wait() + File.exists?(@pid_file).should be_false + end + + it "unlink_on_signals() should remove pidfile upon receipt of signal", unix_only: true do + child_pid = fork { + pf = VCAP::PidFile.new(@pid_file) + pf.unlink_on_signals('HUP') + Signal.trap('TERM') { exit } + while true; end + } + sleep 1 + Process.kill('HUP', child_pid) + sleep 1 + Process.kill('TERM', child_pid) + Process.wait() + File.exists?(@pid_file).should be_false + end + +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/priority_queue_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/priority_queue_spec.rb new file mode 100644 index 0000000..cffcbc4 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/priority_queue_spec.rb @@ -0,0 +1,204 @@ +require 'spec_helper' + +describe VCAP::PriorityQueueFIFO do + before :each do + @q.should be_nil + @q = VCAP::PriorityQueueFIFO.new + end + + describe '.new' do + it 'should be able to create an empty Q' do + @q.should_not be_nil + end + end + + describe '.insert' do + it 'should respond to insert method with 1 or 2 arguments' do + @q.insert "boo" + @q.insert "hoo", 1 + end + it 'should not allow negative priorities' do + lambda {@q.insert("bar", -1)}.should raise_error ArgumentError + end + end + + describe 'priority specified' do + it 'should respect specified priorities when returning items' do + @q.insert "low", 1 + @q.insert "high", 10 + @q.insert "lowest" #default priority is zero + @q.insert "highest", 20 + + @q.remove.should == "highest" + @q.remove.should == "high" + @q.remove.should == "low" + @q.remove.should == "lowest" + end + end + + describe 'high volume' do + it 'should be able to accept a bunch of random values and return them in non-increasing order' do + n = (ENV['VCAP_TEST_PQUEUE_LOAD'] || 100_000).to_i + n.times { val = rand ; @q.insert val,val } + prev = @q.remove + + expect do + until @q.empty? do + val = @q.remove + val.should be < prev + prev = val + n-=1 + end + end.to take_less_than(6).seconds + + n.should == 1 + end + end + + describe 'high volume FIFO' do + it 'should have decent FIFO perfomance for same-priority values' do + + n = 100_000 + n.times { |i| @q.insert i } + + prev = @q.remove + expect do + until @q.empty? do + val = @q.remove + val.should == prev + 1 + prev = val + end + end.to take_less_than(1).seconds + + prev.should == n - 1 + end + end +end + +describe VCAP::PrioritySet do + before :each do + @qs.should be_nil + @qs = VCAP::PrioritySet.new + end + + describe '.new' do + it 'should be able to new a PrioritySet' do + @qs.should_not be_nil + end + end + + describe 'proper handling of duplicates' do + + it 'should only queue the same object once' do + @qs.insert "high", 10 + @qs.insert "low", 5 + @qs.insert "low", 6 + + @qs.size.should == 2 + + @qs.insert "low", 7 + @qs.insert "high", 1 #an updateable priority queue would respect this, but this one won't + + @qs.remove.should == "high" + @qs.remove.should == "low" + @qs.empty?.should be_true + end + + it 'should be able to re-insert an element once it is removed' do + + @qs.insert "item" + @qs.insert "item" + + @qs.remove.should == "item" + @qs.empty?.should be_true + + @qs.insert "item" + @qs.empty?.should be_false + + @qs.remove.should == "item" + end + end + + describe 'using key other than element for duplicate elimination' do + it 'should prevent duplication using supplied key' do + @qs.insert "low" + @qs.insert "medium", 5 + @qs.insert "rare", 10, "rare_id" + + @qs.size.should == 3 + + @qs.insert "another_rare", 10, "rare_id" #different object, but same key, should not be added + @qs.size.should == 3 + + @qs.insert "another_rare", 15 #no key supplied, since the object is different it should be added + @qs.size.should == 4 + + @qs.remove.should == "another_rare" + @qs.remove.should == "rare" + @qs.remove.should == "medium" + @qs.remove.should == "low" + + @qs.empty?.should be_true + + #should be able to reinsert any item provided the identity is different + @qs.insert "low" + @qs.insert "low", 1, "other_id" + @qs.insert "medium", 3 + @qs.insert "rare", 5, "rare_id" + @qs.insert "another_rare", 10 + + @qs.size.should == 5 + end + end + + describe 'equal priorities' do + describe 'FIFO behavior' do + it 'should FIFO for simplest case' do + @qs.insert 'first', 1 + @qs.insert 'second', 1 + @qs.insert 'third', 1 + + @qs.remove.should == 'first' + @qs.remove.should == 'second' + @qs.remove.should == 'third' + end + + it 'should FIFO for lower and higher priority items interpersed' do + + 50.times {|i| + val, pri = 0,0 + if rand > 0.2 + val, pri = 1000 - i , 2000000000 + else + val, pri = 100 - i, 100 - i + end + @qs.insert(val, pri) + } + prev = @qs.remove + until @qs.empty? + v = @qs.remove + v.should < prev + prev = v + end + end + + it 'should retain FIFO ordering when higher priority items are interspersed' do + @qs.insert 1 + @qs.insert 2 + @qs.insert 'high', 2 + @qs.insert 3 + @qs.insert 4 + @qs.remove.should == 'high' + @qs.insert 5 + @qs.insert 6 + @qs.remove.should == 1 + @qs.remove.should == 2 + @qs.remove.should == 3 + @qs.remove.should == 4 + @qs.remove.should == 5 + @qs.remove.should == 6 + + end + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/process_utils_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/process_utils_spec.rb new file mode 100644 index 0000000..bb20dce --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/process_utils_spec.rb @@ -0,0 +1,21 @@ +require 'spec_helper' +require 'open3' + +describe VCAP::ProcessUtils do + describe '.get_stats' do + it 'should parse fields correctly' do + VCAP::Subprocess.stub(:run).and_return(['123 456 7.8', '', 0]) + stats = VCAP::ProcessUtils.get_stats(12345) + stats[:rss].should == 123 + stats[:vsize].should == 456 + stats[:pcpu].should == 7.8 + end + + it "should return nil if the process isn't running", unix_only: true do + Open3.stub(:capture3).and_return(['', '', 1]) + stats = VCAP::ProcessUtils.get_stats(12345) + stats.should be_nil + end + + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/quota_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/quota_spec.rb new file mode 100644 index 0000000..3207ead --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/quota_spec.rb @@ -0,0 +1,53 @@ +require 'spec_helper' + +describe VCAP::Quota::SetQuota do + describe '#validate' do + it 'should require at least one of {:user, :group}' do + cmd = VCAP::Quota::SetQuota.new + cmd.filesystem = 'xxx' + expect do + cmd.validate + end.to raise_error(VCAP::Quota::Command::ValidationError, /user/) + end + + it 'should require :filesystem' do + cmd = VCAP::Quota::SetQuota.new + cmd.user = :test + expect do + cmd.validate + end.to raise_error(VCAP::Quota::Command::ValidationError, /filesystem/) + end + + it 'should require :quotas' do + cmd = VCAP::Quota::SetQuota.new + cmd.filesystem = 'xxx' + cmd.user = :test + cmd.quotas = nil + expect do + cmd.validate + end.to raise_error(VCAP::Quota::Command::ValidationError, /quotas/) + end + end +end + +describe VCAP::Quota::RepQuota do + describe '#validate' do + it 'should require at least one of {:report_users, :report_groups}' do + cmd = VCAP::Quota::RepQuota.new + cmd.report_users = false + cmd.report_groups = false + cmd.filesystem = '/' + expect do + cmd.validate + end.to raise_error(VCAP::Quota::Command::ValidationError, /report_users/) + end + + it 'should require :filesystem' do + cmd = VCAP::Quota::RepQuota.new + cmd.report_users = true + expect do + cmd.validate + end.to raise_error(VCAP::Quota::Command::ValidationError, /filesystem/) + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/registrar_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/registrar_spec.rb new file mode 100644 index 0000000..eecf6fa --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/registrar_spec.rb @@ -0,0 +1,160 @@ +require "cf/registrar" +require "cf_message_bus/mock_message_bus" + +module Cf + describe Registrar do + let(:message_bus) { CfMessageBus::MockMessageBus.new } + let(:bus_uri) { "a message bus uri" } + let(:logger) { double(:logger, info: nil, error: nil, debug: nil) } + let(:config) do + { message_bus_servers: [bus_uri], + host: "registrar.host", + port: 98765, + uri: "fancyuri", + tags: "taggy goodness", + private_instance_id: "monkey-id", + index: "indextastic", + varz: {} + } + end + + let(:registry_message) do + { + host: config[:host], + port: config[:port], + uris: Array(config[:uri]), + tags: config[:tags], + index: "indextastic", + private_instance_id: "monkey-id" + } + end + + before do + EM.stub(:cancel_timer) + CfMessageBus::MessageBus.stub(:new) { message_bus } + end + + subject { described_class.new(config) } + + describe ".new" do + let(:config) { { message_bus_servers: ["m"], host: "h", port: "p", uri: "u", tags: "t", index: 1, private_instance_id: "monkey" } } + + its(:logger) { should be_a Steno::Logger } + its(:message_bus_servers) { should eq(["m"]) } + its(:host) { should eq "h" } + its(:port) { should eq "p" } + its(:uri) { should eq "u" } + its(:tags) { should eq "t" } + its(:index) { should eq 1 } + its(:private_instance_id) { should eq "monkey" } + + context "when the index is not provided" do + let(:config) { { message_bus_servers: ["m"], host: "h", port: "p", uri: "u", tags: "t" } } + + its(:index) { should eq 0 } + end + + context "when no varz has been provided" do + let(:config) { {} } + + its(:username) { should be_nil } + its(:password) { should be_nil } + its(:type) { should be_nil } + its(:uuid) { should be_nil } + end + + context "when there is a varz provided" do + let(:config) { { varz: { username: "user", password: "pass", type: "foo", uuid: "123" } } } + + its(:username) { should eq "user" } + its(:password) { should eq "pass" } + its(:type) { should eq "foo" } + its(:uuid) { should eq "123" } + + context "and a uuid is not provided" do + let(:config) { { varz: { username: "user", password: "pass", type: "foo" } } } + + its(:uuid) { should_not be_nil } + end + end + + context "when there are values with String keys" do + let(:config) { { "host" => "h", :varz => { "username" => "user" } } } + + its(:host) { should eq "h" } + its(:username) { should eq "user" } + end + end + + describe "#register_with_router" do + it "creates the message bus correctly with logger" do + CfMessageBus::MessageBus.should_receive(:new).with(servers: [bus_uri], logger: subject.logger) + subject.register_with_router + end + + it "registers routes immediately" do + subject.register_with_router + expect(message_bus).to have_published_with_message("router.register", registry_message) + end + + it "registers upon a router.start message" do + EM.should_receive(:add_periodic_timer).with(33) + + subject.register_with_router + + message_bus.clear_published_messages + + message_bus.publish("router.start", minimumRegisterIntervalInSeconds: 33) + + expect(message_bus).to have_published_with_message("router.register", registry_message) + end + + it "greets the router" do + EM.should_receive(:add_periodic_timer).with(33) + + subject.register_with_router + + message_bus.clear_published_messages + + message_bus.respond_to_request("router.greet", minimumRegisterIntervalInSeconds: 33) + end + + it "periodically registers with the router" do + EM.should_receive(:add_periodic_timer).with(33).and_return(:periodic_timer) + subject.register_with_router + message_bus.publish("router.start", minimumRegisterIntervalInSeconds: 33) + end + + it "clears an existing timer when registering a new one" do + subject.register_with_router + + EM.should_receive(:add_periodic_timer).with(33).and_return(:periodic_timer) + message_bus.publish("router.start", minimumRegisterIntervalInSeconds: 33) + + EM.should_receive(:cancel_timer).with(:periodic_timer) + EM.should_receive(:add_periodic_timer).with(24) + message_bus.publish("router.start", minimumRegisterIntervalInSeconds: 24) + end + + context "when there is no timer interval returned" do + it "does not set up a timer" do + subject.register_with_router + + EM.should_not_receive(:add_periodic_timer) + message_bus.publish("router.start", {}) + end + end + end + + describe "#shutdown" do + it "publishes router.unregister" do + subject.shutdown + expect(message_bus).to have_published_with_message("router.unregister", registry_message) + end + + it "calls the given block after sending" do + expect { |b| subject.shutdown(&b) }.to yield_control + end + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/rolling_metric_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/rolling_metric_spec.rb new file mode 100644 index 0000000..2399b6b --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/rolling_metric_spec.rb @@ -0,0 +1,46 @@ +require "spec_helper" + +describe VCAP::RollingMetric do + + it "should not track anything initially" do + metric = VCAP::RollingMetric.new(60, 4) + metric.value.should == {:value => 0, :samples => 0} + end + + it "should track basic samples" do + metric = VCAP::RollingMetric.new(60, 4) + Time.stub(:now).and_return(0, 15, 30, 45, 45) + metric << 10 + metric << 20 + metric << 30 + metric << 40 + metric.value.should == {:value => 100, :samples => 4} + end + + it "should aggregate per bucket" do + metric = VCAP::RollingMetric.new(60, 4) + Time.stub(:now).and_return(0, 5, 10, 15, 15) + metric << 10 + metric << 20 + metric << 30 + metric << 40 + metric.value.should == {:value => 100, :samples => 4} + end + + it "should overwrite old samples" do + metric = VCAP::RollingMetric.new(60, 4) + Time.stub(:now).and_return(0, 60, 60) + metric << 10 + metric << 30 + metric.value.should == {:value => 30, :samples => 1} + end + + it "should ignore old samples" do + metric = VCAP::RollingMetric.new(60, 4) + Time.stub(:now).and_return(0, 15, 60) + metric << 10 + metric << 30 + metric.value.should == {:value => 0, :samples => 0} + end + +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/service_gateway_client_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/service_gateway_client_spec.rb new file mode 100644 index 0000000..aa19f8b --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/service_gateway_client_spec.rb @@ -0,0 +1,335 @@ +# Copyright (c) 2009-2012 VMware, Inc. +require 'spec_helper' +require 'webmock/rspec' + +module VCAP::Services::Api + describe ServiceGatewayClient do + let(:gateway_url) { 'http://gateway.example.com' } + let(:token) { 'mytoken' } + let(:timeout) { 10 } + let(:request_id) { SecureRandom.uuid } + + let(:http_client) { double(:http_client) } + + subject(:client) do + ServiceGatewayClient.new(gateway_url, token, timeout, request_id) + end + + before do + ServiceGatewayClient::HttpClient.stub(:new).and_return(http_client) + end + + describe '#initialize' do + it 'properly instantiates the http client' do + ServiceGatewayClient::HttpClient.should_receive(:new). + with(gateway_url, token, timeout, request_id). + and_return(http_client) + + ServiceGatewayClient.new(gateway_url, token, timeout, request_id) + end + end + + describe '#provision' do + it 'sends a POST request to the correct endpoint' do + http_client.should_receive(:perform_request). + with(:post, '/gateway/v1/configurations', an_instance_of(GatewayProvisionRequest)). + and_return({ + service_id: '456', + configuration: {setting: true}, + credentials: {user: 'admin', pass: 'secret'} + }.to_json) + + response = client.provision(unique_id: '123', name: 'Example Service') + expect(response.service_id).to be == '456' + expect(response.configuration).to be == {'setting' => true} + expect(response.credentials).to be == {'user' => 'admin', 'pass' => 'secret'} + end + end + + describe '#unprovision' do + it 'sends a DELETE request to the correct endpoint' do + http_client.should_receive(:perform_request). + with(:delete, '/gateway/v1/configurations/service-instance-8272') + + client.unprovision(service_id: 'service-instance-8272') + end + end + + describe '#bind' do + it 'sends a POST request to the correct endpoint' do + service_id = '123' + http_client.should_receive(:perform_request). + with(:post, "/gateway/v1/configurations/#{service_id}/handles", an_instance_of(GatewayBindRequest)). + and_return({ + service_id: service_id, + configuration: {setting: true}, + credentials: {user: 'admin', pass: 'secret'}, + syslog_drain_url: "syslog://example.com" + }.to_json) + + response = client.bind(service_id: service_id) + expect(response.service_id).to be == service_id + expect(response.configuration).to be == {'setting' => true} + expect(response.credentials).to be == {'user' => 'admin', 'pass' => 'secret'} + expect(response.syslog_drain_url).to be == "syslog://example.com" + end + end + + describe '#unbind' do + it 'sends a DELETE request to the correct endpoint' do + service_id = '123' + handle_id = '456' + http_client.should_receive(:perform_request). + with(:delete, "/gateway/v1/configurations/#{service_id}/handles/#{handle_id}", an_instance_of(GatewayUnbindRequest)) + + client.unbind(service_id: service_id, handle_id: handle_id, binding_options: {}) + end + end + end + + describe ServiceGatewayClient::HttpClient do + describe '#perform_request' do + let(:url) { 'http://localhost' } + let(:token) { 'mytoken' } + let(:timeout) { 10 } + let(:request_id) { "request-id-beef" } + + let(:http_client) { described_class.new(url, token, timeout, request_id) } + + it 'makes GET requests' do + request = stub_request(:get, 'http://localhost/path1'). + with(headers: { + "X-VCAP-Request-ID" => request_id, + VCAP::Services::Api::GATEWAY_TOKEN_HEADER => token, + }). + to_return(status: 200, body: 'data') + + result = http_client.perform_request(:get, '/path1') + result.should == 'data' + + request.should have_been_made + end + + describe '#perform_request (https)' do + let(:url) { 'https://localhost' } + + it 'makes https GET requests' do + request = stub_request(:get, 'https://localhost/path1'). + with(headers: { + "X-VCAP-Request-ID" => request_id, + VCAP::Services::Api::GATEWAY_TOKEN_HEADER => token + }). + to_return(status: 200, body: 'data') + + result = http_client.perform_request(:get, '/path1') + result.should == 'data' + + request.should have_been_made + end + end + + context "when request_id is nil" do + it "makes POST requests without the X-VCAP-Request-ID header" do + client = described_class.new(url, token, timeout, nil) + + request = stub_request(:post, 'http://localhost/path1'). + with(headers: { + VCAP::Services::Api::GATEWAY_TOKEN_HEADER => token, + }). + to_return(status: 200, body: 'data') + + result = client.perform_request(:post, '/path1') + result.should == 'data' + + request.should have_been_made + end + end + + it 'makes POST requests' do + request = stub_request(:post, 'http://localhost/path1'). + with(headers: { + "X-VCAP-Request-ID" => "request-id-beef", + VCAP::Services::Api::GATEWAY_TOKEN_HEADER => token, + }). + to_return(status: 200, body: 'data') + + result = http_client.perform_request(:post, '/path1') + result.should == 'data' + + request.should have_been_made + end + + it 'makes PUT requests' do + request = stub_request(:put, 'http://localhost/path1'). + with(headers: { + "X-VCAP-Request-ID" => "request-id-beef", + VCAP::Services::Api::GATEWAY_TOKEN_HEADER => token, + }). + to_return(status: 200, body: 'data') + + result = http_client.perform_request(:put, '/path1') + result.should == 'data' + + request.should have_been_made + end + + it 'makes DELETE requests' do + request = stub_request(:delete, 'http://localhost/path1'). + with(headers: { + "X-VCAP-Request-ID" => "request-id-beef", + VCAP::Services::Api::GATEWAY_TOKEN_HEADER => token, + }). + to_return(status: 200, body: 'data') + + result = http_client.perform_request(:delete, '/path1') + result.should == 'data' + + request.should have_been_made + end + + def self.it_raises_an_exception_when(opts) + expected_exception = opts.fetch(:exception) + response_status_code = opts.fetch(:response_status) + + let(:error_code) { rand(5000) } + let(:error_description) { SecureRandom.uuid } + let(:backtrace) { ["/dev/null:20:in `catch'", "/dev/null:69:in `start'", "/dev/null:12:in `
'"]} + let(:types) { ["ServiceError", "StandardError", "Exception"]} + + context "when the response status is #{response_status_code}" do + before do + stub_request(:any, /.*/).to_return( + status: response_status_code, + body: { + code: error_code, + description: error_description, + error: { + backtrace: backtrace, + types: types + } + }.to_json + ) + end + + it "raises a #{expected_exception.name} for get requests" do + expect { + http_client.perform_request(:get, url) + }.to raise_error(expected_exception) { |exception| + exception.status.should == response_status_code + exception.error.code.should == error_code + exception.error.description.should == error_description + exception.error.error.fetch('backtrace').should == backtrace + exception.error.error.fetch('types').should == types + error_hash = exception.to_h + error_hash.fetch('error').fetch('description').should == error_description + error_hash.fetch('error').fetch('code').should == error_code + error_hash.fetch('error').fetch('backtrace').should_not be_empty + error_hash.fetch('error').fetch('types').should include( + "VCAP::Services::Api::ServiceGatewayClient::ErrorResponse" + ) + error_hash.fetch('error').fetch('error').should == { + 'backtrace' => backtrace, + 'types' => types + } + } + end + + it "raises a #{expected_exception.name} for post requests" do + expect { + http_client.perform_request(:post, url) + }.to raise_error(expected_exception) { |exception| + exception.status.should == response_status_code + exception.error.code.should == error_code + exception.error.description.should == error_description + exception.error.error.fetch('backtrace').should == backtrace + exception.error.error.fetch('types').should == types + error_hash = exception.to_h + error_hash.fetch('error').fetch('description').should == error_description + error_hash.fetch('error').fetch('code').should == error_code + error_hash.fetch('error').fetch('backtrace').should_not be_empty + error_hash.fetch('error').fetch('types').should include( + "VCAP::Services::Api::ServiceGatewayClient::ErrorResponse" + ) + error_hash.fetch('error').fetch('error').should == { + 'backtrace' => backtrace, + 'types' => types + } + } + end + + it "raises a #{expected_exception.name} for put requests" do + expect { + http_client.perform_request(:put, url) + }.to raise_error(expected_exception) { |exception| + exception.status.should == response_status_code + exception.error.code.should == error_code + exception.error.description.should == error_description + exception.error.error.fetch('backtrace').should == backtrace + exception.error.error.fetch('types').should == types + error_hash = exception.to_h + error_hash.fetch('error').fetch('description').should == error_description + error_hash.fetch('error').fetch('code').should == error_code + error_hash.fetch('error').fetch('backtrace').should_not be_empty + error_hash.fetch('error').fetch('types').should include( + "VCAP::Services::Api::ServiceGatewayClient::ErrorResponse" + ) + error_hash.fetch('error').fetch('error').should == { + 'backtrace' => backtrace, + 'types' => types + } + } + end + + it "raises a #{expected_exception.name} for delete requests" do + expect { + http_client.perform_request(:delete, url) + }.to raise_error(expected_exception) { |exception| + exception.status.should == response_status_code + exception.error.code.should == error_code + exception.error.description.should == error_description + exception.error.error.fetch('backtrace').should == backtrace + exception.error.error.fetch('types').should == types + error_hash = exception.to_h + error_hash.fetch('error').fetch('description').should == error_description + error_hash.fetch('error').fetch('code').should == error_code + error_hash.fetch('error').fetch('backtrace').should_not be_empty + error_hash.fetch('error').fetch('types').should include( + "VCAP::Services::Api::ServiceGatewayClient::ErrorResponse" + ) + error_hash.fetch('error').fetch('error').should == { + 'backtrace' => backtrace, + 'types' => types + } + } + end + end + end + + it_raises_an_exception_when(response_status: 404, exception: ServiceGatewayClient::NotFoundResponse) + it_raises_an_exception_when(response_status: 503, exception: ServiceGatewayClient::GatewayInternalResponse) + + context 'when the response status is an unhandled, non-200' do + it_raises_an_exception_when(response_status: 400, exception: ServiceGatewayClient::ErrorResponse) + it_raises_an_exception_when(response_status: 500, exception: ServiceGatewayClient::ErrorResponse) + it_raises_an_exception_when(response_status: 502, exception: ServiceGatewayClient::ErrorResponse) + # ... you could test any other non-200 example not listed above + + context "when the response is not valid JSON" do + let(:response_status_code) { 500 } + let(:response_body) { "I am not JSON" } + before do + stub_request(:get, /.*/).to_return(status: response_status_code, body: response_body) + end + + it "raises an UnexpectedResponse exception" do + expect { + http_client.perform_request(:get, url) + }.to raise_error(ServiceGatewayClient::UnexpectedResponse) { |exception| + exception.message.should =~ /status code: #{response_status_code}. response body: #{response_body}$/ + } + end + end + end + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/sorted_set_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/sorted_set_spec.rb new file mode 100644 index 0000000..18f67b0 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/sorted_set_spec.rb @@ -0,0 +1,29 @@ +# Copyright (c) 2009-2011 VMware, Inc. +require 'spec_helper' + +describe SortedSet do + DEFAULT_SET = [-4, -1, 0, 1, 4, 6, 9] + + it 'should properly handle empty sorted set' do + set = SortedSet.new + SortedSet.from_int_array(set.to_int_array).should == set + end + + it 'should properly handle sorted set with one item' do + set = SortedSet.new([1]) + SortedSet.from_int_array(set.to_int_array).should == set + end + + it 'should properly handle sorted set' do + set = SortedSet.new(DEFAULT_SET) + SortedSet.from_int_array(set.to_int_array).should == set + end + + it 'should properly handle random sorted set' do + set = SortedSet.new + 20.times do + set << Random.rand(100) + end + SortedSet.from_int_array(set.to_int_array).should == set + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/stats_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/stats_spec.rb new file mode 100644 index 0000000..5799df7 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/stats_spec.rb @@ -0,0 +1,102 @@ +require "spec_helper" +require "vcap/stats" +require "ostruct" + +describe VCAP::Stats do + describe "on Unix" do + before do + stub_const('VCAP::WINDOWS', false) + Process.stub(pid: 9999) + end + + it "should retrieve process memory and cpu" do + VCAP::Stats.should_receive(:'`').with("ps -o rss=,pcpu= -p 9999").and_return("55792 12") + + mem, cpu = VCAP::Stats.process_memory_and_cpu + expect(mem).to eq("55792") + expect(cpu).to eq("12") + end + + it "should retrieve cpu_load" do + Vmstat.stub_chain(:load_average, :one_minute).and_return(3) + + expect(VCAP::Stats.cpu_load_average).to eq(3) + end + + it "should retrieve physical memory total and available" do + Vmstat.should_receive(:memory).twice.and_return do + o = OpenStruct.new + o.active_bytes = 3 + o.wired_bytes = 5 + o.inactive_bytes = 7 + o.free_bytes = 11 + o + end + + expect(VCAP::Stats.memory_used_bytes).to eq(8) + expect(VCAP::Stats.memory_free_bytes).to eq(18) + end + end + + describe "on Windows" do + before do + stub_const("VCAP::WINDOWS", true) + Process.stub(pid: 9999) + end + + let(:system_memory_list) { + <\\"').and_return(system_memory_list) + + mem = VCAP::Stats.memory_used_bytes + expect(mem).to eq 8588886016 - 6189744128 + end + end +end \ No newline at end of file diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/subprocess_spec.rb b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/subprocess_spec.rb new file mode 100644 index 0000000..36424d8 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/spec/unit/subprocess_spec.rb @@ -0,0 +1,51 @@ +require 'spec_helper' + +describe VCAP::Subprocess do + before :each do + @subprocess = VCAP::Subprocess.new + end + + describe '#run' do + it 'should capture stdout stderr', unix_only: true do + stdout, stderr, status = @subprocess.run('echo foo') + stdout.should == "foo\n" + stderr.should == "" + status.should == 0 + end + + it 'should capture stderr', unix_only: true do + stdout, stderr, status = @subprocess.run('echo foo >&2') + stdout.should == "" + stderr.should == "foo\n" + status.should == 0 + end + + it 'should raise exceptions on exit status mismatch', unix_only: true do + begin + ex_thrown = false + @subprocess.run('exit 10') + rescue VCAP::SubprocessStatusError => se + ex_thrown = true + se.status.exitstatus == 10 + ensure + ex_thrown.should be_true + end + end + + it 'should properly validate nonzero exit statuses', unix_only: true do + stdout, stderr, status = @subprocess.run('exit 10', 10) + status.exitstatus.should == 10 + end + + it 'should kill processes that run too long', unix_only: true do + expect { VCAP::Subprocess.run('sleep 5', 0, 1) }.to raise_error(VCAP::SubprocessTimeoutError) + end + + it 'should call previously installed SIGCHLD handlers', unix_only: true do + handler_called = false + trap('CLD') { handler_called = true } + VCAP::Subprocess.run('echo foo') + handler_called.should be_true + end + end +end diff --git a/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/vcap_common.gemspec b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/vcap_common.gemspec new file mode 100644 index 0000000..72665f8 --- /dev/null +++ b/src/vcap_common/vendor/cache/vcap-common-bdd2eac66b6e/vcap_common.gemspec @@ -0,0 +1,87 @@ +# -*- encoding: utf-8 -*- +# stub: vcap_common 2.3.0 ruby lib + +Gem::Specification.new do |s| + s.name = "vcap_common".freeze + s.version = "2.3.0" + + s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= + s.require_paths = ["lib".freeze] + s.authors = ["Cloud Foundry Core Team".freeze] + s.date = "2017-03-16" + s.description = "common vcap classes/methods".freeze + s.email = ["vcap-dev@googlegroups.com".freeze] + s.files = ["bin/cf-registrar".freeze, "bin/fetch_gems".freeze, "bin/transform_git_source".freeze, "lib/cf/registrar.rb".freeze, "lib/cf/version.rb".freeze, "lib/json_message.rb".freeze, "lib/services/api.rb".freeze, "lib/services/api/async_requests.rb".freeze, "lib/services/api/clients/service_gateway_client.rb".freeze, "lib/services/api/const.rb".freeze, "lib/services/api/messages.rb".freeze, "lib/services/api/util.rb".freeze, "lib/vcap/common.rb".freeze, "lib/vcap/component.rb".freeze, "lib/vcap/config.rb".freeze, "lib/vcap/fiber_tracing.rb".freeze, "lib/vcap/priority_queue.rb".freeze, "lib/vcap/process_utils.rb".freeze, "lib/vcap/quota.rb".freeze, "lib/vcap/rolling_metric.rb".freeze, "lib/vcap/sorted_set_utils.rb".freeze, "lib/vcap/spec/em.rb".freeze, "lib/vcap/spec/forked_component.rb".freeze, "lib/vcap/spec/forked_component/base.rb".freeze, "lib/vcap/spec/forked_component/nats_server.rb".freeze, "lib/vcap/stats.rb".freeze, "lib/vcap/subprocess.rb".freeze] + s.homepage = "http://github.com/cloudfoundry/vcap-common".freeze + s.rubygems_version = "2.5.2".freeze + s.summary = "vcap common".freeze + + if s.respond_to? :specification_version then + s.specification_version = 4 + + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then + s.add_runtime_dependency(%q.freeze, [">= 0"]) + s.add_runtime_dependency(%q.freeze, [">= 0"]) + s.add_runtime_dependency(%q.freeze, [">= 0"]) + s.add_runtime_dependency(%q.freeze, ["< 0.6", ">= 0.5.0.beta.12"]) + s.add_runtime_dependency(%q.freeze, ["~> 0.3.6"]) + s.add_runtime_dependency(%q.freeze, ["~> 0.0.2"]) + s.add_runtime_dependency(%q.freeze, [">= 0"]) + s.add_runtime_dependency(%q.freeze, ["~> 1.0"]) + s.add_runtime_dependency(%q.freeze, [">= 0"]) + s.add_runtime_dependency(%q.freeze, [">= 0"]) + s.add_runtime_dependency(%q.freeze, [">= 0"]) + s.add_runtime_dependency(%q.freeze, ["~> 2.0"]) + s.add_runtime_dependency(%q.freeze, [">= 0"]) + s.add_runtime_dependency(%q.freeze, ["~> 2.2"]) + s.add_runtime_dependency(%q.freeze, [">= 0"]) + s.add_development_dependency(%q.freeze, [">= 0"]) + s.add_development_dependency(%q.freeze, [">= 0"]) + s.add_development_dependency(%q.freeze, [">= 0"]) + s.add_development_dependency(%q.freeze, [">= 0"]) + s.add_development_dependency(%q.freeze, [">= 0"]) + else + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, ["< 0.6", ">= 0.5.0.beta.12"]) + s.add_dependency(%q.freeze, ["~> 0.3.6"]) + s.add_dependency(%q.freeze, ["~> 0.0.2"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, ["~> 1.0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, ["~> 2.0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, ["~> 2.2"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + end + else + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, ["< 0.6", ">= 0.5.0.beta.12"]) + s.add_dependency(%q.freeze, ["~> 0.3.6"]) + s.add_dependency(%q.freeze, ["~> 0.0.2"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, ["~> 1.0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, ["~> 2.0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, ["~> 2.2"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + s.add_dependency(%q.freeze, [">= 0"]) + end +end diff --git a/src/vcap_common/vendor/cache/vcap-concurrency-0.1.0.gem b/src/vcap_common/vendor/cache/vcap-concurrency-0.1.0.gem new file mode 100644 index 0000000..563e447 Binary files /dev/null and b/src/vcap_common/vendor/cache/vcap-concurrency-0.1.0.gem differ diff --git a/src/vcap_common/vendor/cache/vmstat-2.3.0.gem b/src/vcap_common/vendor/cache/vmstat-2.3.0.gem new file mode 100644 index 0000000..cebee94 Binary files /dev/null and b/src/vcap_common/vendor/cache/vmstat-2.3.0.gem differ diff --git a/src/vcap_common/vendor/cache/yajl-ruby-1.3.0.gem b/src/vcap_common/vendor/cache/yajl-ruby-1.3.0.gem new file mode 100644 index 0000000..bcc975d Binary files /dev/null and b/src/vcap_common/vendor/cache/yajl-ruby-1.3.0.gem differ