dm-ferret-adapter 1.1.0.rc2 → 1.1.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/dm-ferret-adapter.gemspec +6 -6
- data/lib/ferret_adapter/adapter.rb +2 -2
- metadata +4 -4
data/Gemfile
CHANGED
@@ -5,7 +5,7 @@ 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.1.0.
|
8
|
+
DM_VERSION = '~> 1.1.0.rc3'
|
9
9
|
|
10
10
|
gem 'dm-core', DM_VERSION, SOURCE => "#{DATAMAPPER}/dm-core#{REPO_POSTFIX}"
|
11
11
|
gem 'ferret', '~> 0.11.6'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.0.
|
1
|
+
1.1.0.rc3
|
data/dm-ferret-adapter.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{dm-ferret-adapter}
|
8
|
-
s.version = "1.1.0.
|
8
|
+
s.version = "1.1.0.rc3"
|
9
9
|
|
10
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 = %q{2011-03-
|
12
|
+
s.date = %q{2011-03-10}
|
13
13
|
s.default_executable = %q{ferret}
|
14
14
|
s.description = %q{Ferret Adapter for DataMapper}
|
15
15
|
s.email = %q{bernerd [a] wieck [d] com}
|
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
|
|
42
42
|
s.homepage = %q{http://github.com/datamapper/dm-ferret-adapter}
|
43
43
|
s.require_paths = ["lib"]
|
44
44
|
s.rubyforge_project = %q{datamapper}
|
45
|
-
s.rubygems_version = %q{1.
|
45
|
+
s.rubygems_version = %q{1.6.2}
|
46
46
|
s.summary = %q{Ferret Adapter for DataMapper}
|
47
47
|
s.test_files = [
|
48
48
|
"spec/adapter_spec.rb",
|
@@ -53,14 +53,14 @@ Gem::Specification.new do |s|
|
|
53
53
|
s.specification_version = 3
|
54
54
|
|
55
55
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
56
|
-
s.add_runtime_dependency(%q<dm-core>, ["~> 1.1.0.
|
56
|
+
s.add_runtime_dependency(%q<dm-core>, ["~> 1.1.0.rc3"])
|
57
57
|
s.add_runtime_dependency(%q<ferret>, ["~> 0.11.6"])
|
58
58
|
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
59
59
|
s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
|
60
60
|
s.add_development_dependency(%q<rspec>, ["~> 1.3.1"])
|
61
61
|
s.add_development_dependency(%q<uuidtools>, ["~> 2.1.2"])
|
62
62
|
else
|
63
|
-
s.add_dependency(%q<dm-core>, ["~> 1.1.0.
|
63
|
+
s.add_dependency(%q<dm-core>, ["~> 1.1.0.rc3"])
|
64
64
|
s.add_dependency(%q<ferret>, ["~> 0.11.6"])
|
65
65
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
66
66
|
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
@@ -68,7 +68,7 @@ Gem::Specification.new do |s|
|
|
68
68
|
s.add_dependency(%q<uuidtools>, ["~> 2.1.2"])
|
69
69
|
end
|
70
70
|
else
|
71
|
-
s.add_dependency(%q<dm-core>, ["~> 1.1.0.
|
71
|
+
s.add_dependency(%q<dm-core>, ["~> 1.1.0.rc3"])
|
72
72
|
s.add_dependency(%q<ferret>, ["~> 0.11.6"])
|
73
73
|
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
74
74
|
s.add_dependency(%q<rake>, ["~> 0.8.7"])
|
@@ -12,7 +12,7 @@ module DataMapper
|
|
12
12
|
|
13
13
|
def create(resources)
|
14
14
|
resources.each do |resource|
|
15
|
-
attributes = resource.attributes(:field)
|
15
|
+
attributes = DataMapper::Ext::Hash.to_mash(resource.attributes(:field))
|
16
16
|
|
17
17
|
# Since we don't inspect the models before generating the indices,
|
18
18
|
# we'll map the resource's key to the :id column.
|
@@ -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
|
-
fields.map { |p| [ p, p.typecast(lazy_doc[p.field]) ] }.
|
35
|
+
DataMapper::Ext::Array.to_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
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: dm-ferret-adapter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease: 6
|
5
|
-
version: 1.1.0.
|
5
|
+
version: 1.1.0.rc3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Bernerd Schaefer
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-03-
|
13
|
+
date: 2011-03-10 00:00:00 -08:00
|
14
14
|
default_executable: ferret
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.1.0.
|
23
|
+
version: 1.1.0.rc3
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: *id001
|
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
132
|
requirements: []
|
133
133
|
|
134
134
|
rubyforge_project: datamapper
|
135
|
-
rubygems_version: 1.
|
135
|
+
rubygems_version: 1.6.2
|
136
136
|
signing_key:
|
137
137
|
specification_version: 3
|
138
138
|
summary: Ferret Adapter for DataMapper
|