sunspot 0.10.2 → 0.10.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.10.3 2009-10-15
2
+ * Contiguous, not continuous
3
+ * Fail fast if less-than-1 radius passed for local search
4
+
1
5
  == 0.10.2 2009-10-09
2
6
  * Add Sunspot.config.xml_builder option, which is passed to RSolr
3
7
 
data/README.rdoc CHANGED
@@ -30,8 +30,7 @@ http://wiki.github.com/outoftime/sunspot
30
30
 
31
31
  == Installation
32
32
 
33
- gem sources -a http://gems.github.com
34
- gem install outoftime-sunspot
33
+ gem install sunspot
35
34
 
36
35
  In order to start the packaged Solr installation, run:
37
36
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :minor: 10
3
- :patch: 2
3
+ :patch: 3
4
4
  :major: 0
@@ -27,8 +27,8 @@ module Sunspot
27
27
  if fragment_size = @options[:fragment_size]
28
28
  params[:"hl.fragsize"] = fragment_size
29
29
  end
30
- if @options[:merge_continuous_fragments]
31
- params[:"hl.mergeContinuous"] = 'true'
30
+ if @options[:merge_contiguous_fragments]
31
+ params[:"hl.mergeContiguous"] = 'true'
32
32
  end
33
33
  if @options[:phrase_highlighter]
34
34
  params[:"hl.usePhraseHighlighter"] = 'true'
@@ -8,6 +8,9 @@ module Sunspot
8
8
  #
9
9
  class Local #:nodoc:
10
10
  def initialize(coordinates, radius)
11
+ if radius < 1
12
+ raise ArgumentError, "LocalSolr does not seem to support a radius of less than 1 mile."
13
+ end
11
14
  @coordinates, @radius = Util::Coordinates.new(coordinates), radius
12
15
  end
13
16
 
@@ -105,11 +105,11 @@ describe 'highlighted fulltext queries', :type => :query do
105
105
  it 'enables merging of continuous fragments' do
106
106
  session.search(Post) do
107
107
  keywords 'test' do
108
- highlight :merge_continuous_fragments => true
108
+ highlight :merge_contiguous_fragments => true
109
109
  end
110
110
  end
111
111
  connection.should have_last_search_with(
112
- :"hl.mergeContinuous" => 'true'
112
+ :"hl.mergeContiguous" => 'true'
113
113
  )
114
114
  end
115
115
 
@@ -51,4 +51,12 @@ describe 'local query' do
51
51
  connection.should have_last_search_with(:lat => 40.7, :long => -73.5)
52
52
  end
53
53
  end
54
+
55
+ it 'raises ArgumentError if radius is less than 1' do
56
+ lambda do
57
+ session.search Post do
58
+ near [40, -70], 0.5
59
+ end
60
+ end.should raise_error(ArgumentError)
61
+ end
54
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunspot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mat Brown
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2009-10-09 00:00:00 -04:00
20
+ date: 2009-10-15 00:00:00 -04:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency