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 +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/gleis/api.rb +9 -3
- data/lib/gleis/application.rb +1 -0
- data/lib/gleis/ssh.rb +2 -2
- data/lib/gleis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52cf754e60ba92b22285232e14abc4771f3771d39835e822f3ade4ea8d83c6b8
|
4
|
+
data.tar.gz: 12a49af88befe9f5675ee1891b39be4b5ff5d9b0acd9046f1514cdfcf6a0fe9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec4cd4a23de25800f03f35fbb47ff2860a7e6a99812ab49e069edcfe3c23726d07ac7dbb53a5c7fa2dad7abc5b06d735cb7ed283d992d60c4b70820495f33a37
|
7
|
+
data.tar.gz: d50b397a83a7c166fede102391e17aab3a3df9f75de0158a52bcf95c2ecb2ecb2591efb3047252e9b3d71ddf349ad2a9e678a02dbbae72cf32318ded7bff9608
|
data/CHANGELOG.md
CHANGED
@@ -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
|
data/lib/gleis/api.rb
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
|
-
#
|
53
|
-
|
54
|
-
|
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
|
data/lib/gleis/application.rb
CHANGED
data/lib/gleis/ssh.rb
CHANGED
@@ -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
|
-
"-
|
17
|
+
"-Cgenerated by Gleis CLI for #{username} by #{ENV['USER']}@#{hostname} on #{datetime}")
|
18
18
|
else
|
19
|
-
puts 'The SSH key
|
19
|
+
puts 'The SSH key generator command ssh-keygen is not installed on this system.'
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
data/lib/gleis/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|