mwmitchell-rsolr-ext 0.7.34 → 0.7.35

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 CHANGED
@@ -23,7 +23,7 @@ module RSolr
23
23
 
24
24
  module Ext
25
25
 
26
- VERSION = '0.7.34'
26
+ VERSION = '0.7.35'
27
27
 
28
28
  autoload :Request, 'rsolr-ext/request.rb'
29
29
  autoload :Response, 'rsolr-ext/response.rb'
@@ -24,9 +24,10 @@ module RSolr::Ext::Response::Spelling
24
24
  # Thanks to Naomi Dushay!
25
25
  def words
26
26
  @words ||= (
27
- result = []
27
+ word_suggestions = []
28
28
  spellcheck = self.response[:spellcheck]
29
- if spellcheck && (suggestions = spellcheck[:suggestions])
29
+ if spellcheck && spellcheck[:suggestions]
30
+ suggestions = spellcheck[:suggestions]
30
31
  unless suggestions.nil?
31
32
  # suggestions is an array:
32
33
  # (query term)
@@ -51,11 +52,11 @@ module RSolr::Ext::Response::Spelling
51
52
  # suggestion => { frequency =>, word => }
52
53
  origFreq = term_info['origFreq']
53
54
  suggFreq = term_info['suggestion']['frequency']
54
- words << term_info['suggestion']['word'] if suggFreq > origFreq
55
+ word_suggestions << term_info['suggestion']['word'] if suggFreq > origFreq
55
56
  end
56
57
  end
57
58
  end
58
- words.uniq
59
+ word_suggestions.uniq
59
60
  )
60
61
  end
61
62
 
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.7.34"
3
+ s.version = "0.7.35"
4
4
  s.date = "2009-05-28"
5
5
  s.summary = "An extension lib for RSolr"
6
6
  s.email = "goodieboy@gmail.com"
@@ -40,5 +40,7 @@ Gem::Specification.new do |s|
40
40
  'test/test_unit_test_case.rb',
41
41
  'test/helper.rb'
42
42
  ]
43
+
43
44
  s.extra_rdoc_files = %w(LICENSE README.rdoc)
45
+
44
46
  end
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.34
4
+ version: 0.7.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Mitchell