dm-ferret-adapter 1.1.0 → 1.2.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +7 -7
- data/Rakefile +1 -2
- data/VERSION +1 -1
- data/dm-ferret-adapter.gemspec +22 -27
- data/lib/ferret_adapter/adapter.rb +1 -1
- data/spec/adapter_spec.rb +2 -0
- metadata +83 -39
data/Gemfile
CHANGED
@@ -5,16 +5,16 @@ source 'http://rubygems.org'
|
|
5
5
|
SOURCE = ENV.fetch('SOURCE', :git).to_sym
|
6
6
|
REPO_POSTFIX = SOURCE == :path ? '' : '.git'
|
7
7
|
DATAMAPPER = SOURCE == :path ? Pathname(__FILE__).dirname.parent : 'http://github.com/datamapper'
|
8
|
-
DM_VERSION = '~> 1.
|
8
|
+
DM_VERSION = '~> 1.2.0.rc1'
|
9
9
|
|
10
10
|
gem 'dm-core', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-core#{REPO_POSTFIX}"
|
11
11
|
gem 'ferret', '~> 0.11.6'
|
12
12
|
|
13
13
|
group :development do
|
14
14
|
|
15
|
-
gem 'jeweler', '~> 1.
|
16
|
-
gem 'rake', '~> 0.
|
17
|
-
gem 'rspec', '~> 1.3.
|
15
|
+
gem 'jeweler', '~> 1.6.4'
|
16
|
+
gem 'rake', '~> 0.9.2'
|
17
|
+
gem 'rspec', '~> 1.3.2'
|
18
18
|
gem 'uuidtools', '~> 2.1.2'
|
19
19
|
|
20
20
|
end
|
@@ -22,9 +22,9 @@ end
|
|
22
22
|
platforms :mri_18 do
|
23
23
|
group :quality do
|
24
24
|
|
25
|
-
gem 'rcov', '~> 0.9.
|
26
|
-
gem 'yard', '~> 0.
|
27
|
-
gem 'yardstick', '~> 0.
|
25
|
+
gem 'rcov', '~> 0.9.10'
|
26
|
+
gem 'yard', '~> 0.7.2'
|
27
|
+
gem 'yardstick', '~> 0.4'
|
28
28
|
|
29
29
|
end
|
30
30
|
end
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
|
4
4
|
begin
|
5
|
-
gem 'jeweler', '~> 1.
|
5
|
+
gem 'jeweler', '~> 1.6.4'
|
6
6
|
require 'jeweler'
|
7
7
|
|
8
8
|
Jeweler::Tasks.new do |gem|
|
@@ -12,7 +12,6 @@ begin
|
|
12
12
|
gem.email = 'bernerd [a] wieck [d] com'
|
13
13
|
gem.homepage = 'http://github.com/datamapper/%s' % gem.name
|
14
14
|
gem.authors = [ 'Bernerd Schaefer' ]
|
15
|
-
gem.has_rdoc = 'yard'
|
16
15
|
|
17
16
|
gem.rubyforge_project = 'datamapper'
|
18
17
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0.rc1
|
data/dm-ferret-adapter.gemspec
CHANGED
@@ -4,15 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "1.
|
7
|
+
s.name = "dm-ferret-adapter"
|
8
|
+
s.version = "1.2.0.rc1"
|
9
9
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Bernerd Schaefer"]
|
12
|
-
s.date =
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.email = %q{bernerd [a] wieck [d] com}
|
12
|
+
s.date = "2011-09-09"
|
13
|
+
s.description = "Ferret Adapter for DataMapper"
|
14
|
+
s.email = "bernerd [a] wieck [d] com"
|
16
15
|
s.executables = ["ferret"]
|
17
16
|
s.extra_rdoc_files = [
|
18
17
|
"LICENSE",
|
@@ -39,40 +38,36 @@ Gem::Specification.new do |s|
|
|
39
38
|
"tasks/yard.rake",
|
40
39
|
"tasks/yardstick.rake"
|
41
40
|
]
|
42
|
-
s.homepage =
|
41
|
+
s.homepage = "http://github.com/datamapper/dm-ferret-adapter"
|
43
42
|
s.require_paths = ["lib"]
|
44
|
-
s.rubyforge_project =
|
45
|
-
s.rubygems_version =
|
46
|
-
s.summary =
|
47
|
-
s.test_files = [
|
48
|
-
"spec/adapter_spec.rb",
|
49
|
-
"spec/spec_helper.rb"
|
50
|
-
]
|
43
|
+
s.rubyforge_project = "datamapper"
|
44
|
+
s.rubygems_version = "1.8.10"
|
45
|
+
s.summary = "Ferret Adapter for DataMapper"
|
51
46
|
|
52
47
|
if s.respond_to? :specification_version then
|
53
48
|
s.specification_version = 3
|
54
49
|
|
55
50
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
56
|
-
s.add_runtime_dependency(%q<dm-core>, ["~> 1.
|
51
|
+
s.add_runtime_dependency(%q<dm-core>, ["~> 1.2.0.rc1"])
|
57
52
|
s.add_runtime_dependency(%q<ferret>, ["~> 0.11.6"])
|
58
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.
|
59
|
-
s.add_development_dependency(%q<rake>, ["~> 0.
|
60
|
-
s.add_development_dependency(%q<rspec>, ["~> 1.3.
|
53
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
54
|
+
s.add_development_dependency(%q<rake>, ["~> 0.9.2"])
|
55
|
+
s.add_development_dependency(%q<rspec>, ["~> 1.3.2"])
|
61
56
|
s.add_development_dependency(%q<uuidtools>, ["~> 2.1.2"])
|
62
57
|
else
|
63
|
-
s.add_dependency(%q<dm-core>, ["~> 1.
|
58
|
+
s.add_dependency(%q<dm-core>, ["~> 1.2.0.rc1"])
|
64
59
|
s.add_dependency(%q<ferret>, ["~> 0.11.6"])
|
65
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
66
|
-
s.add_dependency(%q<rake>, ["~> 0.
|
67
|
-
s.add_dependency(%q<rspec>, ["~> 1.3.
|
60
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
61
|
+
s.add_dependency(%q<rake>, ["~> 0.9.2"])
|
62
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.2"])
|
68
63
|
s.add_dependency(%q<uuidtools>, ["~> 2.1.2"])
|
69
64
|
end
|
70
65
|
else
|
71
|
-
s.add_dependency(%q<dm-core>, ["~> 1.
|
66
|
+
s.add_dependency(%q<dm-core>, ["~> 1.2.0.rc1"])
|
72
67
|
s.add_dependency(%q<ferret>, ["~> 0.11.6"])
|
73
|
-
s.add_dependency(%q<jeweler>, ["~> 1.
|
74
|
-
s.add_dependency(%q<rake>, ["~> 0.
|
75
|
-
s.add_dependency(%q<rspec>, ["~> 1.3.
|
68
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
69
|
+
s.add_dependency(%q<rake>, ["~> 0.9.2"])
|
70
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.2"])
|
76
71
|
s.add_dependency(%q<uuidtools>, ["~> 2.1.2"])
|
77
72
|
end
|
78
73
|
end
|
@@ -32,7 +32,7 @@ module DataMapper
|
|
32
32
|
ferret_query = dm_query_to_ferret_query(query)
|
33
33
|
|
34
34
|
@index.search(ferret_query, :limit => query.limit).map do |lazy_doc|
|
35
|
-
|
35
|
+
Hash[ fields.map { |p| [ p, p.typecast(lazy_doc[p.field]) ] } ].update(
|
36
36
|
key.field => key.typecast(lazy_doc[:id])
|
37
37
|
)
|
38
38
|
end
|
data/spec/adapter_spec.rb
CHANGED
metadata
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dm-ferret-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
4
|
+
hash: 15424023
|
5
|
+
prerelease: 6
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
- rc
|
11
|
+
- 1
|
12
|
+
version: 1.2.0.rc1
|
6
13
|
platform: ruby
|
7
14
|
authors:
|
8
15
|
- Bernerd Schaefer
|
@@ -10,75 +17,106 @@ autorequire:
|
|
10
17
|
bindir: bin
|
11
18
|
cert_chain: []
|
12
19
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable: ferret
|
20
|
+
date: 2011-09-09 00:00:00 Z
|
15
21
|
dependencies:
|
16
22
|
- !ruby/object:Gem::Dependency
|
17
|
-
|
18
|
-
|
23
|
+
type: :runtime
|
24
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
19
25
|
none: false
|
20
26
|
requirements:
|
21
27
|
- - ~>
|
22
28
|
- !ruby/object:Gem::Version
|
23
|
-
|
24
|
-
|
29
|
+
hash: 15424023
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 2
|
33
|
+
- 0
|
34
|
+
- rc
|
35
|
+
- 1
|
36
|
+
version: 1.2.0.rc1
|
25
37
|
prerelease: false
|
26
|
-
|
38
|
+
requirement: *id001
|
39
|
+
name: dm-core
|
27
40
|
- !ruby/object:Gem::Dependency
|
28
|
-
|
29
|
-
|
41
|
+
type: :runtime
|
42
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
30
43
|
none: false
|
31
44
|
requirements:
|
32
45
|
- - ~>
|
33
46
|
- !ruby/object:Gem::Version
|
47
|
+
hash: 63
|
48
|
+
segments:
|
49
|
+
- 0
|
50
|
+
- 11
|
51
|
+
- 6
|
34
52
|
version: 0.11.6
|
35
|
-
type: :runtime
|
36
53
|
prerelease: false
|
37
|
-
|
54
|
+
requirement: *id002
|
55
|
+
name: ferret
|
38
56
|
- !ruby/object:Gem::Dependency
|
39
|
-
|
40
|
-
|
57
|
+
type: :development
|
58
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
41
59
|
none: false
|
42
60
|
requirements:
|
43
61
|
- - ~>
|
44
62
|
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
|
63
|
+
hash: 7
|
64
|
+
segments:
|
65
|
+
- 1
|
66
|
+
- 6
|
67
|
+
- 4
|
68
|
+
version: 1.6.4
|
47
69
|
prerelease: false
|
48
|
-
|
70
|
+
requirement: *id003
|
71
|
+
name: jeweler
|
49
72
|
- !ruby/object:Gem::Dependency
|
50
|
-
|
51
|
-
|
73
|
+
type: :development
|
74
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
52
75
|
none: false
|
53
76
|
requirements:
|
54
77
|
- - ~>
|
55
78
|
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
|
79
|
+
hash: 63
|
80
|
+
segments:
|
81
|
+
- 0
|
82
|
+
- 9
|
83
|
+
- 2
|
84
|
+
version: 0.9.2
|
58
85
|
prerelease: false
|
59
|
-
|
86
|
+
requirement: *id004
|
87
|
+
name: rake
|
60
88
|
- !ruby/object:Gem::Dependency
|
61
|
-
|
62
|
-
|
89
|
+
type: :development
|
90
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
63
91
|
none: false
|
64
92
|
requirements:
|
65
93
|
- - ~>
|
66
94
|
- !ruby/object:Gem::Version
|
67
|
-
|
68
|
-
|
95
|
+
hash: 31
|
96
|
+
segments:
|
97
|
+
- 1
|
98
|
+
- 3
|
99
|
+
- 2
|
100
|
+
version: 1.3.2
|
69
101
|
prerelease: false
|
70
|
-
|
102
|
+
requirement: *id005
|
103
|
+
name: rspec
|
71
104
|
- !ruby/object:Gem::Dependency
|
72
|
-
|
73
|
-
|
105
|
+
type: :development
|
106
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
74
107
|
none: false
|
75
108
|
requirements:
|
76
109
|
- - ~>
|
77
110
|
- !ruby/object:Gem::Version
|
111
|
+
hash: 15
|
112
|
+
segments:
|
113
|
+
- 2
|
114
|
+
- 1
|
115
|
+
- 2
|
78
116
|
version: 2.1.2
|
79
|
-
type: :development
|
80
117
|
prerelease: false
|
81
|
-
|
118
|
+
requirement: *id006
|
119
|
+
name: uuidtools
|
82
120
|
description: Ferret Adapter for DataMapper
|
83
121
|
email: bernerd [a] wieck [d] com
|
84
122
|
executables:
|
@@ -108,7 +146,6 @@ files:
|
|
108
146
|
- tasks/spec.rake
|
109
147
|
- tasks/yard.rake
|
110
148
|
- tasks/yardstick.rake
|
111
|
-
has_rdoc: true
|
112
149
|
homepage: http://github.com/datamapper/dm-ferret-adapter
|
113
150
|
licenses: []
|
114
151
|
|
@@ -122,20 +159,27 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
122
159
|
requirements:
|
123
160
|
- - ">="
|
124
161
|
- !ruby/object:Gem::Version
|
162
|
+
hash: 3
|
163
|
+
segments:
|
164
|
+
- 0
|
125
165
|
version: "0"
|
126
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
167
|
none: false
|
128
168
|
requirements:
|
129
|
-
- - "
|
169
|
+
- - ">"
|
130
170
|
- !ruby/object:Gem::Version
|
131
|
-
|
171
|
+
hash: 25
|
172
|
+
segments:
|
173
|
+
- 1
|
174
|
+
- 3
|
175
|
+
- 1
|
176
|
+
version: 1.3.1
|
132
177
|
requirements: []
|
133
178
|
|
134
179
|
rubyforge_project: datamapper
|
135
|
-
rubygems_version: 1.
|
180
|
+
rubygems_version: 1.8.10
|
136
181
|
signing_key:
|
137
182
|
specification_version: 3
|
138
183
|
summary: Ferret Adapter for DataMapper
|
139
|
-
test_files:
|
140
|
-
|
141
|
-
- spec/spec_helper.rb
|
184
|
+
test_files: []
|
185
|
+
|