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: 1ecd9f0fe6d1ab81b4daa49b9c99cf8a1a93e2d9
4
- data.tar.gz: 5f0afae857bfc34e308e2c064228ca4a6a80be1d
3
+ metadata.gz: ac054c4415c845492a1e7e9c472264d242bfb0cf
4
+ data.tar.gz: 0f32e4789d3ad0ae264f5cbb28f448cee18c11c9
5
5
  SHA512:
6
- metadata.gz: 06c67fecb76a47ae1b3593192a03f17ff541c8b57a858f387f429914d2d7541eeb89e6bab335f65c3a96e8dcfeffa44cb5040a43b9e5de882f3d940392b111ea
7
- data.tar.gz: f7e6a43bb205b20a2a4f80feeb46e41c930a125da7e75d2ebdd7ae4f39550afcf48f0d22a1601c10e9f1e970135345c36100cd4220854881d15d9772f3840a01
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 errorau
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
 
@@ -1,7 +1,5 @@
1
1
  module BentoSearch
2
2
  class Engine < ::Rails::Engine
3
3
  #isolate_namespace BentoSearch
4
-
5
- config.assets.precompile += %w( bento_search/large_loader.gif )
6
4
  end
7
5
  end
@@ -1,3 +1,3 @@
1
1
  module BentoSearch
2
- VERSION = "1.6.1"
2
+ VERSION = "1.7.0.beta.1"
3
3
  end
@@ -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.6.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-19 00:00:00.000000000 Z
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: '0'
420
+ version: 1.3.1
421
421
  requirements: []
422
422
  rubyforge_project:
423
423
  rubygems_version: 2.5.1