tanker 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/tanker.rb +4 -4
  3. data/tanker.gemspec +1 -1
  4. metadata +7 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
data/lib/tanker.rb CHANGED
@@ -79,14 +79,14 @@ module Tanker
79
79
  end
80
80
 
81
81
  query = "__any:(#{query.to_s}) __type:#{self.name}"
82
- options = { :start => page - 1, :len => per_page }.merge(options)
82
+ options = { :start => per_page * page, :len => per_page }.merge(options)
83
83
 
84
84
  results = index.search(query, options)
85
85
 
86
- unless results["results"].empty?
87
- ids = results["results"].map{|res| res["docid"].split(" ", 2)[1]}
86
+ ids = unless results["results"].empty?
87
+ results["results"].map{|res| res["docid"].split(" ", 2)[1]}
88
88
  else
89
- return nil
89
+ []
90
90
  end
91
91
 
92
92
  @entries = WillPaginate::Collection.create(page, per_page) do |pager|
data/tanker.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tanker}
8
- s.version = "0.5.1"
8
+ s.version = "0.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["@kidpollo"]
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tanker
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 15
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 5
8
- - 1
9
- version: 0.5.1
9
+ - 2
10
+ version: 0.5.2
10
11
  platform: ruby
11
12
  authors:
12
13
  - "@kidpollo"
@@ -25,6 +26,7 @@ dependencies:
25
26
  requirements:
26
27
  - - ">="
27
28
  - !ruby/object:Gem::Version
29
+ hash: 62196431
28
30
  segments:
29
31
  - 2
30
32
  - 0
@@ -42,6 +44,7 @@ dependencies:
42
44
  requirements:
43
45
  - - ">="
44
46
  - !ruby/object:Gem::Version
47
+ hash: 29
45
48
  segments:
46
49
  - 2
47
50
  - 3
@@ -92,6 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
92
95
  requirements:
93
96
  - - ">="
94
97
  - !ruby/object:Gem::Version
98
+ hash: 3
95
99
  segments:
96
100
  - 0
97
101
  version: "0"
@@ -100,6 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
104
  requirements:
101
105
  - - ">="
102
106
  - !ruby/object:Gem::Version
107
+ hash: 3
103
108
  segments:
104
109
  - 0
105
110
  version: "0"