omniauth-crew-check 0.0.2 → 0.0.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: 54574d7d771ee764ba4a57e5b27867ac99226710
4
- data.tar.gz: 54f363989ccf9762de000dda57ac4ba928d90c45
3
+ metadata.gz: 443fb208fba8f4775b68433a22bc05c092f499a0
4
+ data.tar.gz: f25e31c3efab29573341f93d622769211838afa9
5
5
  SHA512:
6
- metadata.gz: c891ae487c954e898b5899e47bd93d3d798730d7b38f13a36b3f13284c1c4080a1934f6f4906515c1efb8b984064d95003b244fef6d9bc7ccbabd3360af8b6ba
7
- data.tar.gz: 28794697ae8ef11e072a669654b680a0647beef6f6e8cdfab546d7d4ab038efc6881a89da1c0415e963a053c36daa1ef9c71de81bb6dedf80fe58998ad9af7a8
6
+ metadata.gz: 34c4a7959b36c884146d2fe3c6c4aa3eea123f8ac2c1b4402bffb518a7a0896303493f3524dbc8df1de105131dfee41df674bfbc074468585332e5d98a745d9f
7
+ data.tar.gz: 52ec12c0b07fcbe6842719576e6e48b38122f11392f2fc83176c29f79dfec6f93a4fe1056418776ce319987005e94cafe0ab3a342e863ddc3a50a8c48cf87907
@@ -20,8 +20,10 @@ module CrewCheck
20
20
 
21
21
  class << self
22
22
  def fetch(token)
23
- client = Octokit::Client.new(access_token: token)
24
- new(client.user_teams)
23
+ with_octo_auto_pagination do
24
+ client = Octokit::Client.new(access_token: token)
25
+ new(client.user_teams)
26
+ end
25
27
  end
26
28
  end
27
29
 
@@ -32,5 +34,14 @@ module CrewCheck
32
34
  def empty?
33
35
  @teams.size == 0
34
36
  end
37
+
38
+ protected
39
+ def self.with_octo_auto_pagination(&block)
40
+ old_val = Octokit.auto_paginate
41
+ Octokit.auto_paginate = true
42
+ block.call.tap do
43
+ Octokit.auto_paginate = old_val
44
+ end
45
+ end
35
46
  end
36
47
  end
@@ -1,3 +1,3 @@
1
1
  module CrewCheck
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-crew-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Pickett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-11 00:00:00.000000000 Z
11
+ date: 2014-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler