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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2c9862027020fc728f735425e078dca3451555ed55941bcadb4cd61bcf8b7d3
4
- data.tar.gz: 105e15847f190a1bea23250687962a00be3db249bd3c2ba5495ab25af214f8fe
3
+ metadata.gz: f9ed379850fef726be7f988662aa858d81b9d89ea4ecdad6df70babfc39712d0
4
+ data.tar.gz: f52cd003d0965a446e44ef958bae4227c78aa9d36bcb47507a4c0d06617faef7
5
5
  SHA512:
6
- metadata.gz: 3f81c9ac640ab78e68e2d2df9b612a7b3c15a349f7e9a614989c952695e949d590a047e430294e0cfca467c834f5ca360ff076d120af46e038c87da80140c9f9
7
- data.tar.gz: 7de7c88c18837ecd0b43bf090aba878e9bb6cf274c4a275c6211730ca3c98741160bb4fb8b8206b0ad48d0ff7a82603b9de6cb78b4340d2209c91f28cefbaa80
6
+ metadata.gz: ab2fdd9808d17e100b40b77c0403c2a644b76b83cf8fa881c28ecec25dc3ca3c94b5e8cdd6637492da76c6019e0ed663a3d16a5b4f31826e396d50ca901ca34c
7
+ data.tar.gz: 13f21df1e2f50897cabf75b4c8bded24a258f5c8d075998fb0d6ef1ab63dbb18de4f4ed539a8c81e9da900882b4096dd8ea6bee09d676f0a31a7c2806f747389
data/hooks/update-version CHANGED
@@ -30,4 +30,4 @@ end
30
30
  output.push('')
31
31
 
32
32
  printf "%-25<label>s : %<version>s\n", label: 'GEM VERSION', version: version
33
- File.open('lib/k_ext/github/version.rb', 'w+') { |f| f.write(output.join("\n")) }
33
+ File.write('lib/k_ext/github/version.rb', output.join("\n"))
data/k_ext-github.gemspec CHANGED
@@ -44,4 +44,5 @@ Gem::Specification.new do |spec|
44
44
  spec.add_dependency 'octokit', '~> 4.0'
45
45
 
46
46
  spec.add_dependency 'virtus', '~> 1.0.5'
47
+ spec.metadata['rubygems_mfa_required'] = 'true'
47
48
  end
@@ -17,7 +17,7 @@ module KExt
17
17
  attribute :client, Octokit::Client, writer: :private
18
18
 
19
19
  def self.instance(access_token)
20
- GithubApi.new(token: access_token)
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: 100 })
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module KExt
4
4
  module Github
5
- VERSION = '0.0.3'
5
+ VERSION = '0.0.4'
6
6
  end
7
7
  end
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.3
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: 2021-04-19 00:00:00.000000000 Z
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.7
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