api-pagination 4.5.0 → 4.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83806da219ed915e8d9e22d4f88fad6cffb36540
4
- data.tar.gz: cb8d29c985ecc0bcafb83d34f31050c3bc0482ea
3
+ metadata.gz: d1593c1cca4de7e65dae45510075edbc44835c1d
4
+ data.tar.gz: 6d4b8192486631b97fd8d7cc2e9faa9a64e690a6
5
5
  SHA512:
6
- metadata.gz: be07abe0cf7d3a3bbc4e8efc3a86e8e38023820788d777db8963873ebd5445c40ce60036d6c82574803a52d60b1ca3bc97b645d96da28770352b46627d4c1c01
7
- data.tar.gz: 45b6cca14fe34a4f7abb20b0846c818938c375b8ff1a33b4a22a5a5952921da766f008cf2b390374f570c6a6de103964b26dba9218d5fde6b89ee0cb8536ed18
6
+ metadata.gz: c4b2a4006bf64b31ef53bffc3fed788752c6f27865efb5c3ecbdf85d33fc6e8656cc2f72f9edf87972669d0e288d636f4930b4df35d607b77135dafd99d7f231
7
+ data.tar.gz: a53e3fb57f146a59456055c40ac56dab2ad51a548efde8e9c565973c7243eed2845f7c9152f50674e77b273c9ff15851c3c504549c3ff9fdb480140e9302e97d
@@ -1,6 +1,19 @@
1
1
  begin; require 'rails'; rescue LoadError; end
2
2
  begin; require 'rails-api'; rescue LoadError; end
3
+
3
4
  if defined?(Rails)
5
+ module ApiPagination
6
+ module Hooks
7
+ def self.rails_parent_controller
8
+ if Gem::Version.new(Rails.version) >= Gem::Version.new('5') || defined?(ActionController::API)
9
+ ActionController::API
10
+ else
11
+ ActionController::Base
12
+ end
13
+ end
14
+ end
15
+ end
16
+
4
17
  require 'rails/pagination'
5
18
 
6
19
  ActiveSupport.on_load(:action_controller) do
@@ -27,14 +40,3 @@ unless defined?(Kaminari) || defined?(WillPaginate::CollectionMethods)
27
40
  WARNING
28
41
  end
29
42
 
30
- module ApiPagination
31
- module Hooks
32
- def self.rails_parent_controller
33
- if Gem::Version.new(Rails.version) >= Gem::Version.new('5') || defined?(ActionController::API)
34
- ActionController::API
35
- else
36
- ActionController::Base
37
- end
38
- end
39
- end
40
- end
@@ -2,7 +2,7 @@ module ApiPagination
2
2
  class Version
3
3
  MAJOR = 4
4
4
  MINOR = 5
5
- PATCH = 0
5
+ PATCH = 1
6
6
 
7
7
  def self.to_s
8
8
  [MAJOR, MINOR, PATCH].join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-pagination
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.0
4
+ version: 4.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Celis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-05 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec