moneta 0.7.10 → 0.7.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. data/.travis.yml +2 -2
  2. data/CHANGES +8 -0
  3. data/Gemfile +7 -2
  4. data/README.md +7 -7
  5. data/Rakefile +35 -31
  6. data/lib/moneta/adapters/cassandra.rb +4 -0
  7. data/lib/moneta/adapters/couch.rb +36 -24
  8. data/lib/moneta/adapters/hbase.rb +5 -0
  9. data/lib/moneta/adapters/restclient.rb +11 -19
  10. data/lib/moneta/adapters/tokyotyrant.rb +27 -16
  11. data/lib/moneta/logger.rb +24 -7
  12. data/lib/moneta/transformer/config.rb +1 -0
  13. data/lib/moneta/version.rb +1 -1
  14. data/lib/rack/moneta_rest.rb +1 -1
  15. data/script/benchmarks +27 -27
  16. data/script/generate-specs +18 -9
  17. data/script/start-services +9 -1
  18. data/spec/moneta/adapter_activerecord_spec.rb +0 -4
  19. data/spec/moneta/adapter_cassandra_spec.rb +0 -4
  20. data/spec/moneta/adapter_cassandra_with_default_expires_spec.rb +0 -4
  21. data/spec/moneta/adapter_client_spec.rb +0 -4
  22. data/spec/moneta/adapter_cookie_spec.rb +0 -4
  23. data/spec/moneta/adapter_couch_spec.rb +0 -4
  24. data/spec/moneta/adapter_datamapper_spec.rb +0 -4
  25. data/spec/moneta/adapter_daybreak_spec.rb +0 -4
  26. data/spec/moneta/adapter_dbm_spec.rb +0 -4
  27. data/spec/moneta/adapter_file_spec.rb +0 -4
  28. data/spec/moneta/adapter_fog_spec.rb +0 -4
  29. data/spec/moneta/adapter_gdbm_spec.rb +0 -4
  30. data/spec/moneta/adapter_hbase_spec.rb +0 -4
  31. data/spec/moneta/adapter_kyotocabinet_spec.rb +0 -4
  32. data/spec/moneta/adapter_leveldb_spec.rb +0 -4
  33. data/spec/moneta/adapter_localmemcache_spec.rb +0 -4
  34. data/spec/moneta/adapter_lruhash_spec.rb +0 -4
  35. data/spec/moneta/adapter_memcached_dalli_spec.rb +0 -4
  36. data/spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb +0 -4
  37. data/spec/moneta/adapter_memcached_native_spec.rb +0 -4
  38. data/spec/moneta/adapter_memcached_native_with_default_expires_spec.rb +0 -4
  39. data/spec/moneta/adapter_memcached_spec.rb +0 -4
  40. data/spec/moneta/adapter_memcached_with_default_expires_spec.rb +0 -4
  41. data/spec/moneta/adapter_memory_spec.rb +0 -4
  42. data/spec/moneta/adapter_mongo_spec.rb +0 -4
  43. data/spec/moneta/adapter_mongo_with_default_expires_spec.rb +0 -4
  44. data/spec/moneta/adapter_pstore_spec.rb +0 -4
  45. data/spec/moneta/adapter_redis_spec.rb +0 -4
  46. data/spec/moneta/adapter_redis_with_default_expires_spec.rb +0 -4
  47. data/spec/moneta/adapter_restclient_spec.rb +0 -4
  48. data/spec/moneta/adapter_riak_spec.rb +0 -4
  49. data/spec/moneta/adapter_sdbm_spec.rb +0 -4
  50. data/spec/moneta/adapter_sequel_spec.rb +0 -4
  51. data/spec/moneta/adapter_sqlite_spec.rb +0 -4
  52. data/spec/moneta/adapter_tdb_spec.rb +0 -4
  53. data/spec/moneta/adapter_tokyocabinet_bdb_spec.rb +0 -4
  54. data/spec/moneta/adapter_tokyocabinet_hdb_spec.rb +0 -4
  55. data/spec/moneta/adapter_tokyotyrant_spec.rb +0 -4
  56. data/spec/moneta/adapter_yaml_spec.rb +0 -4
  57. data/spec/moneta/cache_file_memory_spec.rb +0 -4
  58. data/spec/moneta/cache_memory_null_spec.rb +0 -4
  59. data/spec/moneta/expires_file_spec.rb +0 -4
  60. data/spec/moneta/expires_memory_spec.rb +0 -4
  61. data/spec/moneta/expires_memory_with_default_expires_spec.rb +0 -4
  62. data/spec/moneta/lock_spec.rb +0 -4
  63. data/spec/moneta/mutex_spec.rb +1 -5
  64. data/spec/moneta/null_adapter_spec.rb +0 -4
  65. data/spec/moneta/optionmerger_spec.rb +1 -5
  66. data/spec/moneta/pool_spec.rb +0 -4
  67. data/spec/moneta/proxy_expires_memory_spec.rb +0 -4
  68. data/spec/moneta/proxy_redis_spec.rb +0 -4
  69. data/spec/moneta/semaphore_spec.rb +1 -5
  70. data/spec/moneta/shared_tcp_spec.rb +0 -4
  71. data/spec/moneta/shared_unix_spec.rb +0 -4
  72. data/spec/moneta/simple_activerecord_spec.rb +1 -5
  73. data/spec/moneta/simple_activerecord_with_expires_spec.rb +1 -5
  74. data/spec/moneta/simple_cassandra_spec.rb +1 -5
  75. data/spec/moneta/simple_client_tcp_spec.rb +1 -5
  76. data/spec/moneta/simple_client_unix_spec.rb +1 -5
  77. data/spec/moneta/simple_couch_spec.rb +1 -5
  78. data/spec/moneta/simple_couch_with_expires_spec.rb +1 -5
  79. data/spec/moneta/simple_datamapper_spec.rb +1 -5
  80. data/spec/moneta/simple_datamapper_with_expires_spec.rb +1 -5
  81. data/spec/moneta/simple_datamapper_with_repository_spec.rb +1 -5
  82. data/spec/moneta/simple_daybreak_spec.rb +1 -5
  83. data/spec/moneta/simple_daybreak_with_expires_spec.rb +1 -5
  84. data/spec/moneta/simple_dbm_spec.rb +1 -5
  85. data/spec/moneta/simple_dbm_with_expires_spec.rb +1 -5
  86. data/spec/moneta/simple_file_spec.rb +1 -5
  87. data/spec/moneta/simple_file_with_expires_spec.rb +1 -5
  88. data/spec/moneta/simple_fog_spec.rb +1 -5
  89. data/spec/moneta/simple_fog_with_expires_spec.rb +1 -5
  90. data/spec/moneta/simple_gdbm_spec.rb +1 -5
  91. data/spec/moneta/simple_gdbm_with_expires_spec.rb +1 -5
  92. data/spec/moneta/simple_hashfile_spec.rb +1 -5
  93. data/spec/moneta/simple_hashfile_with_expires_spec.rb +1 -5
  94. data/spec/moneta/simple_hbase_spec.rb +1 -5
  95. data/spec/moneta/simple_hbase_with_expires_spec.rb +1 -5
  96. data/spec/moneta/simple_kyotocabinet_spec.rb +1 -5
  97. data/spec/moneta/simple_kyotocabinet_with_expires_spec.rb +1 -5
  98. data/spec/moneta/simple_leveldb_spec.rb +1 -5
  99. data/spec/moneta/simple_leveldb_with_expires_spec.rb +1 -5
  100. data/spec/moneta/simple_localmemcache_spec.rb +1 -5
  101. data/spec/moneta/simple_localmemcache_with_expires_spec.rb +1 -5
  102. data/spec/moneta/simple_lruhash_spec.rb +1 -5
  103. data/spec/moneta/simple_lruhash_with_expires_spec.rb +1 -5
  104. data/spec/moneta/simple_memcached_dalli_spec.rb +1 -5
  105. data/spec/moneta/simple_memcached_native_spec.rb +1 -5
  106. data/spec/moneta/simple_memcached_spec.rb +1 -5
  107. data/spec/moneta/simple_memory_spec.rb +1 -5
  108. data/spec/moneta/simple_memory_with_compress_spec.rb +1 -5
  109. data/spec/moneta/simple_memory_with_expires_spec.rb +1 -5
  110. data/spec/moneta/simple_memory_with_json_key_serializer_spec.rb +1 -5
  111. data/spec/moneta/simple_memory_with_json_serializer_spec.rb +1 -5
  112. data/spec/moneta/simple_memory_with_json_value_serializer_spec.rb +1 -5
  113. data/spec/moneta/simple_memory_with_prefix_spec.rb +1 -5
  114. data/spec/moneta/simple_memory_with_snappy_compress_spec.rb +1 -5
  115. data/spec/moneta/simple_mongo_spec.rb +1 -5
  116. data/spec/moneta/simple_null_spec.rb +1 -5
  117. data/spec/moneta/simple_pstore_spec.rb +1 -5
  118. data/spec/moneta/simple_pstore_with_expires_spec.rb +1 -5
  119. data/spec/moneta/simple_redis_spec.rb +1 -5
  120. data/spec/moneta/simple_restclient_spec.rb +1 -5
  121. data/spec/moneta/simple_riak_spec.rb +1 -5
  122. data/spec/moneta/simple_riak_with_expires_spec.rb +1 -5
  123. data/spec/moneta/simple_sdbm_spec.rb +1 -5
  124. data/spec/moneta/simple_sdbm_with_expires_spec.rb +1 -5
  125. data/spec/moneta/simple_sequel_spec.rb +1 -5
  126. data/spec/moneta/simple_sequel_with_expires_spec.rb +1 -5
  127. data/spec/moneta/simple_sqlite_spec.rb +1 -5
  128. data/spec/moneta/simple_sqlite_with_expires_spec.rb +1 -5
  129. data/spec/moneta/simple_tdb_spec.rb +1 -5
  130. data/spec/moneta/simple_tdb_with_expires_spec.rb +1 -5
  131. data/spec/moneta/simple_tokyocabinet_spec.rb +1 -5
  132. data/spec/moneta/simple_tokyocabinet_with_expires_spec.rb +1 -5
  133. data/spec/moneta/simple_tokyotyrant_spec.rb +1 -5
  134. data/spec/moneta/simple_tokyotyrant_with_expires_spec.rb +1 -5
  135. data/spec/moneta/simple_yaml_spec.rb +1 -5
  136. data/spec/moneta/simple_yaml_with_expires_spec.rb +1 -5
  137. data/spec/moneta/stack_file_memory_spec.rb +0 -4
  138. data/spec/moneta/stack_memory_file_spec.rb +0 -4
  139. data/spec/moneta/transformer_bencode_spec.rb +0 -4
  140. data/spec/moneta/transformer_bert_spec.rb +0 -4
  141. data/spec/moneta/transformer_bson_spec.rb +0 -4
  142. data/spec/moneta/transformer_bzip2_spec.rb +0 -4
  143. data/spec/moneta/transformer_json_spec.rb +0 -4
  144. data/spec/moneta/transformer_key_inspect_spec.rb +0 -4
  145. data/spec/moneta/transformer_key_marshal_spec.rb +0 -4
  146. data/spec/moneta/transformer_key_to_s_spec.rb +0 -4
  147. data/spec/moneta/transformer_key_yaml_spec.rb +0 -4
  148. data/spec/moneta/transformer_lzma_spec.rb +0 -4
  149. data/spec/moneta/transformer_lzo_spec.rb +0 -4
  150. data/spec/moneta/transformer_marshal_base64_spec.rb +0 -4
  151. data/spec/moneta/transformer_marshal_escape_spec.rb +0 -4
  152. data/spec/moneta/transformer_marshal_hmac_spec.rb +0 -4
  153. data/spec/moneta/transformer_marshal_md5_spec.rb +0 -4
  154. data/spec/moneta/transformer_marshal_md5_spread_spec.rb +0 -4
  155. data/spec/moneta/transformer_marshal_prefix_spec.rb +0 -4
  156. data/spec/moneta/transformer_marshal_qp_spec.rb +122 -0
  157. data/spec/moneta/transformer_marshal_rmd160_spec.rb +0 -4
  158. data/spec/moneta/transformer_marshal_sha1_spec.rb +0 -4
  159. data/spec/moneta/transformer_marshal_sha256_spec.rb +0 -4
  160. data/spec/moneta/transformer_marshal_sha384_spec.rb +0 -4
  161. data/spec/moneta/transformer_marshal_sha512_spec.rb +0 -4
  162. data/spec/moneta/transformer_marshal_spec.rb +0 -4
  163. data/spec/moneta/transformer_marshal_truncate_spec.rb +0 -4
  164. data/spec/moneta/transformer_marshal_uuencode_spec.rb +0 -4
  165. data/spec/moneta/transformer_msgpack_spec.rb +0 -4
  166. data/spec/moneta/transformer_ox_spec.rb +0 -4
  167. data/spec/moneta/transformer_quicklz_spec.rb +0 -4
  168. data/spec/moneta/transformer_snappy_spec.rb +0 -4
  169. data/spec/moneta/transformer_tnet_spec.rb +0 -4
  170. data/spec/moneta/transformer_value_marshal_spec.rb +0 -4
  171. data/spec/moneta/transformer_value_yaml_spec.rb +0 -4
  172. data/spec/moneta/transformer_yaml_spec.rb +0 -4
  173. data/spec/moneta/transformer_zlib_spec.rb +0 -4
  174. data/spec/moneta/weak_create_spec.rb +0 -4
  175. data/spec/moneta/weak_increment_spec.rb +0 -4
  176. data/spec/monetaspecs.rb +4 -4
  177. metadata +4 -2
@@ -2,16 +2,12 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_yaml" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_yaml.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
12
8
 
13
9
  def new_store
14
- Moneta.new(:YAML, :file => File.join(make_tempdir, "simple_yaml"), :logger => {:out => log})
10
+ Moneta.new(:YAML, :file => File.join(make_tempdir, "simple_yaml"), :logger => {:file => File.join(make_tempdir, 'simple_yaml.log')})
15
11
  end
16
12
 
17
13
  def load_value(value)
@@ -2,16 +2,12 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_yaml_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_yaml_with_expires.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :expires, :increment]
11
7
  end
12
8
 
13
9
  def new_store
14
- Moneta.new(:YAML, :file => File.join(make_tempdir, "simple_yaml_with_expires"), :expires => true, :logger => {:out => log})
10
+ Moneta.new(:YAML, :file => File.join(make_tempdir, "simple_yaml_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_yaml_with_expires.log')})
15
11
  end
16
12
 
17
13
  def load_value(value)
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "stack_file_memory" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'stack_file_memory.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  []
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "stack_memory_file" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'stack_memory_file.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_bencode" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_bencode.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_bert" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_bert.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_bson" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_bson.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_bzip2" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_bzip2.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_json" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_json.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_key_inspect" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_key_inspect.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_key_marshal" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_key_marshal.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_key_to_s" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_key_to_s.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_key_yaml" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_key_yaml.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_lzma" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_lzma.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_lzo" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_lzo.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_base64" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_base64.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_escape" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_escape.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_hmac" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_hmac.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_md5" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_md5.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_md5_spread" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_md5_spread.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_prefix" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_prefix.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -0,0 +1,122 @@
1
+ # Generated by generate-specs
2
+ require 'helper'
3
+
4
+ describe_moneta "transformer_marshal_qp" do
5
+ def features
6
+ [:create, :increment]
7
+ end
8
+
9
+ def new_store
10
+ Moneta.build do
11
+ use :Transformer, :key => [:marshal, :qp], :value => [:marshal, :qp]
12
+ adapter :Memory
13
+ end
14
+ end
15
+
16
+ def load_value(value)
17
+ ::Marshal.load(value.unpack('M').first)
18
+ end
19
+
20
+ include_context 'setup_store'
21
+ it_should_behave_like 'create'
22
+ it_should_behave_like 'features'
23
+ it_should_behave_like 'increment'
24
+ it_should_behave_like 'marshallable_key'
25
+ it_should_behave_like 'marshallable_value'
26
+ it_should_behave_like 'not_persist'
27
+ it_should_behave_like 'null_objectkey_objectvalue'
28
+ it_should_behave_like 'null_objectkey_stringvalue'
29
+ it_should_behave_like 'null_objectkey_hashvalue'
30
+ it_should_behave_like 'null_objectkey_booleanvalue'
31
+ it_should_behave_like 'null_objectkey_nilvalue'
32
+ it_should_behave_like 'null_objectkey_integervalue'
33
+ it_should_behave_like 'null_stringkey_objectvalue'
34
+ it_should_behave_like 'null_stringkey_stringvalue'
35
+ it_should_behave_like 'null_stringkey_hashvalue'
36
+ it_should_behave_like 'null_stringkey_booleanvalue'
37
+ it_should_behave_like 'null_stringkey_nilvalue'
38
+ it_should_behave_like 'null_stringkey_integervalue'
39
+ it_should_behave_like 'null_hashkey_objectvalue'
40
+ it_should_behave_like 'null_hashkey_stringvalue'
41
+ it_should_behave_like 'null_hashkey_hashvalue'
42
+ it_should_behave_like 'null_hashkey_booleanvalue'
43
+ it_should_behave_like 'null_hashkey_nilvalue'
44
+ it_should_behave_like 'null_hashkey_integervalue'
45
+ it_should_behave_like 'null_booleankey_objectvalue'
46
+ it_should_behave_like 'null_booleankey_stringvalue'
47
+ it_should_behave_like 'null_booleankey_hashvalue'
48
+ it_should_behave_like 'null_booleankey_booleanvalue'
49
+ it_should_behave_like 'null_booleankey_nilvalue'
50
+ it_should_behave_like 'null_booleankey_integervalue'
51
+ it_should_behave_like 'null_nilkey_objectvalue'
52
+ it_should_behave_like 'null_nilkey_stringvalue'
53
+ it_should_behave_like 'null_nilkey_hashvalue'
54
+ it_should_behave_like 'null_nilkey_booleanvalue'
55
+ it_should_behave_like 'null_nilkey_nilvalue'
56
+ it_should_behave_like 'null_nilkey_integervalue'
57
+ it_should_behave_like 'null_integerkey_objectvalue'
58
+ it_should_behave_like 'null_integerkey_stringvalue'
59
+ it_should_behave_like 'null_integerkey_hashvalue'
60
+ it_should_behave_like 'null_integerkey_booleanvalue'
61
+ it_should_behave_like 'null_integerkey_nilvalue'
62
+ it_should_behave_like 'null_integerkey_integervalue'
63
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
64
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
65
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
66
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
67
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
68
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
69
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
70
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
71
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
72
+ it_should_behave_like 'returndifferent_booleankey_objectvalue'
73
+ it_should_behave_like 'returndifferent_booleankey_stringvalue'
74
+ it_should_behave_like 'returndifferent_booleankey_hashvalue'
75
+ it_should_behave_like 'returndifferent_nilkey_objectvalue'
76
+ it_should_behave_like 'returndifferent_nilkey_stringvalue'
77
+ it_should_behave_like 'returndifferent_nilkey_hashvalue'
78
+ it_should_behave_like 'returndifferent_integerkey_objectvalue'
79
+ it_should_behave_like 'returndifferent_integerkey_stringvalue'
80
+ it_should_behave_like 'returndifferent_integerkey_hashvalue'
81
+ it_should_behave_like 'store_objectkey_objectvalue'
82
+ it_should_behave_like 'store_objectkey_stringvalue'
83
+ it_should_behave_like 'store_objectkey_hashvalue'
84
+ it_should_behave_like 'store_objectkey_booleanvalue'
85
+ it_should_behave_like 'store_objectkey_nilvalue'
86
+ it_should_behave_like 'store_objectkey_integervalue'
87
+ it_should_behave_like 'store_stringkey_objectvalue'
88
+ it_should_behave_like 'store_stringkey_stringvalue'
89
+ it_should_behave_like 'store_stringkey_hashvalue'
90
+ it_should_behave_like 'store_stringkey_booleanvalue'
91
+ it_should_behave_like 'store_stringkey_nilvalue'
92
+ it_should_behave_like 'store_stringkey_integervalue'
93
+ it_should_behave_like 'store_hashkey_objectvalue'
94
+ it_should_behave_like 'store_hashkey_stringvalue'
95
+ it_should_behave_like 'store_hashkey_hashvalue'
96
+ it_should_behave_like 'store_hashkey_booleanvalue'
97
+ it_should_behave_like 'store_hashkey_nilvalue'
98
+ it_should_behave_like 'store_hashkey_integervalue'
99
+ it_should_behave_like 'store_booleankey_objectvalue'
100
+ it_should_behave_like 'store_booleankey_stringvalue'
101
+ it_should_behave_like 'store_booleankey_hashvalue'
102
+ it_should_behave_like 'store_booleankey_booleanvalue'
103
+ it_should_behave_like 'store_booleankey_nilvalue'
104
+ it_should_behave_like 'store_booleankey_integervalue'
105
+ it_should_behave_like 'store_nilkey_objectvalue'
106
+ it_should_behave_like 'store_nilkey_stringvalue'
107
+ it_should_behave_like 'store_nilkey_hashvalue'
108
+ it_should_behave_like 'store_nilkey_booleanvalue'
109
+ it_should_behave_like 'store_nilkey_nilvalue'
110
+ it_should_behave_like 'store_nilkey_integervalue'
111
+ it_should_behave_like 'store_integerkey_objectvalue'
112
+ it_should_behave_like 'store_integerkey_stringvalue'
113
+ it_should_behave_like 'store_integerkey_hashvalue'
114
+ it_should_behave_like 'store_integerkey_booleanvalue'
115
+ it_should_behave_like 'store_integerkey_nilvalue'
116
+ it_should_behave_like 'store_integerkey_integervalue'
117
+ it_should_behave_like 'transform_value'
118
+ it 'compile transformer class' do
119
+ store.should_not be_nil
120
+ Moneta::Transformer::MarshalQpKeyMarshalQpValue.should_not be_nil
121
+ end
122
+ end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_rmd160" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_rmd160.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_sha1" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_sha1.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_sha256" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_sha256.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_sha384" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_sha384.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_sha512" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_sha512.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_truncate" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_truncate.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_marshal_uuencode" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_marshal_uuencode.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_msgpack" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_msgpack.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_ox" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_ox.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_quicklz" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_quicklz.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_snappy" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_snappy.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_tnet" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_tnet.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_value_marshal" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_value_marshal.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_value_yaml" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_value_yaml.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_yaml" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_yaml.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "transformer_zlib" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'transformer_zlib.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "weak_create" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'weak_create.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "weak_increment" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'weak_increment.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:increment]
11
7
  end
data/spec/monetaspecs.rb CHANGED
@@ -17070,7 +17070,7 @@ shared_examples_for 'expires' do
17070
17070
  store.delete('key2').should be_nil
17071
17071
  end
17072
17072
 
17073
- it 'supports the #expires syntactic sugar' do
17073
+ it 'supports the #expires syntactic sugar', :retry => 3 do
17074
17074
  store.store('persistent_key', 'persistent_value', :expires => 0)
17075
17075
  store.expires(1).store('key2', 'val2')
17076
17076
  store['key2'].should == 'val2'
@@ -17086,7 +17086,7 @@ shared_examples_for 'expires' do
17086
17086
  store['key1'].should == 'val1'
17087
17087
  end
17088
17088
 
17089
- it 'does not update the expiration time in key? when not asked to do so' do
17089
+ it 'does not update the expiration time in key? when not asked to do so', :retry => 3 do
17090
17090
  store.store('key1', 'val1', :expires => 1)
17091
17091
  store.key?('key1').should be_true
17092
17092
  store.key?('key1', :expires => nil).should be_true
@@ -17094,7 +17094,7 @@ shared_examples_for 'expires' do
17094
17094
  store.key?('key1').should be_false
17095
17095
  end
17096
17096
 
17097
- it 'does not update the expiration time in fetch when not asked to do so' do
17097
+ it 'does not update the expiration time in fetch when not asked to do so', :retry => 3 do
17098
17098
  store.store('key1', 'val1', :expires => 1)
17099
17099
  store.fetch('key1').should == 'val1'
17100
17100
  store.fetch('key1', :expires => nil).should == 'val1'
@@ -17102,7 +17102,7 @@ shared_examples_for 'expires' do
17102
17102
  store.fetch('key1').should be_nil
17103
17103
  end
17104
17104
 
17105
- it 'does not update the expiration time in load when not asked to do so' do
17105
+ it 'does not update the expiration time in load when not asked to do so', :retry => 3 do
17106
17106
  store.store('key1', 'val1', :expires => 1)
17107
17107
  store.load('key1').should == 'val1'
17108
17108
  store.load('key1', :expires => nil).should == 'val1'