will_paginate 3.1.2 → 3.1.3

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: 03efd9ec8134ac6ec1d457f73d9ec4713d1e662d
4
- data.tar.gz: fe630d7d564896e2a4c1227a43bbbf03859ebf0a
3
+ metadata.gz: fef2cd8f47f945a1b5d7378a4c66ceba6dc49cdb
4
+ data.tar.gz: af9aa669e248488ec198d5239172fcf08fead4a1
5
5
  SHA512:
6
- metadata.gz: 252057e359f0fd4715d807ece1dbb6d52d497bb6188150782bf90664478c1161a1ca7ba5a0d80d29005469f3cbf7167f1180f08d1f474a71f181d516aef5aa70
7
- data.tar.gz: c8757581f95a806f7926e0cc88fd3245227998022c684c063320a0f6093eb09be1f46e92ddcd393ccc0e3611924f7b5d1e26cb2af9dca3b649a9c73fd8d85bbb
6
+ metadata.gz: ea9ced53320267da3646dad5102f408ed8cc5ad7d973f0a91893035d6ef671c1d57ab5b8793b6002d84ca71363618948718f3ee8cfdd4f3b01e0628eebb96434
7
+ data.tar.gz: c0571c50659366d61692379a97fbaff6f012529f38dc617a5efba1a24a1d9a3a687e95777ef4da6c96b9f0f94ee8380d6ce80b62b8ce7a2b36d95fb66c352eb3
@@ -18,8 +18,6 @@ module WillPaginate
18
18
  require 'will_paginate/view_helpers/action_view'
19
19
  end
20
20
 
21
- self.class.add_locale_path config
22
-
23
21
  # early access to ViewHelpers.pagination_options
24
22
  require 'will_paginate/view_helpers'
25
23
  end
@@ -31,10 +29,6 @@ module WillPaginate
31
29
  ActionController::Base.extend ControllerRescuePatch
32
30
  end
33
31
 
34
- def self.add_locale_path(config)
35
- config.i18n.load_path.unshift(*WillPaginate::I18n.load_path)
36
- end
37
-
38
32
  # Extending the exception handler middleware so it properly detects
39
33
  # WillPaginate::InvalidPage regardless of it being a tag module.
40
34
  module ShowExceptionsPatch
@@ -69,3 +63,7 @@ module WillPaginate
69
63
  end
70
64
  end
71
65
  end
66
+
67
+ ActiveSupport.on_load :i18n do
68
+ I18n.load_path.concat(WillPaginate::I18n.load_path)
69
+ end
@@ -2,7 +2,7 @@ module WillPaginate #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -115,12 +115,12 @@ module WillPaginate
115
115
  end
116
116
 
117
117
  def symbolized_update(target, other, blacklist = nil)
118
- other.each do |key, value|
118
+ other.each_pair do |key, value|
119
119
  key = key.to_sym
120
120
  existing = target[key]
121
121
  next if blacklist && blacklist.include?(key)
122
122
 
123
- if value.is_a?(Hash) and (existing.is_a?(Hash) or existing.nil?)
123
+ if value.respond_to?(:each_pair) and (existing.is_a?(Hash) or existing.nil?)
124
124
  symbolized_update(existing || (target[key] = {}), value)
125
125
  else
126
126
  target[key] = value
@@ -416,7 +416,7 @@ class DummyRequest
416
416
  def initialize(controller)
417
417
  @controller = controller
418
418
  @get = true
419
- @params = {}
419
+ @params = {}.with_indifferent_access
420
420
  @symbolized_path_parameters = { :controller => 'foo', :action => 'bar' }
421
421
  end
422
422
 
@@ -442,7 +442,11 @@ class DummyRequest
442
442
 
443
443
  def params(more = nil)
444
444
  @params.update(more) if more
445
- @params
445
+ if defined?(ActionController::Parameters)
446
+ ActionController::Parameters.new(@params)
447
+ else
448
+ @params
449
+ end
446
450
  end
447
451
 
448
452
  def host_with_port
@@ -458,3 +462,7 @@ class DummyRequest
458
462
  'http:'
459
463
  end
460
464
  end
465
+
466
+ if defined?(ActionController::Parameters)
467
+ ActionController::Parameters.permit_all_parameters = false
468
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: will_paginate
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mislav Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-20 00:00:00.000000000 Z
11
+ date: 2016-09-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: will_paginate provides a simple API for performing paginated queries
14
14
  with Active Record, DataMapper and Sequel, and includes helpers for rendering pagination