diff options
-rw-r--r-- | Cargo.lock | 8 | ||||
-rw-r--r-- | Cargo.toml | 3 | ||||
-rw-r--r-- | readme.md | 70 | ||||
-rw-r--r-- | readme.org | 2 | ||||
-rw-r--r-- | src/git.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 3 | ||||
-rw-r--r-- | src/user_info.rs (renamed from user-info/src/lib.rs) | 0 | ||||
-rw-r--r-- | tests/cli.rs | 2 | ||||
-rw-r--r-- | user-info/Cargo.toml | 7 |
9 files changed, 40 insertions, 57 deletions
@@ -690,7 +690,6 @@ dependencies = [ "shlex", "tempfile", "thiserror", - "user-info", ] [[package]] @@ -891,13 +890,6 @@ dependencies = [ ] [[package]] -name = "user-info" -version = "0.1.0" -dependencies = [ - "nix 0.26.2", -] - -[[package]] name = "utf8parse" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -21,7 +21,6 @@ nix = { version = "0.26.2", default-features = false, features = ["user"] } rustyline = { version = "11.0.0", default-features = false } shlex = "1.1.0" thiserror = "1.0.38" -user-info = { path = "user-info" } [dev-dependencies] anyhow = "1.0.69" @@ -40,5 +39,3 @@ incremental = false [profile.release] lto = true - -[workspace] @@ -1,23 +1,23 @@ # Table of Contents -1. [Getting Started](#org986db7c) - 1. [Usage](#orgafa9ca9) - 2. [Installation](#org549f1c0) - 1. [Prerequisites](#orge3db211) - 2. [Building Shackle](#org201706a) - 3. [Creating the required directory structure](#org7c15c50) - 4. [Set Shackle as your default shell](#orgbbb568c) -2. [Operating System Support](#orgba67b49) -3. [Development Guide](#orgecab73f) - 1. [Development Environment Setup](#org042c092) - 2. [Running Tests](#org47d18c8) - 3. [Linting](#org93c4549) - 4. [Building a Release Binary](#org2f9ca48) -4. [Roadmap / Issue Tracker TODO list](#orgc6e595d) - 1. [MVP](#org63f61f9) - 2. [Post-MVP](#org64e0c30) -5. [License](#org2bca22d) +1. [Getting Started](#org920ad93) + 1. [Usage](#orga0a1fa1) + 2. [Installation](#orgba2f24f) + 1. [Prerequisites](#orgcdc7511) + 2. [Building Shackle](#org028a898) + 3. [Creating the required directory structure](#org04bfc1c) + 4. [Set Shackle as your default shell](#org42a08f6) +2. [Operating System Support](#orgee1f10f) +3. [Development Guide](#org4ab94d8) + 1. [Development Environment Setup](#org37992c2) + 2. [Running Tests](#org435149f) + 3. [Linting](#orge2138f7) + 4. [Building a Release Binary](#org2987255) +4. [Roadmap / Issue Tracker TODO list](#orgd145959) + 1. [MVP](#org90cf3d0) + 2. [Post-MVP](#orge18567c) +5. [License](#org3e0d656) A shell for restricting access on a version control server. @@ -37,12 +37,12 @@ differences: - (coming soon!) Support for other other version control systems. -<a id="org986db7c"></a> +<a id="org920ad93"></a> # Getting Started -<a id="orgafa9ca9"></a> +<a id="orga0a1fa1"></a> ## Usage @@ -101,12 +101,12 @@ all of the options, and is a great way to learn what all the commands do. -h, --help Print help -<a id="org549f1c0"></a> +<a id="orgba2f24f"></a> ## Installation -<a id="orge3db211"></a> +<a id="orgcdc7511"></a> ### Prerequisites @@ -121,7 +121,7 @@ all of the options, and is a great way to learn what all the commands do. the OpenSSH daemon. -<a id="org201706a"></a> +<a id="org028a898"></a> ### Building Shackle @@ -137,7 +137,7 @@ build from source. cargo install --git https://code.worthe-it.co.za/shackle.git/ --force -<a id="org7c15c50"></a> +<a id="org04bfc1c"></a> ### Creating the required directory structure @@ -160,7 +160,7 @@ users have a `~/git` symlink in their home directory which actually points at chmod --recursive u=rwX,g=rwXs,o= ~/git/$GROUP -<a id="orgbbb568c"></a> +<a id="org42a08f6"></a> ### Set Shackle as your default shell @@ -171,7 +171,7 @@ will be Shackle. sudo usermod --shell $HOME/.cargo/bin/shackle-shell $USER -<a id="orgba67b49"></a> +<a id="orgee1f10f"></a> # Operating System Support @@ -182,12 +182,12 @@ currently tested, and there are currently no plans to do so. I would not expect it to work on Windows. -<a id="orgecab73f"></a> +<a id="org4ab94d8"></a> # Development Guide -<a id="org042c092"></a> +<a id="org37992c2"></a> ## Development Environment Setup @@ -231,16 +231,16 @@ environment ready. # Note: you need to log out and in again for the new group to take effect -<a id="org47d18c8"></a> +<a id="org435149f"></a> ## Running Tests All unit tests are run with Cargo. - cargo test --workspace + cargo test -<a id="org93c4549"></a> +<a id="orge2138f7"></a> ## Linting @@ -253,7 +253,7 @@ And it can be run via Cargo. cargo clippy -<a id="org2f9ca48"></a> +<a id="org2987255"></a> ## Building a Release Binary @@ -264,12 +264,12 @@ Release binaries should be built in release mode. After running this, the binary is available in `./target/release/shackle-shell` -<a id="orgc6e595d"></a> +<a id="orgd145959"></a> # Roadmap / Issue Tracker TODO list -<a id="org63f61f9"></a> +<a id="org90cf3d0"></a> ## MVP @@ -303,7 +303,7 @@ After running this, the binary is available in `./target/release/shackle-shell` - [X] help docs on all the commands -<a id="org64e0c30"></a> +<a id="orge18567c"></a> ## Post-MVP @@ -324,7 +324,7 @@ After running this, the binary is available in `./target/release/shackle-shell` - [ ] pijul support on other commands -<a id="org2bca22d"></a> +<a id="org3e0d656"></a> # License @@ -205,7 +205,7 @@ environment ready. All unit tests are run with Cargo. #+begin_src sh - cargo test --workspace + cargo test #+end_src ** Linting @@ -1,5 +1,6 @@ use crate::{ parser::{GitReceivePackArgs, GitUploadPackArgs}, + user_info::{get_user_groups, get_username}, ShackleError, }; use git2::{ErrorCode, Repository, RepositoryInitMode, RepositoryInitOptions}; @@ -8,7 +9,6 @@ use std::{ path::{Path, PathBuf}, process::Command, }; -use user_info::{get_user_groups, get_username}; pub struct GitInitResult { pub path: PathBuf, @@ -1,5 +1,6 @@ pub mod git; -pub mod parser; +mod parser; +pub mod user_info; use comfy_table::Table; use parser::*; diff --git a/user-info/src/lib.rs b/src/user_info.rs index 7a42db9..7a42db9 100644 --- a/user-info/src/lib.rs +++ b/src/user_info.rs diff --git a/tests/cli.rs b/tests/cli.rs index 3787bfc..41fe145 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -1,9 +1,9 @@ use anyhow::Result; use assert_cmd::{cargo::cargo_bin, Command}; use rexpect::session::{spawn_command, PtySession}; +use shackle_shell::user_info::{get_user_groups, get_username}; use std::path::Path; use tempfile::TempDir; -use user_info::{get_user_groups, get_username}; struct TestContext { p: PtySession, diff --git a/user-info/Cargo.toml b/user-info/Cargo.toml deleted file mode 100644 index 63a3f7c..0000000 --- a/user-info/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "user-info" -version = "0.1.0" -edition = "2021" - -[dependencies] -nix = { version = "0.26.2", default-features = false, features = ["user"] } |