Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <[email protected]>
  • Loading branch information
jessfraz committed Feb 21, 2024
1 parent 053e8ce commit 8dc0501
Show file tree
Hide file tree
Showing 8 changed files with 7,588 additions and 1,702 deletions.
747 changes: 509 additions & 238 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zoo"
version = "0.2.20"
version = "0.2.21"
edition = "2021"
build = "build.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
6 changes: 5 additions & 1 deletion cli-macro-impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,11 @@ impl Operation {
//if v.required {
req_body_rendered.push(quote!(#p_og: "".to_string()));
} else if v.required {
req_body_rendered.push(quote!(#p_og: #p_short.clone()));
if self.method == "PUT" {
req_body_rendered.push(quote!(#p_og: self.#p_short.clone()));
} else {
req_body_rendered.push(quote!(#p_og: #p_short.clone()));
}
} else {
// We can use self here since we aren't chaing the value from
// a prompt.
Expand Down
5 changes: 5 additions & 0 deletions cli-macro-impl/tests/gen/users.rs.gen
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ pub struct CmdUserEdit {
#[doc = "The user's GitHub handle."]
#[clap(long = "github", short = 'g', required = false)]
pub new_github: Option<String>,
#[doc = "The image URL for the user. NOTE: If the user uses an OAuth2 provider, this will be overwritten by the provider's image URL when the user logs in next."]
#[clap(long = "image", short = 'i', required = true)]
pub new_image: String,
#[doc = "The user's last name."]
#[clap(long = "last-name", short = 'l', required = false)]
pub new_last_name: Option<String>,
Expand All @@ -67,6 +70,7 @@ impl crate::cmd::Command for CmdUserEdit {
&& self.new_discord.is_none()
&& self.new_first_name.is_none()
&& self.new_github.is_none()
&& self.new_image.is_empty()
&& self.new_last_name.is_none()
&& self.new_phone.is_none()
{
Expand All @@ -81,6 +85,7 @@ impl crate::cmd::Command for CmdUserEdit {
discord: self.new_discord.clone(),
first_name: self.new_first_name.clone(),
github: self.new_github.clone(),
image: self.new_image.clone(),
last_name: self.new_last_name.clone(),
phone: self.new_phone.clone(),
})
Expand Down
Loading

0 comments on commit 8dc0501

Please sign in to comment.