class Gleis::Management
The class implements management and administrative methods around the Gleis
platform
Public Class Methods
apps()
click to toggle source
# File lib/gleis/management.rb, line 4 def self.apps token = Token.check body = API.request('get', 'mgmt/apps', token) apps = body ['data'] if apps.any? puts "Apps list for your organisation:\n\n" printf("\t%-39s %-25s %s\n", 'APP NAME', 'CREATED ON', 'PLAN') printf("\t%-39s %-25s %s\n\n", '--------', '----------', '----') apps.each do |app| printf("\t%-39s %-25s %s\n", app['name'], Time.parse(app['created_at']).localtime.strftime('%c'), app['plan_name'].capitalize) end else puts 'No apps found.' end end
license()
click to toggle source
# File lib/gleis/management.rb, line 21 def self.license puts <<LICENSE Gleis Command Line Interface for the Gleis Platform as a Service Copyright (C) 2018-#{Time.new.year} towards GmbH This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. LICENSE end