persistence-adapter-kyotocabinet 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,14 @@
1
+
2
+ class ::Persistence::Adapter::KyotoCabinet::Marshal
3
+
4
+ include ::Persistence::Adapter::KyotoCabinet::AdapterInterface
5
+
6
+ SerializationClass = ::Marshal
7
+ SerializationMethod = :dump
8
+ UnserializationMethod = :load
9
+ StringifyClassnames = false
10
+ FileContentsAreTextNotBinary = false
11
+ SerializationExtension = '.ruby_marshal.bin'
12
+
13
+ end
14
+
@@ -0,0 +1,14 @@
1
+
2
+ class ::Persistence::Adapter::KyotoCabinet::YAML
3
+
4
+ include ::Persistence::Adapter::KyotoCabinet::AdapterInterface
5
+
6
+ SerializationClass = ::YAML
7
+ SerializationMethod = :dump
8
+ UnserializationMethod = :load
9
+ StringifyClassnames = true
10
+ FileContentsAreTextNotBinary = true
11
+ SerializationExtension = '.yaml'
12
+
13
+ end
14
+
@@ -0,0 +1,10 @@
1
+
2
+ class ::Persistence::Adapter::KyotoCabinet
3
+ class Cursor
4
+ end
5
+ class Bucket
6
+ class Index
7
+ end
8
+ end
9
+ end
10
+
@@ -0,0 +1,28 @@
1
+
2
+ basepath = 'kyotocabinet'
3
+
4
+ files = [
5
+
6
+ 'database_support',
7
+
8
+ 'bucket/index/index_interface',
9
+ 'bucket/index',
10
+
11
+ 'bucket/bucket_interface',
12
+ 'bucket',
13
+
14
+ 'cursor/cursor_interface',
15
+ 'cursor',
16
+
17
+ 'adapter_interface',
18
+
19
+ 'marshal',
20
+ 'yaml'
21
+
22
+ ]
23
+
24
+ files.each do |this_file|
25
+ require_relative( File.join( basepath, this_file ) + '.rb' )
26
+ end
27
+
28
+ require_relative( basepath + '.rb' )
@@ -0,0 +1,25 @@
1
+
2
+ require_relative '../../../../lib/persistence/adapter/kyotocabinet.rb'
3
+
4
+ describe ::Persistence::Adapter::KyotoCabinet::Cursor do
5
+
6
+ temp_test_path = "/tmp/persistence-kyotocabinet"
7
+
8
+ ::FileUtils.rm_rf( temp_test_path ) if ::Dir.exist?( temp_test_path )
9
+
10
+ $__persistence__spec__adapter__ = ::Persistence::Adapter::KyotoCabinet.new( temp_test_path )
11
+
12
+ # we have to specify a serialization class; we use Marshal for our example
13
+ unless $__persistence__spec__development__initialized_kc
14
+ class ::Persistence::Adapter::KyotoCabinet
15
+ SerializationClass = ::Marshal
16
+ SerializationMethod = :dump
17
+ UnserializationMethod = :load
18
+ end
19
+ $__persistence__spec__development__initialized_kc = true
20
+ end
21
+
22
+ # adapter spec
23
+ require_relative File.join( ::Persistence::Adapter::Abstract.spec_location, 'Cursor_spec.rb' )
24
+
25
+ end
@@ -0,0 +1,15 @@
1
+
2
+ require_relative '../../../../lib/persistence/adapter/kyotocabinet.rb'
3
+
4
+ describe ::Persistence::Adapter::KyotoCabinet::Marshal do
5
+
6
+ temp_test_path = "/tmp/persistence-kyotocabinet"
7
+
8
+ ::FileUtils.rm_rf( temp_test_path ) if ::Dir.exist?( temp_test_path )
9
+
10
+ $__persistence__spec__adapter__ = ::Persistence::Adapter::KyotoCabinet::Marshal.new( temp_test_path )
11
+
12
+ # adapter spec
13
+ require_relative File.join( ::Persistence::Adapter::Abstract.spec_location, 'Adapter_spec.rb' )
14
+
15
+ end
@@ -0,0 +1,15 @@
1
+
2
+ require_relative '../../../../lib/persistence/adapter/kyotocabinet.rb'
3
+
4
+ describe ::Persistence::Adapter::KyotoCabinet::YAML do
5
+
6
+ temp_test_path = "/tmp/persistence-kyotocabinet"
7
+
8
+ ::FileUtils.rm_rf( temp_test_path ) if ::Dir.exist?( temp_test_path )
9
+
10
+ $__persistence__spec__adapter__ = ::Persistence::Adapter::KyotoCabinet::YAML.new( temp_test_path )
11
+
12
+ # adapter spec
13
+ require_relative File.join( ::Persistence::Adapter::Abstract.spec_location, 'Adapter_spec.rb' )
14
+
15
+ end
@@ -0,0 +1,25 @@
1
+
2
+ require_relative '../../../lib/persistence/adapter/kyotocabinet.rb'
3
+
4
+ describe ::Persistence::Adapter::KyotoCabinet do
5
+
6
+ temp_test_path = "/tmp/persistence-kyotocabinet"
7
+
8
+ ::FileUtils.rm_rf( temp_test_path ) if ::Dir.exist?( temp_test_path )
9
+
10
+ $__persistence__spec__adapter__ = ::Persistence::Adapter::KyotoCabinet.new( temp_test_path )
11
+
12
+ # we have to specify a serialization class; we use Marshal for our example
13
+ unless $__persistence__spec__development__initialized_kc
14
+ class ::Persistence::Adapter::KyotoCabinet
15
+ SerializationClass = ::Marshal
16
+ SerializationMethod = :dump
17
+ UnserializationMethod = :load
18
+ end
19
+ $__persistence__spec__development__initialized_kc = true
20
+ end
21
+
22
+ # adapter spec
23
+ require_relative File.join( ::Persistence::Adapter::Abstract.spec_location, 'Adapter_spec.rb' )
24
+
25
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: persistence-adapter-kyotocabinet
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Asher
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-06-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: persistence
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ description: Implements necessary methods to run Persistence on top of Kyoto Cabinet.
31
+ email: asher@ridiculouspower.com
32
+ executables: []
33
+ extensions: []
34
+ extra_rdoc_files: []
35
+ files:
36
+ - lib/persistence/adapter/kyotocabinet/adapter_interface.rb
37
+ - lib/persistence/adapter/kyotocabinet/bucket/bucket_interface.rb
38
+ - lib/persistence/adapter/kyotocabinet/bucket/index/index_interface.rb
39
+ - lib/persistence/adapter/kyotocabinet/bucket/index.rb
40
+ - lib/persistence/adapter/kyotocabinet/bucket.rb
41
+ - lib/persistence/adapter/kyotocabinet/cursor/cursor_interface.rb
42
+ - lib/persistence/adapter/kyotocabinet/cursor.rb
43
+ - lib/persistence/adapter/kyotocabinet/database_support.rb
44
+ - lib/persistence/adapter/kyotocabinet/marshal.rb
45
+ - lib/persistence/adapter/kyotocabinet/yaml.rb
46
+ - lib/persistence/adapter/kyotocabinet.rb
47
+ - lib/persistence/adapter/namespaces.rb
48
+ - lib/persistence/adapter/requires.rb
49
+ - spec/Persistence/Adapter/kyotocabinet/cursor_spec.rb
50
+ - spec/Persistence/Adapter/kyotocabinet/marshal_spec.rb
51
+ - spec/Persistence/Adapter/kyotocabinet/yaml_spec.rb
52
+ - spec/Persistence/Adapter/kyotocabinet_spec.rb
53
+ - README.md
54
+ - CHANGELOG.rdoc
55
+ homepage: http://rubygems.org/gems/persistence-adapter-kyotocabinet
56
+ licenses: []
57
+ post_install_message:
58
+ rdoc_options: []
59
+ require_paths:
60
+ - lib
61
+ required_ruby_version: !ruby/object:Gem::Requirement
62
+ none: false
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ required_rubygems_version: !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ! '>='
71
+ - !ruby/object:Gem::Version
72
+ version: '0'
73
+ requirements: []
74
+ rubyforge_project: persistence-adapter-kyotocabinet
75
+ rubygems_version: 1.8.23
76
+ signing_key:
77
+ specification_version: 3
78
+ summary: Adapter to use KyotoCabinet as storage port for Persistence.
79
+ test_files: []
80
+ has_rdoc: