From 15573d6dc063301bbc0ba28940457d47c30c2b09 Mon Sep 17 00:00:00 2001 From: Constantine Date: Tue, 3 Apr 2018 13:09:08 +0300 Subject: [PATCH] Update version to `0.21.0` (#106) * Update AppVeyor badge * Remove outdated unit tests * Update version Fix cli interface doc --- Cargo.toml | 2 +- cli.yml | 8 +++++--- src/cmd/mod.rs | 4 ++-- src/main.rs | 8 ++++---- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 03947e1..fa0b9a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "emerald-cli" -version = "0.20.0" +version = "0.21.0" authors = ["Constantine Kryvomaz "] description = "Console utility for secure account management" homepage = "http://etcdevteam.com" diff --git a/cli.yml b/cli.yml index 7fb6d39..c94daf1 100644 --- a/cli.yml +++ b/cli.yml @@ -29,18 +29,20 @@ subcommands: about: Start local RPC server args: - host: - help: Senders address + help: Host for RPC server takes_value: true + default_value: "127.0.0.1" - port: - help: Receiver address + help: Port for RPC server takes_value: true + default_value: "1920" - mnemonic: about: Create mnemonic phrase according to BIP39 spec - balance: about: Request account's balance from ethereum node through RPC args: - address: - help: account address + help: Account address required: true takes_value: true - transaction: diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs index 066f5ee..782fcc5 100644 --- a/src/cmd/mod.rs +++ b/src/cmd/mod.rs @@ -73,8 +73,8 @@ fn server_cmd( chain: &str, ) -> ExecResult { info!("Starting Emerald Connector - v{}", emerald::version()); - let host = matches.value_of("host").unwrap_or(DEFAULT_RPC_HOST); - let port = matches.value_of("host").unwrap_or(DEFAULT_RPC_PORT); + let host = matches.value_of("host").unwrap_or_default(); + let port = matches.value_of("port").unwrap_or_default(); let addr = format!("{}:{}", host, port).parse::()?; let sec_lvl = get_security_lvl(matches)?; diff --git a/src/main.rs b/src/main.rs index 4ceeb21..6486242 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,10 +44,10 @@ fn main() { let yaml = load_yaml!("../cli.yml"); let matches = App::from_yaml(yaml).get_matches(); - match matches.occurrences_of("v") { - 0 => env::set_var("RUST_LOG", "emerald=error"), - 1 => env::set_var("RUST_LOG", "emerald=info"), - 2 | _ => env::set_var("RUST_LOG", "emerald=trace"), + match matches.occurrences_of("verbose") { + 0 => env::set_var("RUST_LOG", "error"), + 1 => env::set_var("RUST_LOG", "info"), + 2 | _ => env::set_var("RUST_LOG", "debug"), } let mut log_builder = LogBuilder::new();