juno 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. data/.gitignore +2 -1
  2. data/.travis.yml +6 -0
  3. data/Gemfile +16 -9
  4. data/README.md +92 -34
  5. data/Rakefile +23 -5
  6. data/benchmarks/run.rb +19 -22
  7. data/juno.gemspec +0 -3
  8. data/lib/juno/adapters/activerecord.rb +58 -0
  9. data/lib/juno/adapters/cassandra.rb +47 -0
  10. data/lib/juno/adapters/couch.rb +43 -0
  11. data/lib/juno/adapters/datamapper.rb +64 -0
  12. data/lib/juno/adapters/dbm.rb +17 -0
  13. data/lib/juno/adapters/file.rb +58 -0
  14. data/lib/juno/adapters/fog.rb +42 -0
  15. data/lib/juno/adapters/gdbm.rb +17 -0
  16. data/lib/juno/adapters/localmemcache.rb +18 -0
  17. data/lib/juno/adapters/memcached.rb +11 -0
  18. data/lib/juno/adapters/memcached_dalli.rb +46 -0
  19. data/lib/juno/adapters/memcached_native.rb +47 -0
  20. data/lib/juno/adapters/memory.rb +30 -0
  21. data/lib/juno/adapters/mongo.rb +43 -0
  22. data/lib/juno/adapters/null.rb +28 -0
  23. data/lib/juno/adapters/pstore.rb +51 -0
  24. data/lib/juno/adapters/redis.rb +43 -0
  25. data/lib/juno/adapters/riak.rb +46 -0
  26. data/lib/juno/adapters/sdbm.rb +27 -0
  27. data/lib/juno/adapters/sequel.rb +50 -0
  28. data/lib/juno/adapters/sqlite.rb +52 -0
  29. data/lib/juno/adapters/tokyocabinet.rb +33 -0
  30. data/lib/juno/adapters/yaml.rb +13 -0
  31. data/lib/juno/base.rb +11 -89
  32. data/lib/juno/builder.rb +30 -0
  33. data/lib/juno/cache.rb +64 -0
  34. data/lib/juno/expires.rb +6 -10
  35. data/lib/juno/proxy.rb +62 -3
  36. data/lib/juno/stack.rb +27 -11
  37. data/lib/juno/transformer.rb +106 -0
  38. data/lib/juno/version.rb +1 -1
  39. data/lib/juno.rb +81 -29
  40. data/spec/adapter_activerecord_spec.rb +41 -0
  41. data/spec/adapter_cassandra_spec.rb +27 -0
  42. data/spec/adapter_couch_spec.rb +27 -0
  43. data/spec/adapter_datamapper_spec.rb +61 -0
  44. data/spec/adapter_dbm_spec.rb +27 -0
  45. data/spec/adapter_file_spec.rb +27 -0
  46. data/spec/adapter_fog_spec.rb +35 -0
  47. data/spec/adapter_gdbm_spec.rb +27 -0
  48. data/spec/adapter_localmemcache_spec.rb +27 -0
  49. data/spec/adapter_memcached_dalli_spec.rb +28 -0
  50. data/spec/adapter_memcached_native_spec.rb +28 -0
  51. data/spec/adapter_memcached_spec.rb +28 -0
  52. data/spec/adapter_memory_spec.rb +42 -0
  53. data/spec/adapter_mongo_spec.rb +27 -0
  54. data/spec/adapter_pstore_spec.rb +30 -0
  55. data/spec/adapter_redis_spec.rb +28 -0
  56. data/spec/adapter_riak_spec.rb +31 -0
  57. data/spec/adapter_sdbm_spec.rb +27 -0
  58. data/spec/adapter_sequel_spec.rb +27 -0
  59. data/spec/adapter_sqlite_spec.rb +27 -0
  60. data/spec/adapter_tokyocabinet_spec.rb +27 -0
  61. data/spec/adapter_yaml_spec.rb +30 -0
  62. data/spec/cache_file_memory_spec.rb +50 -0
  63. data/spec/cache_memory_null_spec.rb +39 -0
  64. data/spec/expires_file_spec.rb +82 -0
  65. data/spec/expires_memory_spec.rb +59 -0
  66. data/spec/generate.rb +736 -0
  67. data/spec/helper.rb +39 -0
  68. data/spec/junospecs.rb +1540 -0
  69. data/spec/null_adapter_spec.rb +33 -0
  70. data/spec/proxy_expires_memory_spec.rb +63 -0
  71. data/spec/proxy_redis_spec.rb +38 -0
  72. data/spec/simple_activerecord_spec.rb +52 -0
  73. data/spec/simple_cassandra_spec.rb +53 -0
  74. data/spec/simple_couch_spec.rb +52 -0
  75. data/spec/simple_datamapper_spec.rb +54 -0
  76. data/spec/simple_datamapper_with_repository_spec.rb +54 -0
  77. data/spec/simple_dbm_spec.rb +52 -0
  78. data/spec/simple_file_spec.rb +52 -0
  79. data/spec/simple_fog_spec.rb +60 -0
  80. data/spec/simple_gdbm_spec.rb +52 -0
  81. data/spec/simple_hashfile_spec.rb +52 -0
  82. data/spec/simple_localmemcache_spec.rb +52 -0
  83. data/spec/simple_memcached_dalli_spec.rb +53 -0
  84. data/spec/simple_memcached_native_spec.rb +53 -0
  85. data/spec/simple_memcached_spec.rb +53 -0
  86. data/spec/simple_memory_spec.rb +52 -0
  87. data/spec/simple_mongo_spec.rb +52 -0
  88. data/spec/simple_null_spec.rb +43 -0
  89. data/spec/simple_pstore_spec.rb +52 -0
  90. data/spec/simple_redis_spec.rb +53 -0
  91. data/spec/simple_riak_spec.rb +56 -0
  92. data/spec/simple_sdbm_spec.rb +52 -0
  93. data/spec/simple_sequel_spec.rb +52 -0
  94. data/spec/simple_sqlite_spec.rb +52 -0
  95. data/spec/simple_tokyocabinet_spec.rb +52 -0
  96. data/spec/simple_yaml_spec.rb +52 -0
  97. data/spec/stack_file_memory_spec.rb +43 -0
  98. data/spec/stack_memory_file_spec.rb +42 -0
  99. data/spec/transformer_bson_spec.rb +44 -0
  100. data/spec/transformer_json_spec.rb +44 -0
  101. data/spec/transformer_marshal_base64_spec.rb +60 -0
  102. data/spec/transformer_marshal_escape_spec.rb +60 -0
  103. data/spec/transformer_marshal_md5_spec.rb +60 -0
  104. data/spec/transformer_marshal_md5_spread_spec.rb +60 -0
  105. data/spec/transformer_msgpack_spec.rb +44 -0
  106. data/spec/transformer_yaml_spec.rb +59 -0
  107. metadata +164 -108
  108. data/lib/juno/activerecord.rb +0 -55
  109. data/lib/juno/cassandra.rb +0 -45
  110. data/lib/juno/couch.rb +0 -43
  111. data/lib/juno/datamapper.rb +0 -63
  112. data/lib/juno/dbm.rb +0 -15
  113. data/lib/juno/file.rb +0 -62
  114. data/lib/juno/fog.rb +0 -48
  115. data/lib/juno/gdbm.rb +0 -15
  116. data/lib/juno/hashfile.rb +0 -12
  117. data/lib/juno/localmemcache.rb +0 -16
  118. data/lib/juno/memcached.rb +0 -7
  119. data/lib/juno/memcached_dalli.rb +0 -55
  120. data/lib/juno/memcached_native.rb +0 -56
  121. data/lib/juno/memory.rb +0 -7
  122. data/lib/juno/mongodb.rb +0 -43
  123. data/lib/juno/null.rb +0 -23
  124. data/lib/juno/pstore.rb +0 -49
  125. data/lib/juno/redis.rb +0 -46
  126. data/lib/juno/riak.rb +0 -45
  127. data/lib/juno/sdbm.rb +0 -15
  128. data/lib/juno/sequel.rb +0 -48
  129. data/lib/juno/sqlite.rb +0 -50
  130. data/lib/juno/tokyocabinet.rb +0 -36
  131. data/lib/juno/yaml.rb +0 -9
  132. data/test/helper.rb +0 -212
  133. data/test/test_activerecord.rb +0 -33
  134. data/test/test_cassandra.rb +0 -13
  135. data/test/test_couch.rb +0 -13
  136. data/test/test_datamapper.rb +0 -64
  137. data/test/test_dbm.rb +0 -13
  138. data/test/test_expires.rb +0 -9
  139. data/test/test_file.rb +0 -9
  140. data/test/test_fog.rb +0 -17
  141. data/test/test_gdbm.rb +0 -13
  142. data/test/test_hashfile.rb +0 -9
  143. data/test/test_localmemcache.rb +0 -13
  144. data/test/test_memcached.rb +0 -14
  145. data/test/test_memcached_dalli.rb +0 -14
  146. data/test/test_memcached_native.rb +0 -14
  147. data/test/test_memory.rb +0 -9
  148. data/test/test_mongodb.rb +0 -13
  149. data/test/test_null.rb +0 -9
  150. data/test/test_proxy.rb +0 -9
  151. data/test/test_pstore.rb +0 -9
  152. data/test/test_redis.rb +0 -13
  153. data/test/test_riak.rb +0 -13
  154. data/test/test_sdbm.rb +0 -13
  155. data/test/test_sequel.rb +0 -13
  156. data/test/test_sqlite.rb +0 -13
  157. data/test/test_stack.rb +0 -10
  158. data/test/test_tokyocabinet.rb +0 -13
  159. data/test/test_yaml.rb +0 -9
  160. data/unsupported/test_tokyotyrant.rb +0 -13
  161. data/unsupported/tokyotyrant.rb +0 -29
@@ -0,0 +1,52 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ Juno.new(:Sequel, :db => (defined?(JRUBY_VERSION) ? 'jdbc:sqlite:/' : 'sqlite:/')).close
6
+
7
+ describe "simple_sequel" do
8
+ before do
9
+ @store = Juno.new(:Sequel, :db => (defined?(JRUBY_VERSION) ? 'jdbc:sqlite:/' : 'sqlite:/'))
10
+ @store.clear
11
+ end
12
+
13
+ after do
14
+ @store.close.should == nil if @store
15
+ end
16
+
17
+ it_should_behave_like 'null_objectkey_objectvalue'
18
+ it_should_behave_like 'null_objectkey_stringvalue'
19
+ it_should_behave_like 'null_objectkey_hashvalue'
20
+ it_should_behave_like 'null_stringkey_objectvalue'
21
+ it_should_behave_like 'null_stringkey_stringvalue'
22
+ it_should_behave_like 'null_stringkey_hashvalue'
23
+ it_should_behave_like 'null_hashkey_objectvalue'
24
+ it_should_behave_like 'null_hashkey_stringvalue'
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'store_objectkey_objectvalue'
27
+ it_should_behave_like 'store_objectkey_stringvalue'
28
+ it_should_behave_like 'store_objectkey_hashvalue'
29
+ it_should_behave_like 'store_stringkey_objectvalue'
30
+ it_should_behave_like 'store_stringkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_hashkey_objectvalue'
33
+ it_should_behave_like 'store_hashkey_stringvalue'
34
+ it_should_behave_like 'store_hashkey_hashvalue'
35
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
36
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
38
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
39
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
41
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
42
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
44
+ it_should_behave_like 'marshallable_key'
45
+
46
+ end
47
+ rescue LoadError => ex
48
+ puts "Test simple_sequel not executed: #{ex.message}"
49
+ rescue Exception => ex
50
+ puts "Test simple_sequel not executed: #{ex.message}"
51
+ #puts "#{ex.backtrace.join("\n")}"
52
+ end
@@ -0,0 +1,52 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ Juno.new(:Sqlite, :file => ":memory:").close
6
+
7
+ describe "simple_sqlite" do
8
+ before do
9
+ @store = Juno.new(:Sqlite, :file => ":memory:")
10
+ @store.clear
11
+ end
12
+
13
+ after do
14
+ @store.close.should == nil if @store
15
+ end
16
+
17
+ it_should_behave_like 'null_objectkey_objectvalue'
18
+ it_should_behave_like 'null_objectkey_stringvalue'
19
+ it_should_behave_like 'null_objectkey_hashvalue'
20
+ it_should_behave_like 'null_stringkey_objectvalue'
21
+ it_should_behave_like 'null_stringkey_stringvalue'
22
+ it_should_behave_like 'null_stringkey_hashvalue'
23
+ it_should_behave_like 'null_hashkey_objectvalue'
24
+ it_should_behave_like 'null_hashkey_stringvalue'
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'store_objectkey_objectvalue'
27
+ it_should_behave_like 'store_objectkey_stringvalue'
28
+ it_should_behave_like 'store_objectkey_hashvalue'
29
+ it_should_behave_like 'store_stringkey_objectvalue'
30
+ it_should_behave_like 'store_stringkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_hashkey_objectvalue'
33
+ it_should_behave_like 'store_hashkey_stringvalue'
34
+ it_should_behave_like 'store_hashkey_hashvalue'
35
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
36
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
38
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
39
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
41
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
42
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
44
+ it_should_behave_like 'marshallable_key'
45
+
46
+ end
47
+ rescue LoadError => ex
48
+ puts "Test simple_sqlite not executed: #{ex.message}"
49
+ rescue Exception => ex
50
+ puts "Test simple_sqlite not executed: #{ex.message}"
51
+ #puts "#{ex.backtrace.join("\n")}"
52
+ end
@@ -0,0 +1,52 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ Juno.new(:TokyoCabinet, :file => File.join(make_tempdir, "simple_tokyocabinet")).close
6
+
7
+ describe "simple_tokyocabinet" do
8
+ before do
9
+ @store = Juno.new(:TokyoCabinet, :file => File.join(make_tempdir, "simple_tokyocabinet"))
10
+ @store.clear
11
+ end
12
+
13
+ after do
14
+ @store.close.should == nil if @store
15
+ end
16
+
17
+ it_should_behave_like 'null_objectkey_objectvalue'
18
+ it_should_behave_like 'null_objectkey_stringvalue'
19
+ it_should_behave_like 'null_objectkey_hashvalue'
20
+ it_should_behave_like 'null_stringkey_objectvalue'
21
+ it_should_behave_like 'null_stringkey_stringvalue'
22
+ it_should_behave_like 'null_stringkey_hashvalue'
23
+ it_should_behave_like 'null_hashkey_objectvalue'
24
+ it_should_behave_like 'null_hashkey_stringvalue'
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'store_objectkey_objectvalue'
27
+ it_should_behave_like 'store_objectkey_stringvalue'
28
+ it_should_behave_like 'store_objectkey_hashvalue'
29
+ it_should_behave_like 'store_stringkey_objectvalue'
30
+ it_should_behave_like 'store_stringkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_hashkey_objectvalue'
33
+ it_should_behave_like 'store_hashkey_stringvalue'
34
+ it_should_behave_like 'store_hashkey_hashvalue'
35
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
36
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
38
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
39
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
41
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
42
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
44
+ it_should_behave_like 'marshallable_key'
45
+
46
+ end
47
+ rescue LoadError => ex
48
+ puts "Test simple_tokyocabinet not executed: #{ex.message}"
49
+ rescue Exception => ex
50
+ puts "Test simple_tokyocabinet not executed: #{ex.message}"
51
+ #puts "#{ex.backtrace.join("\n")}"
52
+ end
@@ -0,0 +1,52 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+ Juno.new(:YAML, :file => File.join(make_tempdir, "simple_yaml")).close
6
+
7
+ describe "simple_yaml" do
8
+ before do
9
+ @store = Juno.new(:YAML, :file => File.join(make_tempdir, "simple_yaml"))
10
+ @store.clear
11
+ end
12
+
13
+ after do
14
+ @store.close.should == nil if @store
15
+ end
16
+
17
+ it_should_behave_like 'null_objectkey_objectvalue'
18
+ it_should_behave_like 'null_objectkey_stringvalue'
19
+ it_should_behave_like 'null_objectkey_hashvalue'
20
+ it_should_behave_like 'null_stringkey_objectvalue'
21
+ it_should_behave_like 'null_stringkey_stringvalue'
22
+ it_should_behave_like 'null_stringkey_hashvalue'
23
+ it_should_behave_like 'null_hashkey_objectvalue'
24
+ it_should_behave_like 'null_hashkey_stringvalue'
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'store_objectkey_objectvalue'
27
+ it_should_behave_like 'store_objectkey_stringvalue'
28
+ it_should_behave_like 'store_objectkey_hashvalue'
29
+ it_should_behave_like 'store_stringkey_objectvalue'
30
+ it_should_behave_like 'store_stringkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_hashkey_objectvalue'
33
+ it_should_behave_like 'store_hashkey_stringvalue'
34
+ it_should_behave_like 'store_hashkey_hashvalue'
35
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
36
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
37
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
38
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
39
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
40
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
41
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
42
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
43
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
44
+ it_should_behave_like 'marshallable_key'
45
+
46
+ end
47
+ rescue LoadError => ex
48
+ puts "Test simple_yaml not executed: #{ex.message}"
49
+ rescue Exception => ex
50
+ puts "Test simple_yaml not executed: #{ex.message}"
51
+ #puts "#{ex.backtrace.join("\n")}"
52
+ end
@@ -0,0 +1,43 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+
6
+ Juno.build do
7
+ use(:Stack) do
8
+ add(Juno.new(:Null))
9
+ add(Juno::Adapters::Null.new)
10
+ add { adapter :File, :dir => File.join(make_tempdir, "stack-file1") }
11
+ add { adapter :Memory }
12
+ end
13
+ end.close
14
+
15
+ describe "stack_file_memory" do
16
+ before do
17
+ @store =
18
+ Juno.build do
19
+ use(:Stack) do
20
+ add(Juno.new(:Null))
21
+ add(Juno::Adapters::Null.new)
22
+ add { adapter :File, :dir => File.join(make_tempdir, "stack-file1") }
23
+ add { adapter :Memory }
24
+ end
25
+ end
26
+ @store.clear
27
+ end
28
+
29
+ after do
30
+ @store.close.should == nil if @store
31
+ end
32
+
33
+ it_should_behave_like 'null_stringkey_stringvalue'
34
+ it_should_behave_like 'store_stringkey_stringvalue'
35
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
36
+
37
+ end
38
+ rescue LoadError => ex
39
+ puts "Test stack_file_memory not executed: #{ex.message}"
40
+ rescue Exception => ex
41
+ puts "Test stack_file_memory not executed: #{ex.message}"
42
+ #puts "#{ex.backtrace.join("\n")}"
43
+ end
@@ -0,0 +1,42 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+
6
+ Juno.build do
7
+ use(:Stack) do
8
+ add(Juno.new(:Null))
9
+ add(Juno::Adapters::Null.new)
10
+ add { adapter :Memory }
11
+ add { adapter :File, :dir => File.join(make_tempdir, "stack-file2") }
12
+ end
13
+ end.close
14
+
15
+ describe "stack_memory_file" do
16
+ before do
17
+ @store =
18
+ Juno.build do
19
+ use(:Stack) do
20
+ add(Juno.new(:Null))
21
+ add(Juno::Adapters::Null.new)
22
+ add { adapter :Memory }
23
+ add { adapter :File, :dir => File.join(make_tempdir, "stack-file2") }
24
+ end
25
+ end
26
+ @store.clear
27
+ end
28
+
29
+ after do
30
+ @store.close.should == nil if @store
31
+ end
32
+
33
+ it_should_behave_like 'null_stringkey_stringvalue'
34
+ it_should_behave_like 'store_stringkey_stringvalue'
35
+
36
+ end
37
+ rescue LoadError => ex
38
+ puts "Test stack_memory_file not executed: #{ex.message}"
39
+ rescue Exception => ex
40
+ puts "Test stack_memory_file not executed: #{ex.message}"
41
+ #puts "#{ex.backtrace.join("\n")}"
42
+ end
@@ -0,0 +1,44 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+
6
+ Juno.build do
7
+ use :Transformer, :key => :bson, :value => :bson
8
+ adapter :Memory
9
+ end.close
10
+
11
+ describe "transformer_bson" do
12
+ before do
13
+ @store =
14
+ Juno.build do
15
+ use :Transformer, :key => :bson, :value => :bson
16
+ adapter :Memory
17
+ end
18
+ @store.clear
19
+ end
20
+
21
+ after do
22
+ @store.close.should == nil if @store
23
+ end
24
+
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'null_hashkey_stringvalue'
27
+ it_should_behave_like 'null_stringkey_hashvalue'
28
+ it_should_behave_like 'null_stringkey_stringvalue'
29
+ it_should_behave_like 'store_hashkey_hashvalue'
30
+ it_should_behave_like 'store_hashkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_stringkey_stringvalue'
33
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
34
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
35
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
36
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
37
+
38
+ end
39
+ rescue LoadError => ex
40
+ puts "Test transformer_bson not executed: #{ex.message}"
41
+ rescue Exception => ex
42
+ puts "Test transformer_bson not executed: #{ex.message}"
43
+ #puts "#{ex.backtrace.join("\n")}"
44
+ end
@@ -0,0 +1,44 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+
6
+ Juno.build do
7
+ use :Transformer, :key => :json, :value => :json
8
+ adapter :Memory
9
+ end.close
10
+
11
+ describe "transformer_json" do
12
+ before do
13
+ @store =
14
+ Juno.build do
15
+ use :Transformer, :key => :json, :value => :json
16
+ adapter :Memory
17
+ end
18
+ @store.clear
19
+ end
20
+
21
+ after do
22
+ @store.close.should == nil if @store
23
+ end
24
+
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'null_hashkey_stringvalue'
27
+ it_should_behave_like 'null_stringkey_hashvalue'
28
+ it_should_behave_like 'null_stringkey_stringvalue'
29
+ it_should_behave_like 'store_hashkey_hashvalue'
30
+ it_should_behave_like 'store_hashkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_stringkey_stringvalue'
33
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
34
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
35
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
36
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
37
+
38
+ end
39
+ rescue LoadError => ex
40
+ puts "Test transformer_json not executed: #{ex.message}"
41
+ rescue Exception => ex
42
+ puts "Test transformer_json not executed: #{ex.message}"
43
+ #puts "#{ex.backtrace.join("\n")}"
44
+ end
@@ -0,0 +1,60 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+
6
+ Juno.build do
7
+ use :Transformer, :key => [:marshal, :base64], :value => [:marshal, :base64]
8
+ adapter :Memory
9
+ end.close
10
+
11
+ describe "transformer_marshal_base64" do
12
+ before do
13
+ @store =
14
+ Juno.build do
15
+ use :Transformer, :key => [:marshal, :base64], :value => [:marshal, :base64]
16
+ adapter :Memory
17
+ end
18
+ @store.clear
19
+ end
20
+
21
+ after do
22
+ @store.close.should == nil if @store
23
+ end
24
+
25
+ it_should_behave_like 'null_objectkey_objectvalue'
26
+ it_should_behave_like 'null_objectkey_stringvalue'
27
+ it_should_behave_like 'null_objectkey_hashvalue'
28
+ it_should_behave_like 'null_stringkey_objectvalue'
29
+ it_should_behave_like 'null_stringkey_stringvalue'
30
+ it_should_behave_like 'null_stringkey_hashvalue'
31
+ it_should_behave_like 'null_hashkey_objectvalue'
32
+ it_should_behave_like 'null_hashkey_stringvalue'
33
+ it_should_behave_like 'null_hashkey_hashvalue'
34
+ it_should_behave_like 'store_objectkey_objectvalue'
35
+ it_should_behave_like 'store_objectkey_stringvalue'
36
+ it_should_behave_like 'store_objectkey_hashvalue'
37
+ it_should_behave_like 'store_stringkey_objectvalue'
38
+ it_should_behave_like 'store_stringkey_stringvalue'
39
+ it_should_behave_like 'store_stringkey_hashvalue'
40
+ it_should_behave_like 'store_hashkey_objectvalue'
41
+ it_should_behave_like 'store_hashkey_stringvalue'
42
+ it_should_behave_like 'store_hashkey_hashvalue'
43
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
44
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
45
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
46
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
47
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
48
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
49
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
50
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
51
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
52
+ it_should_behave_like 'marshallable_key'
53
+
54
+ end
55
+ rescue LoadError => ex
56
+ puts "Test transformer_marshal_base64 not executed: #{ex.message}"
57
+ rescue Exception => ex
58
+ puts "Test transformer_marshal_base64 not executed: #{ex.message}"
59
+ #puts "#{ex.backtrace.join("\n")}"
60
+ end
@@ -0,0 +1,60 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+
6
+ Juno.build do
7
+ use :Transformer, :key => [:marshal, :escape], :value => :marshal
8
+ adapter :Memory
9
+ end.close
10
+
11
+ describe "transformer_marshal_escape" do
12
+ before do
13
+ @store =
14
+ Juno.build do
15
+ use :Transformer, :key => [:marshal, :escape], :value => :marshal
16
+ adapter :Memory
17
+ end
18
+ @store.clear
19
+ end
20
+
21
+ after do
22
+ @store.close.should == nil if @store
23
+ end
24
+
25
+ it_should_behave_like 'null_objectkey_objectvalue'
26
+ it_should_behave_like 'null_objectkey_stringvalue'
27
+ it_should_behave_like 'null_objectkey_hashvalue'
28
+ it_should_behave_like 'null_stringkey_objectvalue'
29
+ it_should_behave_like 'null_stringkey_stringvalue'
30
+ it_should_behave_like 'null_stringkey_hashvalue'
31
+ it_should_behave_like 'null_hashkey_objectvalue'
32
+ it_should_behave_like 'null_hashkey_stringvalue'
33
+ it_should_behave_like 'null_hashkey_hashvalue'
34
+ it_should_behave_like 'store_objectkey_objectvalue'
35
+ it_should_behave_like 'store_objectkey_stringvalue'
36
+ it_should_behave_like 'store_objectkey_hashvalue'
37
+ it_should_behave_like 'store_stringkey_objectvalue'
38
+ it_should_behave_like 'store_stringkey_stringvalue'
39
+ it_should_behave_like 'store_stringkey_hashvalue'
40
+ it_should_behave_like 'store_hashkey_objectvalue'
41
+ it_should_behave_like 'store_hashkey_stringvalue'
42
+ it_should_behave_like 'store_hashkey_hashvalue'
43
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
44
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
45
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
46
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
47
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
48
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
49
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
50
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
51
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
52
+ it_should_behave_like 'marshallable_key'
53
+
54
+ end
55
+ rescue LoadError => ex
56
+ puts "Test transformer_marshal_escape not executed: #{ex.message}"
57
+ rescue Exception => ex
58
+ puts "Test transformer_marshal_escape not executed: #{ex.message}"
59
+ #puts "#{ex.backtrace.join("\n")}"
60
+ end
@@ -0,0 +1,60 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+
6
+ Juno.build do
7
+ use :Transformer, :key => [:marshal, :md5], :value => :marshal
8
+ adapter :Memory
9
+ end.close
10
+
11
+ describe "transformer_marshal_md5" do
12
+ before do
13
+ @store =
14
+ Juno.build do
15
+ use :Transformer, :key => [:marshal, :md5], :value => :marshal
16
+ adapter :Memory
17
+ end
18
+ @store.clear
19
+ end
20
+
21
+ after do
22
+ @store.close.should == nil if @store
23
+ end
24
+
25
+ it_should_behave_like 'null_objectkey_objectvalue'
26
+ it_should_behave_like 'null_objectkey_stringvalue'
27
+ it_should_behave_like 'null_objectkey_hashvalue'
28
+ it_should_behave_like 'null_stringkey_objectvalue'
29
+ it_should_behave_like 'null_stringkey_stringvalue'
30
+ it_should_behave_like 'null_stringkey_hashvalue'
31
+ it_should_behave_like 'null_hashkey_objectvalue'
32
+ it_should_behave_like 'null_hashkey_stringvalue'
33
+ it_should_behave_like 'null_hashkey_hashvalue'
34
+ it_should_behave_like 'store_objectkey_objectvalue'
35
+ it_should_behave_like 'store_objectkey_stringvalue'
36
+ it_should_behave_like 'store_objectkey_hashvalue'
37
+ it_should_behave_like 'store_stringkey_objectvalue'
38
+ it_should_behave_like 'store_stringkey_stringvalue'
39
+ it_should_behave_like 'store_stringkey_hashvalue'
40
+ it_should_behave_like 'store_hashkey_objectvalue'
41
+ it_should_behave_like 'store_hashkey_stringvalue'
42
+ it_should_behave_like 'store_hashkey_hashvalue'
43
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
44
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
45
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
46
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
47
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
48
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
49
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
50
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
51
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
52
+ it_should_behave_like 'marshallable_key'
53
+
54
+ end
55
+ rescue LoadError => ex
56
+ puts "Test transformer_marshal_md5 not executed: #{ex.message}"
57
+ rescue Exception => ex
58
+ puts "Test transformer_marshal_md5 not executed: #{ex.message}"
59
+ #puts "#{ex.backtrace.join("\n")}"
60
+ end
@@ -0,0 +1,60 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+
6
+ Juno.build do
7
+ use :Transformer, :key => [:marshal, :md5, :spread], :value => :marshal
8
+ adapter :Memory
9
+ end.close
10
+
11
+ describe "transformer_marshal_md5_spread" do
12
+ before do
13
+ @store =
14
+ Juno.build do
15
+ use :Transformer, :key => [:marshal, :md5, :spread], :value => :marshal
16
+ adapter :Memory
17
+ end
18
+ @store.clear
19
+ end
20
+
21
+ after do
22
+ @store.close.should == nil if @store
23
+ end
24
+
25
+ it_should_behave_like 'null_objectkey_objectvalue'
26
+ it_should_behave_like 'null_objectkey_stringvalue'
27
+ it_should_behave_like 'null_objectkey_hashvalue'
28
+ it_should_behave_like 'null_stringkey_objectvalue'
29
+ it_should_behave_like 'null_stringkey_stringvalue'
30
+ it_should_behave_like 'null_stringkey_hashvalue'
31
+ it_should_behave_like 'null_hashkey_objectvalue'
32
+ it_should_behave_like 'null_hashkey_stringvalue'
33
+ it_should_behave_like 'null_hashkey_hashvalue'
34
+ it_should_behave_like 'store_objectkey_objectvalue'
35
+ it_should_behave_like 'store_objectkey_stringvalue'
36
+ it_should_behave_like 'store_objectkey_hashvalue'
37
+ it_should_behave_like 'store_stringkey_objectvalue'
38
+ it_should_behave_like 'store_stringkey_stringvalue'
39
+ it_should_behave_like 'store_stringkey_hashvalue'
40
+ it_should_behave_like 'store_hashkey_objectvalue'
41
+ it_should_behave_like 'store_hashkey_stringvalue'
42
+ it_should_behave_like 'store_hashkey_hashvalue'
43
+ it_should_behave_like 'returndifferent_objectkey_objectvalue'
44
+ it_should_behave_like 'returndifferent_objectkey_stringvalue'
45
+ it_should_behave_like 'returndifferent_objectkey_hashvalue'
46
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
47
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
48
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
49
+ it_should_behave_like 'returndifferent_hashkey_objectvalue'
50
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
51
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
52
+ it_should_behave_like 'marshallable_key'
53
+
54
+ end
55
+ rescue LoadError => ex
56
+ puts "Test transformer_marshal_md5_spread not executed: #{ex.message}"
57
+ rescue Exception => ex
58
+ puts "Test transformer_marshal_md5_spread not executed: #{ex.message}"
59
+ #puts "#{ex.backtrace.join("\n")}"
60
+ end
@@ -0,0 +1,44 @@
1
+ # Generated file
2
+ require 'helper'
3
+
4
+ begin
5
+
6
+ Juno.build do
7
+ use :Transformer, :key => :msgpack, :value => :msgpack
8
+ adapter :Memory
9
+ end.close
10
+
11
+ describe "transformer_msgpack" do
12
+ before do
13
+ @store =
14
+ Juno.build do
15
+ use :Transformer, :key => :msgpack, :value => :msgpack
16
+ adapter :Memory
17
+ end
18
+ @store.clear
19
+ end
20
+
21
+ after do
22
+ @store.close.should == nil if @store
23
+ end
24
+
25
+ it_should_behave_like 'null_hashkey_hashvalue'
26
+ it_should_behave_like 'null_hashkey_stringvalue'
27
+ it_should_behave_like 'null_stringkey_hashvalue'
28
+ it_should_behave_like 'null_stringkey_stringvalue'
29
+ it_should_behave_like 'store_hashkey_hashvalue'
30
+ it_should_behave_like 'store_hashkey_stringvalue'
31
+ it_should_behave_like 'store_stringkey_hashvalue'
32
+ it_should_behave_like 'store_stringkey_stringvalue'
33
+ it_should_behave_like 'returndifferent_hashkey_hashvalue'
34
+ it_should_behave_like 'returndifferent_hashkey_stringvalue'
35
+ it_should_behave_like 'returndifferent_stringkey_hashvalue'
36
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
37
+
38
+ end
39
+ rescue LoadError => ex
40
+ puts "Test transformer_msgpack not executed: #{ex.message}"
41
+ rescue Exception => ex
42
+ puts "Test transformer_msgpack not executed: #{ex.message}"
43
+ #puts "#{ex.backtrace.join("\n")}"
44
+ end