dm-rinda-adapter 0.1.0 → 0.1.2
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/.gemtest +0 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +21 -0
- data/History.txt +13 -0
- data/{Manifest → Manifest.txt} +6 -1
- data/README.rdoc +63 -0
- data/Rakefile +24 -42
- data/dm-rinda-adapter.gemspec +4 -1
- data/lib/rinda-patch.rb +1 -0
- data/lib/rinda_adapter.rb +10 -2
- data/spec/legacy/adapter_shared_spec.rb +1 -1
- metadata +55 -21
data/.gemtest
ADDED
File without changes
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
addressable (2.2.6)
|
5
|
+
dm-core (0.10.2)
|
6
|
+
addressable (~> 2.1)
|
7
|
+
extlib (~> 0.9.14)
|
8
|
+
extlib (0.9.15)
|
9
|
+
hoe (2.9.6)
|
10
|
+
rake (~> 0.8)
|
11
|
+
rake (0.9.2)
|
12
|
+
rspec (1.3.1)
|
13
|
+
|
14
|
+
PLATFORMS
|
15
|
+
ruby
|
16
|
+
|
17
|
+
DEPENDENCIES
|
18
|
+
dm-core (= 0.10.2)
|
19
|
+
hoe (= 2.9.6)
|
20
|
+
rake (= 0.9.2)
|
21
|
+
rspec (= 1.3.1)
|
data/History.txt
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
=== 0.1.0 / 2011-06-30
|
2
|
+
|
3
|
+
* First version
|
4
|
+
|
5
|
+
=== 0.1.1 / 2011-11-01
|
6
|
+
|
7
|
+
* switched to Hoe for gem packaging
|
8
|
+
* fixed unknown symbol error that happens if a model is part of a query result but not known
|
9
|
+
|
10
|
+
=== 0.1.2 / 2011-11-01
|
11
|
+
|
12
|
+
* 0.1.1 was created without History and Manifest files
|
13
|
+
|
data/{Manifest → Manifest.txt}
RENAMED
data/README.rdoc
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
= dm-rinda-adapter
|
2
|
+
|
3
|
+
* http://github.com/sfeu/dm-rinda-adapter
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
The dm-rinda-adapter project implements an datamapper interface for
|
8
|
+
storing records in the rinda tuple space.
|
9
|
+
|
10
|
+
The adpater has only tested with datamapper 0.10.2 so far.
|
11
|
+
|
12
|
+
== FEATURES/PROBLEMS:
|
13
|
+
|
14
|
+
Please consider the current version as software that is still not finished.
|
15
|
+
|
16
|
+
Currently we can only say that "it works for us"...
|
17
|
+
|
18
|
+
We are using this datamapper to coordinate difefrent media and modes
|
19
|
+
of multimodal user interfaces with the Multimodal INTeraction framework (MINT).
|
20
|
+
|
21
|
+
See http://www.multi-access.de
|
22
|
+
|
23
|
+
Please not that these adapter exends the Datamapper adapter API with
|
24
|
+
a proprietary wait and notfiy functionality to reflect the idea of
|
25
|
+
a tuple space to subscribe for data changes.
|
26
|
+
|
27
|
+
== SYNOPSIS:
|
28
|
+
|
29
|
+
(sorry - we will add later)
|
30
|
+
|
31
|
+
== REQUIREMENTS:
|
32
|
+
|
33
|
+
Requires datamapper version 0.10.2, see http://datamapper.org
|
34
|
+
|
35
|
+
== INSTALL:
|
36
|
+
|
37
|
+
sudo gem install dm-rinda-adapter
|
38
|
+
|
39
|
+
== LICENSE:
|
40
|
+
|
41
|
+
Licensed under the Lesser/Library GPL v2.1 or any version above.
|
42
|
+
|
43
|
+
Copyright (c) 2011 Sebastian Feuerstack
|
44
|
+
|
45
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
46
|
+
a copy of this software and associated documentation files (the
|
47
|
+
'Software'), to deal in the Software without restriction, including
|
48
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
49
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
50
|
+
permit persons to whom the Software is furnished to do so, subject to
|
51
|
+
the following conditions:
|
52
|
+
|
53
|
+
The above copyright notice and this permission notice shall be
|
54
|
+
included in all copies or substantial portions of the Software.
|
55
|
+
|
56
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
57
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
58
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
59
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
60
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
61
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
62
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
63
|
+
|
data/Rakefile
CHANGED
@@ -1,47 +1,29 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require '
|
3
|
-
require 'echoe'
|
2
|
+
require 'hoe'
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
# Hoe.plugin :compiler
|
5
|
+
# Hoe.plugin :cucumberfeatures
|
6
|
+
# Hoe.plugin :gem_prelude_sucks
|
7
|
+
# Hoe.plugin :inline
|
8
|
+
# Hoe.plugin :manifest
|
9
|
+
Hoe.plugin :newgem
|
10
|
+
# Hoe.plugin :racc
|
11
|
+
# Hoe.plugin :rubyforge
|
12
|
+
# Hoe.plugin :website
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
p.ignore_pattern = ["tmp/*", "script/*","#*.*#"]
|
20
|
-
p.development_dependencies = []
|
21
|
-
p.need_tar_gz = false
|
22
|
-
p.need_tgz = false
|
23
|
-
end
|
14
|
+
Hoe.spec 'dm-rinda-adapter' do
|
15
|
+
self.developer 'Sebastian Feuerstack', 'Sebastian@Feuerstack.org'
|
16
|
+
self.rubyforge_name = self.name # TODO this is default value
|
17
|
+
self.extra_deps = [['dm-core','~> 0.10.2']]
|
18
|
+
self.email = "Sebastian@Feuerstack.org"
|
24
19
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
33
|
-
|
34
|
-
desc 'Default: Run Specs'
|
35
|
-
task :default => :spec
|
36
|
-
|
37
|
-
desc 'Run all tests'
|
38
|
-
task :test => :spec
|
39
|
-
|
40
|
-
end
|
41
|
-
|
42
|
-
with_gem 'yard' do
|
43
|
-
desc "Generate Yardoc"
|
44
|
-
YARD::Rake::YardocTask.new do |t|
|
45
|
-
t.files = ['lib/**/*.rb', 'README.markdown']
|
46
|
-
end
|
20
|
+
# HEY! If you fill these out in ~/.hoe_template/Rakefile.erb then
|
21
|
+
# you'll never have to touch them again!
|
22
|
+
# (delete this comment too, of course)
|
23
|
+
|
24
|
+
# developer('FIX', 'FIX@example.com')
|
25
|
+
|
26
|
+
# self.rubyforge_name = 'scxml-gemx' # if different than 'scxml-gem'
|
47
27
|
end
|
28
|
+
|
29
|
+
# vim: syntax=ruby
|
data/dm-rinda-adapter.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [%q{Sebastian Feuerstack}]
|
9
|
-
s.date = %q{2011-
|
9
|
+
s.date = %q{2011-08-08}
|
10
10
|
s.description = %q{A datamapper adapter to connect to a rinda tuplespace}
|
11
11
|
s.email = %q{sebastian @nospam@ feuerstack.de}
|
12
12
|
s.extra_rdoc_files = [%q{lib/rinda-patch.rb}, %q{lib/rinda_adapter.rb}]
|
@@ -22,8 +22,11 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.specification_version = 3
|
23
23
|
|
24
24
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
25
|
+
s.add_runtime_dependency(%q<dm-core>, ["~> 0.10.2"])
|
25
26
|
else
|
27
|
+
s.add_dependency(%q<dm-core>, ["~> 0.10.2"])
|
26
28
|
end
|
27
29
|
else
|
30
|
+
s.add_dependency(%q<dm-core>, ["~> 0.10.2"])
|
28
31
|
end
|
29
32
|
end
|
data/lib/rinda-patch.rb
CHANGED
data/lib/rinda_adapter.rb
CHANGED
@@ -49,6 +49,8 @@ module DataMapper
|
|
49
49
|
# budding adapter developers, so it is critical that it remains well documented
|
50
50
|
# and up to date.
|
51
51
|
class RindaAdapter < AbstractAdapter
|
52
|
+
VERSION = "0.1.2"
|
53
|
+
|
52
54
|
#include MonitorMixin
|
53
55
|
|
54
56
|
# Used by DataMapper to put records into a data-store: "INSERT" in SQL-speak.
|
@@ -129,19 +131,25 @@ module DataMapper
|
|
129
131
|
DataMapper.logger << "result #{result.inspect}"
|
130
132
|
#Kernel.const_get(s)
|
131
133
|
|
134
|
+
|
132
135
|
query.fields.each do |property|
|
133
136
|
if (property.type == DataMapper::Types::Discriminator)
|
134
137
|
|
135
138
|
key = property.name.to_s
|
136
139
|
result.each do |entry|
|
140
|
+
begin
|
137
141
|
entry[key]=eval(entry[key].to_s)
|
142
|
+
rescue NameError => e
|
143
|
+
DataMapper.logger << "unknown symbol #{e.to_s}"
|
144
|
+
end
|
145
|
+
|
138
146
|
end
|
139
147
|
end
|
140
148
|
end
|
141
149
|
# DataMapper.logger << "result after transformation of discriminators #{result.inspect}"
|
142
|
-
|
143
150
|
query.filter_records(result)
|
144
|
-
|
151
|
+
|
152
|
+
end
|
145
153
|
|
146
154
|
# Used by DataMapper to update the attributes on existing records in a
|
147
155
|
# data-store: "UPDATE" in SQL-speak. It takes a hash of the attributes
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-rinda-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sebastian Feuerstack
|
@@ -15,21 +15,60 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
dependencies:
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
date: 2011-11-01 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: dm-core
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ~>
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 51
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 10
|
32
|
+
- 2
|
33
|
+
version: 0.10.2
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: hoe
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 17
|
45
|
+
segments:
|
46
|
+
- 2
|
47
|
+
- 9
|
48
|
+
version: "2.9"
|
49
|
+
type: :development
|
50
|
+
version_requirements: *id002
|
51
|
+
description: |-
|
52
|
+
The dm-rinda-adapter project implements an datamapper interface for
|
53
|
+
storing records in the rinda tuple space.
|
54
|
+
|
55
|
+
The adpater has only tested with datamapper 0.10.2 so far.
|
56
|
+
email: Sebastian@Feuerstack.org
|
23
57
|
executables: []
|
24
58
|
|
25
59
|
extensions: []
|
26
60
|
|
27
61
|
extra_rdoc_files:
|
28
|
-
-
|
29
|
-
-
|
62
|
+
- History.txt
|
63
|
+
- Manifest.txt
|
30
64
|
files:
|
31
|
-
-
|
65
|
+
- Gemfile
|
66
|
+
- Gemfile.lock
|
67
|
+
- History.txt
|
68
|
+
- Manifest.txt
|
69
|
+
- README.rdoc
|
32
70
|
- Rakefile
|
71
|
+
- dm-rinda-adapter.gemspec
|
33
72
|
- lib/rinda-patch.rb
|
34
73
|
- lib/rinda_adapter.rb
|
35
74
|
- spec/legacy/README
|
@@ -44,16 +83,12 @@ files:
|
|
44
83
|
- spec/rinda-adapter_spec.rb
|
45
84
|
- spec/spec.opts
|
46
85
|
- spec/spec_helper.rb
|
47
|
-
-
|
86
|
+
- .gemtest
|
48
87
|
homepage: http://github.com/sfeu/dm-rinda-adapter
|
49
88
|
licenses: []
|
50
89
|
|
51
90
|
post_install_message:
|
52
91
|
rdoc_options:
|
53
|
-
- --line-numbers
|
54
|
-
- --inline-source
|
55
|
-
- --title
|
56
|
-
- Dm-rinda-adapter
|
57
92
|
- --main
|
58
93
|
- README.rdoc
|
59
94
|
require_paths:
|
@@ -72,17 +107,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
107
|
requirements:
|
73
108
|
- - ">="
|
74
109
|
- !ruby/object:Gem::Version
|
75
|
-
hash:
|
110
|
+
hash: 3
|
76
111
|
segments:
|
77
|
-
-
|
78
|
-
|
79
|
-
version: "1.2"
|
112
|
+
- 0
|
113
|
+
version: "0"
|
80
114
|
requirements: []
|
81
115
|
|
82
116
|
rubyforge_project: dm-rinda-adapter
|
83
117
|
rubygems_version: 1.8.5
|
84
118
|
signing_key:
|
85
119
|
specification_version: 3
|
86
|
-
summary:
|
120
|
+
summary: The dm-rinda-adapter project implements an datamapper interface for storing records in the rinda tuple space
|
87
121
|
test_files: []
|
88
122
|
|