Skip to content

Commit

Permalink
chore(code-update): upgrade to latest hyper+clap
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Jul 15, 2015
1 parent be894be commit e465359
Show file tree
Hide file tree
Showing 243 changed files with 590 additions and 695 deletions.
4 changes: 2 additions & 2 deletions gen/adexchangebuyer1d3-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ keywords = ["adexchangebuyer", "google", "cli"]
name = "adexchangebuyer1d3"

[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
strsim = "*"
yup-hyper-mock = ">=1.0.0"
clap = ">= 0.9.1"
clap = ">= 1.0.3"

[build-dependencies]
syntex = { version = "*" }
Expand Down
4 changes: 2 additions & 2 deletions gen/adexchangebuyer1d3-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2306,10 +2306,10 @@ fn main() {
.takes_value(false));

for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::new(main_command_name).about(about);
let mut mcmd = SubCommand::with_name(main_command_name).about(about);

for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
let mut scmd = SubCommand::new(sub_command_name);
let mut scmd = SubCommand::with_name(sub_command_name);
if let &Some(desc) = desc {
scmd = scmd.about(desc);
}
Expand Down
2 changes: 1 addition & 1 deletion gen/adexchangebuyer1d3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build = "src/build.rs"


[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
Expand Down
4 changes: 2 additions & 2 deletions gen/adexchangeseller2-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ keywords = ["adexchangeseller", "google", "cli"]
name = "adexchangeseller2"

[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
strsim = "*"
yup-hyper-mock = ">=1.0.0"
clap = ">= 0.9.1"
clap = ">= 1.0.3"

[build-dependencies]
syntex = { version = "*" }
Expand Down
4 changes: 2 additions & 2 deletions gen/adexchangeseller2-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1371,10 +1371,10 @@ fn main() {
.takes_value(false));

for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::new(main_command_name).about(about);
let mut mcmd = SubCommand::with_name(main_command_name).about(about);

for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
let mut scmd = SubCommand::new(sub_command_name);
let mut scmd = SubCommand::with_name(sub_command_name);
if let &Some(desc) = desc {
scmd = scmd.about(desc);
}
Expand Down
2 changes: 1 addition & 1 deletion gen/adexchangeseller2/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build = "src/build.rs"


[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
Expand Down
4 changes: 2 additions & 2 deletions gen/admin1_directory-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ keywords = ["admin", "google", "cli"]
name = "admin1-directory"

[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
strsim = "*"
yup-hyper-mock = ">=1.0.0"
clap = ">= 0.9.1"
clap = ">= 1.0.3"

[build-dependencies]
syntex = { version = "*" }
Expand Down
4 changes: 2 additions & 2 deletions gen/admin1_directory-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6913,10 +6913,10 @@ fn main() {
.takes_value(false));

for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::new(main_command_name).about(about);
let mut mcmd = SubCommand::with_name(main_command_name).about(about);

for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
let mut scmd = SubCommand::new(sub_command_name);
let mut scmd = SubCommand::with_name(sub_command_name);
if let &Some(desc) = desc {
scmd = scmd.about(desc);
}
Expand Down
2 changes: 1 addition & 1 deletion gen/admin1_directory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build = "src/build.rs"


[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
Expand Down
4 changes: 2 additions & 2 deletions gen/admin1_reports-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ keywords = ["admin", "google", "cli"]
name = "admin1-reports"

[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
strsim = "*"
yup-hyper-mock = ">=1.0.0"
clap = ">= 0.9.1"
clap = ">= 1.0.3"

[build-dependencies]
syntex = { version = "*" }
Expand Down
4 changes: 2 additions & 2 deletions gen/admin1_reports-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,10 +759,10 @@ fn main() {
.takes_value(false));

for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::new(main_command_name).about(about);
let mut mcmd = SubCommand::with_name(main_command_name).about(about);

for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
let mut scmd = SubCommand::new(sub_command_name);
let mut scmd = SubCommand::with_name(sub_command_name);
if let &Some(desc) = desc {
scmd = scmd.about(desc);
}
Expand Down
2 changes: 1 addition & 1 deletion gen/admin1_reports/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build = "src/build.rs"


[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
Expand Down
4 changes: 2 additions & 2 deletions gen/admin2_email_migration-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ keywords = ["admin", "google", "cli"]
name = "admin2-email-migration"

[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
strsim = "*"
yup-hyper-mock = ">=1.0.0"
clap = ">= 0.9.1"
clap = ">= 1.0.3"

[build-dependencies]
syntex = { version = "*" }
Expand Down
4 changes: 2 additions & 2 deletions gen/admin2_email_migration-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,10 @@ fn main() {
.takes_value(false));

for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::new(main_command_name).about(about);
let mut mcmd = SubCommand::with_name(main_command_name).about(about);

for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
let mut scmd = SubCommand::new(sub_command_name);
let mut scmd = SubCommand::with_name(sub_command_name);
if let &Some(desc) = desc {
scmd = scmd.about(desc);
}
Expand Down
2 changes: 1 addition & 1 deletion gen/admin2_email_migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build = "src/build.rs"


[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
Expand Down
15 changes: 6 additions & 9 deletions gen/admin2_email_migration/src/lib.rs.in
Original file line number Diff line number Diff line change
Expand Up @@ -421,15 +421,12 @@ impl<'a, C, A> MailInsertCall<'a, C, A> where C: BorrowMut<hyper::Client>, A: oa
if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() {
should_ask_dlg_for_url = false;
upload_url_from_server = false;
let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream));
match response {
Ok(ref mut res) => {
res.status = hyper::status::StatusCode::Ok;
res.headers.set(Location(upload_url.as_ref().unwrap().clone()))
}
_ => unreachable!(),
}
response
let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap();
hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| {
res.status = hyper::status::StatusCode::Ok;
res.headers.set(Location(upload_url.as_ref().unwrap().clone()));
Ok(res)
})
} else {
let mut mp_reader: MultiPartReader = Default::default();
let (mut body_reader, content_type) = match protocol {
Expand Down
4 changes: 2 additions & 2 deletions gen/adsense1d4-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ keywords = ["adsense", "google", "cli"]
name = "adsense1d4"

[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
strsim = "*"
yup-hyper-mock = ">=1.0.0"
clap = ">= 0.9.1"
clap = ">= 1.0.3"

[build-dependencies]
syntex = { version = "*" }
Expand Down
4 changes: 2 additions & 2 deletions gen/adsense1d4-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3504,10 +3504,10 @@ fn main() {
.takes_value(false));

for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::new(main_command_name).about(about);
let mut mcmd = SubCommand::with_name(main_command_name).about(about);

for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
let mut scmd = SubCommand::new(sub_command_name);
let mut scmd = SubCommand::with_name(sub_command_name);
if let &Some(desc) = desc {
scmd = scmd.about(desc);
}
Expand Down
2 changes: 1 addition & 1 deletion gen/adsense1d4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build = "src/build.rs"


[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
Expand Down
4 changes: 2 additions & 2 deletions gen/adsensehost4d1-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ keywords = ["adsensehost", "google", "cli"]
name = "adsensehost4d1"

[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
strsim = "*"
yup-hyper-mock = ">=1.0.0"
clap = ">= 0.9.1"
clap = ">= 1.0.3"

[build-dependencies]
syntex = { version = "*" }
Expand Down
4 changes: 2 additions & 2 deletions gen/adsensehost4d1-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2785,10 +2785,10 @@ fn main() {
.takes_value(false));

for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::new(main_command_name).about(about);
let mut mcmd = SubCommand::with_name(main_command_name).about(about);

for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
let mut scmd = SubCommand::new(sub_command_name);
let mut scmd = SubCommand::with_name(sub_command_name);
if let &Some(desc) = desc {
scmd = scmd.about(desc);
}
Expand Down
2 changes: 1 addition & 1 deletion gen/adsensehost4d1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build = "src/build.rs"


[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
Expand Down
4 changes: 2 additions & 2 deletions gen/analytics3-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ keywords = ["analytics", "google", "cli"]
name = "analytics3"

[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
strsim = "*"
yup-hyper-mock = ">=1.0.0"
clap = ">= 0.9.1"
clap = ">= 1.0.3"

[build-dependencies]
syntex = { version = "*" }
Expand Down
4 changes: 2 additions & 2 deletions gen/analytics3-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9247,10 +9247,10 @@ fn main() {
.takes_value(false));

for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::new(main_command_name).about(about);
let mut mcmd = SubCommand::with_name(main_command_name).about(about);

for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
let mut scmd = SubCommand::new(sub_command_name);
let mut scmd = SubCommand::with_name(sub_command_name);
if let &Some(desc) = desc {
scmd = scmd.about(desc);
}
Expand Down
2 changes: 1 addition & 1 deletion gen/analytics3/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build = "src/build.rs"


[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
Expand Down
15 changes: 6 additions & 9 deletions gen/analytics3/src/lib.rs.in
Original file line number Diff line number Diff line change
Expand Up @@ -14217,15 +14217,12 @@ impl<'a, C, A> ManagementUploadUploadDataCall<'a, C, A> where C: BorrowMut<hyper
if should_ask_dlg_for_url && (upload_url = dlg.upload_url()) == () && upload_url.is_some() {
should_ask_dlg_for_url = false;
upload_url_from_server = false;
let mut response = hyper::client::Response::new(Box::new(cmn::DummyNetworkStream));
match response {
Ok(ref mut res) => {
res.status = hyper::status::StatusCode::Ok;
res.headers.set(Location(upload_url.as_ref().unwrap().clone()))
}
_ => unreachable!(),
}
response
let url = upload_url.as_ref().and_then(|s| Some(hyper::Url::parse(s).unwrap())).unwrap();
hyper::client::Response::new(url, Box::new(cmn::DummyNetworkStream)).and_then(|mut res| {
res.status = hyper::status::StatusCode::Ok;
res.headers.set(Location(upload_url.as_ref().unwrap().clone()));
Ok(res)
})
} else {
let mut client = &mut *self.hub.client.borrow_mut();
let mut req = client.borrow_mut().request(hyper::method::Method::Post, &url)
Expand Down
4 changes: 2 additions & 2 deletions gen/androidenterprise1-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ keywords = ["androidenterprise", "google", "cli"]
name = "androidenterprise1"

[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
strsim = "*"
yup-hyper-mock = ">=1.0.0"
clap = ">= 0.9.1"
clap = ">= 1.0.3"

[build-dependencies]
syntex = { version = "*" }
Expand Down
4 changes: 2 additions & 2 deletions gen/androidenterprise1-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4686,10 +4686,10 @@ fn main() {
.takes_value(false));

for &(main_command_name, ref about, ref subcommands) in arg_data.iter() {
let mut mcmd = SubCommand::new(main_command_name).about(about);
let mut mcmd = SubCommand::with_name(main_command_name).about(about);

for &(sub_command_name, ref desc, url_info, ref args) in subcommands {
let mut scmd = SubCommand::new(sub_command_name);
let mut scmd = SubCommand::with_name(sub_command_name);
if let &Some(desc) = desc {
scmd = scmd.about(desc);
}
Expand Down
2 changes: 1 addition & 1 deletion gen/androidenterprise1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build = "src/build.rs"


[dependencies]
hyper = ">= 0.6.0"
hyper = ">= 0.6.4"
mime = "0.0.12"
serde = ">= 0.4.1"
yup-oauth2 = "*"
Expand Down
Loading

0 comments on commit e465359

Please sign in to comment.