solr_mapper 0.1.9 → 0.1.91

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -1,5 +1,4 @@
1
1
  LICENSE.txt
2
- Manifest
3
2
  README.rdoc
4
3
  Rakefile
5
4
  lib/solr_mapper.rb
@@ -7,7 +6,6 @@ lib/solr_mapper/calculations.rb
7
6
  lib/solr_mapper/locators.rb
8
7
  lib/solr_mapper/relations.rb
9
8
  lib/solr_mapper/solr_document.rb
10
- solr_mapper.gemspec
11
9
  spec/base.rb
12
10
  spec/calculations_spec.rb
13
11
  spec/facets_spec.rb
@@ -21,3 +19,4 @@ spec/solr/stuff/config/schema.xml
21
19
  spec/solr/thing/config/schema.xml
22
20
  spec/solr/widget/conf/schema.xml
23
21
  spec/url_spec.rb
22
+ Manifest
data/Rakefile CHANGED
@@ -16,7 +16,7 @@ require 'rubygems'
16
16
  require 'rake'
17
17
  require 'echoe'
18
18
 
19
- Echoe.new('solr_mapper', '0.1.9') do |p|
19
+ Echoe.new('solr_mapper', '0.1.91') do |p|
20
20
  p.description = "Object Document Mapper for the Apache Foundation's Solr search platform"
21
21
  p.url = "http://github.com/skunkworx/solr_mapper"
22
22
  p.author = "Chris Umbel"
data/lib/solr_mapper.rb CHANGED
@@ -19,6 +19,7 @@ end
19
19
  require 'rest_client'
20
20
  require 'builder'
21
21
  require 'will_paginate'
22
+ require 'will_paginate/collection'
22
23
  require 'active_support/inflector'
23
24
  require 'active_support/hash_with_indifferent_access'
24
25
 
@@ -179,16 +179,15 @@ module SolrMapper
179
179
  objs
180
180
  end
181
181
 
182
-
183
182
  def send_update(data, opts = nil)
184
183
  solr_resource = RestClient::Resource.new(build_url('update', opts))
185
- solr_resource.post(data, {:content_type => 'text/xml'})
184
+ solr_resource.post(data, {:content_type => 'text/xml'}).inspect
186
185
  end
187
186
  end
188
187
 
189
188
  attr_accessor :_id
190
189
 
191
- # the property doesn't exist for this document. add it now.
190
+ # property doesn't exist yet. create it on demand.
192
191
  def method_missing(m, *args, &block)
193
192
  method_name = m.to_s
194
193
  assignment = method_name.match(/\=$/)
@@ -206,7 +205,7 @@ module SolrMapper
206
205
  end
207
206
 
208
207
  self.class.execute_write(to_solr_xml, {:overwrite => true})
209
- send(:after_save) if respond_to?(:after_save)
208
+ send(:after_save) if respond_to?(:after_save)
210
209
  end
211
210
 
212
211
  # remove an object from the index
data/solr_mapper.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{solr_mapper}
5
- s.version = "0.1.9"
5
+ s.version = "0.1.91"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Chris Umbel"]
data/spec/base.rb CHANGED
@@ -43,3 +43,12 @@ class Thing
43
43
  has_many :stuffs
44
44
  has_one :widget
45
45
  end
46
+
47
+ class Item
48
+ include SolrDocument
49
+ bind_service_url 'http://localhost:8080/solr_item'
50
+ limit_page_size 10
51
+
52
+ has_many :stuffs
53
+ has_one :widget
54
+ end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solr_mapper
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 173
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 1
8
- - 9
9
- version: 0.1.9
9
+ - 91
10
+ version: 0.1.91
10
11
  platform: ruby
11
12
  authors:
12
13
  - Chris Umbel
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-12-28 00:00:00 +00:00
18
+ date: 2010-12-28 00:00:00 -05:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 3
28
30
  segments:
29
31
  - 0
30
32
  version: "0"
@@ -38,6 +40,7 @@ dependencies:
38
40
  requirements:
39
41
  - - ">="
40
42
  - !ruby/object:Gem::Version
43
+ hash: 3
41
44
  segments:
42
45
  - 0
43
46
  version: "0"
@@ -51,6 +54,7 @@ dependencies:
51
54
  requirements:
52
55
  - - ">="
53
56
  - !ruby/object:Gem::Version
57
+ hash: 3
54
58
  segments:
55
59
  - 0
56
60
  version: "0"
@@ -64,6 +68,7 @@ dependencies:
64
68
  requirements:
65
69
  - - ">="
66
70
  - !ruby/object:Gem::Version
71
+ hash: 3
67
72
  segments:
68
73
  - 0
69
74
  version: "0"
@@ -77,6 +82,7 @@ dependencies:
77
82
  requirements:
78
83
  - - ">="
79
84
  - !ruby/object:Gem::Version
85
+ hash: 3
80
86
  segments:
81
87
  - 2
82
88
  - 0
@@ -140,6 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
146
  requirements:
141
147
  - - ">="
142
148
  - !ruby/object:Gem::Version
149
+ hash: 3
143
150
  segments:
144
151
  - 0
145
152
  version: "0"
@@ -148,6 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
155
  requirements:
149
156
  - - ">="
150
157
  - !ruby/object:Gem::Version
158
+ hash: 11
151
159
  segments:
152
160
  - 1
153
161
  - 2