chore(source): add source at latest version

This commit is contained in:
Sebastian Thiel
2015-08-08 11:50:37 +02:00
parent 8ab4fd0bd4
commit 08d65ba62b
770 changed files with 25835 additions and 10900 deletions

View File

@@ -8,6 +8,7 @@ extern crate clap;
extern crate yup_oauth2 as oauth2;
extern crate yup_hyper_mock as mock;
extern crate serde;
extern crate serde_json;
extern crate hyper;
extern crate mime;
extern crate strsim;
@@ -27,7 +28,7 @@ use std::default::Default;
use std::str::FromStr;
use oauth2::{Authenticator, DefaultAuthenticatorDelegate};
use serde::json;
use serde_json as json;
use clap::ArgMatches;
enum DoitError {
@@ -134,6 +135,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -147,6 +151,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -186,6 +191,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -199,6 +207,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -321,6 +330,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -334,6 +346,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -471,6 +484,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -484,6 +500,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -562,6 +579,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -575,6 +595,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -1599,6 +1620,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -1612,6 +1636,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -1651,6 +1676,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -1664,6 +1692,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -1798,6 +1827,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -1811,6 +1843,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -1960,6 +1993,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -1973,6 +2009,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -2063,6 +2100,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -2076,6 +2116,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -2342,6 +2383,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -2355,6 +2399,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -2433,6 +2478,9 @@ impl<'n, 'a> Engine<'n, 'a> {
for parg in opt.values_of("v").unwrap_or(Vec::new()).iter() {
let (key, value) = parse_kv_arg(&*parg, err, false);
match key {
"dry-run" => {
call = call.dry_run(arg_from_str(value.unwrap_or("false"), err, "dry-run", "boolean"));
},
_ => {
let mut found = false;
for param in &self.gp {
@@ -2446,6 +2494,7 @@ impl<'n, 'a> Engine<'n, 'a> {
err.issues.push(CLIError::UnknownParameter(key.to_string(),
{let mut v = Vec::new();
v.extend(self.gp.iter().map(|v|*v));
v.extend(["dry-run"].iter().map(|v|*v));
v } ));
}
}
@@ -4472,7 +4521,7 @@ fn main() {
let mut app = App::new("content2")
.author("Sebastian Thiel <byronimo@gmail.com>")
.version("0.3.1+20150528")
.version("0.3.2+20150710")
.about("Manage product items, inventory, and Merchant Center accounts for Google Shopping.")
.after_help("All documentation details can be found at http://byron.github.io/google-apis-rs/google_content2_cli")
.arg(Arg::with_name("url")
@@ -4554,7 +4603,7 @@ fn main() {
},
DoitError::ApiError(err) => {
if debug {
writeln!(io::stderr(), "{:?}", err).ok();
writeln!(io::stderr(), "{:#?}", err).ok();
} else {
writeln!(io::stderr(), "{}", err).ok();
}