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 "transformer_value_marshal" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'transformer_value_marshal.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create, :increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.build do
|
11
15
|
use :Transformer, :value => :marshal
|
@@ -19,6 +23,7 @@ describe_moneta "transformer_value_marshal" do
|
|
19
23
|
|
20
24
|
include_context 'setup_store'
|
21
25
|
it_should_behave_like 'create'
|
26
|
+
it_should_behave_like 'features'
|
22
27
|
it_should_behave_like 'increment'
|
23
28
|
it_should_behave_like 'null_objectkey_objectvalue'
|
24
29
|
it_should_behave_like 'null_objectkey_stringvalue'
|
@@ -6,6 +6,10 @@ describe_moneta "transformer_value_yaml" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'transformer_value_yaml.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create, :increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.build do
|
11
15
|
use :Transformer, :value => :yaml
|
@@ -19,6 +23,7 @@ describe_moneta "transformer_value_yaml" do
|
|
19
23
|
|
20
24
|
include_context 'setup_store'
|
21
25
|
it_should_behave_like 'create'
|
26
|
+
it_should_behave_like 'features'
|
22
27
|
it_should_behave_like 'increment'
|
23
28
|
it_should_behave_like 'null_objectkey_objectvalue'
|
24
29
|
it_should_behave_like 'null_objectkey_stringvalue'
|
@@ -6,6 +6,10 @@ describe_moneta "transformer_yaml" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'transformer_yaml.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create, :increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.build do
|
11
15
|
use :Transformer, :key => :yaml, :value => :yaml
|
@@ -19,6 +23,7 @@ describe_moneta "transformer_yaml" do
|
|
19
23
|
|
20
24
|
include_context 'setup_store'
|
21
25
|
it_should_behave_like 'create'
|
26
|
+
it_should_behave_like 'features'
|
22
27
|
it_should_behave_like 'increment'
|
23
28
|
it_should_behave_like 'null_objectkey_objectvalue'
|
24
29
|
it_should_behave_like 'null_objectkey_stringvalue'
|
@@ -6,6 +6,10 @@ describe_moneta "transformer_zlib" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'transformer_zlib.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create, :increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.build do
|
11
15
|
use :Transformer, :value => :zlib
|
@@ -19,6 +23,7 @@ describe_moneta "transformer_zlib" do
|
|
19
23
|
|
20
24
|
include_context 'setup_store'
|
21
25
|
it_should_behave_like 'create'
|
26
|
+
it_should_behave_like 'features'
|
22
27
|
it_should_behave_like 'increment'
|
23
28
|
it_should_behave_like 'null_objectkey_stringvalue'
|
24
29
|
it_should_behave_like 'null_stringkey_stringvalue'
|
@@ -6,10 +6,14 @@ describe_moneta "weak_create" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'weak_create.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:create]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.build do
|
11
15
|
use :WeakCreate
|
12
|
-
adapter :
|
16
|
+
adapter :Couch, :db => 'weak_create'
|
13
17
|
end
|
14
18
|
end
|
15
19
|
|
@@ -19,96 +23,11 @@ describe_moneta "weak_create" do
|
|
19
23
|
|
20
24
|
include_context 'setup_store'
|
21
25
|
it_should_behave_like 'create'
|
22
|
-
it_should_behave_like '
|
23
|
-
it_should_behave_like '
|
24
|
-
it_should_behave_like '
|
25
|
-
it_should_behave_like 'null_objectkey_stringvalue'
|
26
|
-
it_should_behave_like 'null_objectkey_hashvalue'
|
27
|
-
it_should_behave_like 'null_objectkey_booleanvalue'
|
28
|
-
it_should_behave_like 'null_objectkey_nilvalue'
|
29
|
-
it_should_behave_like 'null_objectkey_integervalue'
|
30
|
-
it_should_behave_like 'null_stringkey_objectvalue'
|
26
|
+
it_should_behave_like 'features'
|
27
|
+
it_should_behave_like 'multiprocess'
|
28
|
+
it_should_behave_like 'not_increment'
|
31
29
|
it_should_behave_like 'null_stringkey_stringvalue'
|
32
|
-
it_should_behave_like '
|
33
|
-
it_should_behave_like '
|
34
|
-
it_should_behave_like 'null_stringkey_nilvalue'
|
35
|
-
it_should_behave_like 'null_stringkey_integervalue'
|
36
|
-
it_should_behave_like 'null_hashkey_objectvalue'
|
37
|
-
it_should_behave_like 'null_hashkey_stringvalue'
|
38
|
-
it_should_behave_like 'null_hashkey_hashvalue'
|
39
|
-
it_should_behave_like 'null_hashkey_booleanvalue'
|
40
|
-
it_should_behave_like 'null_hashkey_nilvalue'
|
41
|
-
it_should_behave_like 'null_hashkey_integervalue'
|
42
|
-
it_should_behave_like 'null_booleankey_objectvalue'
|
43
|
-
it_should_behave_like 'null_booleankey_stringvalue'
|
44
|
-
it_should_behave_like 'null_booleankey_hashvalue'
|
45
|
-
it_should_behave_like 'null_booleankey_booleanvalue'
|
46
|
-
it_should_behave_like 'null_booleankey_nilvalue'
|
47
|
-
it_should_behave_like 'null_booleankey_integervalue'
|
48
|
-
it_should_behave_like 'null_nilkey_objectvalue'
|
49
|
-
it_should_behave_like 'null_nilkey_stringvalue'
|
50
|
-
it_should_behave_like 'null_nilkey_hashvalue'
|
51
|
-
it_should_behave_like 'null_nilkey_booleanvalue'
|
52
|
-
it_should_behave_like 'null_nilkey_nilvalue'
|
53
|
-
it_should_behave_like 'null_nilkey_integervalue'
|
54
|
-
it_should_behave_like 'null_integerkey_objectvalue'
|
55
|
-
it_should_behave_like 'null_integerkey_stringvalue'
|
56
|
-
it_should_behave_like 'null_integerkey_hashvalue'
|
57
|
-
it_should_behave_like 'null_integerkey_booleanvalue'
|
58
|
-
it_should_behave_like 'null_integerkey_nilvalue'
|
59
|
-
it_should_behave_like 'null_integerkey_integervalue'
|
60
|
-
it_should_behave_like 'returnsame_objectkey_objectvalue'
|
61
|
-
it_should_behave_like 'returnsame_objectkey_stringvalue'
|
62
|
-
it_should_behave_like 'returnsame_objectkey_hashvalue'
|
63
|
-
it_should_behave_like 'returnsame_stringkey_objectvalue'
|
64
|
-
it_should_behave_like 'returnsame_stringkey_stringvalue'
|
65
|
-
it_should_behave_like 'returnsame_stringkey_hashvalue'
|
66
|
-
it_should_behave_like 'returnsame_hashkey_objectvalue'
|
67
|
-
it_should_behave_like 'returnsame_hashkey_stringvalue'
|
68
|
-
it_should_behave_like 'returnsame_hashkey_hashvalue'
|
69
|
-
it_should_behave_like 'returnsame_booleankey_objectvalue'
|
70
|
-
it_should_behave_like 'returnsame_booleankey_stringvalue'
|
71
|
-
it_should_behave_like 'returnsame_booleankey_hashvalue'
|
72
|
-
it_should_behave_like 'returnsame_nilkey_objectvalue'
|
73
|
-
it_should_behave_like 'returnsame_nilkey_stringvalue'
|
74
|
-
it_should_behave_like 'returnsame_nilkey_hashvalue'
|
75
|
-
it_should_behave_like 'returnsame_integerkey_objectvalue'
|
76
|
-
it_should_behave_like 'returnsame_integerkey_stringvalue'
|
77
|
-
it_should_behave_like 'returnsame_integerkey_hashvalue'
|
78
|
-
it_should_behave_like 'store_objectkey_objectvalue'
|
79
|
-
it_should_behave_like 'store_objectkey_stringvalue'
|
80
|
-
it_should_behave_like 'store_objectkey_hashvalue'
|
81
|
-
it_should_behave_like 'store_objectkey_booleanvalue'
|
82
|
-
it_should_behave_like 'store_objectkey_nilvalue'
|
83
|
-
it_should_behave_like 'store_objectkey_integervalue'
|
84
|
-
it_should_behave_like 'store_stringkey_objectvalue'
|
30
|
+
it_should_behave_like 'persist_stringkey_stringvalue'
|
31
|
+
it_should_behave_like 'returndifferent_stringkey_stringvalue'
|
85
32
|
it_should_behave_like 'store_stringkey_stringvalue'
|
86
|
-
it_should_behave_like 'store_stringkey_hashvalue'
|
87
|
-
it_should_behave_like 'store_stringkey_booleanvalue'
|
88
|
-
it_should_behave_like 'store_stringkey_nilvalue'
|
89
|
-
it_should_behave_like 'store_stringkey_integervalue'
|
90
|
-
it_should_behave_like 'store_hashkey_objectvalue'
|
91
|
-
it_should_behave_like 'store_hashkey_stringvalue'
|
92
|
-
it_should_behave_like 'store_hashkey_hashvalue'
|
93
|
-
it_should_behave_like 'store_hashkey_booleanvalue'
|
94
|
-
it_should_behave_like 'store_hashkey_nilvalue'
|
95
|
-
it_should_behave_like 'store_hashkey_integervalue'
|
96
|
-
it_should_behave_like 'store_booleankey_objectvalue'
|
97
|
-
it_should_behave_like 'store_booleankey_stringvalue'
|
98
|
-
it_should_behave_like 'store_booleankey_hashvalue'
|
99
|
-
it_should_behave_like 'store_booleankey_booleanvalue'
|
100
|
-
it_should_behave_like 'store_booleankey_nilvalue'
|
101
|
-
it_should_behave_like 'store_booleankey_integervalue'
|
102
|
-
it_should_behave_like 'store_nilkey_objectvalue'
|
103
|
-
it_should_behave_like 'store_nilkey_stringvalue'
|
104
|
-
it_should_behave_like 'store_nilkey_hashvalue'
|
105
|
-
it_should_behave_like 'store_nilkey_booleanvalue'
|
106
|
-
it_should_behave_like 'store_nilkey_nilvalue'
|
107
|
-
it_should_behave_like 'store_nilkey_integervalue'
|
108
|
-
it_should_behave_like 'store_integerkey_objectvalue'
|
109
|
-
it_should_behave_like 'store_integerkey_stringvalue'
|
110
|
-
it_should_behave_like 'store_integerkey_hashvalue'
|
111
|
-
it_should_behave_like 'store_integerkey_booleanvalue'
|
112
|
-
it_should_behave_like 'store_integerkey_nilvalue'
|
113
|
-
it_should_behave_like 'store_integerkey_integervalue'
|
114
33
|
end
|
@@ -6,10 +6,14 @@ describe_moneta "weak_increment" do
|
|
6
6
|
@log ||= File.open(File.join(make_tempdir, 'weak_increment.log'), 'a')
|
7
7
|
end
|
8
8
|
|
9
|
+
def features
|
10
|
+
[:increment]
|
11
|
+
end
|
12
|
+
|
9
13
|
def new_store
|
10
14
|
Moneta.build do
|
11
15
|
use :WeakIncrement
|
12
|
-
adapter :
|
16
|
+
adapter :Couch, :db => 'weak_increment'
|
13
17
|
end
|
14
18
|
end
|
15
19
|
|
@@ -18,97 +22,12 @@ describe_moneta "weak_increment" do
|
|
18
22
|
end
|
19
23
|
|
20
24
|
include_context 'setup_store'
|
21
|
-
it_should_behave_like '
|
25
|
+
it_should_behave_like 'features'
|
22
26
|
it_should_behave_like 'increment'
|
23
|
-
it_should_behave_like '
|
24
|
-
it_should_behave_like '
|
25
|
-
it_should_behave_like 'null_objectkey_stringvalue'
|
26
|
-
it_should_behave_like 'null_objectkey_hashvalue'
|
27
|
-
it_should_behave_like 'null_objectkey_booleanvalue'
|
28
|
-
it_should_behave_like 'null_objectkey_nilvalue'
|
29
|
-
it_should_behave_like 'null_objectkey_integervalue'
|
30
|
-
it_should_behave_like 'null_stringkey_objectvalue'
|
27
|
+
it_should_behave_like 'multiprocess'
|
28
|
+
it_should_behave_like 'not_create'
|
31
29
|
it_should_behave_like 'null_stringkey_stringvalue'
|
32
|
-
it_should_behave_like '
|
33
|
-
it_should_behave_like '
|
34
|
-
it_should_behave_like 'null_stringkey_nilvalue'
|
35
|
-
it_should_behave_like 'null_stringkey_integervalue'
|
36
|
-
it_should_behave_like 'null_hashkey_objectvalue'
|
37
|
-
it_should_behave_like 'null_hashkey_stringvalue'
|
38
|
-
it_should_behave_like 'null_hashkey_hashvalue'
|
39
|
-
it_should_behave_like 'null_hashkey_booleanvalue'
|
40
|
-
it_should_behave_like 'null_hashkey_nilvalue'
|
41
|
-
it_should_behave_like 'null_hashkey_integervalue'
|
42
|
-
it_should_behave_like 'null_booleankey_objectvalue'
|
43
|
-
it_should_behave_like 'null_booleankey_stringvalue'
|
44
|
-
it_should_behave_like 'null_booleankey_hashvalue'
|
45
|
-
it_should_behave_like 'null_booleankey_booleanvalue'
|
46
|
-
it_should_behave_like 'null_booleankey_nilvalue'
|
47
|
-
it_should_behave_like 'null_booleankey_integervalue'
|
48
|
-
it_should_behave_like 'null_nilkey_objectvalue'
|
49
|
-
it_should_behave_like 'null_nilkey_stringvalue'
|
50
|
-
it_should_behave_like 'null_nilkey_hashvalue'
|
51
|
-
it_should_behave_like 'null_nilkey_booleanvalue'
|
52
|
-
it_should_behave_like 'null_nilkey_nilvalue'
|
53
|
-
it_should_behave_like 'null_nilkey_integervalue'
|
54
|
-
it_should_behave_like 'null_integerkey_objectvalue'
|
55
|
-
it_should_behave_like 'null_integerkey_stringvalue'
|
56
|
-
it_should_behave_like 'null_integerkey_hashvalue'
|
57
|
-
it_should_behave_like 'null_integerkey_booleanvalue'
|
58
|
-
it_should_behave_like 'null_integerkey_nilvalue'
|
59
|
-
it_should_behave_like 'null_integerkey_integervalue'
|
60
|
-
it_should_behave_like 'returnsame_objectkey_objectvalue'
|
61
|
-
it_should_behave_like 'returnsame_objectkey_stringvalue'
|
62
|
-
it_should_behave_like 'returnsame_objectkey_hashvalue'
|
63
|
-
it_should_behave_like 'returnsame_stringkey_objectvalue'
|
64
|
-
it_should_behave_like 'returnsame_stringkey_stringvalue'
|
65
|
-
it_should_behave_like 'returnsame_stringkey_hashvalue'
|
66
|
-
it_should_behave_like 'returnsame_hashkey_objectvalue'
|
67
|
-
it_should_behave_like 'returnsame_hashkey_stringvalue'
|
68
|
-
it_should_behave_like 'returnsame_hashkey_hashvalue'
|
69
|
-
it_should_behave_like 'returnsame_booleankey_objectvalue'
|
70
|
-
it_should_behave_like 'returnsame_booleankey_stringvalue'
|
71
|
-
it_should_behave_like 'returnsame_booleankey_hashvalue'
|
72
|
-
it_should_behave_like 'returnsame_nilkey_objectvalue'
|
73
|
-
it_should_behave_like 'returnsame_nilkey_stringvalue'
|
74
|
-
it_should_behave_like 'returnsame_nilkey_hashvalue'
|
75
|
-
it_should_behave_like 'returnsame_integerkey_objectvalue'
|
76
|
-
it_should_behave_like 'returnsame_integerkey_stringvalue'
|
77
|
-
it_should_behave_like 'returnsame_integerkey_hashvalue'
|
78
|
-
it_should_behave_like 'store_objectkey_objectvalue'
|
79
|
-
it_should_behave_like 'store_objectkey_stringvalue'
|
80
|
-
it_should_behave_like 'store_objectkey_hashvalue'
|
81
|
-
it_should_behave_like 'store_objectkey_booleanvalue'
|
82
|
-
it_should_behave_like 'store_objectkey_nilvalue'
|
83
|
-
it_should_behave_like 'store_objectkey_integervalue'
|
84
|
-
it_should_behave_like 'store_stringkey_objectvalue'
|
30
|
+
it_should_behave_like 'persist_stringkey_stringvalue'
|
31
|
+
it_should_behave_like 'returndifferent_stringkey_stringvalue'
|
85
32
|
it_should_behave_like 'store_stringkey_stringvalue'
|
86
|
-
it_should_behave_like 'store_stringkey_hashvalue'
|
87
|
-
it_should_behave_like 'store_stringkey_booleanvalue'
|
88
|
-
it_should_behave_like 'store_stringkey_nilvalue'
|
89
|
-
it_should_behave_like 'store_stringkey_integervalue'
|
90
|
-
it_should_behave_like 'store_hashkey_objectvalue'
|
91
|
-
it_should_behave_like 'store_hashkey_stringvalue'
|
92
|
-
it_should_behave_like 'store_hashkey_hashvalue'
|
93
|
-
it_should_behave_like 'store_hashkey_booleanvalue'
|
94
|
-
it_should_behave_like 'store_hashkey_nilvalue'
|
95
|
-
it_should_behave_like 'store_hashkey_integervalue'
|
96
|
-
it_should_behave_like 'store_booleankey_objectvalue'
|
97
|
-
it_should_behave_like 'store_booleankey_stringvalue'
|
98
|
-
it_should_behave_like 'store_booleankey_hashvalue'
|
99
|
-
it_should_behave_like 'store_booleankey_booleanvalue'
|
100
|
-
it_should_behave_like 'store_booleankey_nilvalue'
|
101
|
-
it_should_behave_like 'store_booleankey_integervalue'
|
102
|
-
it_should_behave_like 'store_nilkey_objectvalue'
|
103
|
-
it_should_behave_like 'store_nilkey_stringvalue'
|
104
|
-
it_should_behave_like 'store_nilkey_hashvalue'
|
105
|
-
it_should_behave_like 'store_nilkey_booleanvalue'
|
106
|
-
it_should_behave_like 'store_nilkey_nilvalue'
|
107
|
-
it_should_behave_like 'store_nilkey_integervalue'
|
108
|
-
it_should_behave_like 'store_integerkey_objectvalue'
|
109
|
-
it_should_behave_like 'store_integerkey_stringvalue'
|
110
|
-
it_should_behave_like 'store_integerkey_hashvalue'
|
111
|
-
it_should_behave_like 'store_integerkey_booleanvalue'
|
112
|
-
it_should_behave_like 'store_integerkey_nilvalue'
|
113
|
-
it_should_behave_like 'store_integerkey_integervalue'
|
114
33
|
end
|
data/spec/monetaspecs.rb
CHANGED
@@ -17408,3 +17408,22 @@ shared_examples_for 'transform_value_expires' do
|
|
17408
17408
|
end
|
17409
17409
|
end
|
17410
17410
|
|
17411
|
+
#################### features ####################
|
17412
|
+
|
17413
|
+
shared_examples_for 'features' do
|
17414
|
+
it 'should report correct features' do
|
17415
|
+
store.features.sort_by(&:to_s).should == features
|
17416
|
+
end
|
17417
|
+
|
17418
|
+
it 'should have frozen features' do
|
17419
|
+
store.features.frozen?.should be_true
|
17420
|
+
end
|
17421
|
+
|
17422
|
+
it 'should have #supports?' do
|
17423
|
+
features.each do |f|
|
17424
|
+
store.supports?(f).should be_true
|
17425
|
+
end
|
17426
|
+
store.supports?(:unknown).should be_false
|
17427
|
+
end
|
17428
|
+
end
|
17429
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moneta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2013-01-
|
14
|
+
date: 2013-01-29 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: A unified interface to key/value stores
|
17
17
|
email:
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- lib/moneta/adapters/fog.rb
|
50
50
|
- lib/moneta/adapters/gdbm.rb
|
51
51
|
- lib/moneta/adapters/hbase.rb
|
52
|
+
- lib/moneta/adapters/kyotocabinet.rb
|
52
53
|
- lib/moneta/adapters/leveldb.rb
|
53
54
|
- lib/moneta/adapters/localmemcache.rb
|
54
55
|
- lib/moneta/adapters/lruhash.rb
|
@@ -97,6 +98,7 @@ files:
|
|
97
98
|
- script/benchmarks
|
98
99
|
- script/generate-specs
|
99
100
|
- script/install-bundle
|
101
|
+
- script/install-kyotocabinet
|
100
102
|
- script/kill-travis
|
101
103
|
- script/start-services
|
102
104
|
- script/upload-bundle
|
@@ -117,6 +119,7 @@ files:
|
|
117
119
|
- spec/moneta/adapter_fog_spec.rb
|
118
120
|
- spec/moneta/adapter_gdbm_spec.rb
|
119
121
|
- spec/moneta/adapter_hbase_spec.rb
|
122
|
+
- spec/moneta/adapter_kyotocabinet_spec.rb
|
120
123
|
- spec/moneta/adapter_leveldb_spec.rb
|
121
124
|
- spec/moneta/adapter_localmemcache_spec.rb
|
122
125
|
- spec/moneta/adapter_lruhash_spec.rb
|
@@ -180,6 +183,8 @@ files:
|
|
180
183
|
- spec/moneta/simple_hashfile_with_expires_spec.rb
|
181
184
|
- spec/moneta/simple_hbase_spec.rb
|
182
185
|
- spec/moneta/simple_hbase_with_expires_spec.rb
|
186
|
+
- spec/moneta/simple_kyotocabinet_spec.rb
|
187
|
+
- spec/moneta/simple_kyotocabinet_with_expires_spec.rb
|
183
188
|
- spec/moneta/simple_leveldb_spec.rb
|
184
189
|
- spec/moneta/simple_leveldb_with_expires_spec.rb
|
185
190
|
- spec/moneta/simple_localmemcache_spec.rb
|
@@ -303,6 +308,7 @@ test_files:
|
|
303
308
|
- spec/moneta/adapter_fog_spec.rb
|
304
309
|
- spec/moneta/adapter_gdbm_spec.rb
|
305
310
|
- spec/moneta/adapter_hbase_spec.rb
|
311
|
+
- spec/moneta/adapter_kyotocabinet_spec.rb
|
306
312
|
- spec/moneta/adapter_leveldb_spec.rb
|
307
313
|
- spec/moneta/adapter_localmemcache_spec.rb
|
308
314
|
- spec/moneta/adapter_lruhash_spec.rb
|
@@ -366,6 +372,8 @@ test_files:
|
|
366
372
|
- spec/moneta/simple_hashfile_with_expires_spec.rb
|
367
373
|
- spec/moneta/simple_hbase_spec.rb
|
368
374
|
- spec/moneta/simple_hbase_with_expires_spec.rb
|
375
|
+
- spec/moneta/simple_kyotocabinet_spec.rb
|
376
|
+
- spec/moneta/simple_kyotocabinet_with_expires_spec.rb
|
369
377
|
- spec/moneta/simple_leveldb_spec.rb
|
370
378
|
- spec/moneta/simple_leveldb_with_expires_spec.rb
|
371
379
|
- spec/moneta/simple_localmemcache_spec.rb
|