uffizzi-cli 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +61 -115
- data/config/uffizzi.rb +2 -1
- data/lib/uffizzi/auth_helper.rb +5 -6
- data/lib/uffizzi/cli/common.rb +1 -1
- data/lib/uffizzi/cli/config.rb +40 -8
- data/lib/uffizzi/cli/connect.rb +8 -8
- data/lib/uffizzi/cli/disconnect.rb +1 -1
- data/lib/uffizzi/cli/login.rb +29 -10
- data/lib/uffizzi/cli/logout.rb +2 -2
- data/lib/uffizzi/cli/preview/service.rb +6 -6
- data/lib/uffizzi/cli/preview.rb +11 -11
- data/lib/uffizzi/cli/project/compose.rb +12 -14
- data/lib/uffizzi/cli/project/secret.rb +6 -6
- data/lib/uffizzi/cli/project.rb +2 -2
- data/lib/uffizzi/cli.rb +8 -3
- data/lib/uffizzi/clients/api/api_client.rb +44 -42
- data/lib/uffizzi/clients/api/api_routes.rb +30 -30
- data/lib/uffizzi/clients/api/http_client.rb +2 -4
- data/lib/uffizzi/config_file.rb +36 -20
- data/lib/uffizzi/shell.rb +13 -4
- data/lib/uffizzi/version.rb +1 -1
- data/lib/uffizzi.rb +4 -0
- data/man/uffizzi-config +65 -0
- data/man/uffizzi-config.html +144 -0
- data/man/uffizzi-config.ronn +55 -0
- data/man/uffizzi-login +1 -1
- data/man/uffizzi-login.ronn +1 -1
- metadata +19 -2
data/lib/uffizzi/shell.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'awesome_print'
|
4
|
+
|
3
5
|
module Uffizzi
|
4
6
|
module UI
|
5
7
|
class Shell
|
@@ -13,10 +15,6 @@ module Uffizzi
|
|
13
15
|
@shell.say(message)
|
14
16
|
end
|
15
17
|
|
16
|
-
def ask(msg, *args)
|
17
|
-
@shell.ask(msg, *args)
|
18
|
-
end
|
19
|
-
|
20
18
|
def print_in_columns(messages)
|
21
19
|
@shell.print_in_columns(messages)
|
22
20
|
end
|
@@ -25,10 +23,21 @@ module Uffizzi
|
|
25
23
|
@shell.print_table(table_data)
|
26
24
|
end
|
27
25
|
|
26
|
+
def ask(message, *args)
|
27
|
+
answer = @shell.ask(message, *args)
|
28
|
+
options = args.last.is_a?(Hash) ? args.pop : {}
|
29
|
+
say("\n") unless options.fetch(:echo, true)
|
30
|
+
answer
|
31
|
+
end
|
32
|
+
|
28
33
|
def last_message
|
29
34
|
@shell.send(:stdout).string.strip
|
30
35
|
end
|
31
36
|
|
37
|
+
def pretty_say(collection, index = true)
|
38
|
+
ap(collection, { index: index })
|
39
|
+
end
|
40
|
+
|
32
41
|
def disable_stdout
|
33
42
|
$stdout = StringIO.new
|
34
43
|
end
|
data/lib/uffizzi/version.rb
CHANGED
data/lib/uffizzi.rb
CHANGED
data/man/uffizzi-config
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
.\" generated with Ronn-NG/v0.9.1
|
2
|
+
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
|
3
|
+
.TH "CONFIG" "" "April 2022" ""
|
4
|
+
.SH "NAME"
|
5
|
+
\fBconfig\fR \- configure the Uffizzi command\-line interface (CLI)
|
6
|
+
.SH "SYNOPSIS"
|
7
|
+
.nf
|
8
|
+
uffizzi config COMMAND [UFFIZZI_WIDE_FLAG \|\.\|\.\|\.]
|
9
|
+
.fi
|
10
|
+
.SH "DESCRIPTION"
|
11
|
+
.nf
|
12
|
+
The uffizzi config command lets you configure this command\-line application\.
|
13
|
+
If COMMAND is not specified, uffizzi config launches an interactive set up
|
14
|
+
guide\.
|
15
|
+
|
16
|
+
For more information on configuration options, see:
|
17
|
+
https://docs\.uffizzi\.com/references/cli
|
18
|
+
.fi
|
19
|
+
.SH "UFFIZZI WIDE FLAGS"
|
20
|
+
.nf
|
21
|
+
These flags are available to all commands: \-\-project\. Run $ uffizzi
|
22
|
+
help for details\.
|
23
|
+
.fi
|
24
|
+
.SH "COMMANDS"
|
25
|
+
.nf
|
26
|
+
COMMAND is one of the following:
|
27
|
+
|
28
|
+
get\-value OPTION
|
29
|
+
Displays the value of the specified option\.
|
30
|
+
|
31
|
+
list
|
32
|
+
Lists all options and their values from the config file\.
|
33
|
+
|
34
|
+
set OPTION VALUE
|
35
|
+
Sets the value of the specified option\.
|
36
|
+
|
37
|
+
unset OPTION
|
38
|
+
Deletes the value of the specified option\.
|
39
|
+
.fi
|
40
|
+
.SH "OPTIONS"
|
41
|
+
.nf
|
42
|
+
OPTION is one of the following:
|
43
|
+
|
44
|
+
server
|
45
|
+
The server of the Uffizzi API service you want to access\. Defaults to
|
46
|
+
app\.uffizzi\.com\.
|
47
|
+
|
48
|
+
name
|
49
|
+
Your name\.
|
50
|
+
|
51
|
+
project
|
52
|
+
The current active project\. This project is used as the default unless
|
53
|
+
\-\-project is pass as an argument\.
|
54
|
+
.fi
|
55
|
+
.SH "EXAMPLES"
|
56
|
+
.nf
|
57
|
+
To list the uffizzi configuration options, run:
|
58
|
+
|
59
|
+
$ uffizzi config list
|
60
|
+
|
61
|
+
To set a new current active project for uffizzi, run:
|
62
|
+
|
63
|
+
$ uffizzi config set project my\-project
|
64
|
+
.fi
|
65
|
+
|
@@ -0,0 +1,144 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv='content-type' content='text/html;charset=utf8'>
|
5
|
+
<meta name='generator' content='Ronn-NG/v0.9.1 (http://github.com/apjanke/ronn-ng/tree/0.9.1)'>
|
6
|
+
<title>configure the Uffizzi command-line interface (CLI)</title>
|
7
|
+
<style type='text/css' media='all'>
|
8
|
+
/* style: man */
|
9
|
+
body#manpage {margin:0}
|
10
|
+
.mp {max-width:100ex;padding:0 9ex 1ex 4ex}
|
11
|
+
.mp p,.mp pre,.mp ul,.mp ol,.mp dl {margin:0 0 20px 0}
|
12
|
+
.mp h2 {margin:10px 0 0 0}
|
13
|
+
.mp > p,.mp > pre,.mp > ul,.mp > ol,.mp > dl {margin-left:8ex}
|
14
|
+
.mp h3 {margin:0 0 0 4ex}
|
15
|
+
.mp dt {margin:0;clear:left}
|
16
|
+
.mp dt.flush {float:left;width:8ex}
|
17
|
+
.mp dd {margin:0 0 0 9ex}
|
18
|
+
.mp h1,.mp h2,.mp h3,.mp h4 {clear:left}
|
19
|
+
.mp pre {margin-bottom:20px}
|
20
|
+
.mp pre+h2,.mp pre+h3 {margin-top:22px}
|
21
|
+
.mp h2+pre,.mp h3+pre {margin-top:5px}
|
22
|
+
.mp img {display:block;margin:auto}
|
23
|
+
.mp h1.man-title {display:none}
|
24
|
+
.mp,.mp code,.mp pre,.mp tt,.mp kbd,.mp samp,.mp h3,.mp h4 {font-family:monospace;font-size:14px;line-height:1.42857142857143}
|
25
|
+
.mp h2 {font-size:16px;line-height:1.25}
|
26
|
+
.mp h1 {font-size:20px;line-height:2}
|
27
|
+
.mp {text-align:justify;background:#fff}
|
28
|
+
.mp,.mp code,.mp pre,.mp pre code,.mp tt,.mp kbd,.mp samp {color:#131211}
|
29
|
+
.mp h1,.mp h2,.mp h3,.mp h4 {color:#030201}
|
30
|
+
.mp u {text-decoration:underline}
|
31
|
+
.mp code,.mp strong,.mp b {font-weight:bold;color:#131211}
|
32
|
+
.mp em,.mp var {font-style:italic;color:#232221;text-decoration:none}
|
33
|
+
.mp a,.mp a:link,.mp a:hover,.mp a code,.mp a pre,.mp a tt,.mp a kbd,.mp a samp {color:#0000ff}
|
34
|
+
.mp b.man-ref {font-weight:normal;color:#434241}
|
35
|
+
.mp pre {padding:0 4ex}
|
36
|
+
.mp pre code {font-weight:normal;color:#434241}
|
37
|
+
.mp h2+pre,h3+pre {padding-left:0}
|
38
|
+
ol.man-decor,ol.man-decor li {margin:3px 0 10px 0;padding:0;float:left;width:33%;list-style-type:none;text-transform:uppercase;color:#999;letter-spacing:1px}
|
39
|
+
ol.man-decor {width:100%}
|
40
|
+
ol.man-decor li.tl {text-align:left}
|
41
|
+
ol.man-decor li.tc {text-align:center;letter-spacing:4px}
|
42
|
+
ol.man-decor li.tr {text-align:right;float:right}
|
43
|
+
</style>
|
44
|
+
</head>
|
45
|
+
<!--
|
46
|
+
The following styles are deprecated and will be removed at some point:
|
47
|
+
div#man, div#man ol.man, div#man ol.head, div#man ol.man.
|
48
|
+
|
49
|
+
The .man-page, .man-decor, .man-head, .man-foot, .man-title, and
|
50
|
+
.man-navigation should be used instead.
|
51
|
+
-->
|
52
|
+
<body id='manpage'>
|
53
|
+
<div class='mp' id='man'>
|
54
|
+
|
55
|
+
<div class='man-navigation' style='display:none'>
|
56
|
+
<a href="#NAME">NAME</a>
|
57
|
+
<a href="#SYNOPSIS">SYNOPSIS</a>
|
58
|
+
<a href="#DESCRIPTION">DESCRIPTION</a>
|
59
|
+
<a href="#UFFIZZI-WIDE-FLAGS">UFFIZZI WIDE FLAGS</a>
|
60
|
+
<a href="#COMMANDS">COMMANDS</a>
|
61
|
+
<a href="#OPTIONS">OPTIONS</a>
|
62
|
+
<a href="#EXAMPLES">EXAMPLES</a>
|
63
|
+
</div>
|
64
|
+
|
65
|
+
<ol class='man-decor man-head man head'>
|
66
|
+
<li class='tl'>config</li>
|
67
|
+
<li class='tc'></li>
|
68
|
+
<li class='tr'>config</li>
|
69
|
+
</ol>
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<h2 id="NAME">NAME</h2>
|
74
|
+
<p class="man-name">
|
75
|
+
<code>config</code> - <span class="man-whatis">configure the Uffizzi command-line interface (CLI)</span>
|
76
|
+
</p>
|
77
|
+
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
78
|
+
<pre><code>uffizzi config COMMAND [UFFIZZI_WIDE_FLAG ...]
|
79
|
+
</code></pre>
|
80
|
+
|
81
|
+
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
82
|
+
<pre><code>The uffizzi config command lets you configure this command-line application.
|
83
|
+
If COMMAND is not specified, uffizzi config launches an interactive set up
|
84
|
+
guide.
|
85
|
+
|
86
|
+
For more information on configuration options, see:
|
87
|
+
https://docs.uffizzi.com/references/cli
|
88
|
+
</code></pre>
|
89
|
+
|
90
|
+
<h2 id="UFFIZZI-WIDE-FLAGS">UFFIZZI WIDE FLAGS</h2>
|
91
|
+
<pre><code>These flags are available to all commands: --project. Run $ uffizzi
|
92
|
+
help for details.
|
93
|
+
</code></pre>
|
94
|
+
|
95
|
+
<h2 id="COMMANDS">COMMANDS</h2>
|
96
|
+
<pre><code>COMMAND is one of the following:
|
97
|
+
|
98
|
+
get-value OPTION
|
99
|
+
Displays the value of the specified option.
|
100
|
+
|
101
|
+
list
|
102
|
+
Lists all options and their values from the config file.
|
103
|
+
|
104
|
+
set OPTION VALUE
|
105
|
+
Sets the value of the specified option.
|
106
|
+
|
107
|
+
unset OPTION
|
108
|
+
Deletes the value of the specified option.
|
109
|
+
</code></pre>
|
110
|
+
|
111
|
+
<h2 id="OPTIONS">OPTIONS</h2>
|
112
|
+
<pre><code> OPTION is one of the following:
|
113
|
+
|
114
|
+
server
|
115
|
+
The server of the Uffizzi API service you want to access. Defaults to
|
116
|
+
app.uffizzi.com.
|
117
|
+
|
118
|
+
name
|
119
|
+
Your name.
|
120
|
+
|
121
|
+
project
|
122
|
+
The current active project. This project is used as the default unless
|
123
|
+
--project is pass as an argument.
|
124
|
+
</code></pre>
|
125
|
+
|
126
|
+
<h2 id="EXAMPLES">EXAMPLES</h2>
|
127
|
+
<pre><code>To list the uffizzi configuration options, run:
|
128
|
+
|
129
|
+
$ uffizzi config list
|
130
|
+
|
131
|
+
To set a new current active project for uffizzi, run:
|
132
|
+
|
133
|
+
$ uffizzi config set project my-project
|
134
|
+
</code></pre>
|
135
|
+
|
136
|
+
<ol class='man-decor man-foot man foot'>
|
137
|
+
<li class='tl'></li>
|
138
|
+
<li class='tc'>April 2022</li>
|
139
|
+
<li class='tr'>config</li>
|
140
|
+
</ol>
|
141
|
+
|
142
|
+
</div>
|
143
|
+
</body>
|
144
|
+
</html>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
uffizzi config - configure the Uffizzi command-line interface (CLI)
|
2
|
+
================================================================
|
3
|
+
|
4
|
+
## SYNOPSIS
|
5
|
+
uffizzi config COMMAND [UFFIZZI_WIDE_FLAG ...]
|
6
|
+
|
7
|
+
## DESCRIPTION
|
8
|
+
The uffizzi config command lets you configure this command-line application.
|
9
|
+
If COMMAND is not specified, uffizzi config launches an interactive set up
|
10
|
+
guide.
|
11
|
+
|
12
|
+
For more information on configuration options, see:
|
13
|
+
https://docs.uffizzi.com/references/cli
|
14
|
+
|
15
|
+
## UFFIZZI WIDE FLAGS
|
16
|
+
These flags are available to all commands: --project. Run $ uffizzi
|
17
|
+
help for details.
|
18
|
+
|
19
|
+
## COMMANDS
|
20
|
+
COMMAND is one of the following:
|
21
|
+
|
22
|
+
get-value OPTION
|
23
|
+
Displays the value of the specified option.
|
24
|
+
|
25
|
+
list
|
26
|
+
Lists all options and their values from the config file.
|
27
|
+
|
28
|
+
set OPTION VALUE
|
29
|
+
Sets the value of the specified option.
|
30
|
+
|
31
|
+
unset OPTION
|
32
|
+
Deletes the value of the specified option.
|
33
|
+
|
34
|
+
## OPTIONS
|
35
|
+
OPTION is one of the following:
|
36
|
+
|
37
|
+
server
|
38
|
+
The server of the Uffizzi API service you want to access. Defaults to
|
39
|
+
app.uffizzi.com.
|
40
|
+
|
41
|
+
name
|
42
|
+
Your name.
|
43
|
+
|
44
|
+
project
|
45
|
+
The current active project. This project is used as the default unless
|
46
|
+
--project is pass as an argument.
|
47
|
+
|
48
|
+
## EXAMPLES
|
49
|
+
To list the uffizzi configuration options, run:
|
50
|
+
|
51
|
+
$ uffizzi config list
|
52
|
+
|
53
|
+
To set a new current active project for uffizzi, run:
|
54
|
+
|
55
|
+
$ uffizzi config set project my-project
|
data/man/uffizzi-login
CHANGED
data/man/uffizzi-login.ronn
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uffizzi-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Thurman
|
@@ -9,8 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-04-
|
12
|
+
date: 2022-04-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: awesome_print
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
14
28
|
- !ruby/object:Gem::Dependency
|
15
29
|
name: thor
|
16
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -315,6 +329,9 @@ files:
|
|
315
329
|
- lib/uffizzi/shell.rb
|
316
330
|
- lib/uffizzi/version.rb
|
317
331
|
- man/uffizzi
|
332
|
+
- man/uffizzi-config
|
333
|
+
- man/uffizzi-config.html
|
334
|
+
- man/uffizzi-config.ronn
|
318
335
|
- man/uffizzi-login
|
319
336
|
- man/uffizzi-login.html
|
320
337
|
- man/uffizzi-login.ronn
|