juno 0.1.0 → 0.1.1

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 (47) hide show
  1. data/.gitignore +1 -0
  2. data/.travis.yml +2 -5
  3. data/Gemfile +21 -8
  4. data/README.md +3 -1
  5. data/{unsupported/benchmarks.rb → benchmarks/run.rb} +20 -83
  6. data/lib/juno.rb +4 -4
  7. data/lib/juno/activerecord.rb +2 -5
  8. data/lib/juno/base.rb +4 -0
  9. data/{unsupported → lib/juno}/cassandra.rb +11 -11
  10. data/lib/juno/datamapper.rb +1 -1
  11. data/{unsupported → lib/juno}/fog.rb +7 -19
  12. data/lib/juno/null.rb +23 -0
  13. data/lib/juno/redis.rb +13 -1
  14. data/lib/juno/sequel.rb +3 -6
  15. data/lib/juno/stack.rb +41 -0
  16. data/lib/juno/version.rb +1 -1
  17. data/test/helper.rb +160 -130
  18. data/test/{test_active_record.rb → test_activerecord.rb} +2 -5
  19. data/{unsupported → test}/test_cassandra.rb +1 -1
  20. data/test/test_couch.rb +1 -1
  21. data/test/test_datamapper.rb +2 -2
  22. data/test/test_dbm.rb +1 -1
  23. data/test/test_expires.rb +1 -2
  24. data/test/test_file.rb +1 -1
  25. data/test/test_fog.rb +17 -0
  26. data/test/test_gdbm.rb +1 -1
  27. data/test/test_hashfile.rb +1 -1
  28. data/test/test_localmemcache.rb +1 -1
  29. data/test/test_memcached.rb +1 -2
  30. data/test/test_memcached_dalli.rb +1 -2
  31. data/test/test_memcached_native.rb +1 -2
  32. data/test/test_memory.rb +1 -1
  33. data/test/test_mongodb.rb +1 -1
  34. data/test/test_null.rb +9 -0
  35. data/test/test_proxy.rb +1 -1
  36. data/test/test_pstore.rb +1 -1
  37. data/test/test_redis.rb +1 -1
  38. data/test/test_riak.rb +1 -1
  39. data/test/test_sdbm.rb +1 -1
  40. data/test/test_sequel.rb +4 -4
  41. data/test/test_sqlite.rb +1 -1
  42. data/test/test_stack.rb +10 -0
  43. data/test/test_tokyocabinet.rb +1 -1
  44. data/test/test_yaml.rb +1 -1
  45. metadata +20 -13
  46. data/unsupported/test_rackspace.rb +0 -15
  47. data/unsupported/test_s3.rb +0 -15
data/test/test_dbm.rb CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Juno::DBM.new(:file => File.join(make_tempdir, 'dbm.db'))
7
7
  end
8
8
 
9
- class_eval(&JunoSpecification)
9
+ class_eval(&Juno::Specification)
10
10
  end
11
11
  rescue LoadError => ex
12
12
  puts "Juno::DBM not tested: #{ex.message}"
data/test/test_expires.rb CHANGED
@@ -5,6 +5,5 @@ describe Juno::Expires do
5
5
  Juno::Expires.new(Juno::Memory.new)
6
6
  end
7
7
 
8
- class_eval(&JunoSpecification)
9
- class_eval(&JunoExpiresSpecification)
8
+ class_eval(&Juno::ExpiresSpecification)
10
9
  end
data/test/test_file.rb CHANGED
@@ -5,5 +5,5 @@ describe Juno::File do
5
5
  Juno::File.new(:dir => File.join(make_tempdir, 'file'))
6
6
  end
7
7
 
8
- class_eval(&JunoSpecification)
8
+ class_eval(&Juno::Specification)
9
9
  end
data/test/test_fog.rb ADDED
@@ -0,0 +1,17 @@
1
+ require 'helper'
2
+
3
+ begin
4
+ describe Juno::Fog do
5
+ def new_store
6
+ Fog.mock!
7
+ Juno::Fog.new(:aws_access_key_id => 'fake_access_key_id',
8
+ :aws_secret_access_key => 'fake_secret_access_key',
9
+ :provider => 'AWS',
10
+ :dir => 'juno')
11
+ end
12
+
13
+ class_eval(&Juno::Specification)
14
+ end
15
+ rescue LoadError => ex
16
+ puts "Juno::Fog not tested: #{ex.message}"
17
+ end
data/test/test_gdbm.rb CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Juno::GDBM.new(:file => File.join(make_tempdir, 'gdbm.db'))
7
7
  end
8
8
 
9
- class_eval(&JunoSpecification)
9
+ class_eval(&Juno::Specification)
10
10
  end
11
11
  rescue LoadError => ex
12
12
  puts "Juno::GDBM not tested: #{ex.message}"
@@ -5,5 +5,5 @@ describe Juno::HashFile do
5
5
  Juno::HashFile.new(:dir => File.join(make_tempdir, 'hashfile'))
6
6
  end
7
7
 
8
- class_eval(&JunoSpecification)
8
+ class_eval(&Juno::Specification)
9
9
  end
@@ -6,7 +6,7 @@ begin
6
6
  Juno::LocalMemCache.new(:file => File.join(make_tempdir, 'lmc'))
7
7
  end
8
8
 
9
- class_eval(&JunoSpecification)
9
+ class_eval(&Juno::Specification)
10
10
  end
11
11
  rescue LoadError => ex
12
12
  puts "Juno::LocalMemCache not tested: #{ex.message}"
@@ -7,8 +7,7 @@ begin
7
7
  Juno::Memcached.new(:server => 'localhost:22122', :namespace => 'juno')
8
8
  end
9
9
 
10
- class_eval(&JunoSpecification)
11
- class_eval(&JunoExpiresSpecification)
10
+ class_eval(&Juno::ExpiresSpecification)
12
11
  end
13
12
  rescue LoadError => ex
14
13
  puts "Juno::Memcached not tested: #{ex.message}"
@@ -7,8 +7,7 @@ begin
7
7
  Juno::MemcachedDalli.new(:server => 'localhost:22122', :namespace => 'juno')
8
8
  end
9
9
 
10
- class_eval(&JunoSpecification)
11
- class_eval(&JunoExpiresSpecification)
10
+ class_eval(&Juno::ExpiresSpecification)
12
11
  end
13
12
  rescue LoadError => ex
14
13
  puts "Juno::MemcachedDalli not tested: #{ex.message}"
@@ -7,8 +7,7 @@ begin
7
7
  Juno::MemcachedNative.new(:server => 'localhost:22122', :namespace => 'juno')
8
8
  end
9
9
 
10
- class_eval(&JunoSpecification)
11
- class_eval(&JunoExpiresSpecification)
10
+ class_eval(&Juno::ExpiresSpecification)
12
11
  end
13
12
  rescue LoadError => ex
14
13
  puts "Juno::MemcachedNative not tested: #{ex.message}"
data/test/test_memory.rb CHANGED
@@ -5,5 +5,5 @@ describe Juno::Memory do
5
5
  Juno::Memory.new
6
6
  end
7
7
 
8
- class_eval(&JunoSpecification)
8
+ class_eval(&Juno::Specification)
9
9
  end
data/test/test_mongodb.rb CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Juno::MongoDB.new
7
7
  end
8
8
 
9
- class_eval(&JunoSpecification)
9
+ class_eval(&Juno::Specification)
10
10
  end
11
11
  rescue LoadError => ex
12
12
  puts "Juno::MongoDB not tested: #{ex.message}"
data/test/test_null.rb ADDED
@@ -0,0 +1,9 @@
1
+ require 'helper'
2
+
3
+ describe Juno::Null do
4
+ def new_store
5
+ Juno::Null.new
6
+ end
7
+
8
+ class_eval(&Juno::NullSpecification)
9
+ end
data/test/test_proxy.rb CHANGED
@@ -5,5 +5,5 @@ describe Juno::Proxy do
5
5
  Juno::Proxy.new(Juno::Proxy.new(Juno::Memory.new))
6
6
  end
7
7
 
8
- class_eval(&JunoSpecification)
8
+ class_eval(&Juno::Specification)
9
9
  end
data/test/test_pstore.rb CHANGED
@@ -5,5 +5,5 @@ describe Juno::PStore do
5
5
  Juno::PStore.new(:file => File.join(make_tempdir, 'pstore'))
6
6
  end
7
7
 
8
- class_eval(&JunoSpecification)
8
+ class_eval(&Juno::Specification)
9
9
  end
data/test/test_redis.rb CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Juno::Redis.new
7
7
  end
8
8
 
9
- class_eval(&JunoSpecification)
9
+ class_eval(&Juno::ExpiresSpecification)
10
10
  end
11
11
  rescue LoadError => ex
12
12
  puts "Juno::Redis not tested: #{ex.message}"
data/test/test_riak.rb CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Juno::Riak.new
7
7
  end
8
8
 
9
- class_eval(&JunoSpecification)
9
+ class_eval(&Juno::Specification)
10
10
  end
11
11
  rescue LoadError => ex
12
12
  puts "Juno::Riak not tested: #{ex.message}"
data/test/test_sdbm.rb CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Juno::GDBM.new(:file => File.join(make_tempdir, 'gdbm.db'))
7
7
  end
8
8
 
9
- class_eval(&JunoSpecification)
9
+ class_eval(&Juno::Specification)
10
10
  end
11
11
  rescue LoadError => ex
12
12
  puts "Juno::SDBM not tested: #{ex.message}"
data/test/test_sequel.rb CHANGED
@@ -3,11 +3,11 @@ require 'helper'
3
3
  begin
4
4
  describe Juno::Sequel do
5
5
  def new_store
6
- store = Juno::Sequel.new(:db => 'sqlite:/')
7
- store.migrate
8
- store
6
+ Juno::Sequel.new(:db => 'sqlite:/')
9
7
  end
10
8
 
11
- class_eval(&JunoSpecification)
9
+ class_eval(&Juno::Specification)
12
10
  end
11
+ rescue LoadError => ex
12
+ puts "Juno::Sequel not tested: #{ex.message}"
13
13
  end
data/test/test_sqlite.rb CHANGED
@@ -6,7 +6,7 @@ begin
6
6
  Juno::Sqlite.new(:file => ':memory:')
7
7
  end
8
8
 
9
- class_eval(&JunoSpecification)
9
+ class_eval(&Juno::Specification)
10
10
  end
11
11
  rescue LoadError => ex
12
12
  puts "Juno::Sqlite not tested: #{ex.message}"
@@ -0,0 +1,10 @@
1
+ require 'helper'
2
+
3
+ describe Juno::File do
4
+ def new_store
5
+ Juno::Stack.new(:stores => [ Juno::File.new(:dir => File.join(make_tempdir, 'file')),
6
+ Juno::Null.new, Juno::Memory.new ])
7
+ end
8
+
9
+ class_eval(&Juno::Specification)
10
+ end
@@ -6,7 +6,7 @@ begin
6
6
  Juno::TokyoCabinet.new(:file => File.join(make_tempdir, 'tokyocabinet.db'))
7
7
  end
8
8
 
9
- class_eval(&JunoSpecification)
9
+ class_eval(&Juno::Specification)
10
10
  end
11
11
  rescue LoadError => ex
12
12
  puts "Juno::TokyoCabinet not tested: #{ex.message}"
data/test/test_yaml.rb CHANGED
@@ -5,5 +5,5 @@ describe Juno::YAML do
5
5
  Juno::YAML.new(:file => File.join(make_tempdir, 'yaml'))
6
6
  end
7
7
 
8
- class_eval(&JunoSpecification)
8
+ class_eval(&Juno::Specification)
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: juno
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -15,7 +15,7 @@ date: 2012-11-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake
18
- requirement: &19508020 !ruby/object:Gem::Requirement
18
+ requirement: &20910480 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: '0'
24
24
  type: :development
25
25
  prerelease: false
26
- version_requirements: *19508020
26
+ version_requirements: *20910480
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
- requirement: &19507540 !ruby/object:Gem::Requirement
29
+ requirement: &20909980 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,7 +34,7 @@ dependencies:
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
- version_requirements: *19507540
37
+ version_requirements: *20909980
38
38
  description: A unified interface to key/value stores (moneta replacement)
39
39
  email:
40
40
  - wycats@gmail.com
@@ -54,15 +54,18 @@ files:
54
54
  - README.md
55
55
  - Rakefile
56
56
  - SPEC.md
57
+ - benchmarks/run.rb
57
58
  - juno.gemspec
58
59
  - lib/juno.rb
59
60
  - lib/juno/activerecord.rb
60
61
  - lib/juno/base.rb
62
+ - lib/juno/cassandra.rb
61
63
  - lib/juno/couch.rb
62
64
  - lib/juno/datamapper.rb
63
65
  - lib/juno/dbm.rb
64
66
  - lib/juno/expires.rb
65
67
  - lib/juno/file.rb
68
+ - lib/juno/fog.rb
66
69
  - lib/juno/gdbm.rb
67
70
  - lib/juno/hashfile.rb
68
71
  - lib/juno/localmemcache.rb
@@ -71,6 +74,7 @@ files:
71
74
  - lib/juno/memcached_native.rb
72
75
  - lib/juno/memory.rb
73
76
  - lib/juno/mongodb.rb
77
+ - lib/juno/null.rb
74
78
  - lib/juno/proxy.rb
75
79
  - lib/juno/pstore.rb
76
80
  - lib/juno/redis.rb
@@ -78,16 +82,19 @@ files:
78
82
  - lib/juno/sdbm.rb
79
83
  - lib/juno/sequel.rb
80
84
  - lib/juno/sqlite.rb
85
+ - lib/juno/stack.rb
81
86
  - lib/juno/tokyocabinet.rb
82
87
  - lib/juno/version.rb
83
88
  - lib/juno/yaml.rb
84
89
  - test/helper.rb
85
- - test/test_active_record.rb
90
+ - test/test_activerecord.rb
91
+ - test/test_cassandra.rb
86
92
  - test/test_couch.rb
87
93
  - test/test_datamapper.rb
88
94
  - test/test_dbm.rb
89
95
  - test/test_expires.rb
90
96
  - test/test_file.rb
97
+ - test/test_fog.rb
91
98
  - test/test_gdbm.rb
92
99
  - test/test_hashfile.rb
93
100
  - test/test_localmemcache.rb
@@ -96,6 +103,7 @@ files:
96
103
  - test/test_memcached_native.rb
97
104
  - test/test_memory.rb
98
105
  - test/test_mongodb.rb
106
+ - test/test_null.rb
99
107
  - test/test_proxy.rb
100
108
  - test/test_pstore.rb
101
109
  - test/test_redis.rb
@@ -103,14 +111,9 @@ files:
103
111
  - test/test_sdbm.rb
104
112
  - test/test_sequel.rb
105
113
  - test/test_sqlite.rb
114
+ - test/test_stack.rb
106
115
  - test/test_tokyocabinet.rb
107
116
  - test/test_yaml.rb
108
- - unsupported/benchmarks.rb
109
- - unsupported/cassandra.rb
110
- - unsupported/fog.rb
111
- - unsupported/test_cassandra.rb
112
- - unsupported/test_rackspace.rb
113
- - unsupported/test_s3.rb
114
117
  - unsupported/test_tokyotyrant.rb
115
118
  - unsupported/tokyotyrant.rb
116
119
  homepage: http://github.com/minad/juno
@@ -140,12 +143,14 @@ summary: A unified interface to key/value stores, including MongoDB, Redis, Toky
140
143
  and ActiveRecord
141
144
  test_files:
142
145
  - test/helper.rb
143
- - test/test_active_record.rb
146
+ - test/test_activerecord.rb
147
+ - test/test_cassandra.rb
144
148
  - test/test_couch.rb
145
149
  - test/test_datamapper.rb
146
150
  - test/test_dbm.rb
147
151
  - test/test_expires.rb
148
152
  - test/test_file.rb
153
+ - test/test_fog.rb
149
154
  - test/test_gdbm.rb
150
155
  - test/test_hashfile.rb
151
156
  - test/test_localmemcache.rb
@@ -154,6 +159,7 @@ test_files:
154
159
  - test/test_memcached_native.rb
155
160
  - test/test_memory.rb
156
161
  - test/test_mongodb.rb
162
+ - test/test_null.rb
157
163
  - test/test_proxy.rb
158
164
  - test/test_pstore.rb
159
165
  - test/test_redis.rb
@@ -161,5 +167,6 @@ test_files:
161
167
  - test/test_sdbm.rb
162
168
  - test/test_sequel.rb
163
169
  - test/test_sqlite.rb
170
+ - test/test_stack.rb
164
171
  - test/test_tokyocabinet.rb
165
172
  - test/test_yaml.rb
@@ -1,15 +0,0 @@
1
- require 'helper'
2
-
3
- begin
4
- describe Juno::Rackspace do
5
- def new_store
6
- Juno::Rackspace.new(:rackspace_username => ENV['RACKSPACE_USERNAME'] || 'mocked',
7
- :rackspace_api_key => ENV['RACKSPACE_APIKEY'] || 'mocked',
8
- :namespace => 'TESTING')
9
- end
10
-
11
- class_eval(&JunoSpecification)
12
- end
13
- rescue LoadError => ex
14
- puts "Juno::Rackspace not tested: #{ex.message}"
15
- end
@@ -1,15 +0,0 @@
1
- require 'helper'
2
-
3
- begin
4
- describe Juno::S3 do
5
- def new_store
6
- Juno::S3.new(:aws_access_key_id => ENV['S3_KEY'] || 'mocked',
7
- :aws_secret_access_key => ENV['S3_SECRET'] || 'mocked',
8
- :namespace => 'TESTING')
9
- end
10
-
11
- class_eval(&JunoSpecification)
12
- end
13
- rescue LoadError => ex
14
- puts "Juno::S3 not tested: #{ex.message}"
15
- end