mwmitchell-rsolr-ext 0.5.3 → 0.5.4

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.
@@ -20,10 +20,17 @@ class RSolr::Ext::HashMethodizer
20
20
  def methodize!(h)
21
21
  h.keys.each do |k|
22
22
  meth = snake_case(k)
23
- h.instance_variable_set("@#{k}", h[k])
23
+ val_key = case k
24
+ when String
25
+ "'#{k}'"
26
+ when Symbol
27
+ ":#{k}"
28
+ else
29
+ raise 'Supports only string/symbol keys!'
30
+ end
24
31
  h.instance_eval <<-RUBY
25
32
  def #{meth}
26
- val = @#{k}
33
+ val = self[#{val_key}]
27
34
  if val.respond_to?(:each_pair)
28
35
  RSolr::Ext::HashMethodizer.methodize!(val)
29
36
  elsif val.is_a?(Array)
data/lib/rsolr-ext.rb CHANGED
@@ -15,7 +15,7 @@ module RSolr
15
15
 
16
16
  module Ext
17
17
 
18
- VERSION = '0.5.3'
18
+ VERSION = '0.5.4'
19
19
 
20
20
  autoload :Request, 'rsolr-ext/request.rb'
21
21
  autoload :Response, 'rsolr-ext/response.rb'
data/rsolr-ext.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "rsolr-ext"
3
- s.version = "0.5.3"
3
+ s.version = "0.5.4"
4
4
  s.date = "2009-03-17"
5
5
  s.summary = "An extension lib for RSolr"
6
6
  s.email = "goodieboy@gmail.com"
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.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Mitchell