moneta 0.7.5 → 0.7.6
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +6 -0
- data/README.md +52 -51
- data/Rakefile +1 -3
- data/lib/moneta/adapters/daybreak.rb +7 -9
- data/lib/moneta/adapters/file.rb +2 -2
- data/lib/moneta/adapters/memcached/dalli.rb +1 -0
- data/lib/moneta/adapters/memcached/native.rb +1 -0
- data/lib/moneta/transformer.rb +4 -4
- data/lib/moneta/transformer/config.rb +2 -1
- data/lib/moneta/version.rb +1 -1
- data/script/benchmarks +52 -44
- data/script/generate-specs +238 -49
- data/spec/helper.rb +4 -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 +4 -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 +4 -0
- data/spec/moneta/adapter_dbm_spec.rb +4 -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_leveldb_spec.rb +4 -0
- data/spec/moneta/adapter_localmemcache_spec.rb +5 -0
- data/spec/moneta/adapter_lruhash_spec.rb +4 -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 +4 -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 +4 -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 +4 -0
- data/spec/moneta/adapter_tokyocabinet_bdb_spec.rb +4 -0
- data/spec/moneta/adapter_tokyocabinet_hdb_spec.rb +4 -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 +4 -0
- data/spec/moneta/expires_file_spec.rb +5 -0
- data/spec/moneta/expires_memory_spec.rb +4 -0
- data/spec/moneta/expires_memory_with_default_expires_spec.rb +4 -0
- data/spec/moneta/lock_spec.rb +4 -0
- data/spec/moneta/null_adapter_spec.rb +4 -0
- data/spec/moneta/optionmerger_spec.rb +5 -1
- data/spec/moneta/pool_spec.rb +5 -0
- data/spec/moneta/proxy_expires_memory_spec.rb +4 -0
- data/spec/moneta/proxy_redis_spec.rb +5 -0
- data/spec/moneta/shared_spec.rb +5 -0
- data/spec/moneta/simple_activerecord_spec.rb +6 -1
- data/spec/moneta/simple_activerecord_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_cassandra_spec.rb +6 -1
- data/spec/moneta/simple_client_tcp_spec.rb +6 -1
- data/spec/moneta/simple_client_unix_spec.rb +6 -1
- data/spec/moneta/simple_couch_spec.rb +6 -1
- data/spec/moneta/simple_couch_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_datamapper_spec.rb +6 -1
- data/spec/moneta/simple_datamapper_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_datamapper_with_repository_spec.rb +6 -1
- data/spec/moneta/simple_daybreak_spec.rb +5 -1
- data/spec/moneta/simple_daybreak_with_expires_spec.rb +5 -1
- data/spec/moneta/simple_dbm_spec.rb +5 -1
- data/spec/moneta/simple_dbm_with_expires_spec.rb +5 -1
- data/spec/moneta/simple_file_spec.rb +6 -1
- data/spec/moneta/simple_file_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_fog_spec.rb +6 -1
- data/spec/moneta/simple_fog_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_gdbm_spec.rb +5 -1
- data/spec/moneta/simple_gdbm_with_expires_spec.rb +5 -1
- data/spec/moneta/simple_hashfile_spec.rb +6 -1
- data/spec/moneta/simple_hashfile_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_hbase_spec.rb +6 -1
- data/spec/moneta/simple_hbase_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_leveldb_spec.rb +5 -1
- data/spec/moneta/simple_leveldb_with_expires_spec.rb +5 -1
- data/spec/moneta/simple_localmemcache_spec.rb +6 -1
- data/spec/moneta/simple_localmemcache_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_lruhash_spec.rb +5 -1
- data/spec/moneta/simple_lruhash_with_expires_spec.rb +5 -1
- data/spec/moneta/simple_memcached_dalli_spec.rb +6 -1
- data/spec/moneta/simple_memcached_native_spec.rb +6 -1
- data/spec/moneta/simple_memcached_spec.rb +6 -1
- data/spec/moneta/simple_memory_spec.rb +5 -1
- data/spec/moneta/simple_memory_with_compress_spec.rb +5 -1
- data/spec/moneta/simple_memory_with_expires_spec.rb +5 -1
- data/spec/moneta/simple_memory_with_json_key_serializer_spec.rb +5 -1
- data/spec/moneta/simple_memory_with_json_serializer_spec.rb +5 -1
- data/spec/moneta/simple_memory_with_json_value_serializer_spec.rb +5 -1
- data/spec/moneta/simple_memory_with_prefix_spec.rb +5 -1
- data/spec/moneta/simple_memory_with_snappy_compress_spec.rb +5 -1
- data/spec/moneta/simple_mongo_spec.rb +6 -1
- data/spec/moneta/simple_null_spec.rb +5 -1
- data/spec/moneta/simple_pstore_spec.rb +6 -1
- data/spec/moneta/simple_pstore_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_redis_spec.rb +6 -1
- data/spec/moneta/simple_restclient_spec.rb +6 -1
- data/spec/moneta/simple_riak_spec.rb +6 -1
- data/spec/moneta/simple_riak_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_sdbm_spec.rb +5 -1
- data/spec/moneta/simple_sdbm_with_expires_spec.rb +5 -1
- data/spec/moneta/simple_sequel_spec.rb +6 -1
- data/spec/moneta/simple_sequel_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_sqlite_spec.rb +6 -1
- data/spec/moneta/simple_sqlite_with_expires_spec.rb +6 -1
- data/spec/moneta/simple_tdb_spec.rb +5 -1
- data/spec/moneta/simple_tdb_with_expires_spec.rb +5 -1
- data/spec/moneta/simple_tokyocabinet_spec.rb +5 -1
- data/spec/moneta/simple_tokyocabinet_with_expires_spec.rb +5 -1
- data/spec/moneta/simple_yaml_spec.rb +6 -1
- data/spec/moneta/simple_yaml_with_expires_spec.rb +6 -1
- data/spec/moneta/stack_file_memory_spec.rb +5 -0
- data/spec/moneta/stack_memory_file_spec.rb +5 -0
- data/spec/moneta/transformer_bencode_spec.rb +8 -0
- data/spec/moneta/transformer_bert_spec.rb +8 -0
- data/spec/moneta/transformer_bson_spec.rb +8 -0
- data/spec/moneta/transformer_bzip2_spec.rb +8 -0
- data/spec/moneta/transformer_json_spec.rb +8 -0
- data/spec/moneta/transformer_key_marshal_spec.rb +8 -0
- data/spec/moneta/transformer_key_to_s_spec.rb +72 -0
- data/spec/moneta/transformer_key_yaml_spec.rb +8 -0
- data/spec/moneta/transformer_lzma_spec.rb +8 -0
- data/spec/moneta/transformer_lzo_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_base64_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_escape_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_hmac_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_md5_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_md5_spread_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_prefix_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_rmd160_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_sha1_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_sha256_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_sha384_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_sha512_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_truncate_spec.rb +8 -0
- data/spec/moneta/transformer_marshal_uuencode_spec.rb +8 -0
- data/spec/moneta/transformer_msgpack_spec.rb +8 -0
- data/spec/moneta/transformer_ox_spec.rb +8 -0
- data/spec/moneta/transformer_quicklz_spec.rb +8 -0
- data/spec/moneta/transformer_snappy_spec.rb +8 -0
- data/spec/moneta/transformer_tnet_spec.rb +8 -0
- data/spec/moneta/transformer_value_marshal_spec.rb +8 -0
- data/spec/moneta/transformer_value_yaml_spec.rb +8 -0
- data/spec/moneta/transformer_yaml_spec.rb +8 -0
- data/spec/moneta/transformer_zlib_spec.rb +8 -0
- data/spec/monetaspecs.rb +11 -0
- metadata +4 -2
@@ -2,6 +2,10 @@
|
|
2
2
|
require 'helper'
|
3
3
|
|
4
4
|
describe_moneta "transformer_value_yaml" do
|
5
|
+
def log
|
6
|
+
@log ||= File.open(File.join(make_tempdir, 'transformer_value_yaml.log'), 'a')
|
7
|
+
end
|
8
|
+
|
5
9
|
def new_store
|
6
10
|
Moneta.build do
|
7
11
|
use :Transformer, :value => :yaml
|
@@ -106,4 +110,8 @@ describe_moneta "transformer_value_yaml" do
|
|
106
110
|
it_should_behave_like 'store_integerkey_nilvalue'
|
107
111
|
it_should_behave_like 'store_integerkey_integervalue'
|
108
112
|
it_should_behave_like 'transform_value'
|
113
|
+
it 'compile transformer class' do
|
114
|
+
store.should_not be_nil
|
115
|
+
Moneta::Transformer::YamlValue.should_not be_nil
|
116
|
+
end
|
109
117
|
end
|
@@ -2,6 +2,10 @@
|
|
2
2
|
require 'helper'
|
3
3
|
|
4
4
|
describe_moneta "transformer_yaml" do
|
5
|
+
def log
|
6
|
+
@log ||= File.open(File.join(make_tempdir, 'transformer_yaml.log'), 'a')
|
7
|
+
end
|
8
|
+
|
5
9
|
def new_store
|
6
10
|
Moneta.build do
|
7
11
|
use :Transformer, :key => :yaml, :value => :yaml
|
@@ -106,4 +110,8 @@ describe_moneta "transformer_yaml" do
|
|
106
110
|
it_should_behave_like 'store_integerkey_nilvalue'
|
107
111
|
it_should_behave_like 'store_integerkey_integervalue'
|
108
112
|
it_should_behave_like 'transform_value'
|
113
|
+
it 'compile transformer class' do
|
114
|
+
store.should_not be_nil
|
115
|
+
Moneta::Transformer::YamlKeyYamlValue.should_not be_nil
|
116
|
+
end
|
109
117
|
end
|
@@ -2,6 +2,10 @@
|
|
2
2
|
require 'helper'
|
3
3
|
|
4
4
|
describe_moneta "transformer_zlib" do
|
5
|
+
def log
|
6
|
+
@log ||= File.open(File.join(make_tempdir, 'transformer_zlib.log'), 'a')
|
7
|
+
end
|
8
|
+
|
5
9
|
def new_store
|
6
10
|
Moneta.build do
|
7
11
|
use :Transformer, :value => :zlib
|
@@ -34,4 +38,8 @@ describe_moneta "transformer_zlib" do
|
|
34
38
|
it_should_behave_like 'store_nilkey_stringvalue'
|
35
39
|
it_should_behave_like 'store_integerkey_stringvalue'
|
36
40
|
it_should_behave_like 'transform_value'
|
41
|
+
it 'compile transformer class' do
|
42
|
+
store.should_not be_nil
|
43
|
+
Moneta::Transformer::ZlibValue.should_not be_nil
|
44
|
+
end
|
37
45
|
end
|
data/spec/monetaspecs.rb
CHANGED
@@ -16884,6 +16884,17 @@ shared_examples_for 'not_persist' do
|
|
16884
16884
|
end
|
16885
16885
|
end
|
16886
16886
|
|
16887
|
+
#################### multiprocess ####################
|
16888
|
+
|
16889
|
+
shared_examples_for 'multiprocess' do
|
16890
|
+
it 'supports access by multiple instances/processes' do
|
16891
|
+
store['key'] = 'val'
|
16892
|
+
store2 = new_store
|
16893
|
+
store2['key'].should == 'val'
|
16894
|
+
store2.close
|
16895
|
+
end
|
16896
|
+
end
|
16897
|
+
|
16887
16898
|
#################### expires ####################
|
16888
16899
|
|
16889
16900
|
shared_examples_for 'expires' do
|
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.6
|
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-17 00:00:00.000000000 Z
|
15
15
|
dependencies: []
|
16
16
|
description: A unified interface to key/value stores
|
17
17
|
email:
|
@@ -219,6 +219,7 @@ files:
|
|
219
219
|
- spec/moneta/transformer_bzip2_spec.rb
|
220
220
|
- spec/moneta/transformer_json_spec.rb
|
221
221
|
- spec/moneta/transformer_key_marshal_spec.rb
|
222
|
+
- spec/moneta/transformer_key_to_s_spec.rb
|
222
223
|
- spec/moneta/transformer_key_yaml_spec.rb
|
223
224
|
- spec/moneta/transformer_lzma_spec.rb
|
224
225
|
- spec/moneta/transformer_lzo_spec.rb
|
@@ -398,6 +399,7 @@ test_files:
|
|
398
399
|
- spec/moneta/transformer_bzip2_spec.rb
|
399
400
|
- spec/moneta/transformer_json_spec.rb
|
400
401
|
- spec/moneta/transformer_key_marshal_spec.rb
|
402
|
+
- spec/moneta/transformer_key_to_s_spec.rb
|
401
403
|
- spec/moneta/transformer_key_yaml_spec.rb
|
402
404
|
- spec/moneta/transformer_lzma_spec.rb
|
403
405
|
- spec/moneta/transformer_lzo_spec.rb
|