moneta 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (446) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -0
  3. data/.rspec +4 -0
  4. data/.travis.yml +83 -32
  5. data/.yardopts +6 -1
  6. data/CHANGES +30 -0
  7. data/CONTRIBUTORS +4 -0
  8. data/Gemfile +28 -36
  9. data/LICENSE +1 -1
  10. data/README.md +136 -67
  11. data/SPEC.md +70 -0
  12. data/feature_matrix.yaml +235 -0
  13. data/lib/active_support/cache/moneta_store.rb +102 -6
  14. data/lib/moneta.rb +9 -2
  15. data/lib/moneta/adapters/activerecord.rb +258 -98
  16. data/lib/moneta/adapters/activesupportcache.rb +133 -0
  17. data/lib/moneta/adapters/cassandra.rb +290 -44
  18. data/lib/moneta/adapters/client.rb +11 -2
  19. data/lib/moneta/adapters/couch.rb +179 -25
  20. data/lib/moneta/adapters/datamapper.rb +1 -0
  21. data/lib/moneta/adapters/daybreak.rb +21 -4
  22. data/lib/moneta/adapters/dbm.rb +7 -7
  23. data/lib/moneta/adapters/file.rb +11 -1
  24. data/lib/moneta/adapters/gdbm.rb +7 -7
  25. data/lib/moneta/adapters/kyotocabinet.rb +66 -1
  26. data/lib/moneta/adapters/leveldb.rb +27 -1
  27. data/lib/moneta/adapters/lmdb.rb +29 -1
  28. data/lib/moneta/adapters/lruhash.rb +30 -0
  29. data/lib/moneta/adapters/memcached/dalli.rb +50 -5
  30. data/lib/moneta/adapters/memcached/native.rb +11 -4
  31. data/lib/moneta/adapters/memory.rb +2 -0
  32. data/lib/moneta/adapters/mongo/base.rb +32 -7
  33. data/lib/moneta/adapters/mongo/moped.rb +59 -2
  34. data/lib/moneta/adapters/mongo/official.rb +40 -0
  35. data/lib/moneta/adapters/pstore.rb +56 -8
  36. data/lib/moneta/adapters/redis.rb +79 -19
  37. data/lib/moneta/adapters/sdbm.rb +7 -7
  38. data/lib/moneta/adapters/sequel.rb +440 -39
  39. data/lib/moneta/adapters/sqlite.rb +74 -10
  40. data/lib/moneta/adapters/tdb.rb +16 -1
  41. data/lib/moneta/adapters/tokyocabinet.rb +7 -1
  42. data/lib/moneta/adapters/tokyotyrant.rb +22 -0
  43. data/lib/moneta/cache.rb +11 -1
  44. data/lib/moneta/expires.rb +110 -8
  45. data/lib/moneta/lock.rb +21 -2
  46. data/lib/moneta/mixins.rb +279 -3
  47. data/lib/moneta/pool.rb +15 -6
  48. data/lib/moneta/proxy.rb +46 -2
  49. data/lib/moneta/server.rb +5 -1
  50. data/lib/moneta/shared.rb +27 -11
  51. data/lib/moneta/stack.rb +1 -1
  52. data/lib/moneta/synchronize.rb +2 -8
  53. data/lib/moneta/transformer.rb +152 -2
  54. data/lib/moneta/transformer/config.rb +2 -0
  55. data/lib/moneta/transformer/helper.rb +2 -2
  56. data/lib/moneta/version.rb +1 -1
  57. data/lib/moneta/weak_each_key.rb +74 -0
  58. data/lib/moneta/wrapper.rb +25 -0
  59. data/moneta.gemspec +2 -2
  60. data/script/benchmarks +174 -62
  61. data/script/parallel-tests +58 -83
  62. data/script/start-hbase +46 -0
  63. data/script/start-services +9 -2
  64. data/script/update-feature-matrix +148 -0
  65. data/spec/active_support/cache_moneta_store_spec.rb +132 -109
  66. data/spec/features/concurrent_create.rb +21 -0
  67. data/spec/features/concurrent_increment.rb +32 -0
  68. data/spec/features/create.rb +25 -0
  69. data/spec/features/create_expires.rb +19 -0
  70. data/spec/features/default_expires.rb +15 -0
  71. data/spec/features/each_key.rb +119 -0
  72. data/spec/features/expires.rb +291 -0
  73. data/spec/features/features.rb +16 -0
  74. data/spec/features/increment.rb +98 -0
  75. data/spec/features/marshallable_key.rb +43 -0
  76. data/spec/features/marshallable_value.rb +7 -0
  77. data/spec/features/multiprocess.rb +8 -0
  78. data/spec/features/not_create.rb +7 -0
  79. data/spec/features/not_each_key.rb +7 -0
  80. data/spec/features/not_increment.rb +13 -0
  81. data/spec/features/not_persist.rb +9 -0
  82. data/spec/features/null.rb +66 -0
  83. data/spec/features/persist.rb +14 -0
  84. data/spec/features/returndifferent.rb +9 -0
  85. data/spec/features/returnsame.rb +9 -0
  86. data/spec/features/store.rb +261 -0
  87. data/spec/features/store_large.rb +13 -0
  88. data/spec/features/transform_value.rb +44 -0
  89. data/spec/features/transform_value_expires.rb +41 -0
  90. data/spec/helper.rb +391 -74
  91. data/spec/moneta/adapters/activerecord/adapter_activerecord_existing_connection_spec.rb +59 -0
  92. data/spec/moneta/adapters/activerecord/adapter_activerecord_spec.rb +118 -0
  93. data/spec/moneta/adapters/activerecord/standard_activerecord_spec.rb +18 -0
  94. data/spec/moneta/adapters/activerecord/standard_activerecord_with_expires_spec.rb +24 -0
  95. data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_spec.rb +51 -0
  96. data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_with_default_expires_spec.rb +51 -0
  97. data/spec/moneta/adapters/cassandra/adapter_cassandra_spec.rb +17 -0
  98. data/spec/moneta/adapters/cassandra/adapter_cassandra_with_default_expires_spec.rb +18 -0
  99. data/spec/moneta/adapters/cassandra/helper.rb +18 -0
  100. data/spec/moneta/adapters/cassandra/standard_cassandra_spec.rb +18 -0
  101. data/spec/moneta/adapters/client/adapter_client_spec.rb +11 -0
  102. data/spec/moneta/adapters/client/standard_client_tcp_spec.rb +23 -0
  103. data/spec/moneta/adapters/client/standard_client_unix_spec.rb +12 -0
  104. data/spec/moneta/adapters/cookie/adapter_cookie_spec.rb +7 -0
  105. data/spec/moneta/adapters/couch/adapter_couch_spec.rb +7 -0
  106. data/spec/moneta/adapters/couch/standard_couch_spec.rb +9 -0
  107. data/spec/moneta/adapters/couch/standard_couch_with_expires_spec.rb +13 -0
  108. data/spec/moneta/adapters/datamapper/adapter_datamapper_spec.rb +43 -0
  109. data/spec/moneta/adapters/datamapper/standard_datamapper_spec.rb +21 -0
  110. data/spec/moneta/adapters/datamapper/standard_datamapper_with_expires_spec.rb +26 -0
  111. data/spec/moneta/adapters/datamapper/standard_datamapper_with_repository_spec.rb +22 -0
  112. data/spec/moneta/adapters/daybreak/adapter_daybreak_spec.rb +7 -0
  113. data/spec/moneta/adapters/daybreak/standard_daybreak_spec.rb +7 -0
  114. data/spec/moneta/adapters/daybreak/standard_daybreak_with_expires_spec.rb +11 -0
  115. data/spec/moneta/adapters/dbm/adapter_dbm_spec.rb +7 -0
  116. data/spec/moneta/adapters/dbm/standard_dbm_spec.rb +7 -0
  117. data/spec/moneta/adapters/dbm/standard_dbm_with_expires_spec.rb +12 -0
  118. data/spec/moneta/adapters/file/adapter_file_spec.rb +7 -0
  119. data/spec/moneta/adapters/file/standard_file_spec.rb +7 -0
  120. data/spec/moneta/adapters/file/standard_file_with_expires_spec.rb +11 -0
  121. data/spec/moneta/adapters/fog/adapter_fog_spec.rb +16 -0
  122. data/spec/moneta/adapters/fog/standard_fog_spec.rb +15 -0
  123. data/spec/moneta/adapters/fog/standard_fog_with_expires_spec.rb +20 -0
  124. data/spec/moneta/adapters/gdbm/adapter_gdbm_spec.rb +7 -0
  125. data/spec/moneta/adapters/gdbm/standard_gdbm_spec.rb +7 -0
  126. data/spec/moneta/adapters/gdbm/standard_gdbm_with_expires_spec.rb +11 -0
  127. data/spec/moneta/adapters/hashfile/standard_hashfile_spec.rb +7 -0
  128. data/spec/moneta/adapters/hashfile/standard_hashfile_with_expires_spec.rb +12 -0
  129. data/spec/moneta/adapters/hbase/adapter_hbase_spec.rb +7 -0
  130. data/spec/moneta/adapters/hbase/standard_hbase_spec.rb +4 -0
  131. data/spec/moneta/adapters/hbase/standard_hbase_with_expires_spec.rb +8 -0
  132. data/spec/moneta/adapters/kyotocabinet/adapter_kyotocabinet_spec.rb +7 -0
  133. data/spec/moneta/adapters/kyotocabinet/standard_kyotocabinet_spec.rb +7 -0
  134. data/spec/moneta/adapters/kyotocabinet/standard_kyotocabinet_with_expires_spec.rb +14 -0
  135. data/spec/moneta/adapters/leveldb/adapter_leveldb_spec.rb +7 -0
  136. data/spec/moneta/adapters/leveldb/standard_leveldb_spec.rb +7 -0
  137. data/spec/moneta/adapters/leveldb/standard_leveldb_with_expires_spec.rb +11 -0
  138. data/spec/moneta/adapters/lmdb/adapter_lmdb_spec.rb +7 -0
  139. data/spec/moneta/adapters/lmdb/adapter_lmdb_with_db_spec.rb +7 -0
  140. data/spec/moneta/adapters/lmdb/standard_lmdb_spec.rb +7 -0
  141. data/spec/moneta/adapters/lmdb/standard_lmdb_with_expires_spec.rb +11 -0
  142. data/spec/moneta/adapters/localmemcache/adapter_localmemcache_spec.rb +7 -0
  143. data/spec/moneta/adapters/localmemcache/standard_localmemcache_spec.rb +7 -0
  144. data/spec/moneta/adapters/localmemcache/standard_localmemcache_with_expires_spec.rb +11 -0
  145. data/spec/moneta/{adapter_lruhash_spec.rb → adapters/lruhash/adapter_lruhash_spec.rb} +3 -25
  146. data/spec/moneta/adapters/lruhash/standard_lruhash_spec.rb +4 -0
  147. data/spec/moneta/adapters/lruhash/standard_lruhash_with_expires_spec.rb +8 -0
  148. data/spec/moneta/adapters/memcached/adapter_memcached_spec.rb +13 -0
  149. data/spec/moneta/adapters/memcached/dalli/adapter_memcached_dalli_spec.rb +15 -0
  150. data/spec/moneta/adapters/memcached/dalli/adapter_memcached_dalli_with_default_expires_spec.rb +15 -0
  151. data/spec/moneta/adapters/memcached/dalli/standard_memcached_dalli_spec.rb +11 -0
  152. data/spec/moneta/adapters/memcached/helper.rb +20 -0
  153. data/spec/moneta/adapters/memcached/native/adapter_memcached_native_spec.rb +15 -0
  154. data/spec/moneta/adapters/memcached/native/adapter_memcached_native_with_default_expires_spec.rb +15 -0
  155. data/spec/moneta/adapters/memcached/native/standard_memcached_native_spec.rb +11 -0
  156. data/spec/moneta/adapters/memcached/standard_memcached_spec.rb +17 -0
  157. data/spec/moneta/adapters/memory/adapter_memory_spec.rb +7 -0
  158. data/spec/moneta/adapters/memory/standard_memory_spec.rb +4 -0
  159. data/spec/moneta/adapters/memory/standard_memory_with_compress_spec.rb +9 -0
  160. data/spec/moneta/adapters/memory/standard_memory_with_expires_spec.rb +8 -0
  161. data/spec/moneta/adapters/memory/standard_memory_with_json_key_serializer_spec.rb +4 -0
  162. data/spec/moneta/adapters/memory/standard_memory_with_json_serializer_spec.rb +9 -0
  163. data/spec/moneta/adapters/memory/standard_memory_with_json_value_serializer_spec.rb +9 -0
  164. data/spec/moneta/adapters/memory/standard_memory_with_prefix_spec.rb +4 -0
  165. data/spec/moneta/adapters/memory/standard_memory_with_snappy_compress_spec.rb +9 -0
  166. data/spec/moneta/adapters/mongo/adapter_mongo_moped_spec.rb +25 -0
  167. data/spec/moneta/adapters/mongo/adapter_mongo_moped_with_default_expires_spec.rb +12 -0
  168. data/spec/moneta/adapters/mongo/adapter_mongo_official_spec.rb +25 -0
  169. data/spec/moneta/adapters/mongo/adapter_mongo_official_with_default_expires_spec.rb +12 -0
  170. data/spec/moneta/adapters/mongo/adapter_mongo_spec.rb +11 -0
  171. data/spec/moneta/adapters/mongo/adapter_mongo_with_default_expires_spec.rb +12 -0
  172. data/spec/moneta/adapters/mongo/standard_mongo_moped_spec.rb +7 -0
  173. data/spec/moneta/adapters/mongo/standard_mongo_official_spec.rb +7 -0
  174. data/spec/moneta/adapters/mongo/standard_mongo_spec.rb +7 -0
  175. data/spec/moneta/adapters/null/null_adapter_spec.rb +7 -0
  176. data/spec/moneta/adapters/null/standard_null_spec.rb +4 -0
  177. data/spec/moneta/adapters/pstore/adapter_pstore_spec.rb +7 -0
  178. data/spec/moneta/adapters/pstore/standard_pstore_spec.rb +9 -0
  179. data/spec/moneta/adapters/pstore/standard_pstore_with_expires_spec.rb +13 -0
  180. data/spec/moneta/adapters/redis/adapter_redis_spec.rb +10 -0
  181. data/spec/moneta/adapters/redis/adapter_redis_with_default_expires_spec.rb +10 -0
  182. data/spec/moneta/adapters/redis/standard_redis_spec.rb +7 -0
  183. data/spec/moneta/adapters/restclient/adapter_restclient_spec.rb +11 -0
  184. data/spec/moneta/adapters/restclient/standard_restclient_spec.rb +10 -0
  185. data/spec/moneta/adapters/riak/adapter_riak_spec.rb +14 -0
  186. data/spec/moneta/adapters/riak/standard_riak_spec.rb +10 -0
  187. data/spec/moneta/adapters/riak/standard_riak_with_expires_spec.rb +10 -0
  188. data/spec/moneta/adapters/sdbm/adapter_sdbm_spec.rb +7 -0
  189. data/spec/moneta/adapters/sdbm/standard_sdbm_spec.rb +7 -0
  190. data/spec/moneta/adapters/sdbm/standard_sdbm_with_expires_spec.rb +11 -0
  191. data/spec/moneta/adapters/sequel/adapter_sequel_spec.rb +181 -0
  192. data/spec/moneta/adapters/sequel/standard_sequel_spec.rb +14 -0
  193. data/spec/moneta/adapters/sequel/standard_sequel_with_expires_spec.rb +19 -0
  194. data/spec/moneta/adapters/sqlite/adapter_sqlite_spec.rb +7 -0
  195. data/spec/moneta/adapters/sqlite/standard_sqlite_spec.rb +7 -0
  196. data/spec/moneta/adapters/sqlite/standard_sqlite_with_expires_spec.rb +15 -0
  197. data/spec/moneta/adapters/tdb/adapter_tdb_spec.rb +7 -0
  198. data/spec/moneta/adapters/tdb/standard_tdb_spec.rb +7 -0
  199. data/spec/moneta/adapters/tdb/standard_tdb_with_expires_spec.rb +11 -0
  200. data/spec/moneta/adapters/tokyocabinet/adapter_tokyocabinet_bdb_spec.rb +7 -0
  201. data/spec/moneta/adapters/tokyocabinet/adapter_tokyocabinet_hdb_spec.rb +7 -0
  202. data/spec/moneta/adapters/tokyocabinet/standard_tokyocabinet_spec.rb +7 -0
  203. data/spec/moneta/adapters/tokyocabinet/standard_tokyocabinet_with_expires_spec.rb +11 -0
  204. data/spec/moneta/adapters/tokyotyrant/adapter_tokyotyrant_spec.rb +7 -0
  205. data/spec/moneta/adapters/tokyotyrant/standard_tokyotyrant_spec.rb +4 -0
  206. data/spec/moneta/adapters/tokyotyrant/standard_tokyotyrant_with_expires_spec.rb +8 -0
  207. data/spec/moneta/adapters/yaml/adapter_yaml_spec.rb +7 -0
  208. data/spec/moneta/adapters/yaml/standard_yaml_spec.rb +9 -0
  209. data/spec/moneta/adapters/yaml/standard_yaml_with_expires_spec.rb +13 -0
  210. data/spec/moneta/builder_spec.rb +0 -1
  211. data/spec/moneta/mutex_spec.rb +6 -23
  212. data/spec/moneta/proxies/cache/cache_file_memory_spec.rb +24 -0
  213. data/spec/moneta/proxies/cache/cache_memory_null_spec.rb +12 -0
  214. data/spec/moneta/proxies/expires/expires_file_spec.rb +28 -0
  215. data/spec/moneta/proxies/expires/expires_memory_spec.rb +15 -0
  216. data/spec/moneta/proxies/expires/expires_memory_with_default_expires_spec.rb +16 -0
  217. data/spec/moneta/proxies/lock/lock_spec.rb +10 -0
  218. data/spec/moneta/{optionmerger_spec.rb → proxies/optionmerger/optionmerger_spec.rb} +2 -18
  219. data/spec/moneta/proxies/pool/pool_spec.rb +12 -0
  220. data/spec/moneta/proxies/proxy/proxy_expires_memory_spec.rb +16 -0
  221. data/spec/moneta/proxies/proxy/proxy_redis_spec.rb +13 -0
  222. data/spec/moneta/proxies/shared/shared_tcp_spec.rb +49 -0
  223. data/spec/moneta/proxies/shared/shared_unix_spec.rb +48 -0
  224. data/spec/moneta/proxies/transformer/transformer_bencode_spec.rb +19 -0
  225. data/spec/moneta/proxies/transformer/transformer_bert_spec.rb +19 -0
  226. data/spec/moneta/proxies/transformer/transformer_bson_spec.rb +23 -0
  227. data/spec/moneta/proxies/transformer/transformer_bzip2_spec.rb +19 -0
  228. data/spec/moneta/proxies/transformer/transformer_json_spec.rb +19 -0
  229. data/spec/moneta/proxies/transformer/transformer_key_inspect_spec.rb +17 -0
  230. data/spec/moneta/proxies/transformer/transformer_key_marshal_spec.rb +17 -0
  231. data/spec/moneta/proxies/transformer/transformer_key_to_s_spec.rb +17 -0
  232. data/spec/moneta/proxies/transformer/transformer_key_yaml_spec.rb +17 -0
  233. data/spec/moneta/proxies/transformer/transformer_lz4_spec.rb +19 -0
  234. data/spec/moneta/proxies/transformer/transformer_lzma_spec.rb +19 -0
  235. data/spec/moneta/proxies/transformer/transformer_lzo_spec.rb +19 -0
  236. data/spec/moneta/proxies/transformer/transformer_marshal_base64_spec.rb +20 -0
  237. data/spec/moneta/proxies/transformer/transformer_marshal_city128_spec.rb +15 -0
  238. data/spec/moneta/proxies/transformer/transformer_marshal_city32_spec.rb +15 -0
  239. data/spec/moneta/proxies/transformer/transformer_marshal_city64_spec.rb +15 -0
  240. data/spec/moneta/proxies/transformer/transformer_marshal_escape_spec.rb +15 -0
  241. data/spec/moneta/proxies/transformer/transformer_marshal_hex_spec.rb +20 -0
  242. data/spec/moneta/proxies/transformer/transformer_marshal_hmac_spec.rb +19 -0
  243. data/spec/moneta/proxies/transformer/transformer_marshal_md5_spec.rb +15 -0
  244. data/spec/moneta/proxies/transformer/transformer_marshal_md5_spread_spec.rb +15 -0
  245. data/spec/moneta/proxies/transformer/transformer_marshal_prefix_spec.rb +15 -0
  246. data/spec/moneta/proxies/transformer/transformer_marshal_qp_spec.rb +20 -0
  247. data/spec/moneta/proxies/transformer/transformer_marshal_rmd160_spec.rb +15 -0
  248. data/spec/moneta/proxies/transformer/transformer_marshal_sha1_spec.rb +15 -0
  249. data/spec/moneta/proxies/transformer/transformer_marshal_sha256_spec.rb +15 -0
  250. data/spec/moneta/proxies/transformer/transformer_marshal_sha384_spec.rb +15 -0
  251. data/spec/moneta/proxies/transformer/transformer_marshal_sha512_spec.rb +15 -0
  252. data/spec/moneta/proxies/transformer/transformer_marshal_spec.rb +19 -0
  253. data/spec/moneta/proxies/transformer/transformer_marshal_truncate_spec.rb +15 -0
  254. data/spec/moneta/proxies/transformer/transformer_marshal_urlsafe_base64_spec.rb +20 -0
  255. data/spec/moneta/proxies/transformer/transformer_marshal_uuencode_spec.rb +19 -0
  256. data/spec/moneta/proxies/transformer/transformer_msgpack_spec.rb +19 -0
  257. data/spec/moneta/proxies/transformer/transformer_ox_spec.rb +19 -0
  258. data/spec/moneta/proxies/transformer/transformer_php_spec.rb +19 -0
  259. data/spec/moneta/proxies/transformer/transformer_quicklz_spec.rb +19 -0
  260. data/spec/moneta/proxies/transformer/transformer_snappy_spec.rb +19 -0
  261. data/spec/moneta/proxies/transformer/transformer_tnet_spec.rb +19 -0
  262. data/spec/moneta/proxies/transformer/transformer_value_marshal_spec.rb +19 -0
  263. data/spec/moneta/proxies/transformer/transformer_value_yaml_spec.rb +19 -0
  264. data/spec/moneta/proxies/transformer/transformer_yaml_spec.rb +19 -0
  265. data/spec/moneta/proxies/transformer/transformer_zlib_spec.rb +19 -0
  266. data/spec/moneta/proxies/weak_create/weak_create_spec.rb +21 -0
  267. data/spec/moneta/proxies/weak_each_key/weak_each_key_spec.rb +24 -0
  268. data/spec/moneta/proxies/weak_increment/weak_increment_spec.rb +21 -0
  269. data/spec/moneta/semaphore_spec.rb +6 -23
  270. data/spec/moneta/stack_file_memory_spec.rb +5 -29
  271. data/spec/moneta/stack_memory_file_spec.rb +5 -31
  272. data/spec/quality_spec.rb +1 -1
  273. data/{spec → test}/action_dispatch/fixtures/session_autoload_test/foo.rb +0 -0
  274. data/{spec/action_dispatch/session_moneta_store_spec.rb → test/action_dispatch/session_moneta_store_test.rb} +13 -5
  275. metadata +415 -355
  276. data/script/generate-specs +0 -2696
  277. data/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb +0 -36
  278. data/spec/moneta/adapter_activerecord_spec.rb +0 -65
  279. data/spec/moneta/adapter_cassandra_spec.rb +0 -33
  280. data/spec/moneta/adapter_cassandra_with_default_expires_spec.rb +0 -34
  281. data/spec/moneta/adapter_client_spec.rb +0 -35
  282. data/spec/moneta/adapter_cookie_spec.rb +0 -30
  283. data/spec/moneta/adapter_couch_spec.rb +0 -36
  284. data/spec/moneta/adapter_datamapper_spec.rb +0 -64
  285. data/spec/moneta/adapter_daybreak_spec.rb +0 -31
  286. data/spec/moneta/adapter_dbm_spec.rb +0 -31
  287. data/spec/moneta/adapter_file_spec.rb +0 -34
  288. data/spec/moneta/adapter_fog_spec.rb +0 -37
  289. data/spec/moneta/adapter_gdbm_spec.rb +0 -31
  290. data/spec/moneta/adapter_hbase_spec.rb +0 -33
  291. data/spec/moneta/adapter_kyotocabinet_spec.rb +0 -31
  292. data/spec/moneta/adapter_leveldb_spec.rb +0 -31
  293. data/spec/moneta/adapter_lmdb_spec.rb +0 -32
  294. data/spec/moneta/adapter_lmdb_with_db_spec.rb +0 -32
  295. data/spec/moneta/adapter_localmemcache_spec.rb +0 -32
  296. data/spec/moneta/adapter_memcached_dalli_spec.rb +0 -36
  297. data/spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb +0 -37
  298. data/spec/moneta/adapter_memcached_native_spec.rb +0 -36
  299. data/spec/moneta/adapter_memcached_native_with_default_expires_spec.rb +0 -37
  300. data/spec/moneta/adapter_memcached_spec.rb +0 -36
  301. data/spec/moneta/adapter_memcached_with_default_expires_spec.rb +0 -37
  302. data/spec/moneta/adapter_memory_spec.rb +0 -184
  303. data/spec/moneta/adapter_mongo_moped_spec.rb +0 -64
  304. data/spec/moneta/adapter_mongo_moped_with_default_expires_spec.rb +0 -53
  305. data/spec/moneta/adapter_mongo_official_spec.rb +0 -64
  306. data/spec/moneta/adapter_mongo_official_with_default_expires_spec.rb +0 -53
  307. data/spec/moneta/adapter_mongo_spec.rb +0 -51
  308. data/spec/moneta/adapter_mongo_with_default_expires_spec.rb +0 -53
  309. data/spec/moneta/adapter_pstore_spec.rb +0 -250
  310. data/spec/moneta/adapter_redis_spec.rb +0 -36
  311. data/spec/moneta/adapter_redis_with_default_expires_spec.rb +0 -37
  312. data/spec/moneta/adapter_restclient_spec.rb +0 -33
  313. data/spec/moneta/adapter_riak_spec.rb +0 -36
  314. data/spec/moneta/adapter_sdbm_spec.rb +0 -30
  315. data/spec/moneta/adapter_sequel_spec.rb +0 -34
  316. data/spec/moneta/adapter_sqlite_spec.rb +0 -32
  317. data/spec/moneta/adapter_tdb_spec.rb +0 -31
  318. data/spec/moneta/adapter_tokyocabinet_bdb_spec.rb +0 -31
  319. data/spec/moneta/adapter_tokyocabinet_hdb_spec.rb +0 -31
  320. data/spec/moneta/adapter_tokyotyrant_spec.rb +0 -34
  321. data/spec/moneta/adapter_yaml_spec.rb +0 -57
  322. data/spec/moneta/cache_file_memory_spec.rb +0 -50
  323. data/spec/moneta/cache_memory_null_spec.rb +0 -35
  324. data/spec/moneta/expires_file_spec.rb +0 -78
  325. data/spec/moneta/expires_memory_spec.rb +0 -189
  326. data/spec/moneta/expires_memory_with_default_expires_spec.rb +0 -190
  327. data/spec/moneta/lock_spec.rb +0 -187
  328. data/spec/moneta/null_adapter_spec.rb +0 -86
  329. data/spec/moneta/pool_spec.rb +0 -38
  330. data/spec/moneta/proxy_expires_memory_spec.rb +0 -191
  331. data/spec/moneta/proxy_redis_spec.rb +0 -40
  332. data/spec/moneta/shared_tcp_spec.rb +0 -46
  333. data/spec/moneta/shared_unix_spec.rb +0 -46
  334. data/spec/moneta/standard_activerecord_spec.rb +0 -253
  335. data/spec/moneta/standard_activerecord_with_expires_spec.rb +0 -255
  336. data/spec/moneta/standard_cassandra_spec.rb +0 -252
  337. data/spec/moneta/standard_client_tcp_spec.rb +0 -269
  338. data/spec/moneta/standard_client_unix_spec.rb +0 -254
  339. data/spec/moneta/standard_couch_spec.rb +0 -252
  340. data/spec/moneta/standard_couch_with_expires_spec.rb +0 -254
  341. data/spec/moneta/standard_datamapper_spec.rb +0 -254
  342. data/spec/moneta/standard_datamapper_with_expires_spec.rb +0 -256
  343. data/spec/moneta/standard_datamapper_with_repository_spec.rb +0 -254
  344. data/spec/moneta/standard_daybreak_spec.rb +0 -250
  345. data/spec/moneta/standard_daybreak_with_expires_spec.rb +0 -252
  346. data/spec/moneta/standard_dbm_spec.rb +0 -250
  347. data/spec/moneta/standard_dbm_with_expires_spec.rb +0 -252
  348. data/spec/moneta/standard_file_spec.rb +0 -253
  349. data/spec/moneta/standard_file_with_expires_spec.rb +0 -255
  350. data/spec/moneta/standard_fog_spec.rb +0 -256
  351. data/spec/moneta/standard_fog_with_expires_spec.rb +0 -258
  352. data/spec/moneta/standard_gdbm_spec.rb +0 -250
  353. data/spec/moneta/standard_gdbm_with_expires_spec.rb +0 -252
  354. data/spec/moneta/standard_hashfile_spec.rb +0 -253
  355. data/spec/moneta/standard_hashfile_with_expires_spec.rb +0 -255
  356. data/spec/moneta/standard_hbase_spec.rb +0 -252
  357. data/spec/moneta/standard_hbase_with_expires_spec.rb +0 -255
  358. data/spec/moneta/standard_kyotocabinet_spec.rb +0 -250
  359. data/spec/moneta/standard_kyotocabinet_with_expires_spec.rb +0 -252
  360. data/spec/moneta/standard_leveldb_spec.rb +0 -250
  361. data/spec/moneta/standard_leveldb_with_expires_spec.rb +0 -252
  362. data/spec/moneta/standard_lmdb_spec.rb +0 -251
  363. data/spec/moneta/standard_lmdb_with_expires_spec.rb +0 -253
  364. data/spec/moneta/standard_localmemcache_spec.rb +0 -251
  365. data/spec/moneta/standard_localmemcache_with_expires_spec.rb +0 -252
  366. data/spec/moneta/standard_lruhash_spec.rb +0 -187
  367. data/spec/moneta/standard_lruhash_with_expires_spec.rb +0 -189
  368. data/spec/moneta/standard_memcached_dalli_spec.rb +0 -255
  369. data/spec/moneta/standard_memcached_native_spec.rb +0 -255
  370. data/spec/moneta/standard_memcached_spec.rb +0 -255
  371. data/spec/moneta/standard_memory_spec.rb +0 -187
  372. data/spec/moneta/standard_memory_with_compress_spec.rb +0 -187
  373. data/spec/moneta/standard_memory_with_expires_spec.rb +0 -189
  374. data/spec/moneta/standard_memory_with_json_key_serializer_spec.rb +0 -86
  375. data/spec/moneta/standard_memory_with_json_serializer_spec.rb +0 -49
  376. data/spec/moneta/standard_memory_with_json_value_serializer_spec.rb +0 -90
  377. data/spec/moneta/standard_memory_with_prefix_spec.rb +0 -187
  378. data/spec/moneta/standard_memory_with_snappy_compress_spec.rb +0 -187
  379. data/spec/moneta/standard_mongo_moped_spec.rb +0 -255
  380. data/spec/moneta/standard_mongo_official_spec.rb +0 -255
  381. data/spec/moneta/standard_mongo_spec.rb +0 -255
  382. data/spec/moneta/standard_null_spec.rb +0 -120
  383. data/spec/moneta/standard_pstore_spec.rb +0 -253
  384. data/spec/moneta/standard_pstore_with_expires_spec.rb +0 -255
  385. data/spec/moneta/standard_redis_spec.rb +0 -255
  386. data/spec/moneta/standard_restclient_spec.rb +0 -252
  387. data/spec/moneta/standard_riak_spec.rb +0 -255
  388. data/spec/moneta/standard_riak_with_expires_spec.rb +0 -256
  389. data/spec/moneta/standard_sdbm_spec.rb +0 -249
  390. data/spec/moneta/standard_sdbm_with_expires_spec.rb +0 -251
  391. data/spec/moneta/standard_sequel_spec.rb +0 -253
  392. data/spec/moneta/standard_sequel_with_expires_spec.rb +0 -255
  393. data/spec/moneta/standard_sqlite_spec.rb +0 -251
  394. data/spec/moneta/standard_sqlite_with_expires_spec.rb +0 -253
  395. data/spec/moneta/standard_tdb_spec.rb +0 -250
  396. data/spec/moneta/standard_tdb_with_expires_spec.rb +0 -252
  397. data/spec/moneta/standard_tokyocabinet_spec.rb +0 -250
  398. data/spec/moneta/standard_tokyocabinet_with_expires_spec.rb +0 -252
  399. data/spec/moneta/standard_tokyotyrant_spec.rb +0 -253
  400. data/spec/moneta/standard_tokyotyrant_with_expires_spec.rb +0 -255
  401. data/spec/moneta/standard_yaml_spec.rb +0 -250
  402. data/spec/moneta/standard_yaml_with_expires_spec.rb +0 -252
  403. data/spec/moneta/transformer_bencode_spec.rb +0 -55
  404. data/spec/moneta/transformer_bert_spec.rb +0 -55
  405. data/spec/moneta/transformer_bson_spec.rb +0 -60
  406. data/spec/moneta/transformer_bzip2_spec.rb +0 -55
  407. data/spec/moneta/transformer_json_spec.rb +0 -55
  408. data/spec/moneta/transformer_key_inspect_spec.rb +0 -91
  409. data/spec/moneta/transformer_key_marshal_spec.rb +0 -191
  410. data/spec/moneta/transformer_key_to_s_spec.rb +0 -91
  411. data/spec/moneta/transformer_key_yaml_spec.rb +0 -191
  412. data/spec/moneta/transformer_lz4_spec.rb +0 -55
  413. data/spec/moneta/transformer_lzma_spec.rb +0 -55
  414. data/spec/moneta/transformer_lzo_spec.rb +0 -55
  415. data/spec/moneta/transformer_marshal_base64_spec.rb +0 -194
  416. data/spec/moneta/transformer_marshal_city128_spec.rb +0 -194
  417. data/spec/moneta/transformer_marshal_city32_spec.rb +0 -194
  418. data/spec/moneta/transformer_marshal_city64_spec.rb +0 -194
  419. data/spec/moneta/transformer_marshal_escape_spec.rb +0 -194
  420. data/spec/moneta/transformer_marshal_hex_spec.rb +0 -194
  421. data/spec/moneta/transformer_marshal_hmac_spec.rb +0 -194
  422. data/spec/moneta/transformer_marshal_md5_spec.rb +0 -194
  423. data/spec/moneta/transformer_marshal_md5_spread_spec.rb +0 -194
  424. data/spec/moneta/transformer_marshal_prefix_spec.rb +0 -194
  425. data/spec/moneta/transformer_marshal_qp_spec.rb +0 -194
  426. data/spec/moneta/transformer_marshal_rmd160_spec.rb +0 -194
  427. data/spec/moneta/transformer_marshal_sha1_spec.rb +0 -194
  428. data/spec/moneta/transformer_marshal_sha256_spec.rb +0 -194
  429. data/spec/moneta/transformer_marshal_sha384_spec.rb +0 -194
  430. data/spec/moneta/transformer_marshal_sha512_spec.rb +0 -194
  431. data/spec/moneta/transformer_marshal_spec.rb +0 -191
  432. data/spec/moneta/transformer_marshal_truncate_spec.rb +0 -194
  433. data/spec/moneta/transformer_marshal_uuencode_spec.rb +0 -194
  434. data/spec/moneta/transformer_msgpack_spec.rb +0 -55
  435. data/spec/moneta/transformer_ox_spec.rb +0 -191
  436. data/spec/moneta/transformer_php_spec.rb +0 -55
  437. data/spec/moneta/transformer_quicklz_spec.rb +0 -55
  438. data/spec/moneta/transformer_snappy_spec.rb +0 -55
  439. data/spec/moneta/transformer_tnet_spec.rb +0 -55
  440. data/spec/moneta/transformer_value_marshal_spec.rb +0 -191
  441. data/spec/moneta/transformer_value_yaml_spec.rb +0 -191
  442. data/spec/moneta/transformer_yaml_spec.rb +0 -191
  443. data/spec/moneta/transformer_zlib_spec.rb +0 -55
  444. data/spec/moneta/weak_create_spec.rb +0 -41
  445. data/spec/moneta/weak_increment_spec.rb +0 -41
  446. data/spec/monetaspecs.rb +0 -51267
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0e375eca1c232dfe6bf7732660b158162bd5b887
4
- data.tar.gz: 30219ec6a3496650ea09927d1d6140d377f48730
2
+ SHA256:
3
+ metadata.gz: 238904687ead475c2961fdd367d90c57fd54598e9a802d81df557058fe71019a
4
+ data.tar.gz: 422fc9af8f65e1fe01cf9cde5fa69d5e4c57a9e3121b92b8796fd81f5f8290b7
5
5
  SHA512:
6
- metadata.gz: 39edafb80920ff47c04b215fd74d77f9e49363588bdf988649637d24219e1e164b8887c46289be4455a0fbaf5315fe5b768fd0b56f5a594594ba44f28ff1ece9
7
- data.tar.gz: ba16585476906490eaa5df9be59c24cd5d49cd82eacdc9b6960f59456bc461a603334abce9c70894e9de12af1f55b13d16710137171a47a4588670e72bf0f4f7
6
+ metadata.gz: fc36f41ff84caa03b78c7ecd6c2dd69db87f27c96204c8a25429314b860838d79c4aa3087ce71b6074777448a26c9d21ba3bdfa8d747e9a9d841228ecd3231ed
7
+ data.tar.gz: b1adfbeb3abcfe01867356752a968ded5e188652d55c6bbdc7ef5dca53eb906ff2ff0b82fc32b80a66a8caec75ab38c7dd4968639e600666f4194e239ce547f3
data/.gitignore CHANGED
@@ -10,3 +10,4 @@ script/benchmarks.tmp
10
10
  Gemfile.lock
11
11
  logs
12
12
  secure
13
+ .bundle
data/.rspec ADDED
@@ -0,0 +1,4 @@
1
+ --color
2
+ --require helper
3
+ --tag ~unsupported
4
+ --tag ~broken
@@ -1,10 +1,12 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.0
4
- - 2.0.0
5
- - 1.9.3
6
- - jruby-19mode
7
- - rbx-19mode
3
+ - 2.6
4
+ - 2.5
5
+ - 2.4
6
+ - 2.3
7
+ - 2.2
8
+ - jruby-9.2
9
+ - rbx-3
8
10
  services:
9
11
  - riak
10
12
  - couchdb
@@ -12,43 +14,92 @@ services:
12
14
  - cassandra
13
15
  - memcached
14
16
  - mongodb
17
+ - postgresql
18
+ addons:
19
+ postgresql: '9.6'
15
20
  before_install:
16
- - gem install bundler -v '~> 1.10'
17
- #- script/install-kyotocabinet
18
- - sudo apt-get install -qq libtokyocabinet8 libtokyocabinet-dev liblzo2-dev libtdb-dev libleveldb-dev tokyotyrant
21
+ - sudo apt-get install -qq libtokyocabinet9 libtokyocabinet-dev libkyotocabinet16 libkyotocabinet-dev liblzo2-dev libtdb-dev libleveldb-dev tokyotyrant
19
22
  - script/start-services
20
- cache: bundler
23
+ cache:
24
+ bundler: true
25
+ directories:
26
+ - downloads
21
27
  before_script:
22
28
  - mysql -e 'create database moneta;'
23
- - mysql -e 'create database moneta_activerecord1;'
24
- - mysql -e 'create database moneta_activerecord2;'
29
+ - mysql -e 'create database moneta2;'
30
+ - psql -c 'create database moneta1;' -U postgres
31
+ - psql -c 'create extension hstore;' -U postgres moneta1
32
+ - psql -c 'create database moneta2;' -U postgres
25
33
  env:
26
34
  global:
27
35
  - secure: "dtM4n7FP8P0UI9Iq+nsvQ7/yfDqsxhfCO9i8zMxm/f9Kxj5Z/4C7jsXsLA+e\n/7FZ9+ld2QjPSPU0LUiDpj/z81bxyZHwqocQ7Nb0DVvO3JRHpr4/iBQQQHd3\n0jvou3mRbu5mBlUjf1/ALaZA+b+vcnsF9fd86UnkY+ChriylGnM="
28
36
  matrix:
29
- - "SCRIPT='parallel-tests 1/10'"
30
- - "SCRIPT='parallel-tests 2/10'"
31
- - "SCRIPT='parallel-tests 3/10'"
32
- - "SCRIPT='parallel-tests 4/10'"
33
- - "SCRIPT='parallel-tests 5/10'"
34
- - "SCRIPT='parallel-tests 6/10'"
35
- - "SCRIPT='parallel-tests 7/10'"
36
- - "SCRIPT='parallel-tests 8/10'"
37
- - "SCRIPT='parallel-tests 9/10'"
38
- - "SCRIPT='parallel-tests 10/10'"
39
- - "SCRIPT='parallel-tests unstable'"
40
- - "SCRIPT='benchmarks uniform_small'"
41
- - "SCRIPT='benchmarks uniform_medium'"
42
- - "SCRIPT='benchmarks uniform_large'"
43
- - "SCRIPT='benchmarks normal_small'"
44
- - "SCRIPT='benchmarks normal_medium'"
45
- - "SCRIPT='benchmarks normal_large'"
37
+ - SCRIPT='parallel-tests ~unstable --
38
+ test/action_dispatch/session_moneta_store_test.rb
39
+ spec/moneta/adapters/activerecord
40
+ spec/moneta/adapters/localmemcache
41
+ spec/moneta/adapters/activesupportcache
42
+ spec/moneta/adapters/lruhash
43
+ spec/moneta/adapters/gdbm
44
+ spec/moneta/adapters/null
45
+ spec/moneta/adapters/datamapper
46
+ spec/moneta/adapters/pstore
47
+ spec/moneta/adapters/daybreak
48
+ spec/moneta/adapters/redis
49
+ spec/moneta/adapters/dbm
50
+ spec/moneta/adapters/restclient
51
+ spec/moneta/adapters/file
52
+ spec/moneta/adapters/fog
53
+ spec/moneta/adapters/sdbm
54
+ spec/moneta/adapters/tokyocabinet
55
+ spec/moneta/adapters/leveldb
56
+ spec/moneta/adapters/tokyotyrant
57
+ spec/moneta/adapters/lmdb
58
+ spec/moneta/adapters/yaml
59
+ '
60
+ - SCRIPT='parallel-tests ~unstable --
61
+ spec/moneta/adapters/client
62
+ spec/moneta/adapters/memory
63
+ spec/moneta/adapters/cookie
64
+ spec/moneta/adapters/mongo
65
+ spec/moneta/adapters/tdb
66
+ spec/moneta/adapters/kyotocabinet
67
+ '
68
+ - SCRIPT='parallel-tests ~unstable --
69
+ spec/moneta/adapters/couch
70
+ '
71
+ - SCRIPT='parallel-tests ~unstable --
72
+ spec/moneta/adapters/memcached/dalli
73
+ '
74
+ - SCRIPT='parallel-tests ~unstable --
75
+ spec/moneta/adapters/memcached/native
76
+ '
77
+ - SCRIPT='parallel-tests ~unstable --
78
+ spec/moneta/adapters/cassandra/adapter_cassandra_spec.rb
79
+ spec/moneta/adapters/cassandra/standard_cassandra_spec.rb
80
+ '
81
+ - SCRIPT='parallel-tests ~unstable --
82
+ spec/moneta/adapters/cassandra/adapter_cassandra_with_default_expires_spec.rb
83
+ spec/moneta/adapters/hashfile
84
+ spec/moneta/adapters/sqlite
85
+ spec/moneta/adapters/sequel
86
+ '
87
+ - SCRIPT='parallel-tests ~unstable --
88
+ spec/moneta/proxies
89
+ '
90
+ - SCRIPT='parallel-tests ~unstable --remainder'
91
+ - SCRIPT='parallel-tests unstable'
92
+ - SCRIPT='benchmarks uniform_small'
93
+ - SCRIPT='benchmarks uniform_medium'
94
+ - SCRIPT='benchmarks uniform_large'
95
+ - SCRIPT='benchmarks normal_small'
96
+ - SCRIPT='benchmarks normal_medium'
97
+ - SCRIPT='benchmarks normal_large'
46
98
  matrix:
