juno 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. data/.travis.yml +2 -4
  2. data/Gemfile +3 -1
  3. data/README.md +40 -8
  4. data/benchmarks/run.rb +17 -5
  5. data/lib/juno/adapters/activerecord.rb +23 -14
  6. data/lib/juno/adapters/cassandra.rb +11 -0
  7. data/lib/juno/adapters/couch.rb +9 -0
  8. data/lib/juno/adapters/datamapper.rb +10 -0
  9. data/lib/juno/adapters/dbm.rb +8 -0
  10. data/lib/juno/adapters/file.rb +2 -0
  11. data/lib/juno/adapters/fog.rb +9 -0
  12. data/lib/juno/adapters/gdbm.rb +8 -0
  13. data/lib/juno/adapters/localmemcache.rb +8 -0
  14. data/lib/juno/adapters/lruhash.rb +8 -0
  15. data/lib/juno/adapters/memcached_dalli.rb +9 -0
  16. data/lib/juno/adapters/memcached_native.rb +10 -0
  17. data/lib/juno/adapters/memory.rb +2 -0
  18. data/lib/juno/adapters/mongo.rb +11 -0
  19. data/lib/juno/adapters/null.rb +2 -0
  20. data/lib/juno/adapters/pstore.rb +9 -2
  21. data/lib/juno/adapters/redis.rb +5 -0
  22. data/lib/juno/adapters/riak.rb +9 -0
  23. data/lib/juno/adapters/sdbm.rb +8 -0
  24. data/lib/juno/adapters/sequel.rb +10 -0
  25. data/lib/juno/adapters/sqlite.rb +9 -0
  26. data/lib/juno/adapters/tokyocabinet.rb +16 -4
  27. data/lib/juno/adapters/yaml.rb +2 -0
  28. data/lib/juno/base.rb +1 -0
  29. data/lib/juno/builder.rb +2 -0
  30. data/lib/juno/cache.rb +2 -0
  31. data/lib/juno/expires.rb +1 -0
  32. data/lib/juno/lock.rb +37 -0
  33. data/lib/juno/proxy.rb +1 -0
  34. data/lib/juno/stack.rb +2 -0
  35. data/lib/juno/transformer.rb +16 -4
  36. data/lib/juno/version.rb +3 -1
  37. data/lib/juno.rb +33 -2
  38. data/spec/adapter_activerecord_spec.rb +20 -34
  39. data/spec/adapter_cassandra_spec.rb +9 -23
  40. data/spec/adapter_couch_spec.rb +9 -23
  41. data/spec/adapter_datamapper_spec.rb +36 -50
  42. data/spec/adapter_dbm_spec.rb +9 -23
  43. data/spec/adapter_file_spec.rb +9 -23
  44. data/spec/adapter_fog_spec.rb +12 -29
  45. data/spec/adapter_gdbm_spec.rb +9 -23
  46. data/spec/adapter_localmemcache_spec.rb +9 -23
  47. data/spec/adapter_lruhash_spec.rb +24 -38
  48. data/spec/adapter_memcached_dalli_spec.rb +10 -24
  49. data/spec/adapter_memcached_native_spec.rb +10 -24
  50. data/spec/adapter_memcached_spec.rb +10 -24
  51. data/spec/adapter_memory_spec.rb +24 -38
  52. data/spec/adapter_mongo_spec.rb +9 -23
  53. data/spec/adapter_pstore_spec.rb +12 -26
  54. data/spec/adapter_redis_spec.rb +10 -24
  55. data/spec/adapter_riak_spec.rb +9 -23
  56. data/spec/adapter_sdbm_spec.rb +9 -23
  57. data/spec/adapter_sequel_spec.rb +9 -23
  58. data/spec/adapter_sqlite_spec.rb +9 -23
  59. data/spec/adapter_tokyocabinet_bdb_spec.rb +13 -0
  60. data/spec/adapter_tokyocabinet_hdb_spec.rb +13 -0
  61. data/spec/adapter_yaml_spec.rb +12 -26
  62. data/spec/cache_file_memory_spec.rb +22 -43
  63. data/spec/cache_memory_null_spec.rb +13 -34
  64. data/spec/expires_file_spec.rb +56 -76
  65. data/spec/expires_memory_spec.rb +35 -54
  66. data/spec/generate.rb +147 -160
  67. data/spec/helper.rb +39 -0
  68. data/spec/junospecs.rb +612 -610
  69. data/spec/lock_spec.rb +31 -0
  70. data/spec/null_adapter_spec.rb +15 -29
  71. data/spec/proxy_expires_memory_spec.rb +37 -58
  72. data/spec/proxy_redis_spec.rb +13 -33
  73. data/spec/simple_activerecord_spec.rb +34 -48
  74. data/spec/simple_activerecord_with_expires_spec.rb +35 -49
  75. data/spec/simple_cassandra_spec.rb +35 -49
  76. data/spec/simple_couch_spec.rb +34 -48
  77. data/spec/simple_couch_with_expires_spec.rb +35 -49
  78. data/spec/simple_datamapper_spec.rb +34 -48
  79. data/spec/simple_datamapper_with_expires_spec.rb +35 -49
  80. data/spec/simple_datamapper_with_repository_spec.rb +34 -48
  81. data/spec/simple_dbm_spec.rb +34 -48
  82. data/spec/simple_dbm_with_expires_spec.rb +35 -49
  83. data/spec/simple_file_spec.rb +34 -48
  84. data/spec/simple_file_with_expires_spec.rb +35 -49
  85. data/spec/simple_fog_spec.rb +37 -54
  86. data/spec/simple_fog_with_expires_spec.rb +39 -57
  87. data/spec/simple_gdbm_spec.rb +34 -48
  88. data/spec/simple_gdbm_with_expires_spec.rb +35 -49
  89. data/spec/simple_hashfile_spec.rb +34 -48
  90. data/spec/simple_hashfile_with_expires_spec.rb +35 -49
  91. data/spec/simple_localmemcache_spec.rb +34 -48
  92. data/spec/simple_localmemcache_with_expires_spec.rb +35 -49
  93. data/spec/simple_lruhash_spec.rb +34 -48
  94. data/spec/simple_lruhash_with_expires_spec.rb +35 -49
  95. data/spec/simple_memcached_dalli_spec.rb +35 -49
  96. data/spec/simple_memcached_native_spec.rb +35 -49
  97. data/spec/simple_memcached_spec.rb +35 -49
  98. data/spec/simple_memory_spec.rb +34 -48
  99. data/spec/simple_memory_with_expires_spec.rb +35 -49
  100. data/spec/simple_mongo_spec.rb +34 -48
  101. data/spec/simple_mongo_with_expires_spec.rb +35 -49
  102. data/spec/simple_null_spec.rb +25 -39
  103. data/spec/simple_pstore_spec.rb +34 -48
  104. data/spec/simple_pstore_with_expires_spec.rb +35 -49
  105. data/spec/simple_redis_spec.rb +35 -49
  106. data/spec/simple_riak_spec.rb +34 -48
  107. data/spec/simple_riak_with_expires_spec.rb +35 -49
  108. data/spec/simple_sdbm_spec.rb +34 -48
  109. data/spec/simple_sdbm_with_expires_spec.rb +35 -49
  110. data/spec/simple_sequel_spec.rb +34 -48
  111. data/spec/simple_sequel_with_expires_spec.rb +35 -49
  112. data/spec/simple_sqlite_spec.rb +34 -48
  113. data/spec/simple_sqlite_with_expires_spec.rb +35 -49
  114. data/spec/simple_tokyocabinet_spec.rb +34 -48
  115. data/spec/simple_tokyocabinet_with_expires_spec.rb +35 -49
  116. data/spec/simple_yaml_spec.rb +34 -48
  117. data/spec/simple_yaml_with_expires_spec.rb +35 -49
  118. data/spec/stack_file_memory_spec.rb +15 -38
  119. data/spec/stack_memory_file_spec.rb +14 -37
  120. data/spec/transformer_bson_spec.rb +20 -39
  121. data/spec/transformer_compress_spec.rb +17 -36
  122. data/spec/transformer_json_spec.rb +20 -39
  123. data/spec/transformer_marshal_base64_spec.rb +36 -55
  124. data/spec/transformer_marshal_escape_spec.rb +36 -55
  125. data/spec/transformer_marshal_md5_spec.rb +36 -55
  126. data/spec/transformer_marshal_md5_spread_spec.rb +36 -55
  127. data/spec/transformer_msgpack_spec.rb +20 -39
  128. data/spec/transformer_ox_spec.rb +40 -0
  129. data/spec/transformer_yaml_spec.rb +35 -54
  130. metadata +11 -6
  131. data/spec/adapter_tokyocabinet_spec.rb +0 -27
  132. data/spec/simpl_memory_with_expires_spec.rb +0 -53
@@ -1,42 +1,28 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::LRUHash.new.close
6
-
7
- describe "adapter_lruhash" do
8
- before do
9
- @store = Juno::Adapters::LRUHash.new
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
-
4
+ describe_juno "adapter_lruhash" do
5
+ def new_store
6
+ Juno::Adapters::LRUHash.new
36
7
  end
37
- rescue LoadError => ex
38
- puts "Test adapter_lruhash not executed: #{ex.message}"
39
- rescue Exception => ex
40
- puts "Test adapter_lruhash not executed: #{ex.message}"
41
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_objectkey_objectvalue'
11
+ it_should_behave_like 'null_objectkey_stringvalue'
12
+ it_should_behave_like 'null_objectkey_hashvalue'
13
+ it_should_behave_like 'null_stringkey_objectvalue'
14
+ it_should_behave_like 'null_stringkey_stringvalue'
15
+ it_should_behave_like 'null_stringkey_hashvalue'
16
+ it_should_behave_like 'null_hashkey_objectvalue'
17
+ it_should_behave_like 'null_hashkey_stringvalue'
18
+ it_should_behave_like 'null_hashkey_hashvalue'
19
+ it_should_behave_like 'store_objectkey_objectvalue'
20
+ it_should_behave_like 'store_objectkey_stringvalue'
21
+ it_should_behave_like 'store_objectkey_hashvalue'
22
+ it_should_behave_like 'store_stringkey_objectvalue'
23
+ it_should_behave_like 'store_stringkey_stringvalue'
24
+ it_should_behave_like 'store_stringkey_hashvalue'
25
+ it_should_behave_like 'store_hashkey_objectvalue'
26
+ it_should_behave_like 'store_hashkey_stringvalue'
27
+ it_should_behave_like 'store_hashkey_hashvalue'
42
28
  end
@@ -1,28 +1,14 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::MemcachedDalli.new(:server => "localhost:22122", :namespace => "adapter_memcached_dalli").close
6
-
7
- describe "adapter_memcached_dalli" do
8
- before do
9
- @store = Juno::Adapters::MemcachedDalli.new(:server => "localhost:22122", :namespace => "adapter_memcached_dalli")
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_stringkey_stringvalue'
18
- it_should_behave_like 'store_stringkey_stringvalue'
19
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
20
- it_should_behave_like 'expires_stringkey_stringvalue'
21
-
4
+ describe_juno "adapter_memcached_dalli" do
5
+ def new_store
6
+ Juno::Adapters::MemcachedDalli.new(:namespace => "adapter_memcached_dalli")
22
7
  end
23
- rescue LoadError => ex
24
- puts "Test adapter_memcached_dalli not executed: #{ex.message}"
25
- rescue Exception => ex
26
- puts "Test adapter_memcached_dalli not executed: #{ex.message}"
27
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
13
+ it_should_behave_like 'expires_stringkey_stringvalue'
28
14
  end
@@ -1,28 +1,14 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::MemcachedNative.new(:server => "localhost:22122", :namespace => "adapter_memcached_native").close
6
-
7
- describe "adapter_memcached_native" do
8
- before do
9
- @store = Juno::Adapters::MemcachedNative.new(:server => "localhost:22122", :namespace => "adapter_memcached_native")
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_stringkey_stringvalue'
18
- it_should_behave_like 'store_stringkey_stringvalue'
19
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
20
- it_should_behave_like 'expires_stringkey_stringvalue'
21
-
4
+ describe_juno "adapter_memcached_native" do
5
+ def new_store
6
+ Juno::Adapters::MemcachedNative.new(:namespace => "adapter_memcached_native")
22
7
  end
