bento_search 1.6.1 → 1.7.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac054c4415c845492a1e7e9c472264d242bfb0cf
|
4
|
+
data.tar.gz: 0f32e4789d3ad0ae264f5cbb28f448cee18c11c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14ad5a420be09d2a01e68834e2508a93ae62eebceea84b2077e49494a6ff942b0aca46050f395bb9e3fee9f27ea400c37446c2cb89919ff44222d1dab3c955cb
|
7
|
+
data.tar.gz: fbeb0bc33bcac41521f642aced391f21d1e04251d0ab05417fe3ae2adb0ada71384d57956a02800a0157c47c8c597dc20028997e8f6fb84abfc6d7ca6bc3870a
|
@@ -304,7 +304,7 @@ module BentoSearch
|
|
304
304
|
arguments.delete(key) if arguments[key].blank?
|
305
305
|
arguments[key] = arguments[key].to_i if arguments[key]
|
306
306
|
end
|
307
|
-
arguments[:per_page] ||= DefaultPerPage
|
307
|
+
arguments[:per_page] ||= configuration.default_per_page || DefaultPerPage
|
308
308
|
|
309
309
|
# illegal arguments
|
310
310
|
if (arguments[:start] && arguments[:page])
|
@@ -419,12 +419,12 @@ module BentoSearch
|
|
419
419
|
# to be something diff in production and dev?
|
420
420
|
#
|
421
421
|
# This default list is probably useful already, but individual
|
422
|
-
# engines can override if it's convenient for their own
|
422
|
+
# engines can override if it's convenient for their own error
|
423
423
|
# handling.
|
424
424
|
def auto_rescue_exceptions
|
425
425
|
[BentoSearch::RubyTimeoutClass, HTTPClient::TimeoutError,
|
426
426
|
HTTPClient::ConfigurationError, HTTPClient::BadResponseError,
|
427
|
-
MultiJson::DecodeError, Nokogiri::SyntaxError]
|
427
|
+
MultiJson::DecodeError, Nokogiri::SyntaxError, SocketError]
|
428
428
|
end
|
429
429
|
|
430
430
|
|
data/lib/bento_search/engine.rb
CHANGED
data/lib/bento_search/version.rb
CHANGED
@@ -110,6 +110,17 @@ class ParseSearchArgumentsTest < ActiveSupport::TestCase
|
|
110
110
|
assert_raise(ArgumentError) { d.test_parse(:query => "query", :per_page => 1000) }
|
111
111
|
end
|
112
112
|
|
113
|
+
def test_default_per_page
|
114
|
+
d = Dummy.new
|
115
|
+
|
116
|
+
args = d.test_parse(:query => "query")
|
117
|
+
assert_equal(Dummy::DefaultPerPage, args[:per_page])
|
118
|
+
|
119
|
+
d.configuration[:default_per_page] = 2
|
120
|
+
args = d.test_parse(:query => "query")
|
121
|
+
assert_equal(2, args[:per_page])
|
122
|
+
end
|
123
|
+
|
113
124
|
def test_search_field_keys
|
114
125
|
assert_equal ["my_title", "my_author", "my_other"], Dummy.new.search_keys
|
115
126
|
assert_equal ["title", "author"], Dummy.new.semantic_search_keys
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bento_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0.beta.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -415,9 +415,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
415
415
|
version: '0'
|
416
416
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
417
417
|
requirements:
|
418
|
-
- - "
|
418
|
+
- - ">"
|
419
419
|
- !ruby/object:Gem::Version
|
420
|
-
version:
|
420
|
+
version: 1.3.1
|
421
421
|
requirements: []
|
422
422
|
rubyforge_project:
|
423
423
|
rubygems_version: 2.5.1
|