k_ext-github 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hooks/update-version +1 -1
- data/k_ext-github.gemspec +1 -0
- data/lib/k_ext/github/api.rb +23 -3
- data/lib/k_ext/github/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9ed379850fef726be7f988662aa858d81b9d89ea4ecdad6df70babfc39712d0
|
4
|
+
data.tar.gz: f52cd003d0965a446e44ef958bae4227c78aa9d36bcb47507a4c0d06617faef7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab2fdd9808d17e100b40b77c0403c2a644b76b83cf8fa881c28ecec25dc3ca3c94b5e8cdd6637492da76c6019e0ed663a3d16a5b4f31826e396d50ca901ca34c
|
7
|
+
data.tar.gz: 13f21df1e2f50897cabf75b4c8bded24a258f5c8d075998fb0d6ef1ab63dbb18de4f4ed539a8c81e9da900882b4096dd8ea6bee09d676f0a31a7c2806f747389
|
data/hooks/update-version
CHANGED
data/k_ext-github.gemspec
CHANGED
data/lib/k_ext/github/api.rb
CHANGED
@@ -17,7 +17,7 @@ module KExt
|
|
17
17
|
attribute :client, Octokit::Client, writer: :private
|
18
18
|
|
19
19
|
def self.instance(access_token)
|
20
|
-
|
20
|
+
Api.new(token: access_token)
|
21
21
|
end
|
22
22
|
|
23
23
|
# Create API for communicating with GitHub
|
@@ -62,8 +62,28 @@ module KExt
|
|
62
62
|
|
63
63
|
# list of repositories for this user
|
64
64
|
#
|
65
|
-
def repositories
|
66
|
-
items = @client.repositories({}, query: { per_page:
|
65
|
+
def repositories(per_page: 100, page: 1)
|
66
|
+
items = @client.repositories({}, query: { per_page: per_page, page: page })
|
67
|
+
|
68
|
+
items.map { |item| KExt::Github::Models::Repository.new(item) }
|
69
|
+
end
|
70
|
+
|
71
|
+
# list of ALL repositories for this user
|
72
|
+
#
|
73
|
+
def all_repositories
|
74
|
+
# NOTE: Does not seam to work
|
75
|
+
# items = @client.all_repositories({})
|
76
|
+
|
77
|
+
items = []
|
78
|
+
page = 1
|
79
|
+
keep_going = true
|
80
|
+
|
81
|
+
while keep_going
|
82
|
+
paged_items = repositories(page: page)
|
83
|
+
items += paged_items
|
84
|
+
page += 1
|
85
|
+
keep_going = paged_items.length.positive? && page <= 50
|
86
|
+
end
|
67
87
|
|
68
88
|
items.map { |item| KExt::Github::Models::Repository.new(item) }
|
69
89
|
end
|
data/lib/k_ext/github/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: k_ext-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Cruwys
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: k_log
|
@@ -125,6 +125,7 @@ metadata:
|
|
125
125
|
homepage_uri: http://appydave.com/gems/k-ext-github
|
126
126
|
source_code_uri: https://github.com/klueless-io/k_ext-github
|
127
127
|
changelog_uri: https://github.com/klueless-io/k_ext-github/commits/master
|
128
|
+
rubygems_mfa_required: 'true'
|
128
129
|
post_install_message:
|
129
130
|
rdoc_options: []
|
130
131
|
require_paths:
|
@@ -140,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
141
|
- !ruby/object:Gem::Version
|
141
142
|
version: '0'
|
142
143
|
requirements: []
|
143
|
-
rubygems_version: 3.2.
|
144
|
+
rubygems_version: 3.2.33
|
144
145
|
signing_key:
|
145
146
|
specification_version: 4
|
146
147
|
summary: KExt/Github provides useful github extensions specifically for the klueless
|