gleis 0.8.0 → 0.9.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5279f32d3b80eb5907b580db6a0377e308901890709e6a7db19e2118210decfd
4
- data.tar.gz: f613f56d5dce97e59304b0e223cb94df1fab942e1e678ac24d5548bc7bee061e
3
+ metadata.gz: 52cf754e60ba92b22285232e14abc4771f3771d39835e822f3ade4ea8d83c6b8
4
+ data.tar.gz: 12a49af88befe9f5675ee1891b39be4b5ff5d9b0acd9046f1514cdfcf6a0fe9d
5
5
  SHA512:
6
- metadata.gz: 36336262ed60d02bac812b5617415b2d1dca4ba40b1c2d1ee1563e38a6c3e37ac7ac5f5229a718dc39203b82e736880a206eed3a71cb6b85c6c35501d907c464
7
- data.tar.gz: 6264718149ab07be6825e20141921a38d9880ad5f2545d0dfb79684ef240997208e0c3352e58748d5055c3c103ab2696ed79703218f74befbf10b18c7597f206
6
+ metadata.gz: ec4cd4a23de25800f03f35fbb47ff2860a7e6a99812ab49e069edcfe3c23726d07ac7dbb53a5c7fa2dad7abc5b06d735cb7ed283d992d60c4b70820495f33a37
7
+ data.tar.gz: d50b397a83a7c166fede102391e17aab3a3df9f75de0158a52bcf95c2ecb2ecb2591efb3047252e9b3d71ddf349ad2a9e678a02dbbae72cf32318ded7bff9608
@@ -5,6 +5,17 @@ All notable changes to the Gleis CLI will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.9.0 - 2020-06-26
9
+
10
+ ### Added
11
+
12
+ - Meaningful reason why app create command failed in case of problem
13
+
14
+ ### Fixed
15
+
16
+ - Extra space in SSH key generator comment and typo in user message when command is unavailable
17
+ - Raw invalid token message when session times out during the app logs command in follow mode
18
+
8
19
  ## 0.8.0 - 2020-04-19
9
20
 
10
21
  ### Changed
@@ -23,6 +23,11 @@ module Gleis
23
23
  when 'stream'
24
24
  stream_output = proc { |response|
25
25
  response.read_body do |chunk|
26
+ # Catch timed out session during streaming response to client (e.g. follow log)
27
+ # in order not to display raw "invalid token" JSON response from API
28
+ chunk == '{"message":"invalid token"}' && abort('Session has timed out, please login again (invalid token).')
29
+ # Catch application not found raw JSON response from API
30
+ chunk == '{"message":"app not found"}' && abort('Application not found.')
26
31
  puts chunk
27
32
  end
28
33
  }
@@ -49,9 +54,10 @@ module Gleis
49
54
  rescue StandardError # (e.g. SocketError, Errno::ECONNREFUSED, RestClient::BadGateway, ...)
50
55
  abort('There was an issue connecting to the Gleis API server.')
51
56
  else
52
- # Streaming GET returns Net::HTTPInternalServerError in case of issue and no usable response body
53
- # In that case the class of resp.body == Net::ReadAdapter
54
- if defined? resp
57
+ # In case the user's session expires during streaming the response class will be NilClass
58
+ if (defined? resp) && resp.class != NilClass
59
+ # Streaming GET returns Net::HTTPInternalServerError in case of issue and no usable response body,
60
+ # in that case the class of resp.body == Net::ReadAdapter
55
61
  if resp.body.empty?
56
62
  # If there is no body return whole response object
57
63
  resp
@@ -38,6 +38,7 @@ module Gleis
38
38
  puts "You can then access your app using the URL https://#{body['dns_name']}" if body.key? 'dns_name'
39
39
  else
40
40
  puts 'failed!'
41
+ puts "\nReason for failure: #{body['message']}" unless body['message'].nil?
41
42
  end
42
43
  end
43
44
 
@@ -14,9 +14,9 @@ module Gleis
14
14
  # returns true on success and nil if command is not found or failed
15
15
  if Utils.which('ssh-keygen')
16
16
  system('ssh-keygen', '-f', key_file, '-b 4096',
17
- "-C generated by Gleis CLI for #{username} by #{ENV['USER']}@#{hostname} on #{datetime}")
17
+ "-Cgenerated by Gleis CLI for #{username} by #{ENV['USER']}@#{hostname} on #{datetime}")
18
18
  else
19
- puts 'The SSH key genator command ssh-keygen is not installed on this system.'
19
+ puts 'The SSH key generator command ssh-keygen is not installed on this system.'
20
20
  end
21
21
  end
22
22
 
@@ -1,3 +1,3 @@
1
1
  module Gleis
2
- VERSION = '0.8.0'
2
+ VERSION = '0.9.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gleis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Bigler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-19 00:00:00.000000000 Z
11
+ date: 2020-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler