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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d992dc7597746374044079fd618a13b1e988766a
4
- data.tar.gz: fec8939551039410e2412294f2fa19755413edfe
3
+ metadata.gz: 642e4643f1753537b4510ce0a47cbdbdfb65ebf2
4
+ data.tar.gz: 807acd8640b3ae0a78ae725062a6412a2e82b188
5
5
  SHA512:
6
- metadata.gz: 13fa047663d93ec878871a9aaac054589dbc3135994bb320575b2c55185d88a3b395658350b2d140052ca9217a2b5558d17513f1354a409759fb9e8b399778ab
7
- data.tar.gz: a93d886f2b8ca3ddb1ab258603ba3b3b9ceb318d814b99022c107e9aa138041ccd564f679e90ea0e18b440ef4421a46f405b578f854388f5fcf0503881b7cdb6
6
+ metadata.gz: 043562b273cffcb3d165412bc9fb20524a88f05b7c39e3dc26e1982a3ad3f63c8583564ceeb169b553bd33979b821183f40edd1a5ce66a9840533655e84445ea
7
+ data.tar.gz: 8d47b90c541c2917a4a05aa5ee896140052d94119aabdea1ba87d88865ed531d11488b8fbcf2efef11f88d5b805f6e5024be8ea58ce05233a0d25f11e0a0ff55
@@ -1,12 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 2.1.0
3
4
  - 2.0.0
4
5
  - 1.9.3
5
- - 1.8.7
6
6
  - jruby-19mode
7
- - jruby-18mode
8
7
  - rbx-19mode
9
- - rbx-18mode
10
8
  before_install:
11
9
  #- script/install-kyotocabinet
12
10
  - sudo apt-get install -qq libtokyocabinet8 libtokyocabinet-dev liblzo2-dev libtdb-dev libleveldb-dev tokyotyrant
@@ -42,9 +40,7 @@ env:
42
40
  - "SCRIPT='benchmarks normal_large'"
43
41
  matrix:
44
42
  allow_failures:
45
- - rvm: jruby-18mode
46
43
  - rvm: jruby-19mode
47
- - rvm: rbx-18mode
48
44
  - rvm: rbx-19mode
49
45
  - env: "SCRIPT='parallel-tests unstable'"
50
46
  script: "eval bundle exec ruby script/$SCRIPT"
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ 0.8.0
2
+
3
+ * Rename Moneta::Adapters::Mongo to Moneta::Adapters::MongoOfficial
4
+ * Add Moneta::Adapters::MongoMoped
5
+ * Drop Ruby 1.8 support
6
+
1
7
  0.7.20
2
8
 
3
9
  * Adapters::LRUHash: add option :max_value
@@ -1,9 +1,11 @@
1
1
  Adrian Madrid <aemadrid@gmail.com>
2
2
  Alejandro Crosa <acrosa@sharing.local>
3
3
  Anthony Eden <anthonyeden@gmail.com>
4
+ AtoxIO <atoxhybrid@gmail.com>
4
5
  Benjamin Yu <benjaminlyu@gmail.com>
5
6
  Ben Schwarz <ben.schwarz@gmail.com>
6
7
  Daniel Mendler <mail@daniel-mendler.de>
8
+ Denis Defreyne <denis.defreyne@stoneship.org>
7
9
  Derek Kastner <dkastner@gmail.com>
8
10
  Dylan Egan <me@dylanegan.com>
9
11
  Hampton Catlin <hcatlin@gmail.com>
data/Gemfile CHANGED
@@ -1,10 +1,3 @@
1
- # Rails 4 requires Ruby >= 1.9
2
- def rails_version
3
- v = ['>= 3.2.11']
4
- v << '< 4.0.0' unless RUBY_VERSION >= '1.9'
5
- v
6
- end
7
-
8
1
  source 'https://rubygems.org'
9
2
  gemspec
10
3
 
@@ -16,26 +9,26 @@ gem 'rspec-retry'
16
9
  gem 'tnetstring'
17
10
  gem 'bencode'
18
11
  gem 'multi_json'
19
- gem 'bson_ext', :platforms => :ruby
20
- gem 'bson', :platforms => :jruby
21
- gem 'ox', :platforms => :ruby
22
- gem 'msgpack', :platforms => :ruby
23
- gem 'msgpack-jruby', :platforms => :jruby
24
- gem 'bert', :platforms => :ruby
12
+ gem 'bson_ext', platforms: :ruby
13
+ gem 'bson', platforms: :jruby
14
+ gem 'ox', platforms: :ruby
15
+ gem 'msgpack', platforms: :ruby
16
+ gem 'msgpack-jruby', platforms: :jruby
17
+ gem 'bert', platforms: :ruby
25
18
  gem 'php_serialize'
26
19
 
27
20
  # Compressors used by Transformer
28
21
  if RUBY_VERSION < '2.0'
29
- gem 'bzip2-ruby', :platforms => :mri # Only on mri currently
22
+ gem 'bzip2-ruby', platforms: :mri # Only on mri currently
30
23
  end
31
- gem 'lz4-ruby', :platforms => :ruby
32
- gem 'ruby-lzma', :platforms => :ruby
33
- gem 'lzoruby', :platforms => :ruby
34
- gem 'snappy', :platforms => :ruby
35
- gem 'qlzruby', :platforms => :ruby
24
+ gem 'lz4-ruby', platforms: :ruby
25
+ gem 'ruby-lzma', platforms: :ruby
26
+ gem 'lzoruby', platforms: :ruby
27
+ gem 'snappy', platforms: :ruby
28
+ gem 'qlzruby', platforms: :ruby
36
29
 
37
30
  # Hash transformer library
38
- gem 'cityhash', :platforms => :ruby
31
+ gem 'cityhash', platforms: :ruby
39
32
 
40
33
  # Backends
41
34
  gem 'faraday'
@@ -44,50 +37,44 @@ gem 'dm-core'
44
37
  gem 'dm-migrations'
45
38
  gem 'dm-mysql-adapter'
46
39
  # FIXME: Use fog master because of failing tests, fixed after 1.11.1
47
- gem 'fog', :github => 'fog/fog'
48
- gem 'activerecord', *rails_version
40
+ gem 'fog', github: 'fog/fog'
41
+ gem 'activerecord', '>= 3.2.11'
49
42
  gem 'redis'
50
43
  gem 'mongo'
44
+ gem 'moped'
51
45
  gem 'sequel'
52
46
  gem 'dalli'
53
47
  gem 'riak-client'
54
48
  gem 'cassandra'
55
49
  gem 'tokyotyrant'
56
- #gem 'ruby-tokyotyrant', :platforms => :ruby
50
+ #gem 'ruby-tokyotyrant', platforms: :ruby
57
51
  #gem 'hbaserb'
58
52
  #gem 'localmemcache'
59
- gem 'tdb', :platforms => :ruby
60
- gem 'leveldb-ruby', :platforms => :ruby
61
- if RUBY_VERSION >= '1.9'
62
- gem 'lmdb', :platforms => :mri
63
- end
53
+ gem 'tdb', platforms: :ruby
54
+ gem 'leveldb-ruby', platforms: :ruby
55
+ gem 'lmdb', platforms: :mri
64
56
  if RUBY_VERSION < '2.0'
65
- gem 'tokyocabinet', :platforms => :ruby
57
+ gem 'tokyocabinet', platforms: :ruby
66
58
  end
67
59
  #if RUBY_VERSION < '2.0' && !defined?(JRUBY_VERSION)
68
60
  # FIXME: We have to check manually for jruby
69
61
  # otherwise bundle install --deployment doesn't work
70
- # gem 'kyotocabinet-ruby', :github => 'minad/kyotocabinet-ruby'
62
+ # gem 'kyotocabinet-ruby', github: 'minad/kyotocabinet-ruby'
71
63
  #end
72
- gem 'memcached', :platforms => :ruby
73
- gem 'jruby-memcached', :platforms => :jruby
74
- gem 'sqlite3', :platforms => :ruby
75
- gem 'activerecord-jdbc-adapter', :platforms => :jruby
76
- gem 'activerecord-jdbcmysql-adapter', :platforms => :jruby
77
- gem 'mysql2', '>= 0.3.12b5', :platforms => :ruby
64
+ gem 'memcached', platforms: :ruby
65
+ gem 'jruby-memcached', platforms: :jruby
66
+ gem 'sqlite3', platforms: :ruby
67
+ gem 'activerecord-jdbc-adapter', platforms: :jruby
68
+ gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
69
+ gem 'mysql2', '>= 0.3.12b5', platforms: :ruby
78
70
  # gdbm for jruby needs ffi
79
- gem 'ffi', :platforms => :jruby
80
- gem 'gdbm', :platforms => :jruby
71
+ gem 'ffi', platforms: :jruby
72
+ gem 'gdbm', platforms: :jruby
81
73
 
82
74
  # Rack integration testing
83
75
  gem 'rack'
84
76
  gem 'rack-cache'
85
77
 
86
78
  # Rails integration testing
87
- gem 'actionpack', *rails_version
79
+ gem 'actionpack', '>= 3.2.11'
88
80
  gem 'minitest', '~> 4.7.4'
89
-
90
- # Fix versions for old ruby 1.8
91
- if RUBY_VERSION < '1.9'
92
- gem 'nokogiri', '< 1.6'
93
- end
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2009 - 2013 Daniel Mendler, Yehuda Katz
1
+ Copyright (c) 2009 - 2014 Daniel Mendler, Yehuda Katz
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,6 +1,7 @@
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)
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)
4
5
 
5
6
  Moneta provides a standard interface for interacting with various kinds of key/value stores. Moneta supports the well-known
6
7
  NoSQL and document based stores.
@@ -18,7 +19,7 @@ A short overview of the features:
18
19
  * Atomic creation of entries (Method `#create`)
19
20
  * Shared/distributed database-wide synchronization primitives `Moneta::Mutex` and `Moneta::Semaphore`
20
21
  * Includes a simple pure-ruby key/value server (`Moneta::Server`) and client (`Moneta::Adapters::Client`)
21
- * Integration with [Rails](http://rubyonrails.org/), [Rack](http://rack.github.com/)/[Rack-Cache](https://github.com/rtomayko/rack-cache), [Sinatra](http://sinatrarb.com/) and [Ramaze](http://ramaze.net/).
22
+ * Integration with [Rails](http://rubyonrails.org/), [Rack](http://rack.github.com/)/[Rack-Cache](https://github.com/rtomayko/rack-cache), [Sinatra](http://sinatrarb.com/), [Padrino](http://padrinorb.com) and [Ramaze](http://ramaze.net/).
22
23
 
23
24
  If you are not yet convinced, you might ask why? What are the goals of the project?
24
25
 
@@ -28,7 +29,6 @@ same for template languages.
28
29
  * To hide a lot of different and maybe complex APIs behind one well-designed and simple Moneta API
29
30
  * 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 :)
30
31
  * 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...)
31
- * See also http://yehudakatz.com/2009/02/12/whats-the-point/
32
32
 
33
33
  Moneta is tested thoroughly using [Travis-CI](http://travis-ci.org/minad/moneta).
34
34
 
@@ -54,7 +54,7 @@ Now you are ready to go:
54
54
  require 'moneta'
55
55
 
56
56
  # Create a simple file store
57
- store = Moneta.new(:File, :dir => 'moneta')
57
+ store = Moneta.new(:File, dir: 'moneta')
58
58
 
59
59
  # Store some entries
60
60
  store['key'] = 'value'
@@ -115,7 +115,7 @@ Out of the box, it supports the following backends. Use the backend name symbol
115
115
  * [Simple Samba database TDB](http://tdb.samba.org/) (`:TDB`)
116
116
  * Document databases:
117
117
  * [CouchDB](http://couchdb.apache.org/) (`:Couch`)
118
- * [MongoDB](http://www.mongodb.org/) (`:Mongo`)
118
+ * [MongoDB](http://www.mongodb.org/) (`:Mongo`, `:MongoOffical` or `:MongoMoped`)
119
119
  * Moneta network protocols:
120
120
  * Moneta key/value client (`:Client` works with `Moneta::Server`)
121
121
  * Moneta HTTP/REST client (`:RestClient` works with `Rack::MonetaRest`)
@@ -130,7 +130,7 @@ to upgrade to a real key/value store.
130
130
 
131
131
  ### Backend feature matrix
132
132
 
133
- __NOTE:__ <a name="backend-matrix">The backend matrix</a> is much more readable on rubydoc.info than on github. [Go there!](http://rubydoc.info/github/minad/moneta/master/file/README.md#backend-matrix)
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)
134
134
 
135
135
  <table>
136
136
 
@@ -138,7 +138,11 @@ __NOTE:__ <a name="backend-matrix">The backend matrix</a> is much more readable
138
138
 
139
139
  <tr><th colspan="2">Persistent stores</th><th colspan="7"></th></tr>
140
140
 
141
- <tr><td>Mongo</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>
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>
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>
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>
142
146
 
143
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>
144
148
 
@@ -210,9 +214,9 @@ __NOTE:__ <a name="backend-matrix">The backend matrix</a> is much more readable
210
214
 
211
215
  </table>
212
216
 
213
- * [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.
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.
214
218
  * [2]: Share a Moneta store between multiple processes using `Moneta::Shared` (See below).
215
- * [3]: Add expiration support by using `Moneta::Expires` or by passing the option `:expires => true` to `Moneta#new`.
219
+ * [3]: Add expiration support by using `Moneta::Expires` or by passing the option `expires: true` to `Moneta#new`.
216
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))
217
221
  * [5]: Depends on server
218
222
  * [6]: Store is multi-process safe because it is an in-memory store, values are not shared between multiple processes
@@ -334,9 +338,9 @@ This allows you to store arbitrary Ruby objects. You can tune some options
334
338
  when you call `Moneta.new`. However for very fine tuning use `Moneta.build`.
335
339
 
336
340
  ~~~ ruby
337
- store = Moneta.new(:Memcached, :server => 'localhost:11211')
341
+ store = Moneta.new(:Memcached, server: 'localhost:11211')
338
342
  store['key'] = 'value'
339
- store['hash_key'] = {:a => 1, :b => 2}
343
+ store['hash_key'] = {a: 1, b: 2}
340
344
  store['object_key'] = MarshallableRubyObject.new
341
345
  ~~~
342
346
 
@@ -348,7 +352,7 @@ store = Moneta.build do
348
352
  use :Expires
349
353
 
350
354
  # Transform key using Marshal and Base64 and value using Marshal
351
- use :Transformer, :key => [:marshal, :base64], :value => :marshal
355
+ use :Transformer, key: [:marshal, :base64], value: :marshal
352
356
 
353
357
  # IMPORTANT: adapter must be defined last for the builder to function properly.
354
358
 
@@ -361,16 +365,16 @@ You can also directly access the underlying adapters if you don't want
361
365
  to use the Moneta stack.
362
366
 
363
367
  ~~~ ruby
364
- db = Moneta::Adapters::File.new(:dir => 'directory')
365
- db['key'] = {:a => 1, :b => 2} # This will fail since you can only store Strings
368
+ db = Moneta::Adapters::File.new(dir: 'directory')
369
+ db['key'] = {a: 1, b: 2} # This will fail since you can only store Strings
366
370
 
367
371
  # However for Mongo and Couch this works
368
372
  # The hash will be mapped directly to a Mongo/Couch document.
369
373
  db = Moneta::Adapters::Couch.new
370
- db['key'] = {:a => 1, :b => 2}
374
+ db['key'] = {a: 1, b: 2}
371
375
 
372
376
  db = Moneta::Adapters::Mongo.new
373
- db['key'] = {:a => 1, :b => 2}
377
+ db['key'] = {a: 1, b: 2}
374
378
  ~~~
375
379
 
376
380
  ### Expiration
@@ -386,19 +390,19 @@ cache = Moneta.build do
386
390
  end
387
391
 
388
392
  # Expires in 60 seconds
389
- cache.store(key, value, :expires => 60)
393
+ cache.store(key, value, expires: 60)
390
394
 
391
395
  # Never expire
392
- cache.store(key, value, :expires => 0)
393
- cache.store(key, value, :expires => false)
396
+ cache.store(key, value, expires: 0)
397
+ cache.store(key, value, expires: false)
394
398
 
395
399
  # Update expires time if value is found
396
- cache.load(key, :expires => 30)
397
- cache.key?(key, :expires => 30)
400
+ cache.load(key, expires: 30)
401
+ cache.key?(key, expires: 30)
398
402
 
399
403
  # Or remove the expiration if found
400
- cache.load(key, :expires => false)
401
- cache.key?(key, :expires => 0)
404
+ cache.load(key, expires: false)
405
+ cache.key?(key, expires: 0)
402
406
  ~~~
403
407
 
404
408
  You can add the expires feature to other backends using the `Moneta::Expires` proxy. But be aware
@@ -406,15 +410,15 @@ that expired values are not deleted automatically if they are not looked up.
406
410
 
407
411
  ~~~ ruby
408
412
  # Using the :expires option
409
- cache = Moneta.new(:File, :dir => '...', :expires => true)
413
+ cache = Moneta.new(:File, dir: '...', expires: true)
410
414
 
411
415
  # or manually by using the proxy...
412
- cache = Moneta::Expires.new(Moneta::Adapters::File.new(:dir => '...'))
416
+ cache = Moneta::Expires.new(Moneta::Adapters::File.new(dir: '...'))
413
417
 
414
418
  # or using the builder...
415
419
  cache = Moneta.build do
416
420
  use :Expires
417
- adapter :File, :dir => '...'
421
+ adapter :File, dir: '...'
418
422
  end
419
423
  ~~~
420
424
 
@@ -441,9 +445,9 @@ if you have a `Moneta::Transformer` somewhere in your proxy stack which transfor
441
445
 
442
446
  ~~~ ruby
443
447
  store.increment('counter') # returns 1, counter created
444
- store.load('counter', :raw => true) # returns 1
448
+ store.load('counter', raw: true) # returns 1
445
449
 
446
- store.store('counter', '10', :raw => true)
450
+ store.store('counter', '10', raw: true)
447
451
  store.increment('counter') # returns 11
448
452
  ~~~
449
453
 
@@ -540,11 +544,11 @@ For raw data access as described before the class `Moneta::OptionMerger` is used
540
544
 
541
545
  ~~~ ruby
542
546
  # All methods after 'with' get the options passed
543
- store.with(:raw => true).load('key')
547
+ store.with(raw: true).load('key')
544
548
 
545
549
  # You can also specify the methods
546
- store.with(:raw => true, :only => :load).load('key')
547
- store.with(:raw => true, :except => [:key?, :increment]).load('key')
550
+ store.with(raw: true, only: :load).load('key')
551
+ store.with(raw: true, except: [:key?, :increment]).load('key')
548
552
 
549
553
  # Syntactic sugar for raw access
550
554
  store.raw.load('key')
@@ -565,8 +569,8 @@ short_lived_store['key'] = 'value'
565
569
  You can add proxies to an existing store. This is useful if you want to compress only a few values for example.
566
570
 
567
571
  ~~~ ruby
568
- compressed_store = store.with(:prefix => 'compressed') do
569
- use :Transformer, :value => :zlib
572
+ compressed_store = store.with(prefix: 'compressed') do
573
+ use :Transformer, value: :zlib
570
574
  end
571
575
 
572
576
  store['key'] = 'this value will not be compressed'
@@ -579,18 +583,19 @@ compressed_store['key'] = 'value will be compressed'
579
583
 
580
584
  Inspired by [redis-store](https://github.com/jodosha/redis-store) there exist integration classes for [Rails](http://rubyonrails.org/) and [Rack](http://rack.github.com/)/[Rack-Cache](https://github.com/rtomayko/rack-cache). You can also use all the Rack middlewares together with Rails and the [Sinatra](http://sinatrarb.com/) framework. There exist the following integration classes:
581
585
 
582
- * Rack, Rails and Sinatra
586
+ * [Rack](http://rack.github.com/), [Rails](http://rubyonrails.org/) and [Sinatra](http://sinatrarb.com/)
583
587
  * `Rack::Session::Moneta` is a Rack middleware to use Moneta for storing sessions
584
588
  * `Rack::MonetaStore` is a Rack middleware which places a Moneta store in the environment and enables per-request caching
585
589
  * `Rack::MonetaCookies` is a Rack middleware which uses Moneta to store cookies
586
590
  * `Rack::MonetaRest` is a Rack application which exposes a Moneta store via REST/HTTP
587
591
  * `Rack::Cache::Moneta` provides meta and entity stores for Rack-Cache
588
- * Rails
592
+ * [Rails](http://rubyonrails.org/)
589
593
  * `ActionDispatch::Session::MonetaStore` is a Rails middleware to use Moneta for storing sessions
590
594
  * `ActiveSupport::Cache::MonetaStore` is a Rails cache implementation which uses a Moneta store as backend
591
- * Ramaze
592
- * `Ramaze::Cache::Moneta` is integrated into the [Ramaze](http://ramaze.net/) project and allows Ramaze to use
595
+ * [Ramaze](http://ramaze.net/)
596
+ * `Ramaze::Cache::Moneta` is integrated into the Ramaze project and allows Ramaze to use
593
597
  Moneta as caching store
598
+ * [Padrino](http://padrinorb.com) adopted Moneta to replace their cache stores in padrino-cache.
594
599
 
595
600
  ### Rack
596
601
 
@@ -602,10 +607,17 @@ You can use Moneta as a [Rack](http://rack.github.com/) session store. Use it in
602
607
  require 'rack/session/moneta'
603
608
 
604
609
  # Use only the adapter name
605
- use Rack::Session::Moneta, :store => :Redis
610
+ use Rack::Session::Moneta, store: :Redis
606
611
 
607
612
  # Use Moneta.new
608
- use Rack::Session::Moneta, :store => Moneta.new(:Memory, :expires => true)
613
+ use Rack::Session::Moneta, store: Moneta.new(:Memory, expires: true)
614
+
615
+ # Set rack options
616
+ use Rack::Session::Moneta, key: 'rack.session',
617
+ domain: 'foo.com',
618
+ path: '/',
619
+ expire_after: 2592000,
620
+ store: Moneta.new(:Memory, expires: true)
609
621
 
610
622
  # Use the Moneta builder
611
623
  use Rack::Session::Moneta do
@@ -617,11 +629,11 @@ end
617
629
  #### Moneta middleware
618
630
 
619
631
  There is a simple middleware which places a Moneta store in the Rack environment at `env['rack.moneta_store']`. It supports per-request
620
- caching if you add the option `:cache => true`. Use it in your `config.ru` like this:
632
+ caching if you add the option `cache: true`. Use it in your `config.ru` like this:
621
633
 
622
634
  ~~~ ruby
623
635
  # Add Rack::MonetaStore somewhere in your rack stack
624
- use Rack::MonetaStore, :Memory, :cache => true
636
+ use Rack::MonetaStore, :Memory, cache: true
625
637
 
626
638
  run lambda { |env|
627
639
  env['rack.moneta_store'] # is a Moneta store with per-request caching
@@ -629,7 +641,7 @@ run lambda { |env|
629
641
 
630
642
  # Pass it a block like the one passed to Moneta.build
631
643
  use Rack::MonetaStore do
632
- use :Transformer, :value => :zlib
644
+ use :Transformer, value: :zlib
633
645
  adapter :Cookie
634
646
  end
635
647
 
@@ -651,7 +663,7 @@ end
651
663
 
652
664
  # Or pass it a block like the one passed to Moneta.build
653
665
  run Rack::MonetaRest.new do
654
- use :Transformer, :value => :zlib
666
+ use :Transformer, value: :zlib
655
667
  adapter :Memory
656
668
  end
657
669
  ~~~
@@ -664,8 +676,8 @@ You can use Moneta as a [Rack-Cache](https://github.com/rtomayko/rack-cache) sto
664
676
  require 'rack/cache/moneta'
665
677
 
666
678
  use Rack::Cache,
667
- :metastore => 'moneta://Memory?expires=true',
668
- :entitystore => 'moneta://Memory?expires=true'
679
+ metastore: 'moneta://Memory?expires=true',
680
+ entitystore: 'moneta://Memory?expires=true'
669
681
 
670
682
  # Or used named Moneta stores
671
683
  Rack::Cache::Moneta['named_metastore'] = Moneta.build do
@@ -673,8 +685,8 @@ Rack::Cache::Moneta['named_metastore'] = Moneta.build do
673
685
  adapter :Memory
674
686
  end
675
687
  use Rack::Cache,
676
- :metastore => 'moneta://named_metastore',
677
- :entity_store => 'moneta://named_entitystore'
688
+ metastore: 'moneta://named_metastore',
689
+ entity_store: 'moneta://named_entitystore'
678
690
  ~~~
679
691
 
680
692
  #### Cookies
@@ -686,7 +698,7 @@ to use all the transformers on the cookies (e.g. `:prefix`, `:marshal` and `:hma
686
698
  ~~~ ruby
687
699
  require 'rack/moneta_cookies'
688
700
 
689
- use Rack::MonetaCookies, :domain => 'example.com', :path => '/path'
701
+ use Rack::MonetaCookies, domain: 'example.com', path: '/path'
690
702
  run lambda { |env|
691
703
  req = Rack::Request.new(env)
692
704
  req.cookies #=> is now a Moneta store!
@@ -708,13 +720,13 @@ Add the session store in your application configuration `config/environments/*.r
708
720
  require 'moneta'
709
721
 
710
722
  # Only by adapter name
711
- config.cache_store :moneta_store, :store => :Memory
723
+ config.cache_store :moneta_store, store: :Memory
712
724
 
713
725
  # Use Moneta.new
714
- config.cache_store :moneta_store, :store => Moneta.new(:Memory)
726
+ config.cache_store :moneta_store, store: Moneta.new(:Memory)
715
727
 
716
728
  # Use the Moneta builder
717
- config.cache_store :moneta_store, :store => Moneta.build do
729
+ config.cache_store :moneta_store, store: Moneta.build do
718
730
  use :Expires
719
731
  adapter :Memory
720
732
  end
@@ -729,19 +741,31 @@ Moneta cache store doesn't support matchers. If you need these features use a di
729
741
  require 'moneta'
730
742
 
731
743
  # Only by adapter name
732
- config.cache_store :moneta_store, :store => :Memory
744
+ config.cache_store :moneta_store, store: :Memory
733
745
 
734
746
  # Use Moneta.new
735
- config.cache_store :moneta_store, :store => Moneta.new(:Memory)
747
+ config.cache_store :moneta_store, store: Moneta.new(:Memory)
736
748
 
737
749
  # Use the Moneta builder
738
- config.cache_store :moneta_store, :store => Moneta.build do
750
+ config.cache_store :moneta_store, store: Moneta.build do
739
751
  use :Expires
740
752
  adapter :Memory
741
753
  end
742
754
  ~~~
743
755
 
744
- ------
756
+ ### Padrino
757
+
758
+ [Padrino](http://padrinorb.com/) adopted Moneta to replace their cache stores in padrino-cache. You use it like this
759
+
760
+ ~~~ ruby
761
+ # Global Padrino caching
762
+ # Don't forget the expires: [true, Integer] if you want expiration support!
763
+ Padrino.cache = Moneta.new(:Memory, expires: true)
764
+
765
+ # Application caching
766
+ # Don't forget the expires: [true, Integer] if you want expiration support!
767
+ set :cache, Moneta.new(:Memory, expires: true)
768
+ ~~~
745
769
 
746
770
  ## Advanced
747
771
 
@@ -755,14 +779,14 @@ they will share the same data which will also be persistet in the database `shar
755
779
  require 'moneta'
756
780
 
757
781
  store = Moneta.build do
758
- use :Transformer, :key => :marshal, :value => :marshal
782
+ use :Transformer, key: :marshal, value: :marshal
759
783
  use :Shared do
760
784
  use :Cache do
761
785
  cache do
762
786
  adapter :LRUHash
763
787
  end
764
788
  backend do
765
- adapter :GDBM, :file => 'shared.db'
789
+ adapter :GDBM, file: 'shared.db'
766
790
  end
767
791
  end
768
792
  end
@@ -794,7 +818,7 @@ Person.adapter :memory, Moneta.new(:Redis)
794
818
 
795
819
  ## Testing and Benchmarks
796
820
 
797
- Testing is done using [Travis-CI](http://travis-ci.org/minad/moneta). Currently we support Ruby 1.8.7 and 1.9.3.
821
+ Testing is done using [Travis-CI](http://travis-ci.org/minad/moneta). Currently we support Ruby >= 1.9.3.
798
822
 
799
823
  Benchmarks for each store are done on [Travis-CI](http://travis-ci.org/minad/moneta) for each build. Take a look there
800
824
  to compare the speed of the different key value stores for different key/value sizes and size distributions.
@@ -834,7 +858,6 @@ Don't forget to edit the README.md and the CHANGES.
834
858
 
835
859
  * [Horcrux](https://github.com/technoweenie/horcrux): Used at github, supports batch operations but only Memcached backend
836
860
  * [ActiveSupport::Cache::Store](http://api.rubyonrails.org/classes/ActiveSupport/Cache/Store.html): The Rails cache store abstraction
837
- * [Padrino::Cache::Store](http://www.padrinorb.com/api/Padrino/Cache/Store.html): The Padrino cache store abstraction. Padrino is currently considering switching to Moneta, see https://github.com/padrino/padrino-framework/pull/1018
838
861
  * [ToyStore](https://github.com/jnunemaker/toystore): ORM mapper for key/value stores
839
862
  * [ToyStore Adapter](https://github.com/jnunemaker/adapter): Adapter to key/value stores used by ToyStore, Moneta can be used directly with the ToyStore Memory adapter
840
863
  * [Cache](https://github.com/seamusabshere/cache): Rubygem cache wraps Memcached and Redis