Skip to content

Commit

Permalink
../..
Browse files Browse the repository at this point in the history
  • Loading branch information
reynn committed Jun 19, 2021
1 parent fd3f4b7 commit 2c78736
Show file tree
Hide file tree
Showing 55 changed files with 748 additions and 1,065 deletions.
571 changes: 164 additions & 407 deletions Cargo.lock

Large diffs are not rendered by default.

Binary file modified target/debug/.fingerprint/vers-51518290d6b77672/dep-lib-vers
Binary file not shown.
Binary file modified target/debug/deps/libvers-51518290d6b77672.rlib
Binary file not shown.
Binary file modified target/debug/deps/libvers-51518290d6b77672.rmeta
Binary file not shown.
8 changes: 4 additions & 4 deletions target/debug/deps/vers-51518290d6b77672.d
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/Users/reynn/git/github.com/reynn/vers/target/debug/deps/vers-51518290d6b77672.rmeta: vers-cli/src/lib.rs vers-cli/src/application.rs vers-cli/src/commands.rs vers-cli/src/commands/start.rs vers-cli/src/commands/version.rs vers-cli/src/config.rs vers-cli/src/error.rs vers-cli/src/prelude.rs
/Users/reynn/git/github.com/reynn/vers/target/debug/deps/vers-51518290d6b77672.rmeta: vers-cli/src/lib.rs vers-cli/src/application.rs vers-cli/src/commands.rs vers-cli/src/commands/install.rs vers-cli/src/commands/version.rs vers-cli/src/config.rs vers-cli/src/error.rs vers-cli/src/prelude.rs

/Users/reynn/git/github.com/reynn/vers/target/debug/deps/libvers-51518290d6b77672.rlib: vers-cli/src/lib.rs vers-cli/src/application.rs vers-cli/src/commands.rs vers-cli/src/commands/start.rs vers-cli/src/commands/version.rs vers-cli/src/config.rs vers-cli/src/error.rs vers-cli/src/prelude.rs
/Users/reynn/git/github.com/reynn/vers/target/debug/deps/libvers-51518290d6b77672.rlib: vers-cli/src/lib.rs vers-cli/src/application.rs vers-cli/src/commands.rs vers-cli/src/commands/install.rs vers-cli/src/commands/version.rs vers-cli/src/config.rs vers-cli/src/error.rs vers-cli/src/prelude.rs

/Users/reynn/git/github.com/reynn/vers/target/debug/deps/vers-51518290d6b77672.d: vers-cli/src/lib.rs vers-cli/src/application.rs vers-cli/src/commands.rs vers-cli/src/commands/start.rs vers-cli/src/commands/version.rs vers-cli/src/config.rs vers-cli/src/error.rs vers-cli/src/prelude.rs
/Users/reynn/git/github.com/reynn/vers/target/debug/deps/vers-51518290d6b77672.d: vers-cli/src/lib.rs vers-cli/src/application.rs vers-cli/src/commands.rs vers-cli/src/commands/install.rs vers-cli/src/commands/version.rs vers-cli/src/config.rs vers-cli/src/error.rs vers-cli/src/prelude.rs

vers-cli/src/lib.rs:
vers-cli/src/application.rs:
vers-cli/src/commands.rs:
vers-cli/src/commands/start.rs:
vers-cli/src/commands/install.rs:
vers-cli/src/commands/version.rs:
vers-cli/src/config.rs:
vers-cli/src/error.rs:
Expand Down
Binary file modified target/debug/deps/vers_cli
Binary file not shown.
15 changes: 12 additions & 3 deletions target/debug/deps/vers_cli.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
/Users/reynn/git/github.com/reynn/vers/target/debug/deps/vers_cli: vers-cli/src/bin/vers_cli/main.rs
/Users/reynn/git/github.com/reynn/vers/target/debug/deps/vers_cli: vers-cli/src/main.rs vers-cli/src/cli.rs vers-cli/src/cmds/mod.rs vers-cli/src/cmds/change.rs vers-cli/src/cmds/config.rs vers-cli/src/cmds/env.rs vers-cli/src/cmds/install.rs vers-cli/src/cmds/list.rs vers-cli/src/cmds/uninstall.rs vers-cli/src/errors.rs

/Users/reynn/git/github.com/reynn/vers/target/debug/deps/vers_cli.d: vers-cli/src/bin/vers_cli/main.rs
/Users/reynn/git/github.com/reynn/vers/target/debug/deps/vers_cli.d: vers-cli/src/main.rs vers-cli/src/cli.rs vers-cli/src/cmds/mod.rs vers-cli/src/cmds/change.rs vers-cli/src/cmds/config.rs vers-cli/src/cmds/env.rs vers-cli/src/cmds/install.rs vers-cli/src/cmds/list.rs vers-cli/src/cmds/uninstall.rs vers-cli/src/errors.rs

vers-cli/src/bin/vers_cli/main.rs:
vers-cli/src/main.rs:
vers-cli/src/cli.rs:
vers-cli/src/cmds/mod.rs:
vers-cli/src/cmds/change.rs:
vers-cli/src/cmds/config.rs:
vers-cli/src/cmds/env.rs:
vers-cli/src/cmds/install.rs:
vers-cli/src/cmds/list.rs:
vers-cli/src/cmds/uninstall.rs:
vers-cli/src/errors.rs:
Binary file not shown.
2 changes: 1 addition & 1 deletion target/debug/libvers.d
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/Users/reynn/git/github.com/reynn/vers/target/debug/libvers.rlib: /Users/reynn/git/github.com/reynn/vers/vers-cli/src/application.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands/start.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands/version.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/config.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/error.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/lib.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/prelude.rs
/Users/reynn/git/github.com/reynn/vers/target/debug/libvers.rlib: /Users/reynn/git/github.com/reynn/vers/vers-cli/src/application.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands/install.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands/version.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/config.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/error.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/lib.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/prelude.rs
Binary file modified target/debug/libvers.rlib
Binary file not shown.
2 changes: 1 addition & 1 deletion target/debug/libvers_core.d
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/Users/reynn/git/github.com/reynn/vers/target/debug/libvers_core.rlib: /Users/reynn/git/github.com/reynn/vers/vers-core/src/arch.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/envs.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/filters.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/lib.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/manager.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/os.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/release.rs
/Users/reynn/git/github.com/reynn/vers/target/debug/libvers_core.rlib: /Users/reynn/git/github.com/reynn/vers/vers-core/src/environment/errors.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/environment/mod.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/environment/tool.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/errors.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/filters.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/lib.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/machine/arch.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/machine/errors.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/machine/mod.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/machine/os.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/machine/os_version.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/manager.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/release.rs /Users/reynn/git/github.com/reynn/vers/vers-core/src/version.rs build.rs
Binary file modified target/debug/libvers_core.rlib
Binary file not shown.
Binary file modified target/debug/vers_cli
Binary file not shown.
2 changes: 1 addition & 1 deletion target/debug/vers_cli.d
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/Users/reynn/git/github.com/reynn/vers/target/debug/vers_cli: /Users/reynn/git/github.com/reynn/vers/vers-cli/src/application.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/bin/vers_cli/main.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands/start.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands/version.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/config.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/error.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/lib.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/prelude.rs
/Users/reynn/git/github.com/reynn/vers/target/debug/vers_cli: /Users/reynn/git/github.com/reynn/vers/vers-cli/src/application.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/bin/vers_cli/main.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands/install.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands/version.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/commands.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/config.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/error.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/lib.rs /Users/reynn/git/github.com/reynn/vers/vers-cli/src/prelude.rs
2 changes: 0 additions & 2 deletions vers-cli/.gitignore

This file was deleted.

24 changes: 8 additions & 16 deletions vers-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[package]
name = "vers"
authors = ["Nic Patterson <[email protected]>"]
version = "0.1.0"
edition = "2018"
name = "vers-cli"
version = "0.1.0"

[dependencies]
gumdrop = "0.7"
serde = { version = "1", features = ["serde_derive"] }
thiserror = "1"

[dependencies.abscissa_core]
version = "0.5.2"
# optional: use `gimli` to capture backtraces
# see https://github.com/rust-lang/backtrace-rs/issues/189
# features = ["gimli-backtrace"]

