github-lister-core 0.1.2 → 0.1.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
  SHA256:
3
- metadata.gz: f137310902b24d7370a9c05cd06a01223c8d023993aa064b1b4ad5a61e6c3ae4
4
- data.tar.gz: 14bcca94a36b8b2716478fa114202d23722118c7745e14e52647ff3eaec3086c
3
+ metadata.gz: 69e0e8f5f349a698eb1b99c945f668a1a938f8a4c38ec64aff83b6dcdee8712c
4
+ data.tar.gz: 69892b6cad7a41268d2623e38e7855cd98f27f8c32e21b8279b271066e5ab37b
5
5
  SHA512:
6
- metadata.gz: 31e825500d42c0f357d87f9d89b5da6d97d4479c1caf6f3bb51e560588209b2820fb70c6250f69b5a35abdf03747a3d52acf409495aa73bbce60e384998bf4cc
7
- data.tar.gz: 980999e9641fa14070cf0193348b83cd7daac027d29ec9cbc57c10b7d72410b4ba7a808836539b44442a77b865b9ca8b0692fbc8892ade7ba1dcc3e105677913
6
+ metadata.gz: 8bba4f41728ddf17d22a1c12725b6174d268f1f59158920bf2d4ce6ef60bf4864a6d0063f627345b1ee574c41f65bf11dce2cf807ee66ff122211464b11cb1a6
7
+ data.tar.gz: 177be0a23e51e378ae0a153c14c2047f1b167a833527b1449c5fe317b644d78da47919b4b0b4b20a2182640585caa70859e8300357f176cb2f0aaf7d9ff757e0
data/.rubocop.yml CHANGED
@@ -23,6 +23,9 @@ Style/HashSyntax:
23
23
  Style/RaiseArgs:
24
24
  EnforcedStyle: compact
25
25
 
26
+ Style/RedundantBegin:
27
+ Enabled: false
28
+
26
29
  Style/Semicolon:
27
30
  AllowAsExpressionSeparator: true
28
31
 
data/CHANGELOG.md CHANGED
@@ -5,11 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
 
6
6
  This changelog was automatically generated using [Caretaker](https://github.com/DevelopersToolbox/caretaker) by [Wolf Software](https://github.com/WolfSoftware)
7
7
 
8
+ ### [v0.1.3](https://github.com/DevelopersToolbox/github-lister-core/compare/v0.1.2...v0.1.3)
9
+
10
+ > Released on March, 12th 2021
11
+
12
+ - Added a begin->rescue->end to handle incorrect or expired PAT codes when looking up a username [`[head]`](https://github.com/DevelopersToolbox/github-lister-core/commit/)
13
+
8
14
  ### [v0.1.2](https://github.com/DevelopersToolbox/github-lister-core/compare/v0.1.1...v0.1.2)
9
15
 
10
16
  > Released on March, 10th 2021
11
17
 
12
- - Fixed error where additional information wasn't being decoded from sawyer::resource and returned as JSON [`[head]`](https://github.com/DevelopersToolbox/github-lister-core/commit/)
18
+ - Fixed error where additional information wasn't being decoded from sawyer::resource and returned as JSON [`[5b77168]`](https://github.com/DevelopersToolbox/github-lister-core/commit/5b7716876aabd35b93f55bdc85b3145f9536044c)
13
19
 
14
20
  ### [v0.1.1](https://github.com/DevelopersToolbox/github-lister-core/compare/v0.1.0...v0.1.1)
15
21
 
data/VERSION.txt CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -26,12 +26,20 @@ class GithubListerCore
26
26
  user_list
27
27
  end
28
28
 
29
+ def get_authed_username(client)
30
+ begin
31
+ client.user if client.user_authenticated?
32
+ rescue Octokit::Unauthorized => _exception
33
+ raise InvalidTokenError.new
34
+ end
35
+ end
36
+
29
37
  #
30
38
  # Users can be a string (comma separated) or an array nothing else
31
39
  #
32
40
  def get_user_list(client, options)
33
41
  user_list = get_option(options, [:user, :username])
34
- authed = client.user if client.user_authenticated?
42
+ authed = get_authed_username(client)
35
43
 
36
44
  return convert_to_array(authed) unless user_list
37
45
 
@@ -1,3 +1,3 @@
1
1
  class GithubListerCore
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
@@ -27,6 +27,6 @@ class GithubListerCore
27
27
  end
28
28
  results || []
29
29
  end
30
+ # rubocop:enable Metrics/MethodLength
30
31
  end
31
- # rubocop:enable Metrics/MethodLength
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-lister-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Gurney aka Wolf
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-10 00:00:00.000000000 Z
11
+ date: 2021-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler