usps-support 0.2.42 → 0.2.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/usps/support/models/git_hub.rb +13 -7
- data/lib/usps/support/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b04ede6eeee252cd53b27f9d9938019e9f2a81d467ca077bab1b17087fce0bc6
|
|
4
|
+
data.tar.gz: aef62058741366eee1794b4ebdee5031f91ec78ee46ef60df3e277ab7ddb04aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 191a90199bdcf0509844d3e12f158e1cad908b1c8c8ad97167bc1d6c464e3ae9bc8984a094306274bcbf806bc815a8385ce849524d1bb372557d592e00f57e07
|
|
7
|
+
data.tar.gz: 5660fd1df623ce3988efdc5c607743095100d7a18e3815ca233bf57bf0313f2a39b728d8b308dac69c8838457f626449f631cafcb6dc4369bdf64f95d49025b8
|
|
@@ -40,13 +40,19 @@ module Usps::Support::Models
|
|
|
40
40
|
.first
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
-
def expired? = expires_at <= Time.zone.now
|
|
44
|
-
def expires_at =
|
|
45
|
-
def permissions =
|
|
46
|
-
def repository_selection =
|
|
43
|
+
def expired? = @auth.nil? || expires_at <= Time.zone.now
|
|
44
|
+
def expires_at = auth[:expires_at]
|
|
45
|
+
def permissions = auth[:permissions]
|
|
46
|
+
def repository_selection = auth[:repository_selection]
|
|
47
47
|
|
|
48
48
|
private
|
|
49
49
|
|
|
50
|
+
def auth
|
|
51
|
+
client if @auth.nil? # Ensure @auth exists
|
|
52
|
+
|
|
53
|
+
@auth
|
|
54
|
+
end
|
|
55
|
+
|
|
50
56
|
def client
|
|
51
57
|
return @client if @client && !expired?
|
|
52
58
|
|
|
@@ -64,9 +70,9 @@ module Usps::Support::Models
|
|
|
64
70
|
jwt = JWT.encode(payload, private_key, 'RS256')
|
|
65
71
|
app_client = Octokit::Client.new(bearer_token: jwt)
|
|
66
72
|
|
|
67
|
-
|
|
68
|
-
@auth =
|
|
69
|
-
@client = Octokit::Client.new(access_token:
|
|
73
|
+
response = app_client.create_app_installation_access_token(ENV['GITHUB_INSTALLATION_ID'].to_i).to_h
|
|
74
|
+
@auth = response.except(:token)
|
|
75
|
+
@client = Octokit::Client.new(access_token: response[:token])
|
|
70
76
|
end
|
|
71
77
|
end
|
|
72
78
|
end
|
data/lib/usps/support/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: usps-support
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.44
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Julian Fiander
|
|
@@ -52,7 +52,7 @@ dependencies:
|
|
|
52
52
|
version: '1'
|
|
53
53
|
- - ">="
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: 1.2.
|
|
55
|
+
version: 1.2.2
|
|
56
56
|
type: :runtime
|
|
57
57
|
prerelease: false
|
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -62,7 +62,7 @@ dependencies:
|
|
|
62
62
|
version: '1'
|
|
63
63
|
- - ">="
|
|
64
64
|
- !ruby/object:Gem::Version
|
|
65
|
-
version: 1.2.
|
|
65
|
+
version: 1.2.2
|
|
66
66
|
description: Shared support for USPS Rails applications
|
|
67
67
|
email:
|
|
68
68
|
- jsfiander@gmail.com
|