[dev-dependencies]
abscissa_core = { version = "0.5.2", features = ["testing"] }
once_cell = "1.2"

anyhow = "1.0"
directories-next = "2.0"
structopt = "0.3"
thiserror = "1.0"
vers-core = { path = "../vers-core" }
14 changes: 0 additions & 14 deletions vers-cli/README.md

This file was deleted.

109 changes: 0 additions & 109 deletions vers-cli/src/application.rs

This file was deleted.

11 changes: 0 additions & 11 deletions vers-cli/src/bin/vers_cli/main.rs

This file was deleted.

17 changes: 17 additions & 0 deletions vers-cli/src/cli.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use crate::{cmds::*, errors::*};
use structopt::StructOpt;

#[derive(Debug, Clone, StructOpt)]
#[structopt(name = "vers")]
pub struct Cli {
#[structopt(short, long, default_value = "default")]
pub env_name: String,
#[structopt(subcommand)]
pub subcommand: Option<CliSubCommands>,
}

impl Cli {
pub fn new() -> Result<Cli> {
Ok(Cli::from_args())
}
}
8 changes: 8 additions & 0 deletions vers-cli/src/cmds/change.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use crate::errors::*;
use structopt::StructOpt;

#[derive(Debug, Clone, StructOpt)]
pub struct Change {
#[structopt(short, long)]
pub name: String,
}
8 changes: 8 additions & 0 deletions vers-cli/src/cmds/config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use crate::errors::*;
use structopt::StructOpt;

#[derive(Debug, Clone, StructOpt)]
pub struct Config {
#[structopt(short, long)]
pub name: String,
}
9 changes: 9 additions & 0 deletions vers-cli/src/cmds/env.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use crate::errors::*;
use structopt::StructOpt;

#[derive(Debug, Clone, StructOpt)]
#[structopt(name = "vers")]
pub struct Environment {
#[structopt(short, long, default_value = "default")]
pub name: String,
}
8 changes: 8 additions & 0 deletions vers-cli/src/cmds/install.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use crate::errors::*;
use structopt::StructOpt;

#[derive(Debug, Clone, StructOpt)]
pub struct Install {
#[structopt(short, long)]
pub name: String,
}
10 changes: 10 additions & 0 deletions vers-cli/src/cmds/list.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::errors::*;
use structopt::StructOpt;

#[derive(Debug, Clone, StructOpt)]
pub struct List {
#[structopt(short, long, aliases = &["env"])]
pub environment: Option<String>,
#[structopt(short, long)]
pub short: Option<bool>,
}
30 changes: 30 additions & 0 deletions vers-cli/src/cmds/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pub mod change;
pub mod config;
pub mod env;
pub mod install;
pub mod list;
pub mod uninstall;

use structopt::StructOpt;

#[derive(Debug, Clone, StructOpt)]
pub enum CliSubCommands {
/// Update $PATH variable with different environments or tool versions
#[structopt(aliases = &["ch"])]
Change(change::Change),
/// Generate a new config or change config values in an existing config file.
#[structopt(aliases = &["cfg", "c"])]
Config(config::Config),
/// Manage environments, a default environment is generated automatically
#[structopt(aliases = &["env", "envs"])]
Environment(env::Environment),
/// Install a tool into an environment
#[structopt(aliases = &["add", "i"])]
Install(install::Install),
/// Remove a tool from an environment
#[structopt(aliases = &["remove", "rm"])]
Uninstall(uninstall::Uninstall),
/// List all tools and their current versions for the current environment
#[structopt(aliases = &["ls"])]
List(list::List),
}
8 changes: 8 additions & 0 deletions vers-cli/src/cmds/uninstall.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use crate::errors::*;
use structopt::StructOpt;

#[derive(Debug, Clone, StructOpt)]
pub struct Uninstall {
#[structopt(short, long)]
pub name: String,
}
72 changes: 0 additions & 72 deletions vers-cli/src/commands.rs

This file was deleted.

Loading

0 comments on commit 2c78736

Please sign in to comment.