aptible-cli 0.16.8 → 0.16.9

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: 7f9abbc0bef99a8ca0f69c0b3d9751e529d9b37b5528315b03481acc84b68868
4
- data.tar.gz: 916d97a558b654865ae9cbcf4532058a9070d19dbe6d984be7a5f233eb2884e6
3
+ metadata.gz: 0c9170855dbd5cf2000e91c545d019cc2e3b2ed5115f1a0c5baa7ae9961d1479
4
+ data.tar.gz: '07528b128af3da4c9b21e8bc17e07ed3184f0e58cb367804435bc48600dbc6dd'
5
5
  SHA512:
6
- metadata.gz: 6ef0c0c9dc25afdf19b680fcabcfd589cd74f246d7442361e79ef5f01d73382bd10ee21c9ca63a31a3f6a003ef0405c651b03e251c6e36525ddfebc86df7aeee
7
- data.tar.gz: 3457904ef7ab8e5ff0a5a63fd856633fea48460e8dd88b0ae5ba8181494d893bfe45027927e57c7b217cc89fb39f09eb3fe27abdcb929d1b6fd8d6ca7a6a5b18
6
+ metadata.gz: 2c145b617a27c9eb6fbda60b4953e12252c4d64b3ecc6d32493ad3f87f5a146567424f812cb495064974bdda7ece202bdbfbadc338a1f2252ace2e93451231f5
7
+ data.tar.gz: 5c200a84cdcfaebb37b45959d6d90177aec02218f3f53bff08f7d60127975c1eed5355b60340f91474bef3fb2df5de9bcf82c0ca930b6fb8d18775c225475fb1
@@ -10,7 +10,7 @@ end
10
10
  begin
11
11
  Aptible::CLI::Agent.start
12
12
  rescue HyperResource::ClientError => e
13
- m = if e.body['error'] == 'invalid_token'
13
+ m = if %w(invalid_token expired_token).include? e.body['error']
14
14
  'API authentication error: please run aptible login'
15
15
  else
16
16
  "An error occurred: #{e.body['message']}"
@@ -235,11 +235,7 @@ module Aptible
235
235
 
236
236
  def warn_sso_enforcement
237
237
  # If the user is also a member of
238
- begin
239
- token = fetch_token
240
- rescue StandardError
241
- return
242
- end
238
+ token = fetch_token
243
239
  reauth = Aptible::Auth::ReauthenticateOrganization.all(token: token)
244
240
  return if reauth.empty?
245
241
 
@@ -247,6 +243,7 @@ module Aptible
247
243
  'login method (SSO or Aptible credentials) to access',
248
244
  'these organizations:',
249
245
  reauth.map(&:name)].join(' '))
246
+ rescue StandardError
250
247
  end
251
248
 
252
249
  def version_string
@@ -1,5 +1,5 @@
1
1
  module Aptible
2
2
  module CLI
3
- VERSION = '0.16.8'.freeze
3
+ VERSION = '0.16.9'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aptible-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.8
4
+ version: 0.16.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank Macreery
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-23 00:00:00.000000000 Z
11
+ date: 2020-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aptible-resource