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 "optionmerger" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'optionmerger.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  []
11
7
  end
12
8
 
13
9
  def new_store
14
- Moneta.new(:Memory, :logger => {:out => log})
10
+ Moneta.new(:Memory, :logger => {:file => File.join(make_tempdir, 'optionmerger.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 "pool" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'pool.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 "proxy_expires_memory" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'proxy_expires_memory.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :expires, :increment]
11
7
  end
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "proxy_redis" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'proxy_redis.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :expires, :increment]
11
7
  end
@@ -2,16 +2,12 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "semaphore" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'semaphore.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  []
11
7
  end
12
8
 
13
9
  def new_store
14
- Moneta.new(:Memory, :logger => {:out => log})
10
+ Moneta.new(:Memory, :logger => {:file => File.join(make_tempdir, 'semaphore.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 "shared_tcp" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'shared_tcp.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 "shared_unix" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'shared_unix.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
@@ -2,16 +2,12 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_activerecord" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_activerecord.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(:ActiveRecord, :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'), :database => File.join(make_tempdir, 'simple_activerecord') }, :logger => {:out => log})
10
+ Moneta.new(:ActiveRecord, :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'), :database => File.join(make_tempdir, 'simple_activerecord') }, :logger => {:file => File.join(make_tempdir, 'simple_activerecord.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_activerecord_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_activerecord_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(:ActiveRecord, :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'), :database => File.join(make_tempdir, 'simple_activerecord_with_expires') }, :expires => true, :logger => {:out => log})
10
+ Moneta.new(:ActiveRecord, :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcsqlite3' : 'sqlite3'), :database => File.join(make_tempdir, 'simple_activerecord_with_expires') }, :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_activerecord_with_expires.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_cassandra" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_cassandra.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:expires]
11
7
  end
12
8
 
13
9
  def new_store
14
- Moneta.new(:Cassandra, :keyspace => "simple_cassandra", :logger => {:out => log})
10
+ Moneta.new(:Cassandra, :keyspace => "simple_cassandra", :logger => {:file => File.join(make_tempdir, 'simple_cassandra.log')})
15
11
  end
16
12
 
17
13
  def load_value(value)
@@ -2,17 +2,13 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_client_tcp" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_client_tcp.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
12
8
 
13
9
  start_server(Moneta::Adapters::Memory.new)
14
10
  def new_store
15
- Moneta.new(:Client, :logger => {:out => log})
11
+ Moneta.new(:Client, :logger => {:file => File.join(make_tempdir, 'simple_client_tcp.log')})
16
12
  end
17
13
 
18
14
  def load_value(value)
@@ -2,17 +2,13 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_client_unix" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_client_unix.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :increment]
11
7
  end
12
8
 
13
9
  start_server(Moneta::Adapters::Memory.new, :socket => File.join(make_tempdir, 'simple_client_unix'))
14
10
  def new_store
15
- Moneta.new(:Client, :socket => File.join(make_tempdir, 'simple_client_unix'), :logger => {:out => log})
11
+ Moneta.new(:Client, :socket => File.join(make_tempdir, 'simple_client_unix'), :logger => {:file => File.join(make_tempdir, 'simple_client_unix.log')})
16
12
  end
17
13
 
18
14
  def load_value(value)
@@ -2,16 +2,12 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_couch" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_couch.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  []
11
7
  end
12
8
 
13
9
  def new_store
14
- Moneta.new(:Couch, :db => 'simple_couch', :logger => {:out => log})
10
+ Moneta.new(:Couch, :db => 'simple_couch', :logger => {:file => File.join(make_tempdir, 'simple_couch.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_couch_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_couch_with_expires.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:expires]
11
7
  end
12
8
 
13
9
  def new_store
14
- Moneta.new(:Couch, :db => 'simple_couch_with_expires', :expires => true, :logger => {:out => log})
10
+ Moneta.new(:Couch, :db => 'simple_couch_with_expires', :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_couch_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 "simple_datamapper" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_datamapper.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create]
11
7
  end
@@ -13,7 +9,7 @@ describe_moneta "simple_datamapper" do
13
9
  require 'dm-core'
14
10
  DataMapper.setup(:default, :adapter => :in_memory)
15
11
  def new_store
16
- Moneta.new(:DataMapper, :setup => "sqlite3://#{make_tempdir}/simple_datamapper", :logger => {:out => log})
12
+ Moneta.new(:DataMapper, :setup => "sqlite3://#{make_tempdir}/simple_datamapper", :logger => {:file => File.join(make_tempdir, 'simple_datamapper.log')})
17
13
  end
18
14
 
19
15
  def load_value(value)
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_datamapper_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_datamapper_with_expires.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create, :expires]
11
7
  end
@@ -13,7 +9,7 @@ describe_moneta "simple_datamapper_with_expires" do
13
9
  require 'dm-core'
14
10
  DataMapper.setup(:default, :adapter => :in_memory)
15
11
  def new_store
16
- Moneta.new(:DataMapper, :setup => "sqlite3://#{make_tempdir}/simple_datamapper_with_expires", :expires => true, :logger => {:out => log})
12
+ Moneta.new(:DataMapper, :setup => "sqlite3://#{make_tempdir}/simple_datamapper_with_expires", :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_datamapper_with_expires.log')})
17
13
  end
18
14
 
19
15
  def load_value(value)
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_datamapper_with_repository" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_datamapper_with_repository.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:create]
11
7
  end
@@ -13,7 +9,7 @@ describe_moneta "simple_datamapper_with_repository" do
13
9
  require 'dm-core'
14
10
  DataMapper.setup(:default, :adapter => :in_memory)
15
11
  def new_store
16
- Moneta.new(:DataMapper, :repository => :repo, :setup => "sqlite3://#{make_tempdir}/simple_datamapper_with_repository", :logger => {:out => log})
12
+ Moneta.new(:DataMapper, :repository => :repo, :setup => "sqlite3://#{make_tempdir}/simple_datamapper_with_repository", :logger => {:file => File.join(make_tempdir, 'simple_datamapper_with_repository.log')})
17
13
  end
18
14
 
19
15
  def load_value(value)
@@ -2,16 +2,12 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_daybreak" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_daybreak.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(:Daybreak, :file => File.join(make_tempdir, "simple_daybreak"), :logger => {:out => log})
10
+ Moneta.new(:Daybreak, :file => File.join(make_tempdir, "simple_daybreak"), :logger => {:file => File.join(make_tempdir, 'simple_daybreak.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_daybreak_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_daybreak_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(:Daybreak, :file => File.join(make_tempdir, "simple_daybreak_with_expires"), :expires => true, :logger => {:out => log})
10
+ Moneta.new(:Daybreak, :file => File.join(make_tempdir, "simple_daybreak_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_daybreak_with_expires.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_dbm" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_dbm.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(:DBM, :file => File.join(make_tempdir, "simple_dbm"), :logger => {:out => log})
10
+ Moneta.new(:DBM, :file => File.join(make_tempdir, "simple_dbm"), :logger => {:file => File.join(make_tempdir, 'simple_dbm.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_dbm_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_dbm_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(:DBM, :file => File.join(make_tempdir, "simple_dbm_with_expires"), :expires => true, :logger => {:out => log})
10
+ Moneta.new(:DBM, :file => File.join(make_tempdir, "simple_dbm_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_dbm_with_expires.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_file" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_file.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(:File, :dir => File.join(make_tempdir, "simple_file"), :logger => {:out => log})
10
+ Moneta.new(:File, :dir => File.join(make_tempdir, "simple_file"), :logger => {:file => File.join(make_tempdir, 'simple_file.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_file_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_file_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(:File, :dir => File.join(make_tempdir, "simple_file_with_expires"), :expires => true, :logger => {:out => log})
10
+ Moneta.new(:File, :dir => File.join(make_tempdir, "simple_file_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_file_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 "simple_fog" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_fog.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  []
11
7
  end
@@ -16,7 +12,7 @@ describe_moneta "simple_fog" do
16
12
  Moneta.new(:Fog, :aws_access_key_id => 'fake_access_key_id',
17
13
  :aws_secret_access_key => 'fake_secret_access_key',
18
14
  :provider => 'AWS',
19
- :dir => 'moneta', :logger => {:out => log})
15
+ :dir => 'moneta', :logger => {:file => File.join(make_tempdir, 'simple_fog.log')})
20
16
  end
21
17
 
22
18
  def load_value(value)
@@ -2,10 +2,6 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_fog_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_fog_with_expires.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:expires]
11
7
  end
@@ -17,7 +13,7 @@ describe_moneta "simple_fog_with_expires" do
17
13
  :aws_secret_access_key => 'fake_secret_access_key',
18
14
  :provider => 'AWS',
19
15
  :dir => 'moneta',
20
- :expires => true, :logger => {:out => log})
16
+ :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_fog_with_expires.log')})
21
17
  end
22
18
 
23
19
  def load_value(value)
@@ -2,16 +2,12 @@
2
2
  require 'helper'
3
3
 
4
4
  describe_moneta "simple_gdbm" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_gdbm.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(:GDBM, :file => File.join(make_tempdir, "simple_gdbm"), :logger => {:out => log})
10
+ Moneta.new(:GDBM, :file => File.join(make_tempdir, "simple_gdbm"), :logger => {:file => File.join(make_tempdir, 'simple_gdbm.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_gdbm_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_gdbm_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(:GDBM, :file => File.join(make_tempdir, "simple_gdbm_with_expires"), :expires => true, :logger => {:out => log})
10
+ Moneta.new(:GDBM, :file => File.join(make_tempdir, "simple_gdbm_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_gdbm_with_expires.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_hashfile" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_hashfile.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(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile"), :logger => {:out => log})
10
+ Moneta.new(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile"), :logger => {:file => File.join(make_tempdir, 'simple_hashfile.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_hashfile_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_hashfile_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(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile_with_expires"), :expires => true, :logger => {:out => log})
10
+ Moneta.new(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_hashfile_with_expires.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_hbase" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_hbase.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  [:increment]
11
7
  end
12
8
 
13
9
  def new_store
14
- Moneta.new(:HBase, :table => "simple_hbase", :logger => {:out => log})
10
+ Moneta.new(:HBase, :table => "simple_hbase", :logger => {:file => File.join(make_tempdir, 'simple_hbase.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_hbase_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_hbase_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(:HBase, :table => "simple_hbase", :expires => true, :logger => {:out => log})
10
+ Moneta.new(:HBase, :table => "simple_hbase", :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_hbase_with_expires.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_kyotocabinet" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_kyotocabinet.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(:KyotoCabinet, :file => File.join(make_tempdir, "simple_kyotocabinet.kch"), :logger => {:out => log})
10
+ Moneta.new(:KyotoCabinet, :file => File.join(make_tempdir, "simple_kyotocabinet.kch"), :logger => {:file => File.join(make_tempdir, 'simple_kyotocabinet.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_kyotocabinet_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_kyotocabinet_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(:KyotoCabinet, :file => File.join(make_tempdir, "simple_kyotocabinet_with_expires.kch"), :expires => true, :logger => {:out => log})
10
+ Moneta.new(:KyotoCabinet, :file => File.join(make_tempdir, "simple_kyotocabinet_with_expires.kch"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_kyotocabinet_with_expires.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_leveldb" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_leveldb.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(:LevelDB, :dir => File.join(make_tempdir, "simple_leveldb"), :logger => {:out => log})
10
+ Moneta.new(:LevelDB, :dir => File.join(make_tempdir, "simple_leveldb"), :logger => {:file => File.join(make_tempdir, 'simple_leveldb.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_leveldb_with_expires" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_leveldb_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(:LevelDB, :dir => File.join(make_tempdir, "simple_leveldb_with_expires"), :expires => true, :logger => {:out => log})
10
+ Moneta.new(:LevelDB, :dir => File.join(make_tempdir, "simple_leveldb_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_leveldb_with_expires.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_localmemcache" do
5
- def log
6
- @log ||= File.open(File.join(make_tempdir, 'simple_localmemcache.log'), 'a')
7
- end
8
-
9
5
  def features
10
6
  []
11
7
  end
12
8
 
13
9
  def new_store
14
- Moneta.new(:LocalMemCache, :file => File.join(make_tempdir, "simple_localmemcache"), :logger => {:out => log})
10
+ Moneta.new(:LocalMemCache, :file => File.join(make_tempdir, "simple_localmemcache"), :logger => {:file => File.join(make_tempdir, 'simple_localmemcache.log')})
15
11
  end
16
12
 
17
13
  def load_value(value)