moneta 0.7.8 → 0.7.9
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/CHANGES +6 -0
- data/Gemfile +1 -0
- data/README.md +107 -40
- data/SPEC.md +8 -0
- data/lib/moneta.rb +6 -7
- data/lib/moneta/adapters/activerecord.rb +2 -0
- data/lib/moneta/adapters/client.rb +9 -0
- data/lib/moneta/adapters/datamapper.rb +2 -0
- data/lib/moneta/adapters/file.rb +2 -0
- data/lib/moneta/adapters/kyotocabinet.rb +39 -0
- data/lib/moneta/adapters/lruhash.rb +1 -1
- data/lib/moneta/adapters/memcached/dalli.rb +3 -5
- data/lib/moneta/adapters/memcached/native.rb +2 -0
- data/lib/moneta/adapters/mongo.rb +2 -0
- data/lib/moneta/adapters/pstore.rb +2 -0
- data/lib/moneta/adapters/redis.rb +3 -3
- data/lib/moneta/adapters/sequel.rb +2 -0
- data/lib/moneta/adapters/sqlite.rb +2 -0
- data/lib/moneta/adapters/tokyocabinet.rb +2 -3
- data/lib/moneta/adapters/yaml.rb +1 -1
- data/lib/moneta/cache.rb +5 -0
- data/lib/moneta/expires.rb +1 -0
- data/lib/moneta/mixins.rb +68 -1
- data/lib/moneta/proxy.rb +5 -0
- data/lib/moneta/server.rb +1 -1
- data/lib/moneta/stack.rb +16 -0
- data/lib/moneta/synchronize.rb +3 -1
- data/lib/moneta/version.rb +1 -1
- data/lib/moneta/weak.rb +15 -1
- data/lib/moneta/wrapper.rb +5 -0
- data/script/benchmarks +2 -0
- data/script/generate-specs +64 -37
- data/script/install-bundle +2 -1
- data/script/install-kyotocabinet +17 -0
- data/spec/moneta/adapter_activerecord_spec.rb +5 -0
- data/spec/moneta/adapter_cassandra_spec.rb +5 -0
- data/spec/moneta/adapter_cassandra_with_default_expires_spec.rb +5 -0
- data/spec/moneta/adapter_client_spec.rb +5 -0
- data/spec/moneta/adapter_cookie_spec.rb +5 -0
- data/spec/moneta/adapter_couch_spec.rb +5 -0
- data/spec/moneta/adapter_datamapper_spec.rb +5 -0
- data/spec/moneta/adapter_daybreak_spec.rb +5 -0
- data/spec/moneta/adapter_dbm_spec.rb +5 -0
- data/spec/moneta/adapter_file_spec.rb +5 -0
- data/spec/moneta/adapter_fog_spec.rb +5 -0
- data/spec/moneta/adapter_gdbm_spec.rb +5 -0
- data/spec/moneta/adapter_hbase_spec.rb +5 -0
- data/spec/moneta/adapter_kyotocabinet_spec.rb +29 -0
- data/spec/moneta/adapter_leveldb_spec.rb +5 -0
- data/spec/moneta/adapter_localmemcache_spec.rb +5 -0
- data/spec/moneta/adapter_lruhash_spec.rb +5 -0
- data/spec/moneta/adapter_memcached_dalli_spec.rb +5 -0
- data/spec/moneta/adapter_memcached_dalli_with_default_expires_spec.rb +5 -0
- data/spec/moneta/adapter_memcached_native_spec.rb +5 -0
- data/spec/moneta/adapter_memcached_native_with_default_expires_spec.rb +5 -0
- data/spec/moneta/adapter_memcached_spec.rb +5 -0
- data/spec/moneta/adapter_memcached_with_default_expires_spec.rb +5 -0
- data/spec/moneta/adapter_memory_spec.rb +5 -0
- data/spec/moneta/adapter_mongo_spec.rb +5 -0
- data/spec/moneta/adapter_mongo_with_default_expires_spec.rb +5 -0
- data/spec/moneta/adapter_pstore_spec.rb +5 -0
- data/spec/moneta/adapter_redis_spec.rb +5 -0
- data/spec/moneta/adapter_redis_with_default_expires_spec.rb +5 -0
- data/spec/moneta/adapter_restclient_spec.rb +5 -0
- data/spec/moneta/adapter_riak_spec.rb +5 -0
- data/spec/moneta/adapter_sdbm_spec.rb +5 -0
- data/spec/moneta/adapter_sequel_spec.rb +5 -0
- data/spec/moneta/adapter_sqlite_spec.rb +5 -0
- data/spec/moneta/adapter_tdb_spec.rb +5 -0
- data/spec/moneta/adapter_tokyocabinet_bdb_spec.rb +5 -0
- data/spec/moneta/adapter_tokyocabinet_hdb_spec.rb +5 -0
- data/spec/moneta/adapter_yaml_spec.rb +5 -0
- data/spec/moneta/cache_file_memory_spec.rb +5 -0
- data/spec/moneta/cache_memory_null_spec.rb +5 -0
- data/spec/moneta/expires_file_spec.rb +5 -0
- data/spec/moneta/expires_memory_spec.rb +5 -0
- data/spec/moneta/expires_memory_with_default_expires_spec.rb +5 -0
- data/spec/moneta/lock_spec.rb +5 -0
- data/spec/moneta/mutex_spec.rb +4 -0
- data/spec/moneta/null_adapter_spec.rb +4 -0
- data/spec/moneta/optionmerger_spec.rb +8 -0
- data/spec/moneta/pool_spec.rb +5 -0
- data/spec/moneta/proxy_expires_memory_spec.rb +5 -0
- data/spec/moneta/proxy_redis_spec.rb +5 -0
- data/spec/moneta/semaphore_spec.rb +4 -0
- data/spec/moneta/shared_tcp_spec.rb +5 -0
- data/spec/moneta/shared_unix_spec.rb +5 -0
- data/spec/moneta/simple_activerecord_spec.rb +5 -0
- data/spec/moneta/simple_activerecord_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_cassandra_spec.rb +5 -0
- data/spec/moneta/simple_client_tcp_spec.rb +5 -0
- data/spec/moneta/simple_client_unix_spec.rb +5 -0
- data/spec/moneta/simple_couch_spec.rb +5 -0
- data/spec/moneta/simple_couch_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_datamapper_spec.rb +5 -0
- data/spec/moneta/simple_datamapper_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_datamapper_with_repository_spec.rb +5 -0
- data/spec/moneta/simple_daybreak_spec.rb +5 -0
- data/spec/moneta/simple_daybreak_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_dbm_spec.rb +5 -0
- data/spec/moneta/simple_dbm_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_file_spec.rb +5 -0
- data/spec/moneta/simple_file_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_fog_spec.rb +5 -0
- data/spec/moneta/simple_fog_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_gdbm_spec.rb +5 -0
- data/spec/moneta/simple_gdbm_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_hashfile_spec.rb +5 -0
- data/spec/moneta/simple_hashfile_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_hbase_spec.rb +5 -0
- data/spec/moneta/simple_hbase_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_kyotocabinet_spec.rb +154 -0
- data/spec/moneta/simple_kyotocabinet_with_expires_spec.rb +156 -0
- data/spec/moneta/simple_leveldb_spec.rb +5 -0
- data/spec/moneta/simple_leveldb_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_localmemcache_spec.rb +5 -0
- data/spec/moneta/simple_localmemcache_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_lruhash_spec.rb +5 -0
- data/spec/moneta/simple_lruhash_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_memcached_dalli_spec.rb +5 -0
- data/spec/moneta/simple_memcached_native_spec.rb +5 -0
- data/spec/moneta/simple_memcached_spec.rb +5 -0
- data/spec/moneta/simple_memory_spec.rb +5 -0
- data/spec/moneta/simple_memory_with_compress_spec.rb +5 -0
- data/spec/moneta/simple_memory_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_memory_with_json_key_serializer_spec.rb +5 -0
- data/spec/moneta/simple_memory_with_json_serializer_spec.rb +5 -0
- data/spec/moneta/simple_memory_with_json_value_serializer_spec.rb +5 -0
- data/spec/moneta/simple_memory_with_prefix_spec.rb +5 -0
- data/spec/moneta/simple_memory_with_snappy_compress_spec.rb +5 -0
- data/spec/moneta/simple_mongo_spec.rb +5 -0
- data/spec/moneta/simple_null_spec.rb +5 -0
- data/spec/moneta/simple_pstore_spec.rb +5 -0
- data/spec/moneta/simple_pstore_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_redis_spec.rb +5 -0
- data/spec/moneta/simple_restclient_spec.rb +5 -0
- data/spec/moneta/simple_riak_spec.rb +5 -0
- data/spec/moneta/simple_riak_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_sdbm_spec.rb +5 -0
- data/spec/moneta/simple_sdbm_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_sequel_spec.rb +5 -0
- data/spec/moneta/simple_sequel_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_sqlite_spec.rb +5 -0
- data/spec/moneta/simple_sqlite_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_tdb_spec.rb +5 -0
- data/spec/moneta/simple_tdb_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_tokyocabinet_spec.rb +5 -0
- data/spec/moneta/simple_tokyocabinet_with_expires_spec.rb +5 -0
- data/spec/moneta/simple_yaml_spec.rb +5 -0
- data/spec/moneta/simple_yaml_with_expires_spec.rb +5 -0
- data/spec/moneta/stack_file_memory_spec.rb +5 -0
- data/spec/moneta/stack_memory_file_spec.rb +7 -4
- data/spec/moneta/transformer_bencode_spec.rb +5 -0
- data/spec/moneta/transformer_bert_spec.rb +5 -0
- data/spec/moneta/transformer_bson_spec.rb +5 -0
- data/spec/moneta/transformer_bzip2_spec.rb +5 -0
- data/spec/moneta/transformer_json_spec.rb +5 -0
- data/spec/moneta/transformer_key_inspect_spec.rb +5 -0
- data/spec/moneta/transformer_key_marshal_spec.rb +5 -0
- data/spec/moneta/transformer_key_to_s_spec.rb +5 -0
- data/spec/moneta/transformer_key_yaml_spec.rb +5 -0
- data/spec/moneta/transformer_lzma_spec.rb +5 -0
- data/spec/moneta/transformer_lzo_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_base64_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_escape_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_hmac_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_md5_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_md5_spread_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_prefix_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_rmd160_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_sha1_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_sha256_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_sha384_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_sha512_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_truncate_spec.rb +5 -0
- data/spec/moneta/transformer_marshal_uuencode_spec.rb +5 -0
- data/spec/moneta/transformer_msgpack_spec.rb +5 -0
- data/spec/moneta/transformer_ox_spec.rb +5 -0
- data/spec/moneta/transformer_quicklz_spec.rb +5 -0
- data/spec/moneta/transformer_snappy_spec.rb +5 -0
- data/spec/moneta/transformer_tnet_spec.rb +5 -0
- data/spec/moneta/transformer_value_marshal_spec.rb +5 -0
- data/spec/moneta/transformer_value_yaml_spec.rb +5 -0
- data/spec/moneta/transformer_yaml_spec.rb +5 -0
- data/spec/moneta/transformer_zlib_spec.rb +5 -0
- data/spec/moneta/weak_create_spec.rb +10 -91
- data/spec/moneta/weak_increment_spec.rb +10 -91
- data/spec/monetaspecs.rb +19 -0
- metadata +10 -2
@@ -6,6 +6,10 @@ describe_moneta "simple_file_with_expires" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'simple_file_with_expires.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create, :expires, :increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.new(:File, :dir => File.join(make_tempdir, "simple_file_with_expires"), :expires => true, :logger => {:out => log})
|
11
15
|
end
|
@@ -18,6 +22,7 @@ describe_moneta "simple_file_with_expires" do
|
|
18
22
|
it_should_behave_like 'create'
|
19
23
|
it_should_behave_like 'create_expires'
|
20
24
|
it_should_behave_like 'expires'
|
25
|
+
it_should_behave_like 'features'
|
21
26
|
it_should_behave_like 'increment'
|
22
27
|
it_should_behave_like 'marshallable_key'
|
23
28
|
it_should_behave_like 'marshallable_value'
|
@@ -6,6 +6,10 @@ describe_moneta "simple_fog" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'simple_fog.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[]
|
11
|
+
end
|
12
|
+
|
9
13
|
require 'fog'
|
10
14
|
Fog.mock!
|
11
15
|
def new_store
|
@@ -20,6 +24,7 @@ describe_moneta "simple_fog" do
|
|
20
24
|
end
|
21
25
|
|
22
26
|
include_context 'setup_store'
|
27
|
+
it_should_behave_like 'features'
|
23
28
|
it_should_behave_like 'marshallable_key'
|
24
29
|
it_should_behave_like 'marshallable_value'
|
25
30
|
it_should_behave_like 'multiprocess'
|
@@ -6,6 +6,10 @@ describe_moneta "simple_fog_with_expires" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'simple_fog_with_expires.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:expires]
|
11
|
+
end
|
12
|
+
|
9
13
|
require 'fog'
|
10
14
|
Fog.mock!
|
11
15
|
def new_store
|
@@ -22,6 +26,7 @@ describe_moneta "simple_fog_with_expires" do
|
|
22
26
|
|
23
27
|
include_context 'setup_store'
|
24
28
|
it_should_behave_like 'expires'
|
29
|
+
it_should_behave_like 'features'
|
25
30
|
it_should_behave_like 'marshallable_key'
|
26
31
|
it_should_behave_like 'marshallable_value'
|
27
32
|
it_should_behave_like 'multiprocess'
|
@@ -6,6 +6,10 @@ describe_moneta "simple_gdbm" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'simple_gdbm.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create, :increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.new(:GDBM, :file => File.join(make_tempdir, "simple_gdbm"), :logger => {:out => log})
|
11
15
|
end
|
@@ -16,6 +20,7 @@ describe_moneta "simple_gdbm" do
|
|
16
20
|
|
17
21
|
include_context 'setup_store'
|
18
22
|
it_should_behave_like 'create'
|
23
|
+
it_should_behave_like 'features'
|
19
24
|
it_should_behave_like 'increment'
|
20
25
|
it_should_behave_like 'marshallable_key'
|
21
26
|
it_should_behave_like 'marshallable_value'
|
@@ -6,6 +6,10 @@ describe_moneta "simple_gdbm_with_expires" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'simple_gdbm_with_expires.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create, :expires, :increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.new(:GDBM, :file => File.join(make_tempdir, "simple_gdbm_with_expires"), :expires => true, :logger => {:out => log})
|
11
15
|
end
|
@@ -18,6 +22,7 @@ describe_moneta "simple_gdbm_with_expires" do
|
|
18
22
|
it_should_behave_like 'create'
|
19
23
|
it_should_behave_like 'create_expires'
|
20
24
|
it_should_behave_like 'expires'
|
25
|
+
it_should_behave_like 'features'
|
21
26
|
it_should_behave_like 'increment'
|
22
27
|
it_should_behave_like 'marshallable_key'
|
23
28
|
it_should_behave_like 'marshallable_value'
|
@@ -6,6 +6,10 @@ describe_moneta "simple_hashfile" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'simple_hashfile.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create, :increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.new(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile"), :logger => {:out => log})
|
11
15
|
end
|
@@ -16,6 +20,7 @@ describe_moneta "simple_hashfile" do
|
|
16
20
|
|
17
21
|
include_context 'setup_store'
|
18
22
|
it_should_behave_like 'create'
|
23
|
+
it_should_behave_like 'features'
|
19
24
|
it_should_behave_like 'increment'
|
20
25
|
it_should_behave_like 'marshallable_key'
|
21
26
|
it_should_behave_like 'marshallable_value'
|
@@ -6,6 +6,10 @@ describe_moneta "simple_hashfile_with_expires" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'simple_hashfile_with_expires.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create, :expires, :increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.new(:HashFile, :dir => File.join(make_tempdir, "simple_hashfile_with_expires"), :expires => true, :logger => {:out => log})
|
11
15
|
end
|
@@ -18,6 +22,7 @@ describe_moneta "simple_hashfile_with_expires" do
|
|
18
22
|
it_should_behave_like 'create'
|
19
23
|
it_should_behave_like 'create_expires'
|
20
24
|
it_should_behave_like 'expires'
|
25
|
+
it_should_behave_like 'features'
|
21
26
|
it_should_behave_like 'increment'
|
22
27
|
it_should_behave_like 'marshallable_key'
|
23
28
|
it_should_behave_like 'marshallable_value'
|
@@ -6,6 +6,10 @@ describe_moneta "simple_hbase" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'simple_hbase.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.new(:HBase, :table => "simple_hbase", :logger => {:out => log})
|
11
15
|
end
|
@@ -15,6 +19,7 @@ describe_moneta "simple_hbase" do
|
|
15
19
|
end
|
16
20
|
|
17
21
|
include_context 'setup_store'
|
22
|
+
it_should_behave_like 'features'
|
18
23
|
it_should_behave_like 'increment'
|
19
24
|
it_should_behave_like 'marshallable_key'
|
20
25
|
it_should_behave_like 'marshallable_value'
|
@@ -6,6 +6,10 @@ describe_moneta "simple_hbase_with_expires" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'simple_hbase_with_expires.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create, :expires, :increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.new(:HBase, :table => "simple_hbase", :expires => true, :logger => {:out => log})
|
11
15
|
end
|
@@ -18,6 +22,7 @@ describe_moneta "simple_hbase_with_expires" do
|
|
18
22
|
it_should_behave_like 'create'
|
19
23
|
it_should_behave_like 'create_expires'
|
20
24
|
it_should_behave_like 'expires'
|
25
|
+
it_should_behave_like 'features'
|
21
26
|
it_should_behave_like 'increment'
|
22
27
|
it_should_behave_like 'marshallable_key'
|
23
28
|
it_should_behave_like 'marshallable_value'
|
@@ -0,0 +1,154 @@
|
|
1
|
+
# Generated by generate-specs
|
2
|
+
require 'helper'
|
3
|
+
|
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
|
+
def features
|
10
|
+
[:create, :increment]
|
11
|
+
end
|
12
|
+
|
13
|
+
def new_store
|
14
|
+
Moneta.new(:KyotoCabinet, :file => File.join(make_tempdir, "simple_kyotocabinet.kch"), :logger => {:out => log})
|
15
|
+
end
|
16
|
+
|
17
|
+
def load_value(value)
|
18
|
+
Marshal.load(value)
|
19
|
+
end
|
20
|
+
|
21
|
+
include_context 'setup_store'
|
22
|
+
it_should_behave_like 'create'
|
23
|
+
it_should_behave_like 'features'
|
24
|
+
it_should_behave_like 'increment'
|
25
|
+
it_should_behave_like 'marshallable_key'
|
26
|
+
it_should_behave_like 'marshallable_value'
|
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 'persist_objectkey_objectvalue'
|
64
|
+
it_should_behave_like 'persist_objectkey_stringvalue'
|
65
|
+
it_should_behave_like 'persist_objectkey_hashvalue'
|
66
|
+
it_should_behave_like 'persist_objectkey_booleanvalue'
|
67
|
+
it_should_behave_like 'persist_objectkey_nilvalue'
|
68
|
+
it_should_behave_like 'persist_objectkey_integervalue'
|
69
|
+
it_should_behave_like 'persist_stringkey_objectvalue'
|
70
|
+
it_should_behave_like 'persist_stringkey_stringvalue'
|
71
|
+
it_should_behave_like 'persist_stringkey_hashvalue'
|
72
|
+
it_should_behave_like 'persist_stringkey_booleanvalue'
|
73
|
+
it_should_behave_like 'persist_stringkey_nilvalue'
|
74
|
+
it_should_behave_like 'persist_stringkey_integervalue'
|
75
|
+
it_should_behave_like 'persist_hashkey_objectvalue'
|
76
|
+
it_should_behave_like 'persist_hashkey_stringvalue'
|
77
|
+
it_should_behave_like 'persist_hashkey_hashvalue'
|
78
|
+
it_should_behave_like 'persist_hashkey_booleanvalue'
|
79
|
+
it_should_behave_like 'persist_hashkey_nilvalue'
|
80
|
+
it_should_behave_like 'persist_hashkey_integervalue'
|
81
|
+
it_should_behave_like 'persist_booleankey_objectvalue'
|
82
|
+
it_should_behave_like 'persist_booleankey_stringvalue'
|
83
|
+
it_should_behave_like 'persist_booleankey_hashvalue'
|
84
|
+
it_should_behave_like 'persist_booleankey_booleanvalue'
|
85
|
+
it_should_behave_like 'persist_booleankey_nilvalue'
|
86
|
+
it_should_behave_like 'persist_booleankey_integervalue'
|
87
|
+
it_should_behave_like 'persist_nilkey_objectvalue'
|
88
|
+
it_should_behave_like 'persist_nilkey_stringvalue'
|
89
|
+
it_should_behave_like 'persist_nilkey_hashvalue'
|
90
|
+
it_should_behave_like 'persist_nilkey_booleanvalue'
|
91
|
+
it_should_behave_like 'persist_nilkey_nilvalue'
|
92
|
+
it_should_behave_like 'persist_nilkey_integervalue'
|
93
|
+
it_should_behave_like 'persist_integerkey_objectvalue'
|
94
|
+
it_should_behave_like 'persist_integerkey_stringvalue'
|
95
|
+
it_should_behave_like 'persist_integerkey_hashvalue'
|
96
|
+
it_should_behave_like 'persist_integerkey_booleanvalue'
|
97
|
+
it_should_behave_like 'persist_integerkey_nilvalue'
|
98
|
+
it_should_behave_like 'persist_integerkey_integervalue'
|
99
|
+
it_should_behave_like 'returndifferent_objectkey_objectvalue'
|
100
|
+
it_should_behave_like 'returndifferent_objectkey_stringvalue'
|
101
|
+
it_should_behave_like 'returndifferent_objectkey_hashvalue'
|
102
|
+
it_should_behave_like 'returndifferent_stringkey_objectvalue'
|
103
|
+
it_should_behave_like 'returndifferent_stringkey_stringvalue'
|
104
|
+
it_should_behave_like 'returndifferent_stringkey_hashvalue'
|
105
|
+
it_should_behave_like 'returndifferent_hashkey_objectvalue'
|
106
|
+
it_should_behave_like 'returndifferent_hashkey_stringvalue'
|
107
|
+
it_should_behave_like 'returndifferent_hashkey_hashvalue'
|
108
|
+
it_should_behave_like 'returndifferent_booleankey_objectvalue'
|
109
|
+
it_should_behave_like 'returndifferent_booleankey_stringvalue'
|
110
|
+
it_should_behave_like 'returndifferent_booleankey_hashvalue'
|
111
|
+
it_should_behave_like 'returndifferent_nilkey_objectvalue'
|
112
|
+
it_should_behave_like 'returndifferent_nilkey_stringvalue'
|
113
|
+
it_should_behave_like 'returndifferent_nilkey_hashvalue'
|
114
|
+
it_should_behave_like 'returndifferent_integerkey_objectvalue'
|
115
|
+
it_should_behave_like 'returndifferent_integerkey_stringvalue'
|
116
|
+
it_should_behave_like 'returndifferent_integerkey_hashvalue'
|
117
|
+
it_should_behave_like 'store_objectkey_objectvalue'
|
118
|
+
it_should_behave_like 'store_objectkey_stringvalue'
|
119
|
+
it_should_behave_like 'store_objectkey_hashvalue'
|
120
|
+
it_should_behave_like 'store_objectkey_booleanvalue'
|
121
|
+
it_should_behave_like 'store_objectkey_nilvalue'
|
122
|
+
it_should_behave_like 'store_objectkey_integervalue'
|
123
|
+
it_should_behave_like 'store_stringkey_objectvalue'
|
124
|
+
it_should_behave_like 'store_stringkey_stringvalue'
|
125
|
+
it_should_behave_like 'store_stringkey_hashvalue'
|
126
|
+
it_should_behave_like 'store_stringkey_booleanvalue'
|
127
|
+
it_should_behave_like 'store_stringkey_nilvalue'
|
128
|
+
it_should_behave_like 'store_stringkey_integervalue'
|
129
|
+
it_should_behave_like 'store_hashkey_objectvalue'
|
130
|
+
it_should_behave_like 'store_hashkey_stringvalue'
|
131
|
+
it_should_behave_like 'store_hashkey_hashvalue'
|
132
|
+
it_should_behave_like 'store_hashkey_booleanvalue'
|
133
|
+
it_should_behave_like 'store_hashkey_nilvalue'
|
134
|
+
it_should_behave_like 'store_hashkey_integervalue'
|
135
|
+
it_should_behave_like 'store_booleankey_objectvalue'
|
136
|
+
it_should_behave_like 'store_booleankey_stringvalue'
|
137
|
+
it_should_behave_like 'store_booleankey_hashvalue'
|
138
|
+
it_should_behave_like 'store_booleankey_booleanvalue'
|
139
|
+
it_should_behave_like 'store_booleankey_nilvalue'
|
140
|
+
it_should_behave_like 'store_booleankey_integervalue'
|
141
|
+
it_should_behave_like 'store_nilkey_objectvalue'
|
142
|
+
it_should_behave_like 'store_nilkey_stringvalue'
|
143
|
+
it_should_behave_like 'store_nilkey_hashvalue'
|
144
|
+
it_should_behave_like 'store_nilkey_booleanvalue'
|
145
|
+
it_should_behave_like 'store_nilkey_nilvalue'
|
146
|
+
it_should_behave_like 'store_nilkey_integervalue'
|
147
|
+
it_should_behave_like 'store_integerkey_objectvalue'
|
148
|
+
it_should_behave_like 'store_integerkey_stringvalue'
|
149
|
+
it_should_behave_like 'store_integerkey_hashvalue'
|
150
|
+
it_should_behave_like 'store_integerkey_booleanvalue'
|
151
|
+
it_should_behave_like 'store_integerkey_nilvalue'
|
152
|
+
it_should_behave_like 'store_integerkey_integervalue'
|
153
|
+
it_should_behave_like 'transform_value'
|
154
|
+
end
|
@@ -0,0 +1,156 @@
|
|
1
|
+
# Generated by generate-specs
|
2
|
+
require 'helper'
|
3
|
+
|
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
|
+
def features
|
10
|
+
[:create, :expires, :increment]
|
11
|
+
end
|
12
|
+
|
13
|
+
def new_store
|
14
|
+
Moneta.new(:KyotoCabinet, :file => File.join(make_tempdir, "simple_kyotocabinet_with_expires.kch"), :expires => true, :logger => {:out => log})
|
15
|
+
end
|
16
|
+
|
17
|
+
def load_value(value)
|
18
|
+
Marshal.load(value)
|
19
|
+
end
|
20
|
+
|
21
|
+
include_context 'setup_store'
|
22
|
+
it_should_behave_like 'create'
|
23
|
+
it_should_behave_like 'create_expires'
|
24
|
+
it_should_behave_like 'expires'
|
25
|
+
it_should_behave_like 'features'
|
26
|
+
it_should_behave_like 'increment'
|
27
|
+
it_should_behave_like 'marshallable_key'
|
28
|
+
it_should_behave_like 'marshallable_value'
|
29
|
+
it_should_behave_like 'null_objectkey_objectvalue'
|
30
|
+
it_should_behave_like 'null_objectkey_stringvalue'
|
31
|
+
it_should_behave_like 'null_objectkey_hashvalue'
|
32
|
+
it_should_behave_like 'null_objectkey_booleanvalue'
|
33
|
+
it_should_behave_like 'null_objectkey_nilvalue'
|
34
|
+
it_should_behave_like 'null_objectkey_integervalue'
|
35
|
+
it_should_behave_like 'null_stringkey_objectvalue'
|
36
|
+
it_should_behave_like 'null_stringkey_stringvalue'
|
37
|
+
it_should_behave_like 'null_stringkey_hashvalue'
|
38
|
+
it_should_behave_like 'null_stringkey_booleanvalue'
|
39
|
+
it_should_behave_like 'null_stringkey_nilvalue'
|
40
|
+
it_should_behave_like 'null_stringkey_integervalue'
|
41
|
+
it_should_behave_like 'null_hashkey_objectvalue'
|
42
|
+
it_should_behave_like 'null_hashkey_stringvalue'
|
43
|
+
it_should_behave_like 'null_hashkey_hashvalue'
|
44
|
+
it_should_behave_like 'null_hashkey_booleanvalue'
|
45
|
+
it_should_behave_like 'null_hashkey_nilvalue'
|
46
|
+
it_should_behave_like 'null_hashkey_integervalue'
|
47
|
+
it_should_behave_like 'null_booleankey_objectvalue'
|
48
|
+
it_should_behave_like 'null_booleankey_stringvalue'
|
49
|
+
it_should_behave_like 'null_booleankey_hashvalue'
|
50
|
+
it_should_behave_like 'null_booleankey_booleanvalue'
|
51
|
+
it_should_behave_like 'null_booleankey_nilvalue'
|
52
|
+
it_should_behave_like 'null_booleankey_integervalue'
|
53
|
+
it_should_behave_like 'null_nilkey_objectvalue'
|
54
|
+
it_should_behave_like 'null_nilkey_stringvalue'
|
55
|
+
it_should_behave_like 'null_nilkey_hashvalue'
|
56
|
+
it_should_behave_like 'null_nilkey_booleanvalue'
|
57
|
+
it_should_behave_like 'null_nilkey_nilvalue'
|
58
|
+
it_should_behave_like 'null_nilkey_integervalue'
|
59
|
+
it_should_behave_like 'null_integerkey_objectvalue'
|
60
|
+
it_should_behave_like 'null_integerkey_stringvalue'
|
61
|
+
it_should_behave_like 'null_integerkey_hashvalue'
|
62
|
+
it_should_behave_like 'null_integerkey_booleanvalue'
|
63
|
+
it_should_behave_like 'null_integerkey_nilvalue'
|
64
|
+
it_should_behave_like 'null_integerkey_integervalue'
|
65
|
+
it_should_behave_like 'persist_objectkey_objectvalue'
|
66
|
+
it_should_behave_like 'persist_objectkey_stringvalue'
|
67
|
+
it_should_behave_like 'persist_objectkey_hashvalue'
|
68
|
+
it_should_behave_like 'persist_objectkey_booleanvalue'
|
69
|
+
it_should_behave_like 'persist_objectkey_nilvalue'
|
70
|
+
it_should_behave_like 'persist_objectkey_integervalue'
|
71
|
+
it_should_behave_like 'persist_stringkey_objectvalue'
|
72
|
+
it_should_behave_like 'persist_stringkey_stringvalue'
|
73
|
+
it_should_behave_like 'persist_stringkey_hashvalue'
|
74
|
+
it_should_behave_like 'persist_stringkey_booleanvalue'
|
75
|
+
it_should_behave_like 'persist_stringkey_nilvalue'
|
76
|
+
it_should_behave_like 'persist_stringkey_integervalue'
|
77
|
+
it_should_behave_like 'persist_hashkey_objectvalue'
|
78
|
+
it_should_behave_like 'persist_hashkey_stringvalue'
|
79
|
+
it_should_behave_like 'persist_hashkey_hashvalue'
|
80
|
+
it_should_behave_like 'persist_hashkey_booleanvalue'
|
81
|
+
it_should_behave_like 'persist_hashkey_nilvalue'
|
82
|
+
it_should_behave_like 'persist_hashkey_integervalue'
|
83
|
+
it_should_behave_like 'persist_booleankey_objectvalue'
|
84
|
+
it_should_behave_like 'persist_booleankey_stringvalue'
|
85
|
+
it_should_behave_like 'persist_booleankey_hashvalue'
|
86
|
+
it_should_behave_like 'persist_booleankey_booleanvalue'
|
87
|
+
it_should_behave_like 'persist_booleankey_nilvalue'
|
88
|
+
it_should_behave_like 'persist_booleankey_integervalue'
|
89
|
+
it_should_behave_like 'persist_nilkey_objectvalue'
|
90
|
+
it_should_behave_like 'persist_nilkey_stringvalue'
|
91
|
+
it_should_behave_like 'persist_nilkey_hashvalue'
|
92
|
+
it_should_behave_like 'persist_nilkey_booleanvalue'
|
93
|
+
it_should_behave_like 'persist_nilkey_nilvalue'
|
94
|
+
it_should_behave_like 'persist_nilkey_integervalue'
|
95
|
+
it_should_behave_like 'persist_integerkey_objectvalue'
|
96
|
+
it_should_behave_like 'persist_integerkey_stringvalue'
|
97
|
+
it_should_behave_like 'persist_integerkey_hashvalue'
|
98
|
+
it_should_behave_like 'persist_integerkey_booleanvalue'
|
99
|
+
it_should_behave_like 'persist_integerkey_nilvalue'
|
100
|
+
it_should_behave_like 'persist_integerkey_integervalue'
|
101
|
+
it_should_behave_like 'returndifferent_objectkey_objectvalue'
|
102
|
+
it_should_behave_like 'returndifferent_objectkey_stringvalue'
|
103
|
+
it_should_behave_like 'returndifferent_objectkey_hashvalue'
|
104
|
+
it_should_behave_like 'returndifferent_stringkey_objectvalue'
|
105
|
+
it_should_behave_like 'returndifferent_stringkey_stringvalue'
|
106
|
+
it_should_behave_like 'returndifferent_stringkey_hashvalue'
|
107
|
+
it_should_behave_like 'returndifferent_hashkey_objectvalue'
|
108
|
+
it_should_behave_like 'returndifferent_hashkey_stringvalue'
|
109
|
+
it_should_behave_like 'returndifferent_hashkey_hashvalue'
|
110
|
+
it_should_behave_like 'returndifferent_booleankey_objectvalue'
|
111
|
+
it_should_behave_like 'returndifferent_booleankey_stringvalue'
|
112
|
+
it_should_behave_like 'returndifferent_booleankey_hashvalue'
|
113
|
+
it_should_behave_like 'returndifferent_nilkey_objectvalue'
|
114
|
+
it_should_behave_like 'returndifferent_nilkey_stringvalue'
|
115
|
+
it_should_behave_like 'returndifferent_nilkey_hashvalue'
|
116
|
+
it_should_behave_like 'returndifferent_integerkey_objectvalue'
|
117
|
+
it_should_behave_like 'returndifferent_integerkey_stringvalue'
|
118
|
+
it_should_behave_like 'returndifferent_integerkey_hashvalue'
|
119
|
+
it_should_behave_like 'store_objectkey_objectvalue'
|
120
|
+
it_should_behave_like 'store_objectkey_stringvalue'
|
121
|
+
it_should_behave_like 'store_objectkey_hashvalue'
|
122
|
+
it_should_behave_like 'store_objectkey_booleanvalue'
|
123
|
+
it_should_behave_like 'store_objectkey_nilvalue'
|
124
|
+
it_should_behave_like 'store_objectkey_integervalue'
|
125
|
+
it_should_behave_like 'store_stringkey_objectvalue'
|
126
|
+
it_should_behave_like 'store_stringkey_stringvalue'
|
127
|
+
it_should_behave_like 'store_stringkey_hashvalue'
|
128
|
+
it_should_behave_like 'store_stringkey_booleanvalue'
|
129
|
+
it_should_behave_like 'store_stringkey_nilvalue'
|
130
|
+
it_should_behave_like 'store_stringkey_integervalue'
|
131
|
+
it_should_behave_like 'store_hashkey_objectvalue'
|
132
|
+
it_should_behave_like 'store_hashkey_stringvalue'
|
133
|
+
it_should_behave_like 'store_hashkey_hashvalue'
|
134
|
+
it_should_behave_like 'store_hashkey_booleanvalue'
|
135
|
+
it_should_behave_like 'store_hashkey_nilvalue'
|
136
|
+
it_should_behave_like 'store_hashkey_integervalue'
|
137
|
+
it_should_behave_like 'store_booleankey_objectvalue'
|
138
|
+
it_should_behave_like 'store_booleankey_stringvalue'
|
139
|
+
it_should_behave_like 'store_booleankey_hashvalue'
|
140
|
+
it_should_behave_like 'store_booleankey_booleanvalue'
|
141
|
+
it_should_behave_like 'store_booleankey_nilvalue'
|
142
|
+
it_should_behave_like 'store_booleankey_integervalue'
|
143
|
+
it_should_behave_like 'store_nilkey_objectvalue'
|
144
|
+
it_should_behave_like 'store_nilkey_stringvalue'
|
145
|
+
it_should_behave_like 'store_nilkey_hashvalue'
|
146
|
+
it_should_behave_like 'store_nilkey_booleanvalue'
|
147
|
+
it_should_behave_like 'store_nilkey_nilvalue'
|
148
|
+
it_should_behave_like 'store_nilkey_integervalue'
|
149
|
+
it_should_behave_like 'store_integerkey_objectvalue'
|
150
|
+
it_should_behave_like 'store_integerkey_stringvalue'
|
151
|
+
it_should_behave_like 'store_integerkey_hashvalue'
|
152
|
+
it_should_behave_like 'store_integerkey_booleanvalue'
|
153
|
+
it_should_behave_like 'store_integerkey_nilvalue'
|
154
|
+
it_should_behave_like 'store_integerkey_integervalue'
|
155
|
+
it_should_behave_like 'transform_value_expires'
|
156
|
+
end
|