uc3-dmp-api-core 0.0.5 → 0.0.6

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
  SHA256:
3
- metadata.gz: b551c08f61f7dfefb748dccb66572b97d910efedc895061058b2750c701f5bdc
4
- data.tar.gz: 29a146bdc34d0a344f8d3d3577102364d0465358d01a5346a36a4df3290ea989
3
+ metadata.gz: 3fdf225c15fdb31fde0c5b580c65fe11cc1f954ca5095c3ba65b97ec5a75706c
4
+ data.tar.gz: 312895d96acf566e198b8159ced5cdf99055330fcddf62b105cfc750fa2d124b
5
5
  SHA512:
6
- metadata.gz: 5458ceb6125ad2aff9085fdcebdca615d150c703d39243f683748db554981d4af73e1880260daef2c36380ed0820dca1d72e9f32b4e7931ad73db3c0a0572360
7
- data.tar.gz: dd36ddc16e919064bbefa90295db54e81c8d7fc923954efe920264cefbf0bc1117ae29345f5c0dab7dbef7bc443de5300c0d3807d8abd0849e4c66c82ed2d3e4
6
+ metadata.gz: c70e9f61cd6d20b1936561a15257d89d13655eb6d163c28c9cd75f2e1c46927118128155312e6b2e6797d704de6fa5360ea4c2ae3019fd159b8a39d95dc4bc4b
7
+ data.tar.gz: 7dd073b4a5c47ac0fef2c750bb780282b8b0cdf23fc8243dcbcf64a27b02787ec3dc692d25dbc2c962803f2b5a99f480c2363b62950bfec7d99bb45287a858b5
@@ -47,9 +47,9 @@ module Uc3DmpApiCore
47
47
  # Fetch the current :page and :per_page from the params or use the defaults
48
48
  def _current_page(item_count: 0, params: {})
49
49
  page = params.fetch('page', DEFAULT_PAGE)
50
- page = DEFAULT_PAGE if page <= 1
50
+ page = DEFAULT_PAGE if page.nil? || page <= 1
51
51
  per_page = params.fetch('per_page', DEFAULT_PER_PAGE)
52
- per_page = DEFAULT_PER_PAGE if per_page >= MAXIMUM_PER_PAGE || per_page < 1
52
+ per_page = DEFAULT_PER_PAGE if per_page.nil? || per_page >= MAXIMUM_PER_PAGE || per_page < 1
53
53
 
54
54
  total_pages = _page_count(total: item_count, per_page: per_page)
55
55
  page = total_pages if page > total_pages
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Uc3DmpApiCore
4
- VERSION = '0.0.5'
4
+ VERSION = '0.0.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uc3-dmp-api-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Riley