freelancing-god-thinking-sphinx 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,7 +38,7 @@ module ThinkingSphinx
38
38
  module Version #:nodoc:
39
39
  Major = 1
40
40
  Minor = 2
41
- Tiny = 0
41
+ Tiny = 1
42
42
 
43
43
  String = [Major, Minor, Tiny].join('.')
44
44
  end
@@ -101,7 +101,7 @@ module ThinkingSphinx
101
101
  # @return [Integer]
102
102
  #
103
103
  def current_page
104
- @options[:page] || 1
104
+ @options[:page].blank? ? 1 : @options[:page].to_i
105
105
  end
106
106
 
107
107
  # The next page number of the result set. If there are no more pages
@@ -662,6 +662,14 @@ describe ThinkingSphinx::Search do
662
662
  ThinkingSphinx::Search.new.current_page.should == 1
663
663
  end
664
664
 
665
+ it "should handle string page values" do
666
+ ThinkingSphinx::Search.new(:page => '2').current_page.should == 2
667
+ end
668
+
669
+ it "should handle empty string page values" do
670
+ ThinkingSphinx::Search.new(:page => '').current_page.should == 1
671
+ end
672
+
665
673
  it "should return the requested page" do
666
674
  ThinkingSphinx::Search.new(:page => 10).current_page.should == 10
667
675
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freelancing-god-thinking-sphinx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-25 00:00:00 -07:00
12
+ date: 2009-07-27 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -127,6 +127,7 @@ files:
127
127
  - spec/lib/thinking_sphinx_spec.rb
128
128
  has_rdoc: true
129
129
  homepage: http://ts.freelancing-gods.com
130
+ licenses:
130
131
  post_install_message: |+
131
132
  With the release of Thinking Sphinx 1.1.18, there is one important change to
132
133
  note: previously, the default morphology for indexing was 'stem_en'. The new
@@ -165,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
166
  requirements: []
166
167
 
167
168
  rubyforge_project: thinking-sphinx
168
- rubygems_version: 1.2.0
169
+ rubygems_version: 1.3.5
169
170
  signing_key:
170
171
  specification_version: 2
171
172
  summary: A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.