mirror of
https://github.com/str4d/rage.git
synced 2025-04-02 02:17:42 +03:00
Use homebrew formula from homebrew/core
This commit is contained in:
parent
b17c81008b
commit
daac4c9a9a
3 changed files with 4 additions and 48 deletions
|
@ -1,47 +0,0 @@
|
|||
class Rage < Formula
|
||||
desc "[BETA] A simple, secure, and modern encryption tool."
|
||||
homepage "https://str4d.xyz/rage"
|
||||
url "https://github.com/str4d/rage/archive/refs/tags/v0.10.0.tar.gz"
|
||||
sha256 "34c39c28f8032c144a43aea96e58159fe69526f5ff91cb813083530adcaa6ea4"
|
||||
license any_of: ["MIT", "Apache-2.0"]
|
||||
version "0.10.0"
|
||||
|
||||
depends_on "rust" => :build
|
||||
|
||||
def install
|
||||
system "cargo", "install", *std_cargo_args(path: './rage')
|
||||
|
||||
install_completions("rage")
|
||||
install_completions("rage-keygen")
|
||||
|
||||
man.install Dir["target/release/manpages/*"]
|
||||
end
|
||||
|
||||
def install_completions(base_name)
|
||||
src_dir = "target/release/completions"
|
||||
|
||||
bash_completion.install { "#{src_dir}/#{base_name}.bash" => base_name}
|
||||
fish_completion.install "#{src_dir}/#{base_name}.fish"
|
||||
zsh_completion.install "#{src_dir}/_#{base_name}"
|
||||
end
|
||||
|
||||
def caveats
|
||||
"rage bash completion depends on the bash-completion package"
|
||||
end
|
||||
|
||||
test do
|
||||
# Test key generation
|
||||
system "#{bin}/rage-keygen -o #{testpath}/output.txt"
|
||||
assert_predicate testpath/"output.txt", :exist?
|
||||
|
||||
# Test encryption
|
||||
(testpath/"test.txt").write("Hello World!\n")
|
||||
system "#{bin}/rage -r age1y8m84r6pwd4da5d45zzk03rlgv2xr7fn9px80suw3psrahul44ashl0usm -o #{testpath}/test.txt.age #{testpath}/test.txt"
|
||||
assert_predicate testpath/"test.txt.age", :exist?
|
||||
assert File.read(testpath/"test.txt.age").start_with?("age-encryption.org")
|
||||
|
||||
# Test decryption
|
||||
(testpath/"test.key").write("AGE-SECRET-KEY-1TRYTV7PQS5XPUYSTAQZCD7DQCWC7Q77YJD7UVFJRMW4J82Q6930QS70MRX")
|
||||
assert_equal "Hello World!", shell_output("#{bin}/rage -d -i #{testpath}/test.key #{testpath}/test.txt.age").strip
|
||||
end
|
||||
end
|
|
@ -24,7 +24,7 @@ For more plugins, implementations, tools, and integrations, check out the
|
|||
| Environment | CLI command |
|
||||
|-------------|-------------|
|
||||
| Cargo (Rust 1.65+) | `cargo install rage` |
|
||||
| Homebrew (macOS or Linux) | `brew tap str4d.xyz/rage https://str4d.xyz/rage`<br>`brew install rage` |
|
||||
| Homebrew (macOS or Linux) | `brew install rage` |
|
||||
| Alpine Linux (edge) | `apk add rage` |
|
||||
| Arch Linux | `pacman -S rage-encryption` |
|
||||
| Debian | [Debian packages](https://github.com/str4d/rage/releases) |
|
||||
|
|
3
tap_migrations.json
Normal file
3
tap_migrations.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"rage": "homebrew/core"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue