mwmitchell-rsolr-ext 0.7.32 → 0.7.33
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/lib/rsolr-ext.rb +1 -1
- data/lib/rsolr-ext/doc.rb +6 -2
- data/rsolr-ext.gemspec +3 -2
- metadata +2 -2
data/lib/rsolr-ext.rb
CHANGED
data/lib/rsolr-ext/doc.rb
CHANGED
@@ -68,11 +68,15 @@ module RSolr::Ext::Doc
|
|
68
68
|
# The original object passed in to the #new method
|
69
69
|
attr :_source_hash
|
70
70
|
|
71
|
+
# The original object passed, converted to a mash
|
72
|
+
attr :_source_mash
|
73
|
+
|
71
74
|
# Constructor **for the class that is getting this module included**
|
72
75
|
# source_doc should be a hash or something similar
|
73
76
|
# calls each of after_initialize blocks
|
74
77
|
def initialize(source_doc={})
|
75
78
|
@_source_hash = source_doc
|
79
|
+
@_source_mash = source_doc.to_mash
|
76
80
|
self.class.hooks.each do |h|
|
77
81
|
instance_eval &h
|
78
82
|
end
|
@@ -80,14 +84,14 @@ module RSolr::Ext::Doc
|
|
80
84
|
|
81
85
|
# for easy access to the solr id (route helpers etc..)
|
82
86
|
def id
|
83
|
-
@
|
87
|
+
@_source_mash['id']
|
84
88
|
end
|
85
89
|
|
86
90
|
# the wrapper method to the @_source_hash object.
|
87
91
|
# If a method is missing, it gets sent to @_source_hash
|
88
92
|
# with all of the original params and block
|
89
93
|
def method_missing(m, *args, &b)
|
90
|
-
@
|
94
|
+
@_source_mash.send(m, *args, &b)
|
91
95
|
end
|
92
96
|
|
93
97
|
end
|
data/rsolr-ext.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "rsolr-ext"
|
3
|
-
s.version = "0.7.
|
4
|
-
s.date = "2009-05-
|
3
|
+
s.version = "0.7.33"
|
4
|
+
s.date = "2009-05-28"
|
5
5
|
s.summary = "An extension lib for RSolr"
|
6
6
|
s.email = "goodieboy@gmail.com"
|
7
7
|
s.homepage = "http://github.com/mwmitchell/rsolr_ext"
|
@@ -24,6 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
"lib/rsolr-ext/response/docs.rb",
|
25
25
|
"lib/rsolr-ext/response/facets.rb",
|
26
26
|
"lib/rsolr-ext/response/spelling.rb",
|
27
|
+
|
27
28
|
"lib/rsolr-ext/response.rb",
|
28
29
|
|
29
30
|
"lib/rsolr-ext.rb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mwmitchell-rsolr-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Mitchell
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-28 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|