Explorar o código

Remove app constants, update Cargo.toml files

timvisee %!s(int64=7) %!d(string=hai) anos
pai
achega
6bec241cf2
Modificáronse 6 ficheiros con 12 adicións e 25 borrados
  1. 3 3
      Cargo.lock
  2. 3 2
      api/Cargo.toml
  3. 2 2
      cli/Cargo.toml
  4. 0 11
      cli/src/app.rs
  5. 4 6
      cli/src/cmd/handler.rs
  6. 0 1
      cli/src/main.rs

+ 3 - 3
Cargo.lock

@@ -333,7 +333,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
 
 [[package]]
 name = "ffsend-api"
-version = "0.1.0"
+version = "0.0.1"
 dependencies = [
  "arrayref 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
  "base64 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -356,7 +356,7 @@ dependencies = [
 
 [[package]]
 name = "ffsend-cli"
-version = "0.0.1-dev"
+version = "0.0.1"
 dependencies = [
  "clap 2.31.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "clipboard 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -364,7 +364,7 @@ dependencies = [
  "derive_builder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "failure 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "failure_derive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "ffsend-api 0.1.0",
+ "ffsend-api 0.0.1",
  "open 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "pbr 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "rpassword 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",

+ 3 - 2
api/Cargo.toml

@@ -1,7 +1,8 @@
 [package]
 name = "ffsend-api"
-version = "0.1.0"
-authors = ["timvisee <timvisee@gmail.com>"]
+description = "A simple Firefox Send API client."
+version = "0.0.1"
+authors = ["Tim Visee <https://timvisee.com/>"]
 workspace = ".."
 
 [dependencies]

+ 2 - 2
cli/Cargo.toml

@@ -1,8 +1,8 @@
 [package]
 name = "ffsend-cli"
 description = "A simple Firefox Send CLI client."
-version = "0.0.1-dev"
-authors = ["timvisee <timvisee@gmail.com>"]
+version = "0.0.1"
+authors = ["Tim Visee <https://timvisee.com/>"]
 workspace = ".."
 
 [[bin]]

+ 0 - 11
cli/src/app.rs

@@ -1,11 +0,0 @@
-/// The application name.
-pub const APP_NAME: &'static str = "ffsend";
-
-/// The application version.
-pub const APP_VERSION: &'static str = "0.0.1-dev";
-
-/// The application author.
-pub const APP_AUTHOR: &'static str = "Tim Visee <https://timvisee.com/>";
-
-/// Application about information.
-pub const APP_ABOUT: &'static str = "A simple Firefox Send CLI client.";

+ 4 - 6
cli/src/cmd/handler.rs

@@ -1,7 +1,5 @@
 use clap::{App, AppSettings, Arg, ArgMatches};
 
-use app::*;
-
 use super::matcher::{
     DeleteMatcher,
     DownloadMatcher,
@@ -31,10 +29,10 @@ pub struct Handler<'a> {
 impl<'a: 'b, 'b> Handler<'a> {
     /// Build the application CLI definition.
     pub fn build() -> App<'a, 'b> {
-        App::new(APP_NAME)
-            .version(APP_VERSION)
-            .author(APP_AUTHOR)
-            .about(APP_ABOUT)
+        App::new(crate_name!())
+            .version(crate_version!())
+            .author(crate_authors!())
+            .about(crate_description!())
             .global_setting(AppSettings::GlobalVersion) .global_setting(AppSettings::VersionlessSubcommands)
             // TODO: enable below command when it doesn't break `p` anymore.
             // .global_setting(AppSettings::InferSubcommands)

+ 0 - 1
cli/src/main.rs

@@ -9,7 +9,6 @@ extern crate ffsend_api;
 extern crate rpassword;
 
 mod action;
-mod app;
 mod cmd;
 mod error;
 mod host;