23
- rescue LoadError => ex
24
- puts "Test adapter_memcached_native not executed: #{ex.message}"
25
- rescue Exception => ex
26
- puts "Test adapter_memcached_native not executed: #{ex.message}"
27
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
13
+ it_should_behave_like 'expires_stringkey_stringvalue'
28
14
  end
@@ -1,28 +1,14 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::Memcached.new(:server => "localhost:22122", :namespace => "adapter_memcached").close
6
-
7
- describe "adapter_memcached" do
8
- before do
9
- @store = Juno::Adapters::Memcached.new(:server => "localhost:22122", :namespace => "adapter_memcached")
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_stringkey_stringvalue'
18
- it_should_behave_like 'store_stringkey_stringvalue'
19
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
20
- it_should_behave_like 'expires_stringkey_stringvalue'
21
-
4
+ describe_juno "adapter_memcached" do
5
+ def new_store
6
+ Juno::Adapters::Memcached.new(:namespace => "adapter_memcached")
22
7
  end
23
- rescue LoadError => ex
24
- puts "Test adapter_memcached not executed: #{ex.message}"
25
- rescue Exception => ex
26
- puts "Test adapter_memcached not executed: #{ex.message}"
27
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
13
+ it_should_behave_like 'expires_stringkey_stringvalue'
28
14
  end
@@ -1,42 +1,28 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::Memory.new.close
6
-
7
- describe "adapter_memory" do
8
- before do
9
- @store = Juno::Adapters::Memory.new
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
-
4
+ describe_juno "adapter_memory" do
5
+ def new_store
6
+ Juno::Adapters::Memory.new
36
7
  end
37
- rescue LoadError => ex
38
- puts "Test adapter_memory not executed: #{ex.message}"
39
- rescue Exception => ex
40
- puts "Test adapter_memory not executed: #{ex.message}"
41
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_objectkey_objectvalue'
11
+ it_should_behave_like 'null_objectkey_stringvalue'
12
+ it_should_behave_like 'null_objectkey_hashvalue'
13
+ it_should_behave_like 'null_stringkey_objectvalue'
14
+ it_should_behave_like 'null_stringkey_stringvalue'
15
+ it_should_behave_like 'null_stringkey_hashvalue'
16
+ it_should_behave_like 'null_hashkey_objectvalue'
17
+ it_should_behave_like 'null_hashkey_stringvalue'
18
+ it_should_behave_like 'null_hashkey_hashvalue'
19
+ it_should_behave_like 'store_objectkey_objectvalue'
20
+ it_should_behave_like 'store_objectkey_stringvalue'
21
+ it_should_behave_like 'store_objectkey_hashvalue'
22
+ it_should_behave_like 'store_stringkey_objectvalue'
23
+ it_should_behave_like 'store_stringkey_stringvalue'
24
+ it_should_behave_like 'store_stringkey_hashvalue'
25
+ it_should_behave_like 'store_hashkey_objectvalue'
26
+ it_should_behave_like 'store_hashkey_stringvalue'
27
+ it_should_behave_like 'store_hashkey_hashvalue'
42
28
  end
@@ -1,27 +1,13 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::Mongo.new(:db => "adapter_mongo").close
6
-
7
- describe "adapter_mongo" do
8
- before do
9
- @store = Juno::Adapters::Mongo.new(:db => "adapter_mongo")
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_stringkey_stringvalue'
18
- it_should_behave_like 'store_stringkey_stringvalue'
19
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
20
-
4
+ describe_juno "adapter_mongo" do
5
+ def new_store
6
+ Juno::Adapters::Mongo.new(:db => "adapter_mongo")
21
7
  end
22
- rescue LoadError => ex
23
- puts "Test adapter_mongo not executed: #{ex.message}"
24
- rescue Exception => ex
25
- puts "Test adapter_mongo not executed: #{ex.message}"
26
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
27
13
  end
@@ -1,30 +1,16 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::PStore.new(:file => File.join(make_tempdir, "adapter_pstore")).close
6
-
7
- describe "adapter_pstore" do
8
- before do
9
- @store = Juno::Adapters::PStore.new(:file => File.join(make_tempdir, "adapter_pstore"))
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_stringkey_stringvalue'
18
- it_should_behave_like 'store_stringkey_stringvalue'
19
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
20
- it_should_behave_like 'null_stringkey_objectvalue'
21
- it_should_behave_like 'store_stringkey_objectvalue'
22
- it_should_behave_like 'returndifferent_stringkey_objectvalue'
23
-
4
+ describe_juno "adapter_pstore" do
5
+ def new_store
6
+ Juno::Adapters::PStore.new(:file => File.join(make_tempdir, "adapter_pstore"))
24
7
  end
25
- rescue LoadError => ex
26
- puts "Test adapter_pstore not executed: #{ex.message}"
27
- rescue Exception => ex
28
- puts "Test adapter_pstore not executed: #{ex.message}"
29
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
13
+ it_should_behave_like 'null_stringkey_objectvalue'
14
+ it_should_behave_like 'store_stringkey_objectvalue'
15
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
30
16
  end
@@ -1,28 +1,14 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::Redis.new.close
6
-
7
- describe "adapter_redis" do
8
- before do
9
- @store = Juno::Adapters::Redis.new
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_stringkey_stringvalue'
18
- it_should_behave_like 'store_stringkey_stringvalue'
19
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
20
- it_should_behave_like 'expires_stringkey_stringvalue'
21
-
4
+ describe_juno "adapter_redis" do
5
+ def new_store
6
+ Juno::Adapters::Redis.new
22
7
  end
23
- rescue LoadError => ex
24
- puts "Test adapter_redis not executed: #{ex.message}"
25
- rescue Exception => ex
26
- puts "Test adapter_redis not executed: #{ex.message}"
27
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
13
+ it_should_behave_like 'expires_stringkey_stringvalue'
28
14
  end
@@ -1,31 +1,17 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
4
+ describe_juno "adapter_riak" do
5
5
  require 'riak'
6
6
 
7
7
  Riak.disable_list_keys_warnings = true
8
8
 
9
- Juno::Adapters::Riak.new.close
10
-
11
- describe "adapter_riak" do
12
- before do
13
- @store = Juno::Adapters::Riak.new
14
- @store.clear
15
- end
16
-
17
- after do
18
- @store.close.should == nil if @store
19
- end
20
-
21
- it_should_behave_like 'null_stringkey_stringvalue'
22
- it_should_behave_like 'store_stringkey_stringvalue'
23
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
24
-
9
+ def new_store
10
+ Juno::Adapters::Riak.new
25
11
  end
26
- rescue LoadError => ex
27
- puts "Test adapter_riak not executed: #{ex.message}"
28
- rescue Exception => ex
29
- puts "Test adapter_riak not executed: #{ex.message}"
30
- #puts "#{ex.backtrace.join("\n")}"
12
+
13
+ include_context 'setup_store'
14
+ it_should_behave_like 'null_stringkey_stringvalue'
15
+ it_should_behave_like 'store_stringkey_stringvalue'
16
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
31
17
  end
@@ -1,27 +1,13 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::SDBM.new(:file => File.join(make_tempdir, "adapter_sdbm")).close
6
-
7
- describe "adapter_sdbm" do
8
- before do
9
- @store = Juno::Adapters::SDBM.new(:file => File.join(make_tempdir, "adapter_sdbm"))
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_stringkey_stringvalue'
18
- it_should_behave_like 'store_stringkey_stringvalue'
19
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
20
-
4
+ describe_juno "adapter_sdbm" do
5
+ def new_store
6
+ Juno::Adapters::SDBM.new(:file => File.join(make_tempdir, "adapter_sdbm"))
21
7
  end
22
- rescue LoadError => ex
23
- puts "Test adapter_sdbm not executed: #{ex.message}"
24
- rescue Exception => ex
25
- puts "Test adapter_sdbm not executed: #{ex.message}"
26
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
27
13
  end
@@ -1,27 +1,13 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::Sequel.new(:db => (defined?(JRUBY_VERSION) ? "jdbc:sqlite:" : "sqlite:") + File.join(make_tempdir, "adapter_sequel")).close
6
-
7
- describe "adapter_sequel" do
8
- before do
9
- @store = Juno::Adapters::Sequel.new(:db => (defined?(JRUBY_VERSION) ? "jdbc:sqlite:" : "sqlite:") + File.join(make_tempdir, "adapter_sequel"))
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_stringkey_stringvalue'
18
- it_should_behave_like 'store_stringkey_stringvalue'
19
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
20
-
4
+ describe_juno "adapter_sequel" do
5
+ def new_store
6
+ Juno::Adapters::Sequel.new(:db => (defined?(JRUBY_VERSION) ? "jdbc:sqlite:" : "sqlite:") + File.join(make_tempdir, "adapter_sequel"))
21
7
  end
