moneta 0.7.20 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -5
  3. data/CHANGES +6 -0
  4. data/CONTRIBUTORS +2 -0
  5. data/Gemfile +31 -44
  6. data/LICENSE +1 -1
  7. data/README.md +82 -59
  8. data/lib/active_support/cache/moneta_store.rb +3 -3
  9. data/lib/moneta.rb +4 -2
  10. data/lib/moneta/adapters/activerecord.rb +8 -8
  11. data/lib/moneta/adapters/cassandra.rb +8 -8
  12. data/lib/moneta/adapters/couch.rb +1 -1
  13. data/lib/moneta/adapters/datamapper.rb +5 -5
  14. data/lib/moneta/adapters/daybreak.rb +1 -1
  15. data/lib/moneta/adapters/fog.rb +2 -2
  16. data/lib/moneta/adapters/lmdb.rb +1 -1
  17. data/lib/moneta/adapters/localmemcache.rb +1 -1
  18. data/lib/moneta/adapters/memcached/dalli.rb +3 -3
  19. data/lib/moneta/adapters/memcached/native.rb +1 -1
  20. data/lib/moneta/adapters/mongo.rb +6 -164
  21. data/lib/moneta/adapters/mongo/base.rb +63 -0
  22. data/lib/moneta/adapters/mongo/moped.rb +113 -0
  23. data/lib/moneta/adapters/mongo/official.rb +121 -0
  24. data/lib/moneta/adapters/pstore.rb +1 -5
  25. data/lib/moneta/adapters/restclient.rb +1 -1
  26. data/lib/moneta/adapters/sequel.rb +10 -10
  27. data/lib/moneta/cache.rb +1 -1
  28. data/lib/moneta/logger.rb +2 -2
  29. data/lib/moneta/mixins.rb +4 -4
  30. data/lib/moneta/shared.rb +2 -2
  31. data/lib/moneta/stack.rb +2 -2
  32. data/lib/moneta/synchronize.rb +2 -2
  33. data/lib/moneta/transformer.rb +5 -5
  34. data/lib/moneta/transformer/config.rb +38 -40
  35. data/lib/moneta/version.rb +1 -1
  36. data/lib/rack/cache/moneta.rb +1 -1
  37. data/lib/rack/moneta_cookies.rb +2 -2
  38. data/lib/rack/moneta_rest.rb +1 -1
  39. data/lib/rack/moneta_store.rb +4 -4
  40. data/lib/rack/session/moneta.rb +14 -2
  41. data/moneta.gemspec +1 -0
  42. data/script/benchmarks +97 -96
  43. data/script/generate-specs +763 -730
  44. data/script/install-bundle +1 -1
  45. data/script/install-kyotocabinet +2 -2
  46. data/script/memusage +1 -1
  47. data/script/upload-bundle +1 -1
  48. data/spec/action_dispatch/session_moneta_store_spec.rb +5 -5
  49. data/spec/active_support/cache_moneta_store_spec.rb +20 -20
  50. data/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb +2 -2
  51. data/spec/moneta/adapter_activerecord_spec.rb +6 -6
  52. data/spec/moneta/adapter_cassandra_spec.rb +1 -1
  53. data/spec/moneta/adapter_cassandra_with_default_expires_spec.rb +1 -1
  54. data/spec/moneta/adapter_couch_spec.rb +1 -1
  55. data/spec/moneta/adapter_datamapper_spec.rb +6 -6
  56. data/spec/moneta/adapter_daybreak_spec.rb +1 -1
  57. data/spec/moneta/adapter_dbm_spec.rb +1 -1
  58. data/spec/moneta/adapter_file_spec.rb +1 -1
  59. data/spec/moneta/adapter_fog_spec.rb +4 -4
  60. data/spec/moneta/adapter_gdbm_spec.rb +1 -1
  61. data/spec/moneta/adapter_hbase_spec.rb +1 -1
  62. data/spec/moneta/adapter_kyotocabinet_spec.rb +1 -1
  63. data/spec/moneta/adapter_leveldb_spec.rb +1 -1
  64. data/spec/moneta/adapter_lmdb_spec.rb +1 -1
  65. data/spec/moneta/adapter_lmdb_with_db_spec.rb +1 -1
  66. data/spec/moneta/adapter_localmemcache_spec.rb +1 -1
  67. data/spec/moneta/adapter_lruhash_spec.rb +1 -1
  68. data/spec/moneta/adapter_memcached_dalli_spec.rb +1 -1
  69. data/spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb +1 -1
  70. data/spec/moneta/adapter_memcached_native_spec.rb +1 -1
  71. data/spec/moneta/adapter_memcached_native_with_default_expires_spec.rb +1 -1
  72. data/spec/moneta/adapter_memcached_spec.rb +1 -1
  73. data/spec/moneta/adapter_memcached_with_default_expires_spec.rb +1 -1
  74. data/spec/moneta/adapter_mongo_moped_spec.rb +56 -0
  75. data/spec/moneta/adapter_mongo_moped_with_default_expires_spec.rb +51 -0
  76. data/spec/moneta/adapter_mongo_official_spec.rb +56 -0
  77. data/spec/moneta/adapter_mongo_official_with_default_expires_spec.rb +51 -0
  78. data/spec/moneta/adapter_mongo_spec.rb +1 -7
  79. data/spec/moneta/adapter_mongo_with_default_expires_spec.rb +1 -1
  80. data/spec/moneta/adapter_pstore_spec.rb +1 -1
  81. data/spec/moneta/adapter_redis_with_default_expires_spec.rb +1 -1
  82. data/spec/moneta/adapter_restclient_spec.rb +1 -1
  83. data/spec/moneta/adapter_sdbm_spec.rb +1 -1
  84. data/spec/moneta/adapter_sequel_spec.rb +1 -1
  85. data/spec/moneta/adapter_sqlite_spec.rb +1 -1
  86. data/spec/moneta/adapter_tdb_spec.rb +1 -1
  87. data/spec/moneta/adapter_tokyocabinet_bdb_spec.rb +1 -1
  88. data/spec/moneta/adapter_tokyocabinet_hdb_spec.rb +1 -1
  89. data/spec/moneta/adapter_yaml_spec.rb +1 -1
  90. data/spec/moneta/cache_file_memory_spec.rb +1 -1
  91. data/spec/moneta/expires_file_spec.rb +3 -3
  92. data/spec/moneta/expires_memory_with_default_expires_spec.rb +1 -1
  93. data/spec/moneta/mutex_spec.rb +1 -1
  94. data/spec/moneta/optionmerger_spec.rb +26 -26
  95. data/spec/moneta/pool_spec.rb +1 -1
  96. data/spec/moneta/semaphore_spec.rb +1 -1
  97. data/spec/moneta/shared_tcp_spec.rb +2 -2
  98. data/spec/moneta/shared_unix_spec.rb +2 -2
  99. data/spec/moneta/stack_file_memory_spec.rb +1 -1
  100. data/spec/moneta/stack_memory_file_spec.rb +1 -1
  101. data/spec/moneta/standard_activerecord_spec.rb +1 -1
  102. data/spec/moneta/standard_activerecord_with_expires_spec.rb +1 -1
  103. data/spec/moneta/standard_cassandra_spec.rb +1 -1
  104. data/spec/moneta/standard_client_tcp_spec.rb +1 -1
  105. data/spec/moneta/standard_client_unix_spec.rb +2 -2
  106. data/spec/moneta/standard_couch_spec.rb +1 -1
  107. data/spec/moneta/standard_couch_with_expires_spec.rb +1 -1
  108. data/spec/moneta/standard_datamapper_spec.rb +2 -2
  109. data/spec/moneta/standard_datamapper_with_expires_spec.rb +2 -2
  110. data/spec/moneta/standard_datamapper_with_repository_spec.rb +2 -2
  111. data/spec/moneta/standard_daybreak_spec.rb +1 -1
  112. data/spec/moneta/standard_daybreak_with_expires_spec.rb +1 -1
  113. data/spec/moneta/standard_dbm_spec.rb +1 -1
  114. data/spec/moneta/standard_dbm_with_expires_spec.rb +1 -1
  115. data/spec/moneta/standard_file_spec.rb +1 -1
  116. data/spec/moneta/standard_file_with_expires_spec.rb +1 -1
  117. data/spec/moneta/standard_fog_spec.rb +4 -4
  118. data/spec/moneta/standard_fog_with_expires_spec.rb +5 -5
  119. data/spec/moneta/standard_gdbm_spec.rb +1 -1
  120. data/spec/moneta/standard_gdbm_with_expires_spec.rb +1 -1
  121. data/spec/moneta/standard_hashfile_spec.rb +1 -1
  122. data/spec/moneta/standard_hashfile_with_expires_spec.rb +1 -1
  123. data/spec/moneta/standard_hbase_spec.rb +1 -1
  124. data/spec/moneta/standard_hbase_with_expires_spec.rb +1 -1
  125. data/spec/moneta/standard_kyotocabinet_spec.rb +1 -1
  126. data/spec/moneta/standard_kyotocabinet_with_expires_spec.rb +1 -1
  127. data/spec/moneta/standard_leveldb_spec.rb +1 -1
  128. data/spec/moneta/standard_leveldb_with_expires_spec.rb +1 -1
  129. data/spec/moneta/standard_lmdb_spec.rb +1 -1
  130. data/spec/moneta/standard_lmdb_with_expires_spec.rb +1 -1
  131. data/spec/moneta/standard_localmemcache_spec.rb +1 -1
  132. data/spec/moneta/standard_localmemcache_with_expires_spec.rb +1 -1
  133. data/spec/moneta/standard_lruhash_spec.rb +1 -1
  134. data/spec/moneta/standard_lruhash_with_expires_spec.rb +1 -1
  135. data/spec/moneta/standard_memcached_dalli_spec.rb +1 -1
  136. data/spec/moneta/standard_memcached_native_spec.rb +1 -1
  137. data/spec/moneta/standard_memcached_spec.rb +1 -1
  138. data/spec/moneta/standard_memory_spec.rb +1 -1
  139. data/spec/moneta/standard_memory_with_compress_spec.rb +1 -1
  140. data/spec/moneta/standard_memory_with_expires_spec.rb +1 -1
  141. data/spec/moneta/standard_memory_with_json_key_serializer_spec.rb +1 -1
  142. data/spec/moneta/standard_memory_with_json_serializer_spec.rb +1 -1
  143. data/spec/moneta/standard_memory_with_json_value_serializer_spec.rb +1 -1
  144. data/spec/moneta/standard_memory_with_prefix_spec.rb +1 -1
  145. data/spec/moneta/standard_memory_with_snappy_compress_spec.rb +1 -1
  146. data/spec/moneta/standard_mongo_moped_spec.rb +255 -0
  147. data/spec/moneta/standard_mongo_official_spec.rb +255 -0
  148. data/spec/moneta/standard_mongo_spec.rb +1 -1
  149. data/spec/moneta/standard_null_spec.rb +1 -1
  150. data/spec/moneta/standard_pstore_spec.rb +1 -1
  151. data/spec/moneta/standard_pstore_with_expires_spec.rb +1 -1
  152. data/spec/moneta/standard_redis_spec.rb +1 -1
  153. data/spec/moneta/standard_restclient_spec.rb +1 -1
  154. data/spec/moneta/standard_riak_spec.rb +1 -1
  155. data/spec/moneta/standard_riak_with_expires_spec.rb +1 -1
  156. data/spec/moneta/standard_sdbm_spec.rb +1 -1
  157. data/spec/moneta/standard_sdbm_with_expires_spec.rb +1 -1
  158. data/spec/moneta/standard_sequel_spec.rb +1 -1
  159. data/spec/moneta/standard_sequel_with_expires_spec.rb +1 -1
  160. data/spec/moneta/standard_sqlite_spec.rb +1 -1
  161. data/spec/moneta/standard_sqlite_with_expires_spec.rb +1 -1
  162. data/spec/moneta/standard_tdb_spec.rb +1 -1
  163. data/spec/moneta/standard_tdb_with_expires_spec.rb +1 -1
  164. data/spec/moneta/standard_tokyocabinet_spec.rb +1 -1
  165. data/spec/moneta/standard_tokyocabinet_with_expires_spec.rb +1 -1
  166. data/spec/moneta/standard_tokyotyrant_spec.rb +1 -1
  167. data/spec/moneta/standard_tokyotyrant_with_expires_spec.rb +1 -1
  168. data/spec/moneta/standard_yaml_spec.rb +1 -1
  169. data/spec/moneta/standard_yaml_with_expires_spec.rb +1 -1
  170. data/spec/moneta/transformer_bencode_spec.rb +1 -1
  171. data/spec/moneta/transformer_bert_spec.rb +1 -1
  172. data/spec/moneta/transformer_bson_spec.rb +1 -1
  173. data/spec/moneta/transformer_bzip2_spec.rb +1 -1
  174. data/spec/moneta/transformer_json_spec.rb +1 -1
  175. data/spec/moneta/transformer_key_inspect_spec.rb +1 -1
  176. data/spec/moneta/transformer_key_marshal_spec.rb +1 -1
  177. data/spec/moneta/transformer_key_to_s_spec.rb +1 -1
  178. data/spec/moneta/transformer_key_yaml_spec.rb +1 -1
  179. data/spec/moneta/transformer_lz4_spec.rb +1 -1
  180. data/spec/moneta/transformer_lzma_spec.rb +1 -1
  181. data/spec/moneta/transformer_lzo_spec.rb +1 -1
  182. data/spec/moneta/transformer_marshal_base64_spec.rb +1 -1
  183. data/spec/moneta/transformer_marshal_city128_spec.rb +1 -1
  184. data/spec/moneta/transformer_marshal_city32_spec.rb +1 -1
  185. data/spec/moneta/transformer_marshal_city64_spec.rb +1 -1
  186. data/spec/moneta/transformer_marshal_escape_spec.rb +1 -1
  187. data/spec/moneta/transformer_marshal_hex_spec.rb +1 -1
  188. data/spec/moneta/transformer_marshal_hmac_spec.rb +1 -1
  189. data/spec/moneta/transformer_marshal_md5_spec.rb +1 -1
  190. data/spec/moneta/transformer_marshal_md5_spread_spec.rb +1 -1
  191. data/spec/moneta/transformer_marshal_prefix_spec.rb +1 -1
  192. data/spec/moneta/transformer_marshal_qp_spec.rb +1 -1
  193. data/spec/moneta/transformer_marshal_rmd160_spec.rb +1 -1
  194. data/spec/moneta/transformer_marshal_sha1_spec.rb +1 -1
  195. data/spec/moneta/transformer_marshal_sha256_spec.rb +1 -1
  196. data/spec/moneta/transformer_marshal_sha384_spec.rb +1 -1
  197. data/spec/moneta/transformer_marshal_sha512_spec.rb +1 -1
  198. data/spec/moneta/transformer_marshal_spec.rb +1 -1
  199. data/spec/moneta/transformer_marshal_truncate_spec.rb +1 -1
  200. data/spec/moneta/transformer_marshal_uuencode_spec.rb +1 -1
  201. data/spec/moneta/transformer_msgpack_spec.rb +1 -1
  202. data/spec/moneta/transformer_ox_spec.rb +1 -1
  203. data/spec/moneta/transformer_php_spec.rb +1 -1
  204. data/spec/moneta/transformer_quicklz_spec.rb +1 -1
  205. data/spec/moneta/transformer_snappy_spec.rb +1 -1
  206. data/spec/moneta/transformer_tnet_spec.rb +1 -1
  207. data/spec/moneta/transformer_value_marshal_spec.rb +1 -1
  208. data/spec/moneta/transformer_value_yaml_spec.rb +1 -1
  209. data/spec/moneta/transformer_yaml_spec.rb +1 -1
  210. data/spec/moneta/transformer_zlib_spec.rb +1 -1
  211. data/spec/moneta/weak_create_spec.rb +4 -4
  212. data/spec/moneta/weak_increment_spec.rb +4 -4
  213. data/spec/monetaspecs.rb +481 -481
  214. metadata +14 -185
@@ -8,7 +8,7 @@ describe_moneta "standard_hashfile_with_expires" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_hashfile_with_expires.log')})
11
+ Moneta.new(:HashFile, dir: File.join(make_tempdir, "simple_hashfile_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_hashfile_with_expires.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_hbase" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:HBase, :table => "simple_hbase", :logger => {:file => File.join(make_tempdir, 'standard_hbase.log')})
11
+ Moneta.new(:HBase, table: "simple_hbase", logger: {file: File.join(make_tempdir, 'standard_hbase.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_hbase_with_expires" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:HBase, :table => "simple_hbase", :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_hbase_with_expires.log')})
11
+ Moneta.new(:HBase, table: "simple_hbase", expires: true, logger: {file: File.join(make_tempdir, 'standard_hbase_with_expires.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_kyotocabinet" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:KyotoCabinet, :file => File.join(make_tempdir, "simple_kyotocabinet.kch"), :logger => {:file => File.join(make_tempdir, 'standard_kyotocabinet.log')})
11
+ Moneta.new(:KyotoCabinet, file: File.join(make_tempdir, "simple_kyotocabinet.kch"), logger: {file: File.join(make_tempdir, 'standard_kyotocabinet.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_kyotocabinet_with_expires" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:KyotoCabinet, :file => File.join(make_tempdir, "simple_kyotocabinet_with_expires.kch"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_kyotocabinet_with_expires.log')})
11
+ Moneta.new(:KyotoCabinet, file: File.join(make_tempdir, "simple_kyotocabinet_with_expires.kch"), expires: true, logger: {file: File.join(make_tempdir, 'standard_kyotocabinet_with_expires.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_leveldb" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:LevelDB, :dir => File.join(make_tempdir, "simple_leveldb"), :logger => {:file => File.join(make_tempdir, 'standard_leveldb.log')})
11
+ Moneta.new(:LevelDB, dir: File.join(make_tempdir, "simple_leveldb"), logger: {file: File.join(make_tempdir, 'standard_leveldb.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_leveldb_with_expires" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:LevelDB, :dir => File.join(make_tempdir, "simple_leveldb_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_leveldb_with_expires.log')})
11
+ Moneta.new(:LevelDB, dir: File.join(make_tempdir, "simple_leveldb_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_leveldb_with_expires.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_lmdb" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:LMDB, :dir => File.join(make_tempdir, "simple_lmdb"), :logger => {:file => File.join(make_tempdir, 'standard_lmdb.log')})
11
+ Moneta.new(:LMDB, dir: File.join(make_tempdir, "simple_lmdb"), logger: {file: File.join(make_tempdir, 'standard_lmdb.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_lmdb_with_expires" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:LMDB, :dir => File.join(make_tempdir, "simple_lmdb_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_lmdb_with_expires.log')})
11
+ Moneta.new(:LMDB, dir: File.join(make_tempdir, "simple_lmdb_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_lmdb_with_expires.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_localmemcache" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:LocalMemCache, :file => File.join(make_tempdir, "simple_localmemcache"), :logger => {:file => File.join(make_tempdir, 'standard_localmemcache.log')})
11
+ Moneta.new(:LocalMemCache, file: File.join(make_tempdir, "simple_localmemcache"), logger: {file: File.join(make_tempdir, 'standard_localmemcache.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_localmemcache_with_expires" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:LocalMemCache, :file => File.join(make_tempdir, "simple_localmemcache_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_localmemcache_with_expires.log')})
11
+ Moneta.new(:LocalMemCache, file: File.join(make_tempdir, "simple_localmemcache_with_expires"), expires: true, logger: {file: File.join(make_tempdir, 'standard_localmemcache_with_expires.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_lruhash" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:LRUHash, :logger => {:file => File.join(make_tempdir, 'standard_lruhash.log')})
11
+ Moneta.new(:LRUHash, logger: {file: File.join(make_tempdir, 'standard_lruhash.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_lruhash_with_expires" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:LRUHash, :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_lruhash_with_expires.log')})
11
+ Moneta.new(:LRUHash, expires: true, logger: {file: File.join(make_tempdir, 'standard_lruhash_with_expires.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memcached_dalli" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:MemcachedDalli, :namespace => "simple_memcached_dalli", :logger => {:file => File.join(make_tempdir, 'standard_memcached_dalli.log')})
11
+ Moneta.new(:MemcachedDalli, namespace: "simple_memcached_dalli", logger: {file: File.join(make_tempdir, 'standard_memcached_dalli.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memcached_native" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:MemcachedNative, :namespace => "simple_memcached_native", :logger => {:file => File.join(make_tempdir, 'standard_memcached_native.log')})
11
+ Moneta.new(:MemcachedNative, namespace: "simple_memcached_native", logger: {file: File.join(make_tempdir, 'standard_memcached_native.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memcached" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:Memcached, :namespace => "simple_memcached", :logger => {:file => File.join(make_tempdir, 'standard_memcached.log')})
11
+ Moneta.new(:Memcached, namespace: "simple_memcached", logger: {file: File.join(make_tempdir, 'standard_memcached.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memory" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:Memory, :logger => {:file => File.join(make_tempdir, 'standard_memory.log')})
11
+ Moneta.new(:Memory, logger: {file: File.join(make_tempdir, 'standard_memory.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_compress" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:Memory, :compress => true, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_compress.log')})
11
+ Moneta.new(:Memory, compress: true, logger: {file: File.join(make_tempdir, 'standard_memory_with_compress.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_expires" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:Memory, :expires => true, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_expires.log')})
11
+ Moneta.new(:Memory, expires: true, logger: {file: File.join(make_tempdir, 'standard_memory_with_expires.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_json_key_serializer" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:Memory, :key_serializer => :json, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_json_key_serializer.log')})
11
+ Moneta.new(:Memory, key_serializer: :json, logger: {file: File.join(make_tempdir, 'standard_memory_with_json_key_serializer.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_json_serializer" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:Memory, :serializer => :json, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_json_serializer.log')})
11
+ Moneta.new(:Memory, serializer: :json, logger: {file: File.join(make_tempdir, 'standard_memory_with_json_serializer.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_json_value_serializer" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:Memory, :value_serializer => :json, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_json_value_serializer.log')})
11
+ Moneta.new(:Memory, value_serializer: :json, logger: {file: File.join(make_tempdir, 'standard_memory_with_json_value_serializer.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_prefix" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:Memory, :prefix => "moneta", :logger => {:file => File.join(make_tempdir, 'standard_memory_with_prefix.log')})
11
+ Moneta.new(:Memory, prefix: "moneta", logger: {file: File.join(make_tempdir, 'standard_memory_with_prefix.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -8,7 +8,7 @@ describe_moneta "standard_memory_with_snappy_compress" do
8
8
  end
9
9
 
10
10
  def new_store
11
- Moneta.new(:Memory, :compress => :snappy, :logger => {:file => File.join(make_tempdir, 'standard_memory_with_snappy_compress.log')})
11
+ Moneta.new(:Memory, compress: :snappy, logger: {file: File.join(make_tempdir, 'standard_memory_with_snappy_compress.log')})
12
12
  end
13
13
 
14
14
  def load_value(value)
@@ -0,0 +1,255 @@
1
+ # coding: binary
2
+ # Generated by generate-specs
3
+ require 'helper'
4
+
5
+ describe_moneta "standard_mongo_moped" do
6
+ def features
7
+ [:create, :expires, :increment]
8
+ end
9
+
10
+ def new_store
11
+ Moneta.new(:MongoMoped, db: 'standard_mongo_moped', logger: {file: File.join(make_tempdir, 'standard_mongo_moped.log')})
12
+ end
13
+
14
+ def load_value(value)
15
+ Marshal.load(value)
16
+ end
17
+
18
+ include_context 'setup_store'
19
+ it_should_behave_like 'concurrent_create'
20
+ it_should_behave_like 'concurrent_increment'
21
+ it_should_behave_like 'create'
22
+ it_should_behave_like 'create_expires'
23
+ it_should_behave_like 'expires'
24
+ it_should_behave_like 'features'
25
+ it_should_behave_like 'increment'
26
+ it_should_behave_like 'marshallable_key'
27
+ it_should_behave_like 'marshallable_value'
28
+ it_should_behave_like 'multiprocess'
29
+ it_should_behave_like 'null_objectkey_objectvalue'
30
+ it_should_behave_like 'null_objectkey_stringvalue'
31
+ it_should_behave_like 'null_objectkey_binaryvalue'
32
+ it_should_behave_like 'null_objectkey_hashvalue'
33
+ it_should_behave_like 'null_objectkey_booleanvalue'
34
+ it_should_behave_like 'null_objectkey_nilvalue'
35
+ it_should_behave_like 'null_objectkey_integervalue'
36
+ it_should_behave_like 'null_objectkey_numbervalue'
37
+ it_should_behave_like 'null_stringkey_objectvalue'
38
+ it_should_behave_like 'null_stringkey_stringvalue'
39
+ it_should_behave_like 'null_stringkey_binaryvalue'
40
+ it_should_behave_like 'null_stringkey_hashvalue'
41
+ it_should_behave_like 'null_stringkey_booleanvalue'
42
+ it_should_behave_like 'null_stringkey_nilvalue'
43
+ it_should_behave_like 'null_stringkey_integervalue'
44
+ it_should_behave_like 'null_stringkey_numbervalue'
45
+ it_should_behave_like 'null_binarykey_objectvalue'
46
+ it_should_behave_like 'null_binarykey_stringvalue'
47
+ it_should_behave_like 'null_binarykey_binaryvalue'
48
+ it_should_behave_like 'null_binarykey_hashvalue'
49
+ it_should_behave_like 'null_binarykey_booleanvalue'
50
+ it_should_behave_like 'null_binarykey_nilvalue'
51
+ it_should_behave_like 'null_binarykey_integervalue'
52
+ it_should_behave_like 'null_binarykey_numbervalue'
53
+ it_should_behave_like 'null_hashkey_objectvalue'
54
+ it_should_behave_like 'null_hashkey_stringvalue'
55
+ it_should_behave_like 'null_hashkey_binaryvalue'
56
+ it_should_behave_like 'null_hashkey_hashvalue'
57
+ it_should_behave_like 'null_hashkey_booleanvalue'
58
+ it_should_behave_like 'null_hashkey_nilvalue'
59
+ it_should_behave_like 'null_hashkey_integervalue'
60
+ it_should_behave_like 'null_hashkey_numbervalue'
61
+ it_should_behave_like 'null_booleankey_objectvalue'
62
+ it_should_behave_like 'null_booleankey_stringvalue'
63
+ it_should_behave_like 'null_booleankey_binaryvalue'
64
+ it_should_behave_like 'null_booleankey_hashvalue'
65
+ it_should_behave_like 'null_booleankey_booleanvalue'
66
+ it_should_behave_like 'null_booleankey_nilvalue'
67
+ it_should_behave_like 'null_booleankey_integervalue'
68
+ it_should_behave_like 'null_booleankey_numbervalue'
69
+ it_should_behave_like 'null_nilkey_objectvalue'
70
+ it_should_behave_like 'null_nilkey_stringvalue'
71
+ it_should_behave_like 'null_nilkey_binaryvalue'
72
+ it_should_behave_like 'null_nilkey_hashvalue'
73
+ it_should_behave_like 'null_nilkey_booleanvalue'
74
+ it_should_behave_like 'null_nilkey_nilvalue'
75
+ it_should_behave_like 'null_nilkey_integervalue'
76
+ it_should_behave_like 'null_nilkey_numbervalue'
77
+ it_should_behave_like 'null_integerkey_objectvalue'
78
+ it_should_behave_like 'null_integerkey_stringvalue'
79
+ it_should_behave_like 'null_integerkey_binaryvalue'
80
+ it_should_behave_like 'null_integerkey_hashvalue'
81
+ it_should_behave_like 'null_integerkey_booleanvalue'
82
+ it_should_behave_like 'null_integerkey_nilvalue'
83
+ it_should_behave_like 'null_integerkey_integervalue'
84
+ it_should_behave_like 'null_integerkey_numbervalue'
85
+ it_should_behave_like 'null_numberkey_objectvalue'
86
+ it_should_behave_like 'null_numberkey_stringvalue'
87
+ it_should_behave_like 'null_numberkey_binaryvalue'
88
+ it_should_behave_like 'null_numberkey_hashvalue'
89
+ it_should_behave_like 'null_numberkey_booleanvalue'
90
+ it_should_behave_like 'null_numberkey_nilvalue'
91
+ it_should_behave_like 'null_numberkey_integervalue'
92
+ it_should_behave_like 'null_numberkey_numbervalue'
93
+ it_should_behave_like 'persist_objectkey_objectvalue'
94
+ it_should_behave_like 'persist_objectkey_stringvalue'
95
+ it_should_behave_like 'persist_objectkey_binaryvalue'
96
+ it_should_behave_like 'persist_objectkey_hashvalue'
97
+ it_should_behave_like 'persist_objectkey_booleanvalue'
98
+ it_should_behave_like 'persist_objectkey_nilvalue'
99
+ it_should_behave_like 'persist_objectkey_integervalue'
100
+ it_should_behave_like 'persist_objectkey_numbervalue'
101
+ it_should_behave_like 'persist_stringkey_objectvalue'
102
+ it_should_behave_like 'persist_stringkey_stringvalue'
103
+ it_should_behave_like 'persist_stringkey_binaryvalue'
104
+ it_should_behave_like 'persist_stringkey_hashvalue'
105
+ it_should_behave_like 'persist_stringkey_booleanvalue'
106
+ it_should_behave_like 'persist_stringkey_nilvalue'
107
+ it_should_behave_like 'persist_stringkey_integervalue'
108
+ it_should_behave_like 'persist_stringkey_numbervalue'
109
+ it_should_behave_like 'persist_binarykey_objectvalue'
110
+ it_should_behave_like 'persist_binarykey_stringvalue'
111
+ it_should_behave_like 'persist_binarykey_binaryvalue'
112
+ it_should_behave_like 'persist_binarykey_hashvalue'
113
+ it_should_behave_like 'persist_binarykey_booleanvalue'
114
+ it_should_behave_like 'persist_binarykey_nilvalue'
115
+ it_should_behave_like 'persist_binarykey_integervalue'
116
+ it_should_behave_like 'persist_binarykey_numbervalue'
117
+ it_should_behave_like 'persist_hashkey_objectvalue'
118
+ it_should_behave_like 'persist_hashkey_stringvalue'
119
+ it_should_behave_like 'persist_hashkey_binaryvalue'
120
+ it_should_behave_like 'persist_hashkey_hashvalue'
121
+ it_should_behave_like 'persist_hashkey_booleanvalue'
122
+ it_should_behave_like 'persist_hashkey_nilvalue'
123
+ it_should_behave_like 'persist_hashkey_integervalue'
124
+ it_should_behave_like 'persist_hashkey_numbervalue'
125
+ it_should_behave_like 'persist_booleankey_objectvalue'
126
+ it_should_behave_like 'persist_booleankey_stringvalue'
127
+ it_should_behave_like 'persist_booleankey_binaryvalue'
128
+ it_should_behave_like 'persist_booleankey_hashvalue'
129
+ it_should_behave_like 'persist_booleankey_booleanvalue'
130
+ it_should_behave_like 'persist_booleankey_nilvalue'
131
+ it_should_behave_like 'persist_booleankey_integervalue'
132
+ it_should_behave_like 'persist_booleankey_numbervalue'
133
+ it_should_behave_like 'persist_nilkey_objectvalue'
134
+ it_should_behave_like 'persist_nilkey_stringvalue'
135
+ it_should_behave_like 'persist_nilkey_binaryvalue'
136
+ it_should_behave_like 'persist_nilkey_hashvalue'
137
+ it_should_behave_like 'persist_nilkey_booleanvalue'
138
+ it_should_behave_like 'persist_nilkey_nilvalue'
139
+ it_should_behave_like 'persist_nilkey_integervalue'
140
+ it_should_behave_like 'persist_nilkey_numbervalue'
141
+ it_should_behave_like 'persist_integerkey_objectvalue'
142
+ it_should_behave_like 'persist_integerkey_stringvalue'
143
+ it_should_behave_like 'persist_integerkey_binaryvalue'
144
+ it_should_behave_like 'persist_integerkey_hashvalue'
145
+ it_should_behave_like 'persist_integerkey_booleanvalue'
146
+ it_should_behave_like 'persist_integerkey_nilvalue'
147
+ it_should_behave_like 'persist_integerkey_integervalue'
148
+ it_should_behave_like 'persist_integerkey_numbervalue'
149
+ it_should_behave_like 'persist_numberkey_objectvalue'
150
+ it_should_behave_like 'persist_numberkey_stringvalue'
151
+ it_should_behave_like 'persist_numberkey_binaryvalue'
152
+ it_should_behave_like 'persist_numberkey_hashvalue'
153
+ it_should_behave_like 'persist_numberkey_booleanvalue'
154
+ it_should_behave_like 'persist_numberkey_nilvalue'
155
+ it_should_behave_like 'persist_numberkey_integervalue'
156
+ it_should_behave_like 'persist_numberkey_numbervalue'
157
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
158
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
159
+ it_should_behave_like 'returndifferent_objectkey_binaryvalue'
160
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
161
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
162
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
163
+ it_should_behave_like 'returndifferent_stringkey_binaryvalue'
164
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
165
+ it_should_behave_like 'returndifferent_binarykey_objectvalue'
166
+ it_should_behave_like 'returndifferent_binarykey_stringvalue'
167
+ it_should_behave_like 'returndifferent_binarykey_binaryvalue'
168
+ it_should_behave_like 'returndifferent_binarykey_hashvalue'
169
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
170
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
171
+ it_should_behave_like 'returndifferent_hashkey_binaryvalue'
172
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
173
+ it_should_behave_like 'returndifferent_booleankey_objectvalue'
174
+ it_should_behave_like 'returndifferent_booleankey_stringvalue'
175
+ it_should_behave_like 'returndifferent_booleankey_binaryvalue'
176
+ it_should_behave_like 'returndifferent_booleankey_hashvalue'
177
+ it_should_behave_like 'returndifferent_nilkey_objectvalue'
178
+ it_should_behave_like 'returndifferent_nilkey_stringvalue'
179
+ it_should_behave_like 'returndifferent_nilkey_binaryvalue'
180
+ it_should_behave_like 'returndifferent_nilkey_hashvalue'
181
+ it_should_behave_like 'returndifferent_integerkey_objectvalue'
182
+ it_should_behave_like 'returndifferent_integerkey_stringvalue'
183
+ it_should_behave_like 'returndifferent_integerkey_binaryvalue'
184
+ it_should_behave_like 'returndifferent_integerkey_hashvalue'
185
+ it_should_behave_like 'returndifferent_numberkey_objectvalue'
186
+ it_should_behave_like 'returndifferent_numberkey_stringvalue'
187
+ it_should_behave_like 'returndifferent_numberkey_binaryvalue'
188
+ it_should_behave_like 'returndifferent_numberkey_hashvalue'
189
+ it_should_behave_like 'store_objectkey_objectvalue'
190
+ it_should_behave_like 'store_objectkey_stringvalue'
191
+ it_should_behave_like 'store_objectkey_binaryvalue'
192
+ it_should_behave_like 'store_objectkey_hashvalue'
193
+ it_should_behave_like 'store_objectkey_booleanvalue'
194
+ it_should_behave_like 'store_objectkey_nilvalue'
195
+ it_should_behave_like 'store_objectkey_integervalue'
196
+ it_should_behave_like 'store_objectkey_numbervalue'
197
+ it_should_behave_like 'store_stringkey_objectvalue'
198
+ it_should_behave_like 'store_stringkey_stringvalue'
199
+ it_should_behave_like 'store_stringkey_binaryvalue'
200
+ it_should_behave_like 'store_stringkey_hashvalue'
201
+ it_should_behave_like 'store_stringkey_booleanvalue'
202
+ it_should_behave_like 'store_stringkey_nilvalue'
203
+ it_should_behave_like 'store_stringkey_integervalue'
204
+ it_should_behave_like 'store_stringkey_numbervalue'
205
+ it_should_behave_like 'store_binarykey_objectvalue'
206
+ it_should_behave_like 'store_binarykey_stringvalue'
207
+ it_should_behave_like 'store_binarykey_binaryvalue'
208
+ it_should_behave_like 'store_binarykey_hashvalue'
209
+ it_should_behave_like 'store_binarykey_booleanvalue'
210
+ it_should_behave_like 'store_binarykey_nilvalue'
211
+ it_should_behave_like 'store_binarykey_integervalue'
212
+ it_should_behave_like 'store_binarykey_numbervalue'
213
+ it_should_behave_like 'store_hashkey_objectvalue'
214
+ it_should_behave_like 'store_hashkey_stringvalue'
215
+ it_should_behave_like 'store_hashkey_binaryvalue'
216
+ it_should_behave_like 'store_hashkey_hashvalue'
217
+ it_should_behave_like 'store_hashkey_booleanvalue'
218
+ it_should_behave_like 'store_hashkey_nilvalue'
219
+ it_should_behave_like 'store_hashkey_integervalue'
220
+ it_should_behave_like 'store_hashkey_numbervalue'
221
+ it_should_behave_like 'store_booleankey_objectvalue'
222
+ it_should_behave_like 'store_booleankey_stringvalue'
223
+ it_should_behave_like 'store_booleankey_binaryvalue'
224
+ it_should_behave_like 'store_booleankey_hashvalue'
225
+ it_should_behave_like 'store_booleankey_booleanvalue'
226
+ it_should_behave_like 'store_booleankey_nilvalue'
227
+ it_should_behave_like 'store_booleankey_integervalue'
228
+ it_should_behave_like 'store_booleankey_numbervalue'
229
+ it_should_behave_like 'store_nilkey_objectvalue'
230
+ it_should_behave_like 'store_nilkey_stringvalue'
231
+ it_should_behave_like 'store_nilkey_binaryvalue'
232
+ it_should_behave_like 'store_nilkey_hashvalue'
233
+ it_should_behave_like 'store_nilkey_booleanvalue'
234
+ it_should_behave_like 'store_nilkey_nilvalue'
235
+ it_should_behave_like 'store_nilkey_integervalue'
236
+ it_should_behave_like 'store_nilkey_numbervalue'
237
+ it_should_behave_like 'store_integerkey_objectvalue'
238
+ it_should_behave_like 'store_integerkey_stringvalue'
239
+ it_should_behave_like 'store_integerkey_binaryvalue'
240
+ it_should_behave_like 'store_integerkey_hashvalue'
241
+ it_should_behave_like 'store_integerkey_booleanvalue'
242
+ it_should_behave_like 'store_integerkey_nilvalue'
243
+ it_should_behave_like 'store_integerkey_integervalue'
244
+ it_should_behave_like 'store_integerkey_numbervalue'
245
+ it_should_behave_like 'store_numberkey_objectvalue'
246
+ it_should_behave_like 'store_numberkey_stringvalue'
247
+ it_should_behave_like 'store_numberkey_binaryvalue'
248
+ it_should_behave_like 'store_numberkey_hashvalue'
249
+ it_should_behave_like 'store_numberkey_booleanvalue'
250
+ it_should_behave_like 'store_numberkey_nilvalue'
251
+ it_should_behave_like 'store_numberkey_integervalue'
252
+ it_should_behave_like 'store_numberkey_numbervalue'
253
+ it_should_behave_like 'store_large'
254
+ it_should_behave_like 'transform_value'
255
+ end