greedo 0.0.4 → 0.0.5

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: 48c3028f4ecf306b0c59c53b9bede17f851103cd
4
- data.tar.gz: 7ef547c2576e93017b31013cccfee5b367772e7e
3
+ metadata.gz: 8f68dee2429a340ebd06a0499df197e8fc2b4c79
4
+ data.tar.gz: 5b58bd4694eb4c09327f710f734a623b29de3044
5
5
  SHA512:
6
- metadata.gz: 96eb11d4a5dcd6f38904289d3e3e8d8fac085fbe8c6a81aaa176f0f3cd1270dcec7c6719ca10d193a567304f6a33207c6436527b170a03cce3fba23ba167e1d9
7
- data.tar.gz: 557a57d5eb4c230c044fc0132e79d00555de86c06ac73766b264a4a64d2fb3cfec5838612de033bc5d8e84db0693fe50c9d1cb8e386a8ca25b88f950f162b1a8
6
+ metadata.gz: 77cb491c02725cf064cc72e9f9a75c1fcbb039efc385e8cdf4ddaae86e49330ace055308f9a77430a66159920835c8141a6d8d32fea86c7c5656fba2532d3322
7
+ data.tar.gz: b2cb29ad19bd312a26585feff6eee609e7a8d4876cee38a3802223452f82a83c0ffe2d631a940e876112f9cdf2cfac014b42d6a31f9a56ec6cce7407cb6dd482
@@ -158,7 +158,7 @@ module Greedo
158
158
  def greedo(scope,
159
159
  param_name: :page,
160
160
  page: params.fetch(param_name) { 1 }.to_i,
161
- per_page: 20,
161
+ per_page: params.fetch(:per_page) { 20 }.to_i,
162
162
  path_params: {},
163
163
  order: params[:order],
164
164
  order_by: params[:order_by],
@@ -6,9 +6,8 @@ module Greedo
6
6
  attr_reader :scope, :page, :per_page, :order, :order_by
7
7
 
8
8
  def self.build(scope,
9
- params: {},
10
- page: params.fetch(:page) { 1 }.to_i,
11
- per_page: params.fetch(:per_page) { 20 }.to_i,
9
+ page: 1,
10
+ per_page: 20,
12
11
  order_by: nil)
13
12
  return ArrayPaginator.new(scope, order_by.order, order_by.sort) if scope.is_a?(Array)
14
13
  Paginator.new(scope, page: page, per_page: per_page,
@@ -1,3 +1,3 @@
1
1
  module Greedo
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: greedo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Pohorecki