22
- rescue LoadError => ex
23
- puts "Test adapter_sequel not executed: #{ex.message}"
24
- rescue Exception => ex
25
- puts "Test adapter_sequel not executed: #{ex.message}"
26
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
27
13
  end
@@ -1,27 +1,13 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::Sqlite.new(:file => File.join(make_tempdir, "adapter_sqlite")).close
6
-
7
- describe "adapter_sqlite" do
8
- before do
9
- @store = Juno::Adapters::Sqlite.new(:file => File.join(make_tempdir, "adapter_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_stringkey_stringvalue'
18
- it_should_behave_like 'store_stringkey_stringvalue'
19
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
20
-
4
+ describe_juno "adapter_sqlite" do
5
+ def new_store
6
+ Juno::Adapters::Sqlite.new(:file => File.join(make_tempdir, "adapter_sqlite"))
21
7
  end
22
- rescue LoadError => ex
23
- puts "Test adapter_sqlite not executed: #{ex.message}"
24
- rescue Exception => ex
25
- puts "Test adapter_sqlite not executed: #{ex.message}"
26
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
27
13
  end
@@ -0,0 +1,13 @@
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
+ require 'helper'
3
+
4
+ describe_juno "adapter_tokyocabinet_bdb" do
5
+ def new_store
6
+ Juno::Adapters::TokyoCabinet.new(:file => File.join(make_tempdir, "adapter_tokyocabinet_bdb"), :type => :bdb)
7
+ end
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
13
+ end
@@ -0,0 +1,13 @@
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
+ require 'helper'
3
+
4
+ describe_juno "adapter_tokyocabinet_hdb" do
5
+ def new_store
6
+ Juno::Adapters::TokyoCabinet.new(:file => File.join(make_tempdir, "adapter_tokyocabinet_hdb"), :type => :hdb)
7
+ end
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
13
+ end
@@ -1,30 +1,16 @@
1
- # Generated file
1
+ # Generated by generate.rb at 2012-12-02 18:03:24 +0100, heads/master-0-g9a90bb4
2
2
  require 'helper'
3
3
 
4
- begin
5
- Juno::Adapters::YAML.new(:file => File.join(make_tempdir, "adapter_yaml")).close
6
-
7
- describe "adapter_yaml" do
8
- before do
9
- @store = Juno::Adapters::YAML.new(:file => File.join(make_tempdir, "adapter_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_stringkey_stringvalue'
18
- it_should_behave_like 'store_stringkey_stringvalue'
19
- it_should_behave_like 'returndifferent_stringkey_stringvalue'
20
- it_should_behave_like 'null_stringkey_objectvalue'
21
- it_should_behave_like 'store_stringkey_objectvalue'
22
- it_should_behave_like 'returndifferent_stringkey_objectvalue'
23
-
4
+ describe_juno "adapter_yaml" do
5
+ def new_store
6
+ Juno::Adapters::YAML.new(:file => File.join(make_tempdir, "adapter_yaml"))
24
7
  end
25
- rescue LoadError => ex
26
- puts "Test adapter_yaml not executed: #{ex.message}"
27
- rescue Exception => ex
28
- puts "Test adapter_yaml not executed: #{ex.message}"
29
- #puts "#{ex.backtrace.join("\n")}"
8
+
9
+ include_context 'setup_store'
10
+ it_should_behave_like 'null_stringkey_stringvalue'
11
+ it_should_behave_like 'store_stringkey_stringvalue'
12
+ it_should_behave_like 'returndifferent_stringkey_stringvalue'
13
+ it_should_behave_like 'null_stringkey_objectvalue'
14
+ it_should_behave_like 'store_stringkey_objectvalue'
15
+ it_should_behave_like 'returndifferent_stringkey_objectvalue'
30
16
  end