chore(aws): adds space to the duration variable (#3872)
This commit is contained in:
parent
b79df46e0d
commit
6def45b751
|
@ -12,7 +12,7 @@
|
||||||
"disabled": false,
|
"disabled": false,
|
||||||
"expiration_symbol": "X",
|
"expiration_symbol": "X",
|
||||||
"force_display": false,
|
"force_display": false,
|
||||||
"format": "on [$symbol($profile )(\\($region\\) )(\\[$duration\\])]($style)",
|
"format": "on [$symbol($profile )(\\($region\\) )(\\[$duration\\] )]($style)",
|
||||||
"profile_aliases": {},
|
"profile_aliases": {},
|
||||||
"region_aliases": {},
|
"region_aliases": {},
|
||||||
"style": "bold yellow",
|
"style": "bold yellow",
|
||||||
|
@ -1479,7 +1479,7 @@
|
||||||
"properties": {
|
"properties": {
|
||||||
"format": {
|
"format": {
|
||||||
"description": "The format for the module.",
|
"description": "The format for the module.",
|
||||||
"default": "on [$symbol($profile )(\\($region\\) )(\\[$duration\\])]($style)",
|
"default": "on [$symbol($profile )(\\($region\\) )(\\[$duration\\] )]($style)",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"symbol": {
|
"symbol": {
|
||||||
|
|
|
@ -306,16 +306,16 @@ date is read from the `AWSUME_EXPIRATION` env var.
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
| ------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||||
| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\])]($style)'` | The format for the module. |
|
| `format` | `'on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)'` | The format for the module. |
|
||||||
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. |
|
||||||
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
| `region_aliases` | | Table of region aliases to display in addition to the AWS name. |
|
||||||
| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. |
|
| `profile_aliases` | | Table of profile aliases to display in addition to the AWS name. |
|
||||||
| `style` | `"bold yellow"` | The style for the module. |
|
| `style` | `"bold yellow"` | The style for the module. |
|
||||||
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
| `expiration_symbol` | `X` | The symbol displayed when the temporary credentials have expired. |
|
||||||
| `disabled` | `false` | Disables the `AWS` module. |
|
| `disabled` | `false` | Disables the `AWS` module. |
|
||||||
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
|
| `force_display` | `false` | If `true` displays info even if `credentials`, `credential_process` or `sso_start_url` have not been setup. |
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ pub struct AwsConfig<'a> {
|
||||||
impl<'a> Default for AwsConfig<'a> {
|
impl<'a> Default for AwsConfig<'a> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
AwsConfig {
|
AwsConfig {
|
||||||
format: "on [$symbol($profile )(\\($region\\) )(\\[$duration\\])]($style)",
|
format: "on [$symbol($profile )(\\($region\\) )(\\[$duration\\] )]($style)",
|
||||||
symbol: "☁️ ",
|
symbol: "☁️ ",
|
||||||
style: "bold yellow",
|
style: "bold yellow",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
|
|
|
@ -633,7 +633,7 @@ credential_process = /opt/bin/awscreds-retriever
|
||||||
"on {}",
|
"on {}",
|
||||||
Color::Yellow
|
Color::Yellow
|
||||||
.bold()
|
.bold()
|
||||||
.paint("☁️ astronauts (ap-northeast-2) [30m]")
|
.paint("☁️ astronauts (ap-northeast-2) [30m] ")
|
||||||
));
|
));
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
|
@ -679,7 +679,7 @@ expiration={}
|
||||||
// on shared runners may delay it. Allow for up to 2 seconds of delay.
|
// on shared runners may delay it. Allow for up to 2 seconds of delay.
|
||||||
let possible_values = ["30m", "29m59s", "29m58s"];
|
let possible_values = ["30m", "29m59s", "29m58s"];
|
||||||
let possible_values = possible_values.map(|duration| {
|
let possible_values = possible_values.map(|duration| {
|
||||||
let segment_colored = format!("☁️ astronauts (ap-northeast-2) [{}]", duration);
|
let segment_colored = format!("☁️ astronauts (ap-northeast-2) [{}] ", duration);
|
||||||
Some(format!(
|
Some(format!(
|
||||||
"on {}",
|
"on {}",
|
||||||
Color::Yellow.bold().paint(segment_colored)
|
Color::Yellow.bold().paint(segment_colored)
|
||||||
|
@ -736,7 +736,7 @@ expiration={}
|
||||||
"on {}",
|
"on {}",
|
||||||
Color::Yellow
|
Color::Yellow
|
||||||
.bold()
|
.bold()
|
||||||
.paint(format!("☁️ astronauts (ap-northeast-2) [{}]", symbol))
|
.paint(format!("☁️ astronauts (ap-northeast-2) [{}] ", symbol))
|
||||||
));
|
));
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
|
|
Loading…
Reference in New Issue