moneta 0.7.10 → 0.7.11
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -2
- data/CHANGES +8 -0
- data/Gemfile +7 -2
- data/README.md +7 -7
- data/Rakefile +35 -31
- data/lib/moneta/adapters/cassandra.rb +4 -0
- data/lib/moneta/adapters/couch.rb +36 -24
- data/lib/moneta/adapters/hbase.rb +5 -0
- data/lib/moneta/adapters/restclient.rb +11 -19
- data/lib/moneta/adapters/tokyotyrant.rb +27 -16
- data/lib/moneta/logger.rb +24 -7
- data/lib/moneta/transformer/config.rb +1 -0
- data/lib/moneta/version.rb +1 -1
- data/lib/rack/moneta_rest.rb +1 -1
- data/script/benchmarks +27 -27
- data/script/generate-specs +18 -9
- data/script/start-services +9 -1
- data/spec/moneta/adapter_activerecord_spec.rb +0 -4
- data/spec/moneta/adapter_cassandra_spec.rb +0 -4
- data/spec/moneta/adapter_cassandra_with_default_expires_spec.rb +0 -4
- data/spec/moneta/adapter_client_spec.rb +0 -4
- data/spec/moneta/adapter_cookie_spec.rb +0 -4
- data/spec/moneta/adapter_couch_spec.rb +0 -4
- data/spec/moneta/adapter_datamapper_spec.rb +0 -4
- data/spec/moneta/adapter_daybreak_spec.rb +0 -4
- data/spec/moneta/adapter_dbm_spec.rb +0 -4
- data/spec/moneta/adapter_file_spec.rb +0 -4
- data/spec/moneta/adapter_fog_spec.rb +0 -4
- data/spec/moneta/adapter_gdbm_spec.rb +0 -4
- data/spec/moneta/adapter_hbase_spec.rb +0 -4
- data/spec/moneta/adapter_kyotocabinet_spec.rb +0 -4
- data/spec/moneta/adapter_leveldb_spec.rb +0 -4
- data/spec/moneta/adapter_localmemcache_spec.rb +0 -4
- data/spec/moneta/adapter_lruhash_spec.rb +0 -4
- data/spec/moneta/adapter_memcached_dalli_spec.rb +0 -4
- data/spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb +0 -4
- data/spec/moneta/adapter_memcached_native_spec.rb +0 -4
- data/spec/moneta/adapter_memcached_native_with_default_expires_spec.rb +0 -4
- data/spec/moneta/adapter_memcached_spec.rb +0 -4
- data/spec/moneta/adapter_memcached_with_default_expires_spec.rb +0 -4
- data/spec/moneta/adapter_memory_spec.rb +0 -4
- data/spec/moneta/adapter_mongo_spec.rb +0 -4
- data/spec/moneta/adapter_mongo_with_default_expires_spec.rb +0 -4
- data/spec/moneta/adapter_pstore_spec.rb +0 -4
- data/spec/moneta/adapter_redis_spec.rb +0 -4
- data/spec/moneta/adapter_redis_with_default_expires_spec.rb +0 -4
- data/spec/moneta/adapter_restclient_spec.rb +0 -4
- data/spec/moneta/adapter_riak_spec.rb +0 -4
- data/spec/moneta/adapter_sdbm_spec.rb +0 -4
- data/spec/moneta/adapter_sequel_spec.rb +0 -4
- data/spec/moneta/adapter_sqlite_spec.rb +0 -4
- data/spec/moneta/adapter_tdb_spec.rb +0 -4
- data/spec/moneta/adapter_tokyocabinet_bdb_spec.rb +0 -4
- data/spec/moneta/adapter_tokyocabinet_hdb_spec.rb +0 -4
- data/spec/moneta/adapter_tokyotyrant_spec.rb +0 -4
- data/spec/moneta/adapter_yaml_spec.rb +0 -4
- data/spec/moneta/cache_file_memory_spec.rb +0 -4
- data/spec/moneta/cache_memory_null_spec.rb +0 -4
- data/spec/moneta/expires_file_spec.rb +0 -4
- data/spec/moneta/expires_memory_spec.rb +0 -4
- data/spec/moneta/expires_memory_with_default_expires_spec.rb +0 -4
- data/spec/moneta/lock_spec.rb +0 -4
- data/spec/moneta/mutex_spec.rb +1 -5
- data/spec/moneta/null_adapter_spec.rb +0 -4
- data/spec/moneta/optionmerger_spec.rb +1 -5
- data/spec/moneta/pool_spec.rb +0 -4
- data/spec/moneta/proxy_expires_memory_spec.rb +0 -4
- data/spec/moneta/proxy_redis_spec.rb +0 -4
- data/spec/moneta/semaphore_spec.rb +1 -5
- data/spec/moneta/shared_tcp_spec.rb +0 -4
- data/spec/moneta/shared_unix_spec.rb +0 -4
- data/spec/moneta/simple_activerecord_spec.rb +1 -5
- data/spec/moneta/simple_activerecord_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_cassandra_spec.rb +1 -5
- data/spec/moneta/simple_client_tcp_spec.rb +1 -5
- data/spec/moneta/simple_client_unix_spec.rb +1 -5
- data/spec/moneta/simple_couch_spec.rb +1 -5
- data/spec/moneta/simple_couch_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_datamapper_spec.rb +1 -5
- data/spec/moneta/simple_datamapper_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_datamapper_with_repository_spec.rb +1 -5
- data/spec/moneta/simple_daybreak_spec.rb +1 -5
- data/spec/moneta/simple_daybreak_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_dbm_spec.rb +1 -5
- data/spec/moneta/simple_dbm_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_file_spec.rb +1 -5
- data/spec/moneta/simple_file_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_fog_spec.rb +1 -5
- data/spec/moneta/simple_fog_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_gdbm_spec.rb +1 -5
- data/spec/moneta/simple_gdbm_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_hashfile_spec.rb +1 -5
- data/spec/moneta/simple_hashfile_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_hbase_spec.rb +1 -5
- data/spec/moneta/simple_hbase_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_kyotocabinet_spec.rb +1 -5
- data/spec/moneta/simple_kyotocabinet_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_leveldb_spec.rb +1 -5
- data/spec/moneta/simple_leveldb_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_localmemcache_spec.rb +1 -5
- data/spec/moneta/simple_localmemcache_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_lruhash_spec.rb +1 -5
- data/spec/moneta/simple_lruhash_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_memcached_dalli_spec.rb +1 -5
- data/spec/moneta/simple_memcached_native_spec.rb +1 -5
- data/spec/moneta/simple_memcached_spec.rb +1 -5
- data/spec/moneta/simple_memory_spec.rb +1 -5
- data/spec/moneta/simple_memory_with_compress_spec.rb +1 -5
- data/spec/moneta/simple_memory_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_memory_with_json_key_serializer_spec.rb +1 -5
- data/spec/moneta/simple_memory_with_json_serializer_spec.rb +1 -5
- data/spec/moneta/simple_memory_with_json_value_serializer_spec.rb +1 -5
- data/spec/moneta/simple_memory_with_prefix_spec.rb +1 -5
- data/spec/moneta/simple_memory_with_snappy_compress_spec.rb +1 -5
- data/spec/moneta/simple_mongo_spec.rb +1 -5
- data/spec/moneta/simple_null_spec.rb +1 -5
- data/spec/moneta/simple_pstore_spec.rb +1 -5
- data/spec/moneta/simple_pstore_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_redis_spec.rb +1 -5
- data/spec/moneta/simple_restclient_spec.rb +1 -5
- data/spec/moneta/simple_riak_spec.rb +1 -5
- data/spec/moneta/simple_riak_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_sdbm_spec.rb +1 -5
- data/spec/moneta/simple_sdbm_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_sequel_spec.rb +1 -5
- data/spec/moneta/simple_sequel_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_sqlite_spec.rb +1 -5
- data/spec/moneta/simple_sqlite_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_tdb_spec.rb +1 -5
- data/spec/moneta/simple_tdb_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_tokyocabinet_spec.rb +1 -5
- data/spec/moneta/simple_tokyocabinet_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_tokyotyrant_spec.rb +1 -5
- data/spec/moneta/simple_tokyotyrant_with_expires_spec.rb +1 -5
- data/spec/moneta/simple_yaml_spec.rb +1 -5
- data/spec/moneta/simple_yaml_with_expires_spec.rb +1 -5
- data/spec/moneta/stack_file_memory_spec.rb +0 -4
- data/spec/moneta/stack_memory_file_spec.rb +0 -4
- data/spec/moneta/transformer_bencode_spec.rb +0 -4
- data/spec/moneta/transformer_bert_spec.rb +0 -4
- data/spec/moneta/transformer_bson_spec.rb +0 -4
- data/spec/moneta/transformer_bzip2_spec.rb +0 -4
- data/spec/moneta/transformer_json_spec.rb +0 -4
- data/spec/moneta/transformer_key_inspect_spec.rb +0 -4
- data/spec/moneta/transformer_key_marshal_spec.rb +0 -4
- data/spec/moneta/transformer_key_to_s_spec.rb +0 -4
- data/spec/moneta/transformer_key_yaml_spec.rb +0 -4
- data/spec/moneta/transformer_lzma_spec.rb +0 -4
- data/spec/moneta/transformer_lzo_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_base64_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_escape_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_hmac_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_md5_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_md5_spread_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_prefix_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_qp_spec.rb +122 -0
- data/spec/moneta/transformer_marshal_rmd160_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_sha1_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_sha256_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_sha384_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_sha512_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_truncate_spec.rb +0 -4
- data/spec/moneta/transformer_marshal_uuencode_spec.rb +0 -4
- data/spec/moneta/transformer_msgpack_spec.rb +0 -4
- data/spec/moneta/transformer_ox_spec.rb +0 -4
- data/spec/moneta/transformer_quicklz_spec.rb +0 -4
- data/spec/moneta/transformer_snappy_spec.rb +0 -4
- data/spec/moneta/transformer_tnet_spec.rb +0 -4
- data/spec/moneta/transformer_value_marshal_spec.rb +0 -4
- data/spec/moneta/transformer_value_yaml_spec.rb +0 -4
- data/spec/moneta/transformer_yaml_spec.rb +0 -4
- data/spec/moneta/transformer_zlib_spec.rb +0 -4
- data/spec/moneta/weak_create_spec.rb +0 -4
- data/spec/moneta/weak_increment_spec.rb +0 -4
- data/spec/monetaspecs.rb +4 -4
- metadata +4 -2
@@ -2,16 +2,12 @@
|
|
2
2
|
require 'helper'
|
3
3
|
|
4
4
|
describe_moneta "simple_localmemcache_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_localmemcache_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(:LocalMemCache, :file => File.join(make_tempdir, "simple_localmemcache_with_expires"), :expires => true, :logger => {:
|
10
|
+
Moneta.new(:LocalMemCache, :file => File.join(make_tempdir, "simple_localmemcache_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_localmemcache_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_lruhash" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_lruhash.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(:LRUHash, :logger => {:
|
10
|
+
Moneta.new(:LRUHash, :logger => {:file => File.join(make_tempdir, 'simple_lruhash.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_lruhash_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_lruhash_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(:LRUHash, :expires => true, :logger => {:
|
10
|
+
Moneta.new(:LRUHash, :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_lruhash_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_memcached_dalli" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memcached_dalli.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(:MemcachedDalli, :namespace => "simple_memcached_dalli", :logger => {:
|
10
|
+
Moneta.new(:MemcachedDalli, :namespace => "simple_memcached_dalli", :logger => {:file => File.join(make_tempdir, 'simple_memcached_dalli.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_memcached_native" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memcached_native.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(:MemcachedNative, :namespace => "simple_memcached_native", :logger => {:
|
10
|
+
Moneta.new(:MemcachedNative, :namespace => "simple_memcached_native", :logger => {:file => File.join(make_tempdir, 'simple_memcached_native.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_memcached" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memcached.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(:Memcached, :namespace => "simple_memcached", :logger => {:
|
10
|
+
Moneta.new(:Memcached, :namespace => "simple_memcached", :logger => {:file => File.join(make_tempdir, 'simple_memcached.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_memory" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memory.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(:Memory, :logger => {:
|
10
|
+
Moneta.new(:Memory, :logger => {:file => File.join(make_tempdir, 'simple_memory.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_memory_with_compress" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memory_with_compress.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(:Memory, :compress => true, :logger => {:
|
10
|
+
Moneta.new(:Memory, :compress => true, :logger => {:file => File.join(make_tempdir, 'simple_memory_with_compress.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_memory_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memory_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(:Memory, :expires => true, :logger => {:
|
10
|
+
Moneta.new(:Memory, :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_memory_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_memory_with_json_key_serializer" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memory_with_json_key_serializer.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(:Memory, :key_serializer => :json, :logger => {:
|
10
|
+
Moneta.new(:Memory, :key_serializer => :json, :logger => {:file => File.join(make_tempdir, 'simple_memory_with_json_key_serializer.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_memory_with_json_serializer" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memory_with_json_serializer.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(:Memory, :serializer => :json, :logger => {:
|
10
|
+
Moneta.new(:Memory, :serializer => :json, :logger => {:file => File.join(make_tempdir, 'simple_memory_with_json_serializer.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_memory_with_json_value_serializer" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memory_with_json_value_serializer.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(:Memory, :value_serializer => :json, :logger => {:
|
10
|
+
Moneta.new(:Memory, :value_serializer => :json, :logger => {:file => File.join(make_tempdir, 'simple_memory_with_json_value_serializer.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_memory_with_prefix" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memory_with_prefix.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(:Memory, :prefix => "moneta", :logger => {:
|
10
|
+
Moneta.new(:Memory, :prefix => "moneta", :logger => {:file => File.join(make_tempdir, 'simple_memory_with_prefix.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_memory_with_snappy_compress" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_memory_with_snappy_compress.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(:Memory, :compress => :snappy, :logger => {:
|
10
|
+
Moneta.new(:Memory, :compress => :snappy, :logger => {:file => File.join(make_tempdir, 'simple_memory_with_snappy_compress.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_mongo" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_mongo.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(:Mongo, :db => 'simple_mongo', :logger => {:
|
10
|
+
Moneta.new(:Mongo, :db => 'simple_mongo', :logger => {:file => File.join(make_tempdir, 'simple_mongo.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_null" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_null.log'), 'a')
|
7
|
-
end
|
8
|
-
|
9
5
|
def features
|
10
6
|
[]
|
11
7
|
end
|
12
8
|
|
13
9
|
def new_store
|
14
|
-
Moneta.new(:Null, :logger => {:
|
10
|
+
Moneta.new(:Null, :logger => {:file => File.join(make_tempdir, 'simple_null.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_pstore" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_pstore.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(:PStore, :file => File.join(make_tempdir, "simple_pstore"), :logger => {:
|
10
|
+
Moneta.new(:PStore, :file => File.join(make_tempdir, "simple_pstore"), :logger => {:file => File.join(make_tempdir, 'simple_pstore.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_pstore_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_pstore_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(:PStore, :file => File.join(make_tempdir, "simple_pstore_with_expires"), :expires => true, :logger => {:
|
10
|
+
Moneta.new(:PStore, :file => File.join(make_tempdir, "simple_pstore_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_pstore_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_redis" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_redis.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(:Redis, :logger => {:
|
10
|
+
Moneta.new(:Redis, :logger => {:file => File.join(make_tempdir, 'simple_redis.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_restclient" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_restclient.log'), 'a')
|
7
|
-
end
|
8
|
-
|
9
5
|
def features
|
10
6
|
[]
|
11
7
|
end
|
12
8
|
|
13
9
|
start_restserver
|
14
10
|
def new_store
|
15
|
-
Moneta.new(:RestClient, :url => 'http://localhost:8808/moneta/', :logger => {:
|
11
|
+
Moneta.new(:RestClient, :url => 'http://localhost:8808/moneta/', :logger => {:file => File.join(make_tempdir, 'simple_restclient.log')})
|
16
12
|
end
|
17
13
|
|
18
14
|
def load_value(value)
|
@@ -2,10 +2,6 @@
|
|
2
2
|
require 'helper'
|
3
3
|
|
4
4
|
describe_moneta "simple_riak" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_riak.log'), 'a')
|
7
|
-
end
|
8
|
-
|
9
5
|
def features
|
10
6
|
[]
|
11
7
|
end
|
@@ -15,7 +11,7 @@ describe_moneta "simple_riak" do
|
|
15
11
|
Riak.disable_list_keys_warnings = true
|
16
12
|
|
17
13
|
def new_store
|
18
|
-
Moneta.new(:Riak, :bucket => 'simple_riak', :logger => {:
|
14
|
+
Moneta.new(:Riak, :bucket => 'simple_riak', :logger => {:file => File.join(make_tempdir, 'simple_riak.log')})
|
19
15
|
end
|
20
16
|
|
21
17
|
def load_value(value)
|
@@ -2,10 +2,6 @@
|
|
2
2
|
require 'helper'
|
3
3
|
|
4
4
|
describe_moneta "simple_riak_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_riak_with_expires.log'), 'a')
|
7
|
-
end
|
8
|
-
|
9
5
|
def features
|
10
6
|
[:expires]
|
11
7
|
end
|
@@ -15,7 +11,7 @@ describe_moneta "simple_riak_with_expires" do
|
|
15
11
|
Riak.disable_list_keys_warnings = true
|
16
12
|
|
17
13
|
def new_store
|
18
|
-
Moneta.new(:Riak, :bucket => 'simple_riak_with_expires', :expires => true, :logger => {:
|
14
|
+
Moneta.new(:Riak, :bucket => 'simple_riak_with_expires', :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_riak_with_expires.log')})
|
19
15
|
end
|
20
16
|
|
21
17
|
def load_value(value)
|
@@ -2,16 +2,12 @@
|
|
2
2
|
require 'helper'
|
3
3
|
|
4
4
|
describe_moneta "simple_sdbm" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_sdbm.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(:SDBM, :file => File.join(make_tempdir, "simple_sdbm"), :logger => {:
|
10
|
+
Moneta.new(:SDBM, :file => File.join(make_tempdir, "simple_sdbm"), :logger => {:file => File.join(make_tempdir, 'simple_sdbm.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_sdbm_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_sdbm_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(:SDBM, :file => File.join(make_tempdir, "simple_sdbm_with_expires"), :expires => true, :logger => {:
|
10
|
+
Moneta.new(:SDBM, :file => File.join(make_tempdir, "simple_sdbm_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_sdbm_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_sequel" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_sequel.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(:Sequel, :db => (defined?(JRUBY_VERSION) ? "jdbc:sqlite:" : "sqlite:") + File.join(make_tempdir, "simple_sequel"), :logger => {:
|
10
|
+
Moneta.new(:Sequel, :db => (defined?(JRUBY_VERSION) ? "jdbc:sqlite:" : "sqlite:") + File.join(make_tempdir, "simple_sequel"), :logger => {:file => File.join(make_tempdir, 'simple_sequel.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_sequel_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_sequel_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(:Sequel, :db => (defined?(JRUBY_VERSION) ? "jdbc:sqlite:" : "sqlite:") + File.join(make_tempdir, "simple_sequel_with_expires"), :expires => true, :logger => {:
|
10
|
+
Moneta.new(:Sequel, :db => (defined?(JRUBY_VERSION) ? "jdbc:sqlite:" : "sqlite:") + File.join(make_tempdir, "simple_sequel_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_sequel_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_sqlite" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_sqlite.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(:Sqlite, :file => File.join(make_tempdir, "simple_sqlite"), :logger => {:
|
10
|
+
Moneta.new(:Sqlite, :file => File.join(make_tempdir, "simple_sqlite"), :logger => {:file => File.join(make_tempdir, 'simple_sqlite.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_sqlite_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_sqlite_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(:Sqlite, :file => File.join(make_tempdir, "simple_sqlite_with_expires"), :expires => true, :logger => {:
|
10
|
+
Moneta.new(:Sqlite, :file => File.join(make_tempdir, "simple_sqlite_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_sqlite_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_tdb" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_tdb.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(:TDB, :file => File.join(make_tempdir, "simple_tdb"), :logger => {:
|
10
|
+
Moneta.new(:TDB, :file => File.join(make_tempdir, "simple_tdb"), :logger => {:file => File.join(make_tempdir, 'simple_tdb.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_tdb_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_tdb_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(:TDB, :file => File.join(make_tempdir, "simple_tdb_with_expires"), :expires => true, :logger => {:
|
10
|
+
Moneta.new(:TDB, :file => File.join(make_tempdir, "simple_tdb_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_tdb_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_tokyocabinet" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_tokyocabinet.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(:TokyoCabinet, :file => File.join(make_tempdir, "simple_tokyocabinet"), :logger => {:
|
10
|
+
Moneta.new(:TokyoCabinet, :file => File.join(make_tempdir, "simple_tokyocabinet"), :logger => {:file => File.join(make_tempdir, 'simple_tokyocabinet.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_tokyocabinet_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_tokyocabinet_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(:TokyoCabinet, :file => File.join(make_tempdir, "simple_tokyocabinet_with_expires"), :expires => true, :logger => {:
|
10
|
+
Moneta.new(:TokyoCabinet, :file => File.join(make_tempdir, "simple_tokyocabinet_with_expires"), :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_tokyocabinet_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_tokyotyrant" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_tokyotyrant.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(:TokyoTyrant, :logger => {:
|
10
|
+
Moneta.new(:TokyoTyrant, :logger => {:file => File.join(make_tempdir, 'simple_tokyotyrant.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_tokyotyrant_with_expires" do
|
5
|
-
def log
|
6
|
-
@log ||= File.open(File.join(make_tempdir, 'simple_tokyotyrant_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(:TokyoTyrant, :expires => true, :logger => {:
|
10
|
+
Moneta.new(:TokyoTyrant, :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_tokyotyrant_with_expires.log')})
|
15
11
|
end
|
16
12
|
|
17
13
|
def load_value(value)
|