47
99
  allow_failures:
48
- - rvm: jruby-19mode
49
- - rvm: rbx-19mode
50
- - env: "SCRIPT='parallel-tests unstable'"
51
- script: "eval bundle exec ruby script/$SCRIPT"
100
+ - rvm: rbx-3
101
+ - env: SCRIPT='parallel-tests unstable'
102
+ script: "bundle exec script/$SCRIPT"
52
103
  branches:
53
104
  only:
54
105
  - master
data/.yardopts CHANGED
@@ -1 +1,6 @@
1
- - README.md SPEC.md CHANGES LICENSE CONTRIBUTORS
1
+ -
2
+ README.md
3
+ SPEC.md
4
+ CHANGES
5
+ LICENSE
6
+ CONTRIBUTORS
data/CHANGES CHANGED
@@ -1,3 +1,33 @@
1
+ 1.1.0
2
+
3
+ * Adapters::ActiveRecord - rewrite to use Arel directly; support for Rails 5
4
+ * Moneta::Server - close all connections when stopping
5
+ * Moneta::Shared - recover from socket errors
6
+ * Transformer - add :urlsafe_base64; use this by default for keys with Couch
7
+ adapter
8
+ * Adapters::MongoMoped - recover from failed increment
9
+ * Moneta::Pool - fix race condition in #pop (#144)
10
+ * Moneta::Client - raise EOFError if a read fails
11
+ * Moneta::Expires - use Rational objects to get much more accurate time
12
+ resolution
13
+ * Moneta::Lock/Moneta::Pool - allow wrapped methods to call other wrapped
14
+ methods
15
+ * Adapters::Sequel - add optimisations for MySQL, PostgreSQL and SQLite
16
+ * Adapters::Sequel - add Postgres+HStore backend
17
+ * Add Adapters::ActiveSupportCache
18
+ * Adapters::Sqlite - add :journal_mode option
19
+ * Add table creation options to Sequel and ActiveRecord adapters
20
+ * Adapters::ActiveRecord - support for forking (#159)
21
+ * Adapters::Cassandra - rewrite to use cassandra-driver gem (#81)
22
+ * Adapters::Couch - add a LRUHash to cache document revs
23
+ * Adapters::KyotoCabinet - implement atomic increment
24
+ * Add :each_key feature and implemented on many adapters; add
25
+ Moneta::WeakEachKey (#143; see feature matrix)
26
+ * Add bulk read/write methods to the spec; added default implementation to
27
+ Defaults and fast versions in many adapters (#116; see feature matrix)
28
+ * First class support for latest JRuby (#160)
29
+ * Minimum required MRI version is now 2.2.2 (#135)
30
+
1
31
  1.0.0
2
32
 
3
33
  * Adapters::Sequel - allow usage of Sequel extensions and connection validation
@@ -20,7 +20,11 @@ Jeremy Voorhis <jvoorhis@gmail.com>
20
20
  Jon Crosby <jon@joncrosby.me>
21
21
  lakshan <lakshan@web2media.net>
22
22
  Mal McKay <mal.mckay@gmail.com>
23
+ Marek Skrobacki <skrobul@skrobul.com>
24
+ Mauro Asprea <mauroasprea@gmail.com>
23
25
  Nathaniel Bibler <git@nathanielbibler.com>
26
+ Olle Jonsson <olle.jonsson@gmail.com>
27
+ Patrik Rak <patrik@raxoft.cz>
24
28
  Piotr Murach <pmurach@gmail.com>
25
29
  Potapov Sergey <blake131313@gmail.com>
26
30
  Quin Hoxie <quin@aboutus.org>
data/Gemfile CHANGED
@@ -2,8 +2,11 @@ source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
4
  # Testing
5
- gem 'rspec', '~> 2.0'
6
- gem 'rspec-retry', '0.4.4' # 0.4.5 does not work with rspec 2
5
+ gem 'rspec', '~> 3.0'
6
+ gem 'rspec-retry'
7
+ gem 'rantly', '~> 1.2.0'
8
+ gem 'parallel_tests'
9
+ gem 'timecop'
7
10
 
8
11
  # Serializer used by Transformer
9
12
  gem 'tnetstring'
@@ -15,11 +18,10 @@ gem 'ox', platforms: :ruby
15
18
  gem 'msgpack', platforms: :ruby
16
19
  gem 'msgpack-jruby', platforms: :jruby
17
20
  gem 'bert', platforms: :ruby
18
- gem 'php_serialize'
19
- gem 'nokogiri', '~> 1.6.0'
21
+ gem 'php-serialize'
20
22
 
21
23
  # Compressors used by Transformer
22
- gem 'rbzip2'
24
+ gem 'rbzip2', '~> 0.3.0'
23
25
  gem 'lz4-ruby', platforms: :ruby
24
26
  gem 'ruby-lzma', platforms: :ruby
25
27
  gem 'lzoruby', platforms: :ruby
@@ -35,54 +37,44 @@ gem 'daybreak'
35
37
  gem 'dm-core'
36
38
  gem 'dm-migrations'
37
39
  gem 'dm-mysql-adapter'
38
- if RUBY_VERSION < '2.0'
39
- gem 'fog', '~> 1.12'
40
- gem 'mime-types', '~> 2.0'
41
- gem 'addressable', '~> 2.4.0'
42
- else
43
- gem 'fog', '>= 1.11.1'
44
- gem 'mime-types'
45
- end
46
- gem 'activerecord', '~> 4.0.0'
47
- gem 'redis'
40
+ gem 'fog-aws', '>= 1.11.1'
41
+ gem 'mime-types'
42
+ gem 'activerecord', '~> 5.2'
43
+ gem 'redis', '~> 4.0.0'
48
44
  gem 'mongo', '~> 2.1.0'
49
45
  gem 'moped', '>= 2.0.0'
50
46
  gem 'sequel'
51
47
  gem 'dalli'
52
48
  gem 'riak-client'
53
- gem 'cassandra'
54
- if RUBY_VERSION < '2.0'
55
- gem 'json', '~> 1.0'
56
- end
49
+ gem 'cassandra-driver'
57
50
  gem 'tokyotyrant'
58
51
  #gem 'ruby-tokyotyrant', platforms: :ruby
59
- #gem 'hbaserb'
60
- gem 'localmemcache'
52
+ gem 'hbaserb'
53
+ gem 'localmemcache', platforms: :ruby
61
54
  gem 'tdb', platforms: :ruby
62
55
  gem 'leveldb-ruby', platforms: :ruby
63
56
  gem 'lmdb', platforms: :mri
64
- if RUBY_VERSION < '2.0'
65
- gem 'tokyocabinet', platforms: :ruby
66
- end
67
- #if RUBY_VERSION < '2.0' && !defined?(JRUBY_VERSION)
68
- # FIXME: We have to check manually for jruby
69
- # otherwise bundle install --deployment doesn't work
70
- # gem 'kyotocabinet-ruby', github: 'minad/kyotocabinet-ruby'
71
- #end
57
+ gem 'tokyocabinet', platforms: :ruby
58
+ gem 'kyotocabinet-ruby-reanimated', platforms: :ruby
72
59
  gem 'memcached', platforms: :ruby
73
60
  gem 'jruby-memcached', platforms: :jruby
74
- gem 'sqlite3', platforms: :ruby
61
+ gem 'sqlite3', '~> 1.3.6', platforms: :ruby
75
62
  gem 'activerecord-jdbc-adapter', platforms: :jruby
76
63
  gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
77
- gem 'mysql2', '~> 0.3.12b5', platforms: :ruby
78
- # gdbm for jruby needs ffi
79
- gem 'ffi', platforms: :jruby
80
- gem 'gdbm', platforms: :jruby
64
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
65
+ gem 'activerecord-jdbcpostgresql-adapter', platforms: :jruby
66
+ gem 'activerecord-jdbch2-adapter', platforms: :jruby
67
+ gem 'mysql2', platforms: :ruby
68
+ gem 'ffi-gdbm', platforms: :jruby
69
+ gem 'pg', platforms: :ruby
81
70
 
82
71
  # Rack integration testing
83
72
  gem 'rack'
84
73
  gem 'rack-cache'
85
74
 
86
75
  # Rails integration testing
87
- gem 'actionpack', '~> 4.0.0'
88
- gem 'minitest', '~> 4.7.4'
76
+ gem 'actionpack', '~> 5.0'
77
+ gem 'minitest', '~> 5.0'
78
+
79
+ # Used for generating the feature matrix
80
+ gem 'kramdown', '~> 1.17.0', group: :doc
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 - 2017 Daniel Mendler, Yehuda Katz, Alastair Pharo
1
+ Copyright (c) 2009 - 2019 Daniel Mendler, Yehuda Katz, Alastair Pharo
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  # Moneta: A unified interface for key/value stores
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/moneta.png)](http://rubygems.org/gems/moneta) [![Build Status](https://secure.travis-ci.org/minad/moneta.png?branch=master)](http://travis-ci.org/minad/moneta) [![Dependency Status](https://gemnasium.com/minad/moneta.png?travis)](https://gemnasium.com/minad/moneta) [![Code Climate](https://codeclimate.com/github/minad/moneta.png)](https://codeclimate.com/github/minad/moneta) [![Gittip donate button](http://img.shields.io/gittip/bevry.png)](https://www.gittip.com/min4d/ "Donate weekly to this project using Gittip")
4
- [![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=min4d&url=https://github.com/minad/moneta&title=Moneta&language=&tags=github&category=software)
3
+ [![Gem Version](https://badge.fury.io/rb/moneta.svg)](http://rubygems.org/gems/moneta) [![Build Status](https://secure.travis-ci.org/moneta-rb/moneta.svg?branch=master)](http://travis-ci.org/moneta-rb/moneta) [![Code Climate](https://codeclimate.com/github/moneta-rb/moneta.svg)](https://codeclimate.com/github/moneta-rb/moneta) [![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=min4d&url=https://github.com/moneta-rb/moneta&title=Moneta&language=&tags=github&category=software)
5
4
 
6
5
  Moneta provides a standard interface for interacting with various kinds of key/value stores. Moneta supports the well-known
7
6
  NoSQL and document based stores.
@@ -30,7 +29,7 @@ same for template languages.
30
29
  * Give people a starting point or example code to start working with their favourite key/value store. Feel free to copy code, please mention Moneta then :)
31
30
  * Create a reusable piece of code, since similar things are solved over and over again ([Rails](http://rubyonrails.org/) brings its own cache stores, and many frameworks do the same...)
32
31
 
33
- Moneta is tested thoroughly using [Travis-CI](http://travis-ci.org/minad/moneta).
32
+ Moneta is tested thoroughly using [Travis-CI](http://travis-ci.org/moneta-rb/moneta).
34
33
 
35
34
  ------
36
35
 
@@ -70,12 +69,12 @@ store.close
70
69
 
71
70
  ## Links
72
71
 
73
- * Source: <http://github.com/minad/moneta>
74
- * Bugs: <http://github.com/minad/moneta/issues>
75
- * Tests and benchmarks: <http://travis-ci.org/minad/moneta>
72
+ * Source: <http://github.com/moneta-rb/moneta>
73
+ * Bugs: <http://github.com/moneta-rb/moneta/issues>
74
+ * Tests and benchmarks: <http://travis-ci.org/moneta-rb/moneta>
76
75
  * API documentation:
77
76
  * Latest Gem: <http://rubydoc.info/gems/moneta/frames>
78
- * GitHub master: <http://rubydoc.info/github/minad/moneta/master/frames>
77
+ * GitHub master: <http://rubydoc.info/github/moneta-rb/moneta/master/frames>
79
78
 
80
79
  ------
81
80
 
@@ -130,100 +129,104 @@ to upgrade to a real key/value store.
130
129
 
131
130
  ### Backend feature matrix
132
131
 
133
- __NOTE:__ <a name="backend-matrix"></a>The backend matrix is much more readable on rubydoc.info than on github. [Go there!](http://rubydoc.info/github/minad/moneta/master/file/README.md#backend-matrix)
132
+ __NOTE:__ <a name="backend-matrix"></a>The backend matrix is much more readable on rubydoc.info than on github. [Go there!](http://rubydoc.info/github/moneta-rb/moneta/master/file/README.md#backend-matrix)
134
133
 
135
134
  <table>
135
+ <tr><th>Adapter</th><th>Required gems</th><th style="writing-mode:tb">MRI support<sup>1</sup></th><th style="writing-mode:tb">JRuby support<sup>1</sup></th><th style="writing-mode:tb">Multi-thread safe<sup>2</sup></th><th style="writing-mode:tb">Multi-process safe<sup>3</sup></th><th style="writing-mode:tb">Atomic increment<sup>4</sup></th><th style="writing-mode:tb">Atomic create<sup>5</sup></th><th style="writing-mode:tb">Native expires<sup>6</sup></th><th style="writing-mode:tb">Persistent</th><th style="writing-mode:tb">Key Traversal</th><th style="writing-mode:tb">Bulk read<sup>7</sup></th><th style="writing-mode:tb">Bulk write<sup>8</sup></th><th>Description</th></tr>
136
136
 
137
- <tr><th>Adapter</th><th>Required gems</th><th>Multi-thread safe<sup>[1]</sup></th><th>Multi-process safe<sup>[2]</sup></th><th>Atomic increment<sup>[8]</sup></th><th>Atomic create<sup>[9]</sup></th><th>Native expires<sup>[3]</sup></th><th>Persistent</th><th>Description</th></tr>
137
+ <tr><th colspan="2">Persistent stores</th><th colspan="12"></th></tr>
138
138
 
139
- <tr><th colspan="2">Persistent stores</th><th colspan="7"></th></tr>
139
+ <tr><td>Mongo</td><td>mongo or moped</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.mongodb.org/">MongoDB</a> database</td></tr>
140
140
 
141
- <tr><td>Mongo</td><td>mongo or moped</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.mongodb.org/">MongoDB</a> database</td></tr>
141
+ <tr><td>MongoOfficial</td><td>mongo</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.mongodb.org/">MongoDB</a> database</td></tr>
142
142
 
143
- <tr><td>MongoOfficial</td><td>mongo</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.mongodb.org/">MongoDB</a> database</td></tr>
143
+ <tr><td>MongoMoped</td><td>moped</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.mongodb.org/">MongoDB</a> database</td></tr>
144
144
 
145
- <tr><td>MongoMoped</td><td>moped</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.mongodb.org/">MongoDB</a> database</td></tr>
145
+ <tr><td>Redis</td><td>redis</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://redis.io/">Redis</a> database</td></tr>
146
146
 
147
- <tr><td>Redis</td><td>redis</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://redis.io/">Redis</a> database</td></tr>
147
+ <tr><td>ActiveRecord</td><td>activerecord</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="https://rubygems.org/gems/activerecord">ActiveRecord</a> ORM</td></tr>
148
148
 
149
- <tr><td>ActiveRecord</td><td>activerecord</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="https://rubygems.org/gems/activerecord">ActiveRecord</a> ORM</td></tr>
149
+ <tr><td>File</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td>File store</td></tr>
150
150
 
151
- <tr><td>File</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td>File store</td></tr>
151
+ <tr><td>LMDB</td><td>lmdb</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://symas.com/mdb/">Symas Lightning Memory-Mapped Database (LMDB)</a></td></tr>
152
152
 
153
- <tr><td>LMDB</td><td>lmdb</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://symas.com/mdb/">Symas Lightning Memory-Mapped Database (LMDB)</a></td></tr>
153
+ <tr><td>Sequel</td><td>sequel</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://sequel.rubyforge.org/">Sequel</a> ORM</td></tr>
154
154
 
155
- <tr><td>Sequel</td><td>sequel</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://sequel.rubyforge.org/">Sequel</a> ORM</td></tr>
155
+ <tr><td>TokyoTyrant</td><td>tokyotyrant or ruby-tokyotyrant</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td><a href="http://fallabs.com/tokyotyrant/">TokyoTyrant</a> database</td></tr>
156
156
 
157
- <tr><td>TokyoTyrant</td><td>tokyotyrant or ruby-tokyotyrant</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://fallabs.com/tokyotyrant/">TokyoTyrant</a> database</td></tr>
157
+ <tr><td>PStore</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓<sup>9</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://ruby-doc.org/stdlib/libdoc/pstore/rdoc/PStore.html">PStore</a> store</td></tr>
158
158
 
159
- <tr><td>PStore</td><td>-</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓<sup>[10]</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://ruby-doc.org/stdlib/libdoc/pstore/rdoc/PStore.html">PStore</a> store</td></tr>
159
+ <tr><td>YAML</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓<sup>9</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td><a href="http://www.ruby-doc.org/stdlib/libdoc/yaml/rdoc/YAML/Store.html">YAML</a> store</td></tr>
160
160
 
161
- <tr><td>YAML</td><td>-</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓<sup>[10]</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.ruby-doc.org/stdlib/libdoc/yaml/rdoc/YAML/Store.html">YAML</a> store</td></tr>
161
+ <tr><td>Sqlite</td><td>sqlite3</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#55F">?</td><td style="text-align:center;background:#5F5">✓<sup>9</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://sqlite.org/">Sqlite3</a> database</td></tr>
162
162
 
163
- <tr><td>Sqlite</td><td>sqlite3</td><td style="text-align:center;background:#55F">?</td><td style="text-align:center;background:#5F5">✓<sup>[10]</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://sqlite.org/">Sqlite3</a> database</td></tr>
163
+ <tr><td>Daybreak</td><td>daybreak</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td>Incredibly fast pure-ruby key/value store <a href="http://propublica.github.com/daybreak/">Daybreak</a></td></tr>
164
164
 
165
- <tr><td>Daybreak</td><td>daybreak</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#55F">(✓)<sup>[7]</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td>Incredibly fast pure-ruby key/value store <a href="http://propublica.github.com/daybreak/">Daybreak</a></td></tr>
165
+ <tr><td>DBM</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.ruby-doc.org/stdlib/libdoc/dbm/rdoc/DBM.html">Berkeley DB using DBM interface or NDBM (Depends on Ruby environment)</a></td></tr>
166
166
 
167
- <tr><td>DBM</td><td>-</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.ruby-doc.org/stdlib/libdoc/dbm/rdoc/DBM.html">Berkeley DB using DBM interface or NDBM (Depends on Ruby environment)</a></td></tr>
167
+ <tr><td>GDBM</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.ruby-doc.org/stdlib/libdoc/gdbm/rdoc/GDBM.html">GDBM</a> database</td></tr>
168
168
 
169
- <tr><td>GDBM</td><td>-</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.ruby-doc.org/stdlib/libdoc/gdbm/rdoc/GDBM.html">GDBM</a> database</td></tr>
169
+ <tr><td>LevelDB</td><td>leveldb</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://code.google.com/p/leveldb/">LevelDB</a> database</td></tr>
170
170
 
171
- <tr><td>LevelDB</td><td>leveldb</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://code.google.com/p/leveldb/">LevelDB</a> database</td></tr>
171
+ <tr><td>SDBM</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.ruby-doc.org/stdlib/libdoc/sdbm/rdoc/SDBM.html">SDBM</a> database</td></tr>
172
172
 
173
- <tr><td>SDBM</td><td>-</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://www.ruby-doc.org/stdlib/libdoc/sdbm/rdoc/SDBM.html">SDBM</a> database</td></tr>
173
+ <tr><td>TDB</td><td>tdb</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td><a href="http://tdb.samba.org/">TDB</a> database</td></tr>
174
174
 
175
- <tr><td>TDB</td><td>tdb</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://tdb.samba.org/">TDB</a> database</td></tr>
175
+ <tr><td>KyotoCabinet</td><td>kyotocabinet-ruby or kyotocabinet-ruby-reanimated</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://fallabs.com/kyotocabinet/">KyotoCabinet</a> database</td></tr>
176
176
 
177
- <tr><td>KyotoCabinet</td><td>kyotocabinet</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://fallabs.com/kyotocabinet/">KyotoCabinet</a> database</td></tr>
177
+ <tr><td>TokyoCabinet</td><td>tokyocabinet</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td><a href="http://fallabs.com/tokyocabinet/">TokyoCabinet</a> database</td></tr>
178
178
 
179
- <tr><td>TokyoCabinet</td><td>tokyocabinet</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://fallabs.com/tokyocabinet/">TokyoCabinet</a> database</td></tr>
179
+ <tr><td>DataMapper</td><td>dm-core, dm-migrations</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td><a href="http://datamapper.org/">DataMapper</a> ORM</td></tr>
180
180
 
181
- <tr><td>DataMapper</td><td>dm-core, dm-migrations</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://datamapper.org/">DataMapper</a> ORM</td></tr>
181
+ <tr><td>Couch</td><td>faraday, multi_json</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://couchdb.apache.org/">CouchDB</a> database</td></tr>
182
182
 
183
- <tr><td>Couch</td><td>faraday, multi_json</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://couchdb.apache.org/">CouchDB</a> database</td></tr>
183
+ <tr><td>HBase</td><td>hbaserb</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#55F">?</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td><a href="http://hbase.apache.org/">HBase</a> database</td></tr>
184
184
 
185
- <tr><td>HBase</td><td>hbaserb</td><td style="text-align:center;background:#55F">?</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://hbase.apache.org/">HBase</a> database</td></tr>
185
+ <tr><td>Cassandra</td><td>cassandra</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#55F">?</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://cassandra.apache.org/">Cassandra</a> distributed database</td></tr>
186
186
 
187
- <tr><td>Cassandra</td><td>cassandra</td><td style="text-align:center;background:#55F">?</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://cassandra.apache.org/">Cassandra</a> distributed database</td></tr>
187
+ <tr><td>LocalMemCache</td><td>localmemcache</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td><a href="http://localmemcache.rubyforge.org/">LocalMemCache</a> database</td></tr>
188
188
 
189
- <tr><td>LocalMemCache</td><td>localmemcache</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://localmemcache.rubyforge.org/">LocalMemCache</a> database</td></tr>
189
+ <tr><td>Fog</td><td>fog</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#55F">?</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td><a href="http://fog.io/">Fog</a> cloud store</td></tr>
190
190
 
191
- <tr><td>Fog</td><td>fog</td><td style="text-align:center;background:#55F">?</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://fog.io/">Fog</a> cloud store</td></tr>
191
+ <tr><td>Riak</td><td>riak-client</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td><a href="http://docs.basho.com/">Riak</a> database</td></tr>
192
192
 
193
- <tr><td>Riak</td><td>riak-client</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://docs.basho.com/">Riak</a> database</td></tr>
193
+ <tr><th colspan="2">Non-persistent stores</th><th colspan="12"></th></tr>
194
194
 
195
- <tr><th colspan="2">Non persistent stores</th><th colspan="7"></th></tr>
195
+ <tr><td>MemcachedDalli</td><td>dalli</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗<sup>10</sup></td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td><a href="http://memcached.org/">Memcached</a> database with Dalli library</td></tr>
196
196
 
197
- <tr><td>MemcachedDalli</td><td>dalli</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗<sup>[4]</sup></td><td><a href="http://memcached.org/">Memcached</a> database with Dalli library</td></tr>
197
+ <tr><td>Memcached</td><td>dalli or memcached</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#55F">?<sup>11</sup></td><td style="text-align:center;background:#55F">?<sup>11</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗<sup>10</sup></td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#55F">?<sup>11</sup></td><td style="text-align:center;background:#55F">?<sup>11</sup></td><td><a href="http://memcached.org/">Memcached</a> database</td></tr>
198
198
 
199
- <tr><td>Memcached</td><td>dalli or memcached</td><td style="text-align:center;background:#55F">?</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗<sup>[4]</sup></td><td><a href="http://memcached.org/">Memcached</a> database</td></tr>
199
+ <tr><td>MemcachedNative</td><td>memcached</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗<sup>10</sup></td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td>Memcached database with native library</td></tr>
200
200
 
201
- <tr><td>MemcachedNative</td><td>memcached</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗<sup>[4]</sup></td><td>Memcached database with native library</td></tr>
201
+ <tr><td>Cookie</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓<sup>12</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td>Cookie in memory store</td></tr>
202
202
 
203
- <tr><td>Cookie</td><td>-</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#55F">(✓)<sup>[6]</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td>Cookie in memory store</td></tr>
203
+ <tr><td>LRUHash</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓<sup>12</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td>LRU memory store</td></tr>
204
204
 
205
- <tr><td>LRUHash</td><td>-</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#55F">(✓)<sup>[6]</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td>LRU memory store</td></tr>
205
+ <tr><td>Memory</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓<sup>12</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td>Memory store</td></tr>
206
206
 
207
- <tr><td>Memory</td><td>-</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#55F">(✓)<sup>[6]</sup></td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td>Memory store</td></tr>
207
+ <tr><td>Null</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td>No database</td></tr>
208
208
 
209
- <tr><td>Null</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td>No database</td></tr>
209
+ <tr><th colspan="2">Network clients</th><th colspan="12"></th></tr>
210
210
 
211
- <tr><td>Client</td><td>-</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#55F">?<sup>[5]</sup></td><td style="text-align:center;background:#55F">?<sup>[5]</sup></td><td style="text-align:center;background:#55F">?<sup>[5]</sup></td><td style="text-align:center;background:#55F">?<sup>[5]</sup></td><td>Moneta client adapter</td></tr>
211
+ <tr><td>Client</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#55F">?<sup>13</sup></td><td style="text-align:center;background:#55F">?<sup>13</sup></td><td style="text-align:center;background:#55F">?<sup>13</sup></td><td style="text-align:center;background:#55F">?<sup>13</sup></td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td>Moneta client adapter</td></tr>
212
212
 
213
- <tr><td>RestClient</td><td>faraday</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#55F">?<sup>[5]</sup></td><td>Moneta REST client adapter</td></tr>
213
+ <tr><td>RestClient</td><td>-</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#5F5">✓</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#55F">?<sup>13</sup></td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td style="text-align:center;background:#F44">✗</td><td>Moneta REST client adapter</td></tr>
214
214
 
215
215
  </table>
216
216
 
217
- * [1]: Make adapters thread-safe by using `Moneta::Lock` or by passing the option `threadsafe: true` to `Moneta#new`. There is also `Moneta::Pool` which can be used to share a store between multiple threads if the store is multi-process safe. I recommend to add the option `:threadsafe` to ensure thread-safety since for example under JRuby and Rubinius even the basic datastructures are not thread safe due to the lack of a global interpreter lock (GIL). This differs from MRI where some adapters might appear thread safe already but only due to the GIL.
218
- * [2]: Share a Moneta store between multiple processes using `Moneta::Shared` (See below).
219
- * [3]: Add expiration support by using `Moneta::Expires` or by passing the option `expires: true` to `Moneta#new`.
220
- * [4]: There are some servers which use the memcached protocol but which are persistent (e.g. [MemcacheDB](http://memcachedb.org/), [Kai](http://sourceforge.net/apps/mediawiki/kai), [IronCache](http://dev.iron.io/cache/reference/memcache/), [Roma](https://github.com/roma/roma/tree), [Flare](http://labs.gree.jp/Top/OpenSource/Flare-en.html) and [Kumofs](https://github.com/etolabo/kumofs))
221
- * [5]: Depends on server
222
- * [6]: Store is multi-process safe because it is an in-memory store, values are not shared between multiple processes
223
- * [7]: Store is multi-process safe, but not synchronized automatically between multiple processes
224
- * [8]: If a store provides atomic increment it can be used with `Moneta::Semaphore`. You can add weak `#increment` support using the `Moneta::WeakIncrement` proxy.
225
- * [9]: If a store provides atomic creation it can be used with `Moneta::Mutex`. You can add weak `#create` support using the `Moneta::WeakCreate` proxy.
226
- * [10]: Sqlite/YAML/PStore are multiprocess safe, but the performance suffers badly since the whole database file must be locked for writing. Use a key/value server if you want multiprocess concurrency!
217
+ 1. Indicates that the adapter is expected to work on this platform. Most adapters will at least work on MRI, but some are curently considered unstable, in which case they are not supported on any platform.
218
+ 2. Make adapters thread-safe by using `Moneta::Lock` or by passing the option `threadsafe: true` to `Moneta#new`. There is also `Moneta::Pool` which can be used to share a store between multiple threads if the store is multi-process safe. I recommend to add the option `:threadsafe` to ensure thread-safety since for example under JRuby and Rubinius even the basic datastructures are not thread safe due to the lack of a global interpreter lock (GIL). This differs from MRI where some adapters might appear thread safe already but only due to the GIL.
219
+ 3. Share a Moneta store between multiple processes using `Moneta::Shared` (See below).
220
+ 4. If a store provides atomic increment it can be used with `Moneta::Semaphore`. You can add weak `#increment` support using the `Moneta::WeakIncrement` proxy.
221
+ 5. If a store provides atomic creation it can be used with `Moneta::Mutex`. You can add weak `#create` support using the `Moneta::WeakCreate` proxy.
222
+ 6. Add expiration support by using `Moneta::Expires` or by passing the option `expires: true` to `Moneta#new`.
223
+ 7. This indicates that there is some performance gain when fetching multiple values at once using `#values_at`/`#fetch_values` or `#slice`. For instance, the `MGET` instruction in Redis, or the ability to retrieve several rows in one query in SQL.
224
+ 8. This indicates that there is some performance gain when storing multiple key/value pairs at once using `#merge!`/`#update`.
225
+ 9. Sqlite/YAML/PStore are multiprocess safe, but the performance suffers badly since the whole database file must be locked for writing. Use a key/value server if you want multiprocess concurrency!
226
+ 10. There are some servers which use the memcached protocol but which are persistent (e.g. [MemcacheDB](http://memcachedb.org/), [Kai](http://sourceforge.net/apps/mediawiki/kai), [IronCache](http://dev.iron.io/cache/reference/memcache/), [Roma](https://github.com/roma/roma/tree), [Flare](http://labs.gree.jp/Top/OpenSource/Flare-en.html) and [Kumofs](https://github.com/etolabo/kumofs))
227
+ 11. This feature is only available if the dalli backend is selected
228
+ 12. Store is multi-process safe because it is an in-memory store, values are not shared between multiple processes
229
+ 13. Depends on server
227
230
 
228
231
  ------
229
232
 
@@ -242,6 +245,7 @@ add additional features to storage backends:
242
245
  * `Moneta::Logger` to log database accesses. Add it in the builder using `use :Logger`.
243
246
  * `Moneta::Shared` to share a store between multiple processes. Add it in the builder using `use(:Shared) {}`.
244
247
  * `Moneta::WeakIncrement` and `Moneta::WeakCreate` to add `#create` and `#increment` support without atomicity (weak) to stores which don't support it.
248
+ * `Moneta::WeakEachKey` to add key traversal to stores that don't support it, with the important caveat that only those keys previously seen by this proxy will be traversed.
245
249
 
246
250
  ### Serializers and compressors (`Moneta::Transformer`)
247
251
 
@@ -270,7 +274,8 @@ Supported value compressors:
270
274
 
271
275
  Supported encoders:
272
276
 
273
- * Base64 (`:base64`)
277
+ * Base64 (RFC 2045; `:base64`)
278
+ * URL-safe Base64 (RFC 4648; `:urlsafe_base64`)
274
279
  * Url escape (`:escape`)
275
280
  * Hexadecimal (`:hex`)
276
281
  * QP (`:qp`)
@@ -288,7 +293,7 @@ Special transformers:
288
293
 
289
294
  The Moneta API is purposely extremely similar to the Hash API with a few minor additions.
290
295
  Every method takes also a optional option hash. In order so support an identical API across stores,
291
- Moneta does not support iteration or partial matches.
296
+ Moneta does not support partial matches.
292
297
 
293
298
  ~~~
294
299
  #initialize(options) options differs per-store, and is used to set up the store.
@@ -321,6 +326,35 @@ Moneta does not support iteration or partial matches.
321
326
  #create(key, value, options = {}) create entry. This is an atomic operation which is not supported by all stores.
322
327
  Returns true if the value was created.
323
328
 
329
+ #values_at(*keys, **options) retrieve multiple keys. Returns an array of equal length to the keys.
330
+ Each entry in the array is either the value corresponding to the key
331
+ in the same position, or nil if the key is not available.
332
+
333
+ #fetch_values(*keys, **options, &block) retrieve multiple keys. Return is identical to values_at, except that
334
+ when a block is given it will be called once for each key that is not
335
+ available, and the return value of the block will be used in place of
336
+ nil in the array.
337
+
338
+ #slice(*keys, **options) retrieve multiple keys. Returns an enumerable of key-value pairs,
339
+ one for each of the supplied keys that is present in the store.
340
+
341
+ #merge!(pairs, options = {}) set values for multiple keys. "pairs" must be an enumerable of
342
+ key-value pairs to be stored. Any existing keys will be clobbered.
343
+
344
+ #merge!(pairs, options = {}, &block) set values for multiple keys. For each existing key, execute the block
345
+ passing the key, existing value and new value, and store the return
346
+ value.
347
+
348
+ #update(pairs, options = {}, &block) same as merge!
349
+
350
+ #each_key return an enumerable which will yield all keys in the store, one at a
351
+ time. This method is present if and only if the store supports the
352
+ :each_key feature.
353
+
354
+ #each_key(&block) yield all keys in the store to the block, one at a time. Again, this
355
+ method is present if and only if the store supports the :each_key
356
+ feature.
357
+
324
358
  #clear(options = {}) clear all keys in this store.
325
359
 
326
360
  #close close database connection.
@@ -422,6 +456,21 @@ cache = Moneta.build do
422
456
  end
423
457
  ~~~
424
458
 
459
+ ### Key traversal
460
+
461
+ Where supported by the store's backend, it is possible to traverse the keys in
462
+ the store using the `#each_key` method. Support for this can be tested by
463
+ calling `store.supports?(:each_key)`, or checking for the presence of
464
+ `:each_key` in `store.features`.
465
+
466
+ ~~~ ruby
467
+ store.each_key # returns an Enumerable
468
+ store.each_key do |key|
469
+ store.load(key) # read operations are supported within the block
470
+ store[key] = "x" # behaviour of write operations is undefined
471
+ end
472
+ ~~~
473
+
425
474
  ### Atomic operations
426
475
 
427
476
  #### Atomic incrementation and raw access
@@ -485,6 +534,24 @@ store.create('key', 'value') # returns true
485
534
  store.create('key', 'other value') # returns false
486
535
  ~~~
487
536
 
537
+ #### Atomic bulk operations
538
+
539
+ All stores support storage and retrieval of multiple keys using
540
+ `#values_at`/`#fetch_values`/`#slice` and `#merge!`/`#update`. Wherever
541
+ possible, these operations are performed atomically. When this is not possible,
542
+ the `#load` and `#store` methods are called once for each key.
543
+
544
+ ~~~ ruby
545
+ store.merge!('key1' => 'value1', 'key2' => 'value2') # stores two keys
546
+ store.values_at('key1', 'key2', 'key3') # returns ['value1', 'value2', nil]
547
+ store.fetch('key1', 'key3') { |k| k + ' missing' } # returns ['key1', 'key3 missing']
548
+ store.slice('key1', 'key2', 'key3') # returns enumerable of ['key1', 'value1'], ['key2', 'value2']
549
+
550
+ store.merge!('key2' => 'new value2', 'key3' => 'value3') do |key, value, new_value|
551
+ [value, new_value].join('+')
552
+ end # stores "value3" and "value2+new value2"
553
+ ~~~
554
+
488
555
  #### Shared/distributed synchronization primitives
489
556
 
490
557
  Moneta provides shared/distributed synchronization primitives which are shared database-wide between
@@ -632,6 +699,8 @@ There is a simple middleware which places a Moneta store in the Rack environment
632
699
  caching if you add the option `cache: true`. Use it in your `config.ru` like this:
633
700
 
634
701
  ~~~ ruby
702
+ require 'rack/moneta_store'
703
+
635
704
  # Add Rack::MonetaStore somewhere in your rack stack
636
705
  use Rack::MonetaStore, :Memory, cache: true
637
706
 
@@ -818,9 +887,9 @@ Person.adapter :memory, Moneta.new(:Redis)
818
887
 
819
888
  ## Testing and Benchmarks
820
889
 
821
- Testing is done using [Travis-CI](http://travis-ci.org/minad/moneta). Currently we support Ruby >= 1.9.3.
890
+ Testing is done using [Travis-CI](http://travis-ci.org/moneta-rb/moneta). Currently we support Ruby >= 1.9.3.
822
891
 
823
- Benchmarks for each store are done on [Travis-CI](http://travis-ci.org/minad/moneta) for each build. Take a look there
892
+ Benchmarks for each store are done on [Travis-CI](http://travis-ci.org/moneta-rb/moneta) for each build. Take a look there
824
893
  to compare the speed of the different key value stores for different key/value sizes and size distributions.
825
894
  Feel free to add your own configurations! The impact of Moneta should be minimal since it is only a thin layer
826
895
  on top of the different stores.
@@ -831,7 +900,7 @@ on top of the different stores.
831
900
  ## How to contribute?
832
901
 
833
902
  Always feel free to open an issue on
834
- https://github.com/minad/moneta/issues if something doesn't work
903
+ https://github.com/moneta-rb/moneta/issues if something doesn't work
835
904
  as you expect it to work. Feedback is also very welcome!
836
905
 
837
906
  My only request about patches is that you please try
@@ -840,12 +909,11 @@ to test them before submitting.
840
909
  ### Contribute an adapter
841
910
 
842
911
  If you want support for another adapter you can at first at it to the list of
843
- missing adapters at https://github.com/minad/moneta/issues/16
912
+ missing adapters at https://github.com/moneta-rb/moneta/issues/16
844
913
 
845
- If you choose to implement an adapter please also add tests. Usually you
846
- only have to add a few lines to `script/generate-specs` to generate appropriate
847
- tests for your adapter. Please check also if travis.yml needs changes, for example
848
- if you need to start additional services.
914
+ If you choose to implement an adapter please also add tests. Please check also
915
+ if travis.yml needs changes, for example if you need to start additional
916
+ services.
849
917
 
850
918
  Check if the default settings in Moneta#new are appropriate for your adapter. If
851
919
  not specify a better one.
@@ -869,4 +937,5 @@ Don't forget to edit the README.md and the CHANGES.
869
937
 
870
938
  * [Daniel Mendler](https://github.com/minad)
871
939
  * [Hannes Georg](https://github.com/hannesg)
940
+ * [Alastair Pharo](https://github.com/asppsa)
872
941
  * Originally by [Yehuda Katz](https://github.com/wycats) and contributors