ur-product 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/ur/search.rb +8 -0
  2. metadata +4 -4
data/lib/ur/search.rb CHANGED
@@ -36,6 +36,14 @@ module UR
36
36
  (!@solr.nil? && @solr && @solr.ok?)
37
37
  end
38
38
 
39
+ def per_page
40
+ (ok?) ? @solr.params['rows'].to_i : 0
41
+ end
42
+
43
+ def total_pages
44
+ (ok? && !@solr.docs.nil?) ? @solr.docs.total_pages : 0
45
+ end
46
+
39
47
  def num_found
40
48
  (ok?) ? @solr.response['numFound'].to_i : 0
41
49
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ur-product
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
4
+ hash: 49
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 4
10
- version: 0.9.4
9
+ - 5
10
+ version: 0.9.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Peter Hellberg
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-06-21 00:00:00 +02:00
18
+ date: 2010-06-24 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency