gleis 0.9.0 → 1.0.0

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: 52cf754e60ba92b22285232e14abc4771f3771d39835e822f3ade4ea8d83c6b8
4
- data.tar.gz: 12a49af88befe9f5675ee1891b39be4b5ff5d9b0acd9046f1514cdfcf6a0fe9d
3
+ metadata.gz: 8832f19d9aa54a36a1a1d1e7682b1ce6017294c22115bf83755d6eeb7331a2e3
4
+ data.tar.gz: 15f7458349747ce180483878bb02761473324130ac254d0754a388d7fb6535ff
5
5
  SHA512:
6
- metadata.gz: ec4cd4a23de25800f03f35fbb47ff2860a7e6a99812ab49e069edcfe3c23726d07ac7dbb53a5c7fa2dad7abc5b06d735cb7ed283d992d60c4b70820495f33a37
7
- data.tar.gz: d50b397a83a7c166fede102391e17aab3a3df9f75de0158a52bcf95c2ecb2ecb2591efb3047252e9b3d71ddf349ad2a9e678a02dbbae72cf32318ded7bff9608
6
+ metadata.gz: ca53e5e9fae14cd827ce6b476a911a3add034fec36fc70858b157cc898c3325a4c446a37aeb2efc6d320589a250831cbdb91ddd698a90bbcf4d2bd3905e03a92
7
+ data.tar.gz: 685270a20f7c4076aac97dc46784974abfbca9607567e2ef3a061210fcce5028c639631425c077934e51d4eff7720ad870e4e60d461fcae4b8a9431c2e6033ca
@@ -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
+ ## 1.0.0 - 2020-08-21
9
+
10
+ ### Added
11
+
12
+ - New command called healthcheck in order to show and change the health check path of an app
13
+
14
+ ### Changed
15
+
16
+ - References to old gleis.cloud domain by new domain name gleis.io
17
+ - Version dependency of thor
18
+
8
19
  ## 0.9.0 - 2020-06-26
9
20
 
10
21
  ### Added
data/exe/gleis CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'gleis/main'
4
4
 
5
- puts "\n### Gleis CLI Copyright (c) 2018-#{Time.new.year} towards GmbH - v#{Gleis::VERSION} - https://gleis.cloud ###\n\n" \
5
+ puts "\n### Gleis CLI Copyright (c) 2018-#{Time.new.year} towards GmbH - v#{Gleis::VERSION} - https://gleis.io ###\n\n" \
6
6
  unless ARGF.argv.include?('-q')
7
7
 
8
8
  trap 'SIGINT' do
@@ -110,6 +110,28 @@ module Gleis
110
110
  end
111
111
  end
112
112
 
113
+ def self.healthcheck(app_name, path)
114
+ token = Token.check
115
+ if path.empty?
116
+ body = API.request('get', "healthcheck/#{app_name}", token)
117
+ if body['success'] == 1
118
+ puts "The path for the health check of the #{app_name} app is: #{body['data']}"
119
+ else
120
+ puts 'Failed to fetch health check path for app.'
121
+ end
122
+ elsif Utils.uri_path_valid?(path)
123
+ body = API.request('post', 'healthcheck', token, 'name': app_name, 'path': path)
124
+ if body['success'] == 1
125
+ puts "Successfully changed app health check path to: #{path}\n\n"
126
+ puts "Don't forget to restart your app to make your change effective"
127
+ else
128
+ puts "Failed to change app health chech path: #{body['message']}"
129
+ end
130
+ else
131
+ puts 'Invalid health check path'
132
+ end
133
+ end
134
+
113
135
  def self.logs(app_name, follow, process)
114
136
  token = Token.check
115
137
  action = "logs/#{app_name}/#{process}?follow=#{follow}"
@@ -35,6 +35,11 @@ module Gleis
35
35
  Application.git(options[:app], options[:quiet])
36
36
  end
37
37
 
38
+ desc 'healthcheck [PATH]', 'Show or change the path for the health check'
39
+ def healthcheck(path = '')
40
+ Application.healthcheck(options[:app], path)
41
+ end
42
+
38
43
  desc 'logs', 'View last log entries of a process'
39
44
  option :follow, aliases: :'-f', type: :boolean, default: false,
40
45
  desc: 'Follow live log data'
@@ -3,6 +3,10 @@ require 'gleis'
3
3
  module Gleis
4
4
  # This class defines all the main command-line interface commands for gleis
5
5
  class Main < Thor
6
+ def self.exit_on_failure?
7
+ true
8
+ end
9
+
6
10
  desc 'login USERNAME', 'Login into Gleis'
7
11
  def login(username)
8
12
  Authentication.login(username)
@@ -130,5 +130,14 @@ module Gleis
130
130
  end
131
131
  nil
132
132
  end
133
+
134
+ def self.uri_path_valid?(path)
135
+ begin
136
+ URI.parse("http://localhost:3000#{path}")
137
+ rescue URI::InvalidURIError
138
+ return false
139
+ end
140
+ true
141
+ end
133
142
  end
134
143
  end
@@ -1,3 +1,3 @@
1
1
  module Gleis
2
- VERSION = '0.9.0'
2
+ VERSION = '1.0.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.9.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
- - Marc Bigler
7
+ - towards GmbH
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-26 00:00:00.000000000 Z
11
+ date: 2020-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,16 +114,16 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.20.0
117
+ version: '1.0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.20.0
125
- description: " Command-line interface to deploy and manage your Rails apps on the
126
- https://gleis.cloud Swiss Platform as a Service.\n"
124
+ version: '1.0'
125
+ description: " Command-line interface to deploy and manage your apps on the https://gleis.io
126
+ Swiss Platform as a Service supporting Ruby, Node.js, Python and .NET Core.\n"
127
127
  email:
128
128
  - gleis@towards.ch
129
129
  executables:
@@ -165,7 +165,7 @@ files:
165
165
  - lib/gleis/token.rb
166
166
  - lib/gleis/utils.rb
167
167
  - lib/gleis/version.rb
168
- homepage: https://gleis.cloud
168
+ homepage: https://gleis.io
169
169
  licenses:
170
170
  - GPL-3.0
171
171
  metadata:
@@ -188,5 +188,5 @@ requirements: []
188
188
  rubygems_version: 3.0.3
189
189
  signing_key:
190
190
  specification_version: 4
191
- summary: Gleis CLI to deploy and manage Rails apps on the Gleis PaaS
191
+ summary: Gleis CLI to deploy and manage apps on the Gleis PaaS
192
192
  test_files: []