paginate-responder 1.6.0.b0 → 1.6.0

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: fa30c367c32405ca6cc56ccee9ab1cad82e8894b
4
- data.tar.gz: 5dd939187d91b5af8c9c35ac483a9d3c56d0b092
3
+ metadata.gz: 1957ee0bd1397a8d501df89778815cb7b031a3e2
4
+ data.tar.gz: a79a6353386070aafacd8cbb713d415d70f2f226
5
5
  SHA512:
6
- metadata.gz: be00e015691aeadf0d5174ee2010cb7b73e40ffc9c9c79ee6a6cef87a1617c065d85cd747f03d27d1f8ac99c6915ec7d526ecf06b3e38b6b428072c6a4a67747
7
- data.tar.gz: 404cf3ad70bbfd40ee53a0c30268ccaaa922257022345f1d12d387580ec94a91d20726623032497fe2f16090edde4200ec7cba48f3d2e320adaf378dd5c7f323
6
+ metadata.gz: 87b48047d3b7c092d568eeccb596961cf8f09e80e3774a712345a4cd92c7603ff48aafb2e0c6de95402c1d8be4820b7d4278a8007379ccbad0a8a207641307ba
7
+ data.tar.gz: 1acb18988a31fca3f45bb9063c5018ed728364b529924afa45746d9f59e80eccbc1e5e373cd8a2252a7001ce44fe02e4d342aef29e7bdd46321a865de8d01dfd
@@ -3,7 +3,7 @@ module PaginateResponder
3
3
  MAJOR = 1
4
4
  MINOR = 6
5
5
  PATCH = 0
6
- STAGE = :b0
6
+ STAGE = nil
7
7
 
8
8
  def self.to_s
9
9
  [MAJOR, MINOR, PATCH, STAGE].reject(&:nil?).join '.'
@@ -9,8 +9,8 @@ module Responders
9
9
  private
10
10
 
11
11
  def paginate!
12
- adapter = ::Responders::PaginateResponder.find(self)
13
- @resource = adapter.new(self).paginate! if adapter
12
+ adapter = ::Responders::PaginateResponder.init(self)
13
+ @resource = adapter.paginate! if adapter
14
14
  end
15
15
 
16
16
  class << self
@@ -22,6 +22,15 @@ module Responders
22
22
  @adpaters ||= ::Set.new
23
23
  end
24
24
 
25
+ def init(responder)
26
+ if responder.controller.respond_to?(:pagination_adapter_init)
27
+ return responder.controller.pagination_adapter_init(responder)
28
+ end
29
+
30
+ adapter = find(responder)
31
+ adapter.new(responder) if adapter
32
+ end
33
+
25
34
  def find(responder)
26
35
  adapters.find do |adapter|
27
36
  adapter.suitable?(responder.resource, responder)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paginate-responder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0.b0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Graichen
@@ -250,9 +250,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
250
250
  version: '0'
251
251
  required_rubygems_version: !ruby/object:Gem::Requirement
252
252
  requirements:
253
- - - ">"
253
+ - - ">="
254
254
  - !ruby/object:Gem::Version
255
- version: 1.3.1
255
+ version: '0'
256
256
  requirements: []
257
257
  rubyforge_project:
258
258
  rubygems_version: 2.5.1