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 +4 -4
- data/lib/crew_check/team_list.rb +13 -2
- data/lib/crew_check/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 443fb208fba8f4775b68433a22bc05c092f499a0
|
4
|
+
data.tar.gz: f25e31c3efab29573341f93d622769211838afa9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c4a7959b36c884146d2fe3c6c4aa3eea123f8ac2c1b4402bffb518a7a0896303493f3524dbc8df1de105131dfee41df674bfbc074468585332e5d98a745d9f
|
7
|
+
data.tar.gz: 52ec12c0b07fcbe6842719576e6e48b38122f11392f2fc83176c29f79dfec6f93a4fe1056418776ce319987005e94cafe0ab3a342e863ddc3a50a8c48cf87907
|
data/lib/crew_check/team_list.rb
CHANGED
@@ -20,8 +20,10 @@ module CrewCheck
|
|
20
20
|
|
21
21
|
class << self
|
22
22
|
def fetch(token)
|
23
|
-
|
24
|
-
|
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
|
data/lib/crew_check/version.rb
CHANGED
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.
|
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
|
+
date: 2014-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|