benschwarz-smoke 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. data/Gemfile +10 -0
  2. data/VERSION.yml +1 -1
  3. data/bin/edit_json.rb +3 -0
  4. data/bin/restclient +3 -0
  5. data/examples/web_search_joined.rb +25 -0
  6. data/examples/yql_web_search.rb +11 -0
  7. data/lib/smoke/cache.rb +0 -3
  8. data/lib/smoke.rb +5 -5
  9. data/vendor/gems/cache/crack-0.1.1.gem +0 -0
  10. data/vendor/gems/cache/fakeweb-1.2.5.gem +0 -0
  11. data/vendor/gems/cache/json-1.1.3.gem +0 -0
  12. data/vendor/gems/cache/rest-client-1.0.1.gem +0 -0
  13. data/vendor/gems/cache/simple-rss-1.2.gem +0 -0
  14. data/vendor/gems/cache/wycats-moneta-0.6.0.gem +0 -0
  15. data/vendor/gems/environment.rb +83 -0
  16. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/LICENSE +0 -0
  17. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/README.rdoc +0 -0
  18. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/VERSION.yml +0 -0
  19. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/lib/crack/core_extensions.rb +0 -0
  20. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/lib/crack/json.rb +0 -0
  21. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/lib/crack/xml.rb +0 -0
  22. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/lib/crack.rb +0 -0
  23. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/test/crack_test.rb +0 -0
  24. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/test/json_test.rb +0 -0
  25. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/test/test_helper.rb +0 -0
  26. data/vendor/{crack-0.1.1 → gems/gems/crack-0.1.1}/test/xml_test.rb +0 -0
  27. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/CHANGELOG +0 -0
  28. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/LICENSE.txt +0 -0
  29. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/README.rdoc +0 -0
  30. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/Rakefile +0 -0
  31. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/lib/fake_web/ext/net_http.rb +0 -0
  32. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/lib/fake_web/registry.rb +0 -0
  33. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/lib/fake_web/responder.rb +0 -0
  34. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/lib/fake_web/response.rb +0 -0
  35. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/lib/fake_web/stub_socket.rb +0 -0
  36. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/lib/fake_web/utility.rb +0 -0
  37. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/lib/fake_web.rb +0 -0
  38. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/lib/fakeweb.rb +0 -0
  39. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/fixtures/google_response_from_curl +0 -0
  40. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/fixtures/google_response_with_transfer_encoding +0 -0
  41. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/fixtures/google_response_without_transfer_encoding +0 -0
  42. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/fixtures/test_example.txt +0 -0
  43. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/fixtures/test_txt_file +0 -0
  44. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_allow_net_connect.rb +0 -0
  45. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_deprecations.rb +0 -0
  46. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_fake_authentication.rb +0 -0
  47. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_fake_web.rb +0 -0
  48. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_fake_web_open_uri.rb +0 -0
  49. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_helper.rb +0 -0
  50. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_missing_open_uri.rb +0 -0
  51. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_precedence.rb +0 -0
  52. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_query_string.rb +0 -0
  53. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_regexes.rb +0 -0
  54. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_response_headers.rb +0 -0
  55. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_trailing_slashes.rb +0 -0
  56. data/vendor/{fakeweb-1.2.5 → gems/gems/fakeweb-1.2.5}/test/test_utility.rb +0 -0
  57. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/CHANGES +0 -0
  58. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/GPL +0 -0
  59. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/README +0 -0
  60. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/RUBY +0 -0
  61. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/Rakefile +0 -0
  62. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/TODO +0 -0
  63. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/VERSION +0 -0
  64. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/benchmarks/benchmark.txt +0 -0
  65. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/benchmarks/benchmark_generator.rb +0 -0
  66. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/benchmarks/benchmark_parser.rb +0 -0
  67. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/benchmarks/benchmark_rails.rb +0 -0
  68. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/bin/edit_json.rb +0 -0
  69. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/bin/prettify_json.rb +0 -0
  70. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/data/example.json +0 -0
  71. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/data/index.html +0 -0
  72. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/data/prototype.js +0 -0
  73. data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/Makefile +150 -0
  74. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/ext/json/ext/generator/extconf.rb +0 -0
  75. data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/generator.bundle +0 -0
  76. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/ext/json/ext/generator/generator.c +0 -0
  77. data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/generator.o +0 -0
  78. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/ext/json/ext/generator/unicode.c +0 -0
  79. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/ext/json/ext/generator/unicode.h +0 -0
  80. data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator/unicode.o +0 -0
  81. data/vendor/gems/gems/json-1.1.3/ext/json/ext/generator.bundle +0 -0
  82. data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/Makefile +150 -0
  83. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/ext/json/ext/parser/extconf.rb +0 -0
  84. data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/parser.bundle +0 -0
  85. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/ext/json/ext/parser/parser.c +0 -0
  86. data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/parser.o +0 -0
  87. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/ext/json/ext/parser/parser.rl +0 -0
  88. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/ext/json/ext/parser/unicode.c +0 -0
  89. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/ext/json/ext/parser/unicode.h +0 -0
  90. data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser/unicode.o +0 -0
  91. data/vendor/gems/gems/json-1.1.3/ext/json/ext/parser.bundle +0 -0
  92. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/install.rb +0 -0
  93. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/Array.xpm +0 -0
  94. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/FalseClass.xpm +0 -0
  95. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/Hash.xpm +0 -0
  96. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/Key.xpm +0 -0
  97. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/NilClass.xpm +0 -0
  98. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/Numeric.xpm +0 -0
  99. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/String.xpm +0 -0
  100. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/TrueClass.xpm +0 -0
  101. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/add/core.rb +0 -0
  102. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/add/rails.rb +0 -0
  103. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/common.rb +0 -0
  104. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/editor.rb +0 -0
  105. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/ext.rb +0 -0
  106. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/json.xpm +0 -0
  107. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/pure/generator.rb +0 -0
  108. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/pure/parser.rb +0 -0
  109. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/pure.rb +0 -0
  110. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json/version.rb +0 -0
  111. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/lib/json.rb +0 -0
  112. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail1.json +0 -0
  113. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail10.json +0 -0
  114. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail11.json +0 -0
  115. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail12.json +0 -0
  116. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail13.json +0 -0
  117. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail14.json +0 -0
  118. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail18.json +0 -0
  119. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail19.json +0 -0
  120. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail2.json +0 -0
  121. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail20.json +0 -0
  122. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail21.json +0 -0
  123. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail22.json +0 -0
  124. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail23.json +0 -0
  125. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail24.json +0 -0
  126. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail25.json +0 -0
  127. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail27.json +0 -0
  128. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail28.json +0 -0
  129. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail3.json +0 -0
  130. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail4.json +0 -0
  131. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail5.json +0 -0
  132. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail6.json +0 -0
  133. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail7.json +0 -0
  134. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail8.json +0 -0
  135. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/fail9.json +0 -0
  136. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/pass1.json +0 -0
  137. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/pass15.json +0 -0
  138. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/pass16.json +0 -0
  139. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/pass17.json +0 -0
  140. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/pass2.json +0 -0
  141. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/pass26.json +0 -0
  142. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/fixtures/pass3.json +0 -0
  143. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/runner.rb +0 -0
  144. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/test_json.rb +0 -0
  145. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/test_json_addition.rb +0 -0
  146. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/test_json_fixtures.rb +0 -0
  147. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/test_json_generate.rb +0 -0
  148. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/test_json_rails.rb +0 -0
  149. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tests/test_json_unicode.rb +0 -0
  150. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tools/fuzz.rb +0 -0
  151. data/vendor/{json-1.1.3 → gems/gems/json-1.1.3}/tools/server.rb +0 -0
  152. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/README.rdoc +0 -0
  153. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/Rakefile +0 -0
  154. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/bin/restclient +0 -0
  155. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/lib/rest_client.rb +0 -0
  156. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/lib/restclient/exceptions.rb +0 -0
  157. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/lib/restclient/mixin/response.rb +0 -0
  158. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/lib/restclient/raw_response.rb +0 -0
  159. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/lib/restclient/request.rb +0 -0
  160. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/lib/restclient/resource.rb +0 -0
  161. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/lib/restclient/response.rb +0 -0
  162. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/lib/restclient.rb +0 -0
  163. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/spec/base.rb +0 -0
  164. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/spec/exceptions_spec.rb +0 -0
  165. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/spec/mixin/response_spec.rb +0 -0
  166. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/spec/raw_response_spec.rb +0 -0
  167. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/spec/request_spec.rb +0 -0
  168. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/spec/resource_spec.rb +0 -0
  169. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/spec/response_spec.rb +0 -0
  170. data/vendor/{rest-client-1.0.1 → gems/gems/rest-client-1.0.1}/spec/restclient_spec.rb +0 -0
  171. data/vendor/{simple-rss-1.2 → gems/gems/simple-rss-1.2}/LICENSE +0 -0
  172. data/vendor/{simple-rss-1.2 → gems/gems/simple-rss-1.2}/README +0 -0
  173. data/vendor/{simple-rss-1.2 → gems/gems/simple-rss-1.2}/Rakefile +0 -0
  174. data/vendor/{simple-rss-1.2 → gems/gems/simple-rss-1.2}/lib/simple-rss.rb +0 -0
  175. data/vendor/{simple-rss-1.2 → gems/gems/simple-rss-1.2}/test/base/base_test.rb +0 -0
  176. data/vendor/{simple-rss-1.2 → gems/gems/simple-rss-1.2}/test/data/atom.xml +0 -0
  177. data/vendor/{simple-rss-1.2 → gems/gems/simple-rss-1.2}/test/data/not-rss.xml +0 -0
  178. data/vendor/{simple-rss-1.2 → gems/gems/simple-rss-1.2}/test/data/rss09.rdf +0 -0
  179. data/vendor/{simple-rss-1.2 → gems/gems/simple-rss-1.2}/test/data/rss20.xml +0 -0
  180. data/vendor/{simple-rss-1.2 → gems/gems/simple-rss-1.2}/test/test_helper.rb +0 -0
  181. data/vendor/{moneta → gems/gems/wycats-moneta-0.6.0}/LICENSE +0 -0
  182. data/vendor/{moneta → gems/gems/wycats-moneta-0.6.0}/README +1 -2
  183. data/vendor/{moneta → gems/gems/wycats-moneta-0.6.0}/Rakefile +0 -0
  184. data/vendor/{moneta → gems/gems/wycats-moneta-0.6.0}/TODO +0 -0
  185. data/vendor/{moneta → gems/gems/wycats-moneta-0.6.0}/lib/moneta/datamapper.rb +0 -0
  186. data/vendor/{moneta → gems/gems/wycats-moneta-0.6.0}/lib/moneta/file.rb +1 -1
  187. data/vendor/{moneta → gems/gems/wycats-moneta-0.6.0}/lib/moneta/memcache.rb +2 -3
  188. data/vendor/{moneta → gems/gems/wycats-moneta-0.6.0}/lib/moneta/memory.rb +0 -0
  189. data/vendor/{moneta → gems/gems/wycats-moneta-0.6.0}/lib/moneta/xattr.rb +0 -0
  190. data/vendor/{moneta → gems/gems/wycats-moneta-0.6.0}/lib/moneta.rb +0 -0
  191. data/vendor/gems/specifications/crack-0.1.1.gemspec +29 -0
  192. data/vendor/gems/specifications/fakeweb-1.2.5.gemspec +34 -0
  193. data/vendor/gems/specifications/json-1.1.3.gemspec +33 -0
  194. data/vendor/gems/specifications/rest-client-1.0.1.gemspec +30 -0
  195. data/vendor/gems/specifications/simple-rss-1.2.gemspec +27 -0
  196. data/vendor/{moneta/moneta.gemspec → gems/specifications/wycats-moneta-0.6.0.gemspec} +2 -5
  197. metadata +217 -290
  198. data/vendor/dependencies/README.markdown +0 -113
  199. data/vendor/dependencies/Rakefile +0 -5
  200. data/vendor/dependencies/bin/dep +0 -83
  201. data/vendor/dependencies/dependencies.gemspec +0 -15
  202. data/vendor/dependencies/dependencies.gemspec.erb +0 -27
  203. data/vendor/dependencies/lib/dependencies/dep.rb +0 -99
  204. data/vendor/dependencies/lib/dependencies.rb +0 -5
  205. data/vendor/dependencies/test/dependencies_test.rb +0 -228
  206. data/vendor/dependencies/test/foobaz-0.3.gem +0 -0
  207. data/vendor/moneta/benchmarks/various.rb +0 -234
  208. data/vendor/moneta/lib/moneta/basic_file.rb +0 -111
  209. data/vendor/moneta/lib/moneta/berkeley.rb +0 -53
  210. data/vendor/moneta/lib/moneta/couch.rb +0 -63
  211. data/vendor/moneta/lib/moneta/lmc.rb +0 -52
  212. data/vendor/moneta/lib/moneta/mongodb.rb +0 -58
  213. data/vendor/moneta/lib/moneta/redis.rb +0 -49
  214. data/vendor/moneta/lib/moneta/rufus.rb +0 -41
  215. data/vendor/moneta/lib/moneta/s3.rb +0 -162
  216. data/vendor/moneta/lib/moneta/sdbm.rb +0 -33
  217. data/vendor/moneta/lib/moneta/tyrant.rb +0 -58
  218. data/vendor/moneta/script/destroy +0 -14
  219. data/vendor/moneta/script/generate +0 -14
  220. data/vendor/moneta/spec/moneta_basic_file_spec.rb +0 -50
  221. data/vendor/moneta/spec/moneta_berkeley_spec.rb +0 -20
  222. data/vendor/moneta/spec/moneta_couch_spec.rb +0 -22
  223. data/vendor/moneta/spec/moneta_datamapper_spec.rb +0 -79
  224. data/vendor/moneta/spec/moneta_file_spec.rb +0 -21
  225. data/vendor/moneta/spec/moneta_lmc_spec.rb +0 -24
  226. data/vendor/moneta/spec/moneta_memcache_spec.rb +0 -16
  227. data/vendor/moneta/spec/moneta_memory_spec.rb +0 -12
  228. data/vendor/moneta/spec/moneta_mongodb_spec.rb +0 -16
  229. data/vendor/moneta/spec/moneta_redis_spec.rb +0 -16
  230. data/vendor/moneta/spec/moneta_rufus_spec.rb +0 -15
  231. data/vendor/moneta/spec/moneta_s3_spec.rb +0 -19
  232. data/vendor/moneta/spec/moneta_sdbm_spec.rb +0 -21
  233. data/vendor/moneta/spec/moneta_tyrant_spec.rb +0 -15
  234. data/vendor/moneta/spec/moneta_xattr_spec.rb +0 -21
  235. data/vendor/moneta/spec/shared.rb +0 -122
  236. data/vendor/moneta/spec/spec_helper.rb +0 -7
@@ -1,162 +0,0 @@
1
- begin
2
- require "right_aws"
3
- rescue LoadError
4
- puts "You need the RightScale AWS gem to use the S3 moneta store"
5
- exit
6
- end
7
-
8
- module Moneta
9
- # An S3 implementation of Moneta
10
- #
11
- # Example usage:
12
- #
13
- # require 'rubygems'
14
- # require 'moneta'
15
- # require 'moneta/s3'
16
- #
17
- # store = Moneta::S3.new(
18
- # :access_key_id => 'ACCESS_KEY_ID',
19
- # :secret_access_key => 'SECRET_ACCESS_KEY',
20
- # :bucket => 'a_bucket'
21
- # )
22
- # store['somefile']
23
- class S3
24
- # Initialize the Moneta::S3 store.
25
- #
26
- # Required values passed in the options hash:
27
- # * <tt>:access_key_id</tt>: The access id key
28
- # * <tt>:secret_access_key</tt>: The secret key
29
- # * <tt>:bucket</tt>: The name of bucket. Will be created if it doesn't
30
- # exist.
31
- # * <tt>:multi_thread</tt>: Set to true if using threading
32
- def initialize(options = {})
33
- validate_options(options)
34
- s3 = RightAws::S3.new(
35
- options[:access_key_id],
36
- options[:secret_access_key],
37
- {
38
- :logger => logger,
39
- :multi_thread => options.delete(:multi_thread) || false
40
- }
41
- )
42
- @bucket = s3.bucket(options.delete(:bucket), true)
43
- end
44
-
45
- def key?(key)
46
- !s3_key(key).nil?
47
- end
48
-
49
- alias has_key? key?
50
-
51
- def [](key)
52
- get(key)
53
- end
54
-
55
- def []=(key, value)
56
- store(key, value)
57
- end
58
-
59
- def delete(key)
60
- k = s3_key(key)
61
- if k
62
- value = k.get
63
- k.delete
64
- value
65
- end
66
- end
67
-
68
- # Store the key/value pair.
69
- #
70
- # Options:
71
- # *<tt>:meta_headers</tt>: Meta headers passed to S3
72
- # *<tt>:perms</tt>: Permissions passed to S3
73
- # *<tt>:headers</tt>: Headers sent as part of the PUT request
74
- # *<tt>:expires_in</tt>: Number of seconds until expiration
75
- def store(key, value, options = {})
76
- debug "store(key=#{key}, value=#{value}, options=#{options.inspect})"
77
- meta_headers = meta_headers_from_options(options)
78
- perms = options[:perms]
79
- headers = options[:headers] || {}
80
-
81
- case value
82
- when IO
83
- @bucket.put(key, value.read, meta_headers, perms, headers)
84
- else
85
- @bucket.put(key, value, meta_headers, perms, headers)
86
- end
87
- end
88
-
89
- def update_key(key, options = {})
90
- debug "update_key(key=#{key}, options=#{options.inspect})"
91
- k = s3_key(key, false)
92
- k.save_meta(meta_headers_from_options(options)) unless k.nil?
93
- end
94
-
95
- def clear
96
- @bucket.clear
97
- end
98
-
99
- protected
100
- def logger
101
- @logger ||= begin
102
- logger = Logger.new(STDOUT)
103
- logger.level = Logger::FATAL
104
- logger
105
- end
106
- end
107
-
108
- private
109
- def validate_options(options)
110
- unless options[:access_key_id]
111
- raise RuntimeError, ":access_key_id is required in options"
112
- end
113
- unless options[:secret_access_key]
114
- raise RuntimeError, ":secret_access_key is required in options"
115
- end
116
- unless options[:bucket]
117
- raise RuntimeError, ":bucket is required in options"
118
- end
119
- end
120
-
121
- def get(key)
122
- k = s3_key(key)
123
- k.nil? ? nil : k.get
124
- end
125
-
126
- def s3_key(key, nil_if_expired=true)
127
- begin
128
- s3_key = @bucket.key(key, true)
129
- if s3_key.exists?
130
- logger.debug "[Moneta::S3] key exists: #{key}"
131
- if s3_key.meta_headers.has_key?('expires-at')
132
- expires_at = Time.parse(s3_key.meta_headers['expires-at'])
133
- if Time.now > expires_at && nil_if_expired
134
- # TODO delete the object?
135
- debug "key expired: #{key} (@#{s3_key.meta_headers['expires-at']})"
136
- return nil
137
- end
138
- end
139
- return s3_key
140
- else
141
- debug "key does not exist: #{key}"
142
- end
143
- rescue RightAws::AwsError => e
144
- debug "key does not exist: #{key}"
145
- end
146
- nil
147
- end
148
-
149
- def meta_headers_from_options(options={})
150
- meta_headers = options[:meta_headers] || {}
151
- if options[:expires_in]
152
- meta_headers['expires-at'] = (Time.now + options[:expires_in]).rfc2822
153
- end
154
- debug "setting expires-at: #{meta_headers['expires-at']}"
155
- meta_headers
156
- end
157
-
158
- def debug(message)
159
- logger.debug "[Moneta::S3] #{message}"
160
- end
161
- end
162
- end
@@ -1,33 +0,0 @@
1
- require "sdbm"
2
-
3
- module Moneta
4
- class BasicSDBM < ::SDBM
5
- include Defaults
6
-
7
- def [](key)
8
- if val = super
9
- Marshal.load(val)
10
- end
11
- end
12
-
13
- def []=(key, value)
14
- super(key, Marshal.dump(value))
15
- end
16
-
17
- def delete(key)
18
- if val = super
19
- Marshal.load(val)
20
- end
21
- end
22
- end
23
-
24
- class SDBM < BasicSDBM
25
- include Expires
26
-
27
- def initialize(options = {})
28
- raise "No :file option specified" unless file = options[:file]
29
- @expiration = BasicSDBM.new("#{file}_expires")
30
- super(file)
31
- end
32
- end
33
- end
@@ -1,58 +0,0 @@
1
- begin
2
- require "rufus/tokyo/tyrant"
3
- rescue LoadError
4
- puts "You need the rufus gem to use the Tyrant moneta store"
5
- exit
6
- end
7
-
8
- module Moneta
9
- class Tyrant < ::Rufus::Tokyo::Tyrant
10
- include Defaults
11
-
12
- module Implementation
13
- def initialize(options = {})
14
- host = options[:host]
15
- port = options[:port]
16
- super(host, port)
17
- end
18
-
19
- def key?(key)
20
- !!self[key]
21
- end
22
-
23
- def [](key)
24
- if val = super
25
- Marshal.load(val.unpack("m")[0])
26
- end
27
- end
28
-
29
- def []=(key, value)
30
- super(key, [Marshal.dump(value)].pack("m"))
31
- end
32
- end
33
-
34
- include Implementation
35
- include Expires
36
-
37
- def initialize(options = {})
38
- super
39
- @expiration = Expiration.new(options)
40
- end
41
-
42
- class Expiration < ::Rufus::Tokyo::Tyrant
43
- include Implementation
44
-
45
- def [](key)
46
- super("#{key}__expiration")
47
- end
48
-
49
- def []=(key, value)
50
- super("#{key}__expiration", value)
51
- end
52
-
53
- def delete(key)
54
- super("#{key}__expiration")
55
- end
56
- end
57
- end
58
- end
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
-
4
- begin
5
- require 'rubigen'
6
- rescue LoadError
7
- require 'rubygems'
8
- require 'rubigen'
9
- end
10
- require 'rubigen/scripts/destroy'
11
-
12
- ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
- RubiGen::Base.use_component_sources! [:newgem_simple, :test_unit]
14
- RubiGen::Scripts::Destroy.new.run(ARGV)
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
-
4
- begin
5
- require 'rubigen'
6
- rescue LoadError
7
- require 'rubygems'
8
- require 'rubigen'
9
- end
10
- require 'rubigen/scripts/generate'
11
-
12
- ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
- RubiGen::Base.use_component_sources! [:newgem_simple, :test_unit]
14
- RubiGen::Scripts::Generate.new.run(ARGV)
@@ -1,50 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/basic_file"
5
-
6
- describe "Moneta::BasicFile" do
7
- describe "without namespacing" do
8
- before(:each) do
9
- @cache = Moneta::BasicFile.new(:path => File.join(File.dirname(__FILE__), "basic_file_cache"))
10
- @cache.clear
11
- end
12
-
13
- if ENV['MONETA_TEST'].nil? || ENV['MONETA_TEST'] == 'basic_file'
14
- it_should_behave_like "a read/write Moneta cache"
15
- end
16
-
17
- it "should deal with '/' and '#' in a key" do
18
- key = "hello/mom#crazycharacters"
19
- @cache[key] = "hi"
20
- @cache[key].should == "hi"
21
- ::File.exists?(File.join(File.dirname(__FILE__), "basic_file_cache", "")).should == true
22
- end
23
- end
24
-
25
- describe "with namespacing" do
26
- before(:each) do
27
- @cache = Moneta::BasicFile.new(:path => File.join(File.dirname(__FILE__), "basic_file_cache"), :namespace => "test_namespace")
28
- @cache.clear
29
- end
30
-
31
- if ENV['MONETA_TEST'].nil? || ENV['MONETA_TEST'] == 'basic_file'
32
- it_should_behave_like "a read/write Moneta cache"
33
- end
34
-
35
- it "should act as two stores within the same directory" do
36
- @second = Moneta::BasicFile.new(:path => File.join(File.dirname(__FILE__), "basic_file_cache"), :namespace => "second_namespace")
37
- @second[:key] = "hello"
38
- @cache[:key] = "world!"
39
- @second[:key].should == "hello"
40
- @cache[:key].should == "world!"
41
- end
42
- end
43
-
44
- after(:all) do
45
- FileUtils.rm_rf(File.join(File.dirname(__FILE__), "basic_file_cache"))
46
- end
47
-
48
- end
49
- rescue SystemExit
50
- end
@@ -1,20 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require 'moneta/berkeley'
5
-
6
- describe "Moneta::Berkeley" do
7
- before(:each) do
8
- @cache = Moneta::Berkeley.new(:file => File.join(File.dirname(__FILE__), "berkeley_test.db"))
9
- @cache.clear
10
- end
11
-
12
- after(:all) do
13
- File.delete(File.join(File.dirname(__FILE__), "berkeley_test.db"))
14
- File.delete(File.join(File.dirname(__FILE__), "berkeley_test.db_expiration"))
15
- end
16
-
17
- it_should_behave_like "a read/write Moneta cache"
18
- end
19
- rescue SystemExit
20
- end
@@ -1,22 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require 'moneta/couch'
5
-
6
- describe "Moneta::Couch" do
7
- before(:each) do
8
- @cache = Moneta::Couch.new(:db => "couch_test")
9
- @expiration = Moneta::Couch.new(:db => "couch_test_expiration", :skip_expires => true)
10
- @cache.clear
11
- @expiration.clear
12
- end
13
-
14
- after(:all) do
15
- @cache.delete_store
16
- @expiration.delete_store
17
- end
18
-
19
- it_should_behave_like "a read/write Moneta cache"
20
- end
21
- rescue SystemExit
22
- end
@@ -1,79 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/datamapper"
5
-
6
- describe "Moneta::DataMapper" do
7
-
8
- describe "default repository" do
9
- before(:each) do
10
- @cache = Moneta::DataMapper.new(:setup => "sqlite3::memory:")
11
- @cache.clear
12
- end
13
-
14
- after(:all) do
15
- repository(:moneta) { MonetaHash.auto_migrate! }
16
- end
17
-
18
- it_should_behave_like "a read/write Moneta cache"
19
- end
20
-
21
- describe "when :repository specified" do
22
- before(:each) do
23
- @cache = Moneta::DataMapper.new(:repository => :sample, :setup => "sqlite3::memory:")
24
- @cache.clear
25
- end
26
-
27
- after(:all) do
28
- repository(:sample) { MonetaHash.auto_migrate! }
29
- end
30
-
31
- it_should_behave_like "a read/write Moneta cache"
32
- end
33
-
34
- describe "with multple stores" do
35
- before(:each) do
36
- @default_cache = Moneta::DataMapper.new(:setup => "sqlite3:moneta.db")
37
- @default_cache.clear
38
-
39
- @sample_cache = Moneta::DataMapper.new(:repository => :sample, :setup => "sqlite3:sample.db")
40
- @sample_cache.clear
41
- end
42
-
43
- after(:all) do
44
- File.delete('moneta.db')
45
- File.delete('sample.db')
46
- end
47
-
48
- # TODO should there be more tests than these?
49
- it "does not cross contaminate when storing" do
50
- @default_cache["key"] = "value"
51
- @sample_cache["key"] = "value2"
52
-
53
- @default_cache["key"].should == "value"
54
- @sample_cache["key"].should == "value2"
55
- end
56
-
57
- it "does not cross contaminate when deleting" do
58
- @default_cache["key"] = "value"
59
- @sample_cache["key"] = "value2"
60
-
61
- @default_cache.delete("key").should == "value"
62
- @default_cache.key?("key").should be_false
63
- @sample_cache["key"].should == "value2"
64
- end
65
-
66
- it "does not cross contaminate when expiring" do
67
- @default_cache.store("key", "value", :expires_in => 2)
68
- @sample_cache["key"] = "value2"
69
-
70
- time = Time.now
71
- Time.stub!(:now).and_return { time + 2 }
72
-
73
- @default_cache["key"].should == nil
74
- @sample_cache["key"].should == "value2"
75
- end
76
- end
77
- end
78
- rescue SystemExit
79
- end
@@ -1,21 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/file"
5
-
6
- describe "Moneta::File" do
7
- before(:each) do
8
- @cache = Moneta::File.new(:path => File.join(File.dirname(__FILE__), "file_cache"))
9
- @cache.clear
10
- end
11
-
12
- after(:all) do
13
- FileUtils.rm_rf(File.join(File.dirname(__FILE__), "file_cache"))
14
- end
15
-
16
- if ENV['MONETA_TEST'].nil? || ENV['MONETA_TEST'] == 'file'
17
- it_should_behave_like "a read/write Moneta cache"
18
- end
19
- end
20
- rescue SystemExit
21
- end
@@ -1,24 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/lmc"
5
- require "fileutils"
6
-
7
- # Problem: If there are multiple caches around, they start
8
- # to block (with a system semaphore), which can be unpleasant
9
- # so just use one cache for the entire test run.
10
- $lmc_cache = Moneta::LMC.new(:filename => "test")
11
-
12
- describe "Moneta::LMC" do
13
- before(:all) do
14
- @cache = $lmc_cache
15
- end
16
-
17
- after(:each) do
18
- @cache.clear
19
- end
20
-
21
- it_should_behave_like "a read/write Moneta cache"
22
- end
23
- rescue SystemExit
24
- end
@@ -1,16 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/memcache"
5
-
6
- describe "Moneta::Memcache" do
7
- before(:each) do
8
- @native_expires = true
9
- @cache = Moneta::Memcache.new(:server => "localhost:11211", :namespace => "moneta_spec")
10
- @cache.clear
11
- end
12
-
13
- it_should_behave_like "a read/write Moneta cache"
14
- end
15
- rescue SystemExit
16
- end
@@ -1,12 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- require "moneta/memory"
4
-
5
- describe "Moneta::Memory" do
6
- before(:each) do
7
- @cache = Moneta::Memory.new
8
- @cache.clear
9
- end
10
-
11
- it_should_behave_like "a read/write Moneta cache"
12
- end
@@ -1,16 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/mongodb"
5
-
6
- describe "Moneta::MongoDB" do
7
- before(:each) do
8
- @native_expires = true
9
- @cache = Moneta::MongoDB.new
10
- @cache.clear
11
- end
12
-
13
- it_should_behave_like "a read/write Moneta cache"
14
- end
15
- rescue SystemExit
16
- end
@@ -1,16 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/redis"
5
-
6
- describe "Moneta::Redis" do
7
- before(:each) do
8
- @native_expires = true
9
- @cache = Moneta::Redis.new
10
- @cache.clear
11
- end
12
-
13
- it_should_behave_like "a read/write Moneta cache"
14
- end
15
- rescue SystemExit
16
- end
@@ -1,15 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/rufus"
5
-
6
- describe "Moneta::Rufus" do
7
- before(:each) do
8
- @cache = Moneta::Rufus.new(:file => "cache")
9
- @cache.clear
10
- end
11
-
12
- it_should_behave_like "a read/write Moneta cache"
13
- end
14
- rescue SystemExit
15
- end
@@ -1,19 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require 'moneta/s3'
5
-
6
- describe "Moneta::S3" do
7
- before(:each) do
8
- @cache = Moneta::S3.new(
9
- :access_key_id => ENV['AWS_ACCESS_KEY_ID'],
10
- :secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'],
11
- :bucket => 'moneta_test'
12
- )
13
- @cache.clear
14
- end
15
-
16
- it_should_behave_like "a read/write Moneta cache"
17
- end
18
- rescue SystemExit
19
- end
@@ -1,21 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/sdbm"
5
-
6
- describe "Moneta::SDBM" do
7
- before(:each) do
8
- @cache = Moneta::SDBM.new(:file => File.join(File.dirname(__FILE__), "sdbm_cache"))
9
- @cache.clear
10
- end
11
-
12
- after(:all) do
13
- FileUtils.rm_rf(Dir.glob(File.join(File.dirname(__FILE__), "sdbm_cache*")))
14
- end
15
-
16
- if ENV['MONETA_TEST'].nil? || ENV['MONETA_TEST'] == 'sdbm'
17
- it_should_behave_like "a read/write Moneta cache"
18
- end
19
- end
20
- rescue SystemExit
21
- end
@@ -1,15 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/tyrant"
5
-
6
- describe "Moneta::Tyrant" do
7
- before(:each) do
8
- @cache = Moneta::Tyrant.new(:host => "localhost", :port => 1978)
9
- @cache.clear
10
- end
11
-
12
- it_should_behave_like "a read/write Moneta cache"
13
- end
14
- rescue SystemExit
15
- end
@@ -1,21 +0,0 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
2
-
3
- begin
4
- require "moneta/xattr"
5
-
6
- describe "Moneta::Xattrs" do
7
- before(:each) do
8
- @cache = Moneta::Xattr.new(:file => File.join(File.dirname(__FILE__), "file_cache", "xattr_cache"))
9
- @cache.clear
10
- end
11
-
12
- after(:all) do
13
- FileUtils.rm_rf(File.join(File.dirname(__FILE__), "file_cache"))
14
- end
15
-
16
- if ENV['MONETA_TEST'].nil? || ENV['MONETA_TEST'] == 'xattrs'
17
- it_should_behave_like "a read/write Moneta cache"
18
- end
19
- end
20
- rescue SystemExit
21
- end