From e434563215b6b8cddc0aaa6a6c5ef48d6e7aedbb Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 12 May 2015 17:21:25 +0200 Subject: [PATCH] chore(cargo): compilation without local overrides Also checked in code for groupsmigration to allow others to test it simply by checking out the right commit. --- etc/api/type-api.yaml | 2 -- etc/api/type-cli.yaml | 8 +++++--- gen/groupsmigration1-cli/Cargo.toml | 24 ++++++++++++++++++++---- gen/groupsmigration1-cli/README.md | 9 +++++++++ gen/groupsmigration1-cli/src/main.rs | 8 +++++--- gen/groupsmigration1/Cargo.toml | 18 +++++++++++++++--- gen/groupsmigration1/src/cmn.rs | 14 ++++++++------ src/mako/Cargo.toml.mako | 18 ++++++++++++++++-- 8 files changed, 78 insertions(+), 23 deletions(-) diff --git a/etc/api/type-api.yaml b/etc/api/type-api.yaml index 6c0e57783a..4e681ee659 100644 --- a/etc/api/type-api.yaml +++ b/etc/api/type-api.yaml @@ -25,6 +25,4 @@ cargo: keywords: [protocol, web, api] dependencies: - url = "*" - - serde = ">= 0.3.0" - - serde_macros = "*" - json-tools = ">= 0.3.0" diff --git a/etc/api/type-cli.yaml b/etc/api/type-cli.yaml index 82f29a1772..43009c3078 100644 --- a/etc/api/type-cli.yaml +++ b/etc/api/type-cli.yaml @@ -27,7 +27,9 @@ cargo: is_executable: YES dependencies: - strsim = "*" - - yup-hyper-mock = "*" - - serde = ">= 0.3.0" - - serde_macros = "*" - clap = "*" + - | + [dependencies.yup-hyper-mock] + version = "*" + git = "https://github.com/Byron/yup-hyper-mock" + rev = "ee56de4dead136b3ca5a3eda6ca7057f9074e261" diff --git a/gen/groupsmigration1-cli/Cargo.toml b/gen/groupsmigration1-cli/Cargo.toml index 22449fa31a..feab0ae694 100644 --- a/gen/groupsmigration1-cli/Cargo.toml +++ b/gen/groupsmigration1-cli/Cargo.toml @@ -17,14 +17,30 @@ keywords = ["groupsmigration", "google", "cli"] name = "groupsmigration1" [dependencies] -hyper = ">= 0.4.0" mime = "*" -yup-oauth2 = "*" -strsim = "*" -yup-hyper-mock = "*" + serde = ">= 0.3.0" serde_macros = "*" +strsim = "*" clap = "*" +[dependencies.yup-hyper-mock] + version = "*" + git = "https://github.com/Byron/yup-hyper-mock" + rev = "ee56de4dead136b3ca5a3eda6ca7057f9074e261" + + +# Needed for latest fix in macros ! +[dependencies.hyper] +version = ">= 0.4.0" +git = "https://github.com/hyperium/hyper" +rev = "871f37a5605d433e5699ed2f16631001d86d7805" + +# to adapt to hyper changes ... +[dependencies.yup-oauth2] +version = "*" +git = "https://github.com/Byron/yup-oauth2" +rev = "94d5b7c2cac02ad67da8504504364b3081a9a866" + [dependencies.google-groupsmigration1] path = "../groupsmigration1" diff --git a/gen/groupsmigration1-cli/README.md b/gen/groupsmigration1-cli/README.md index 8ff231a100..850b911839 100644 --- a/gen/groupsmigration1-cli/README.md +++ b/gen/groupsmigration1-cli/README.md @@ -13,6 +13,15 @@ If data-structures are requested, these will be returned as pretty-printed JSON, Everything else about the *Groups Migration* API can be found at the [official documentation site](https://developers.google.com/google-apps/groups-migration/). +# Downloads + +You can download the pre-compiled 64bit binaries for the following platforms: + +* ![icon](http://megaicons.net/static/img/icons_sizes/6/140/16/ubuntu-icon.png) [ubuntu](http://dl.byronimo.de/google.rs/cli/0.2.0/ubuntu/groupsmigration1.tar.gz) +* ![icon](http://hydra-media.cursecdn.com/wow.gamepedia.com/a/a2/Apple-icon-16x16.png?version=25ddd67ac3dd3b634478e3978b76cb74) [osx](http://dl.byronimo.de/google.rs/cli/0.2.0/osx/groupsmigration1.tar.gz) + +Find the source code [on github](https://github.com/Byron/google-apis-rs/tree/master/gen/groupsmigration1-cli). + # Usage This documentation was generated from the *Groups Migration* API at revision *20140416*. The CLI is at version *0.2.0*. diff --git a/gen/groupsmigration1-cli/src/main.rs b/gen/groupsmigration1-cli/src/main.rs index bb01653c02..1d4f176b35 100644 --- a/gen/groupsmigration1-cli/src/main.rs +++ b/gen/groupsmigration1-cli/src/main.rs @@ -61,9 +61,11 @@ impl<'n, 'a> Engine<'n, 'a> { } } if !found { - err.issues.push(CLIError::UnknownParameter(key.to_string(), - Vec::new() + &self.gp + &[] - )); + err.issues.push(CLIError::UnknownParameter(key.to_string(), + {let mut v = Vec::new(); + v.extend(self.gp.iter().map(|v|*v)); + v.extend([].iter().map(|v|*v)); + v } )); } } } diff --git a/gen/groupsmigration1/Cargo.toml b/gen/groupsmigration1/Cargo.toml index 362f5964b1..1a41af482f 100644 --- a/gen/groupsmigration1/Cargo.toml +++ b/gen/groupsmigration1/Cargo.toml @@ -15,10 +15,22 @@ keywords = ["groupsmigration", "google", "protocol", "web", "api"] [dependencies] -hyper = ">= 0.4.0" mime = "*" -yup-oauth2 = "*" -url = "*" + serde = ">= 0.3.0" serde_macros = "*" +url = "*" json-tools = ">= 0.3.0" + +# Needed for latest fix in macros ! +[dependencies.hyper] +version = ">= 0.4.0" +git = "https://github.com/hyperium/hyper" +rev = "871f37a5605d433e5699ed2f16631001d86d7805" + +# to adapt to hyper changes ... +[dependencies.yup-oauth2] +version = "*" +git = "https://github.com/Byron/yup-oauth2" +rev = "94d5b7c2cac02ad67da8504504364b3081a9a866" + diff --git a/gen/groupsmigration1/src/cmn.rs b/gen/groupsmigration1/src/cmn.rs index 908bef39dc..e38e121c07 100644 --- a/gen/groupsmigration1/src/cmn.rs +++ b/gen/groupsmigration1/src/cmn.rs @@ -668,12 +668,14 @@ impl<'a, A> ResumableUploadHelper<'a, A> if self.delegate.cancel_chunk_upload(&range_header) { return None } - match self.client.post(self.url) - .header(range_header) - .header(ContentType(self.media_type.clone())) - .header(UserAgent(self.user_agent.to_string())) - .body(&mut section_reader) - .send() { + // workaround https://github.com/rust-lang/rust/issues/22252 + let res = self.client.post(self.url) + .header(range_header) + .header(ContentType(self.media_type.clone())) + .header(UserAgent(self.user_agent.to_string())) + .body(&mut section_reader) + .send(); + match res { Ok(mut res) => { if res.status == StatusCode::PermanentRedirect { continue diff --git a/src/mako/Cargo.toml.mako b/src/mako/Cargo.toml.mako index 9f48de8a47..7366eb6570 100644 --- a/src/mako/Cargo.toml.mako +++ b/src/mako/Cargo.toml.mako @@ -23,12 +23,26 @@ name = "${util.program_name()}" % endif [dependencies] -hyper = ">= 0.4.0" mime = "*" -yup-oauth2 = "*" + +serde = ">= 0.3.0" +serde_macros = "*" % for dep in cargo.get('dependencies', list()): ${dep} % endfor + +# Needed for latest fix in macros ! +[dependencies.hyper] +version = ">= 0.4.0" +git = "https://github.com/hyperium/hyper" +rev = "871f37a5605d433e5699ed2f16631001d86d7805" + +# to adapt to hyper changes ... +[dependencies.yup-oauth2] +version = "*" +git = "https://github.com/Byron/yup-oauth2" +rev = "94d5b7c2cac02ad67da8504504364b3081a9a866" + % if make.depends_on_suffix is not None: <% api_name = util.library_name() %>\