rkv 0.0.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.
- data/.gitignore +21 -0
- data/README.rdoc +50 -0
- data/Rakefile +63 -0
- data/VERSION +1 -0
- data/rkv.gemspec +46 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +11 -0
- metadata +61 -0
data/.gitignore
ADDED
data/README.rdoc
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
rkv - Ruby Key Value - an adapter on top of various key-value stores
|
2
|
+
|
3
|
+
== Install
|
4
|
+
|
5
|
+
Installing the gem:
|
6
|
+
|
7
|
+
gem install rkv
|
8
|
+
|
9
|
+
|
10
|
+
== Usage
|
11
|
+
|
12
|
+
require 'rubygems'
|
13
|
+
require 'rkv'
|
14
|
+
|
15
|
+
client = Rkv::Store.new(:cassandra, { :servers => ['127.0.0.1:9160'], :keyspace => "Blog" })
|
16
|
+
store = client[:Users]
|
17
|
+
|
18
|
+
store["5"] = { :name => "Dev Random", :role => "admin" }
|
19
|
+
puts store["3"].inspect
|
20
|
+
|
21
|
+
store.batch do
|
22
|
+
store[id1] = { :name => "John Doe" }
|
23
|
+
store[id2] = { :name => "Jane Doe" }
|
24
|
+
end
|
25
|
+
|
26
|
+
store = client[:UserRelationships]
|
27
|
+
store[id1, "posts"] = post_id1
|
28
|
+
|
29
|
+
== Notes
|
30
|
+
|
31
|
+
Keystores have different features. Operations are mapped to the best of the keystore ability, but some operations may be less efficient or impossible in certain keystores.
|
32
|
+
|
33
|
+
== Documentation
|
34
|
+
|
35
|
+
RDoc: http://rdoc.info/projects/devrandom/rkv
|
36
|
+
|
37
|
+
== Supported KV stores
|
38
|
+
|
39
|
+
* Cassandra
|
40
|
+
|
41
|
+
== Planned KV stores
|
42
|
+
|
43
|
+
* Keyspace
|
44
|
+
* Voldemort
|
45
|
+
* Redis
|
46
|
+
|
47
|
+
== Roadmap
|
48
|
+
|
49
|
+
* Create a keystore feature support matrix
|
50
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "rkv"
|
8
|
+
gem.summary = %Q{Ruby Key Value - an adapter on top of various key-value stores}
|
9
|
+
gem.description = %Q{Ruby Key Value - an adapter on top of various key-value stores, supporting Cassandra and others}
|
10
|
+
gem.email = "c1.github@niftybox.net"
|
11
|
+
gem.homepage = "http://github.com/devrandom/rkv"
|
12
|
+
gem.authors = ["Miron Cuperman"]
|
13
|
+
end
|
14
|
+
Jeweler::GemcutterTasks.new
|
15
|
+
rescue LoadError
|
16
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'spec/rake/spectask'
|
20
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
21
|
+
spec.libs << 'lib' << 'spec'
|
22
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
23
|
+
end
|
24
|
+
|
25
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
26
|
+
spec.libs << 'lib' << 'spec'
|
27
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
28
|
+
spec.rcov = true
|
29
|
+
end
|
30
|
+
|
31
|
+
task :spec => :check_dependencies
|
32
|
+
|
33
|
+
task :default => :spec
|
34
|
+
|
35
|
+
desc "release with no version change"
|
36
|
+
task :dist => [:clean, :release]
|
37
|
+
|
38
|
+
namespace :dist do
|
39
|
+
desc "release patch"
|
40
|
+
task :patch => [:clean, "version:bump:patch", :release]
|
41
|
+
desc "release with minor version bump"
|
42
|
+
task :minor => [:clean, "version:bump:minor", :release]
|
43
|
+
end
|
44
|
+
|
45
|
+
desc "build gem into pkg directory"
|
46
|
+
task :gem => [:build]
|
47
|
+
|
48
|
+
task :clean do
|
49
|
+
Dir.glob("**/*~").each do |file|
|
50
|
+
File.unlink file
|
51
|
+
end
|
52
|
+
puts "cleaned"
|
53
|
+
end
|
54
|
+
|
55
|
+
require 'rake/rdoctask'
|
56
|
+
Rake::RDocTask.new do |rdoc|
|
57
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
58
|
+
|
59
|
+
rdoc.rdoc_dir = 'rdoc'
|
60
|
+
rdoc.title = "rkv #{version}"
|
61
|
+
rdoc.rdoc_files.include('README*')
|
62
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
63
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
data/rkv.gemspec
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{rkv}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Miron Cuperman"]
|
12
|
+
s.date = %q{2010-01-09}
|
13
|
+
s.description = %q{Ruby Key Value - an adapter on top of various key-value stores, supporting Cassandra and others}
|
14
|
+
s.email = %q{c1.github@niftybox.net}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README.rdoc"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
".gitignore",
|
20
|
+
"README.rdoc",
|
21
|
+
"Rakefile",
|
22
|
+
"VERSION",
|
23
|
+
"rkv.gemspec",
|
24
|
+
"spec/spec.opts",
|
25
|
+
"spec/spec_helper.rb"
|
26
|
+
]
|
27
|
+
s.homepage = %q{http://github.com/devrandom/rkv}
|
28
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
29
|
+
s.require_paths = ["lib"]
|
30
|
+
s.rubygems_version = %q{1.3.5}
|
31
|
+
s.summary = %q{Ruby Key Value - an adapter on top of various key-value stores}
|
32
|
+
s.test_files = [
|
33
|
+
"spec/spec_helper.rb"
|
34
|
+
]
|
35
|
+
|
36
|
+
if s.respond_to? :specification_version then
|
37
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
38
|
+
s.specification_version = 3
|
39
|
+
|
40
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
41
|
+
else
|
42
|
+
end
|
43
|
+
else
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
data/spec/spec.opts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,61 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rkv
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Miron Cuperman
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-01-09 00:00:00 -08:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: Ruby Key Value - an adapter on top of various key-value stores, supporting Cassandra and others
|
17
|
+
email: c1.github@niftybox.net
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README.rdoc
|
24
|
+
files:
|
25
|
+
- .gitignore
|
26
|
+
- README.rdoc
|
27
|
+
- Rakefile
|
28
|
+
- VERSION
|
29
|
+
- rkv.gemspec
|
30
|
+
- spec/spec.opts
|
31
|
+
- spec/spec_helper.rb
|
32
|
+
has_rdoc: true
|
33
|
+
homepage: http://github.com/devrandom/rkv
|
34
|
+
licenses: []
|
35
|
+
|
36
|
+
post_install_message:
|
37
|
+
rdoc_options:
|
38
|
+
- --charset=UTF-8
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: "0"
|
46
|
+
version:
|
47
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: "0"
|
52
|
+
version:
|
53
|
+
requirements: []
|
54
|
+
|
55
|
+
rubyforge_project:
|
56
|
+
rubygems_version: 1.3.5
|
57
|
+
signing_key:
|
58
|
+
specification_version: 3
|
59
|
+
summary: Ruby Key Value - an adapter on top of various key-value stores
|
60
|
+
test_files:
|
61
|
+
- spec/spec_helper.rb
|