100 lines
4.0 KiB
Ruby
100 lines
4.0 KiB
Ruby
class Regipy < Formula
|
|
include Language::Python::Virtualenv
|
|
|
|
desc "Offline registry hive parsing tool"
|
|
homepage "https://github.com/mkorman90/regipy"
|
|
url "https://files.pythonhosted.org/packages/6e/63/a41e1b8c00941c8c980cd273bfb2a59b6fc1eefa385d0ec2841219108502/regipy-1.8.0.tar.gz"
|
|
sha256 "4ceca6e192044aacfc34ece349be256a73e5fde6639cedee4becf5460483f5a5"
|
|
license "MIT"
|
|
head "https://github.com/mkorman90/regipy.git"
|
|
|
|
livecheck do
|
|
url :stable
|
|
end
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "11a11f25b4299ed4eecaf7220ae3c5c8f3f8cb8c67dcd46622c6b8b3fa323314" => :big_sur
|
|
sha256 "62b09d78f42faba628ec6f50185fcc62acc90fbe8fdd1766be354a5d1ad86d6f" => :catalina
|
|
sha256 "b300cc5407e2ba579f649ccf418f2273c7bfb27cca6b637c91b02b6041740efd" => :mojave
|
|
end
|
|
|
|
depends_on "python@3.9"
|
|
|
|
resource "attrs" do
|
|
url "https://files.pythonhosted.org/packages/f0/cb/80a4a274df7da7b8baf083249b0890a0579374c3d74b5ac0ee9291f912dc/attrs-20.3.0.tar.gz"
|
|
sha256 "832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700"
|
|
end
|
|
|
|
resource "click" do
|
|
url "https://files.pythonhosted.org/packages/27/6f/be940c8b1f1d69daceeb0032fee6c34d7bd70e3e649ccac0951500b4720e/click-7.1.2.tar.gz"
|
|
sha256 "d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"
|
|
end
|
|
|
|
resource "construct" do
|
|
url "https://files.pythonhosted.org/packages/00/e0/71e41b817220333c7c511c3f78d988d69f9b03b5cca2f251a898ad3567a3/construct-2.10.56.tar.gz"
|
|
sha256 "97ba13edcd98546f10f7555af41c8ce7ae9d8221525ec4062c03f9adbf940661"
|
|
end
|
|
|
|
resource "inflection" do
|
|
url "https://files.pythonhosted.org/packages/e1/7e/691d061b7329bc8d54edbf0ec22fbfb2afe61facb681f9aaa9bff7a27d04/inflection-0.5.1.tar.gz"
|
|
sha256 "1a29730d366e996aaacffb2f1f1cb9593dc38e2ddd30c91250c6dde09ea9b417"
|
|
end
|
|
|
|
resource "jsonlines" do
|
|
url "https://files.pythonhosted.org/packages/90/cd/0beacbcfdf9b3af9e7c615cb3dba7ec4be1030d4b283e3c9717e3fd9af3c/jsonlines-1.2.0.tar.gz"
|
|
sha256 "43b8d5588a9d4862c8a4a49580e38e20ec595aee7ad6fe469b10fb83fbefde88"
|
|
end
|
|
|
|
resource "Logbook" do
|
|
url "https://files.pythonhosted.org/packages/2f/d9/16ac346f7c0102835814cc9e5b684aaadea101560bb932a2403bd26b2320/Logbook-1.5.3.tar.gz"
|
|
sha256 "66f454ada0f56eae43066f604a222b09893f98c1adc18df169710761b8f32fe8"
|
|
end
|
|
|
|
resource "pytz" do
|
|
url "https://files.pythonhosted.org/packages/09/07/448a8887c7195450604dfc0305d80d74324c36ee18ed997664051d4bffe3/pytz-2020.4.tar.gz"
|
|
sha256 "3e6b7dd2d1e0a59084bcee14a17af60c5c562cdc16d828e8eba2e683d3a7e268"
|
|
end
|
|
|
|
resource "six" do
|
|
url "https://files.pythonhosted.org/packages/6b/34/415834bfdafca3c5f451532e8a8d9ba89a21c9743a0c59fbd0205c7f9426/six-1.15.0.tar.gz"
|
|
sha256 "30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"
|
|
end
|
|
|
|
resource "tabulate" do
|
|
url "https://files.pythonhosted.org/packages/57/6f/213d075ad03c84991d44e63b6516dd7d185091df5e1d02a660874f8f7e1e/tabulate-0.8.7.tar.gz"
|
|
sha256 "db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007"
|
|
end
|
|
|
|
resource "tqdm" do
|
|
url "https://files.pythonhosted.org/packages/88/e6/13dde83089386c9aa200c4539891948094443d4f6fe85fe95c7806c1f3d5/tqdm-4.51.0.tar.gz"
|
|
sha256 "ef54779f1c09f346b2b5a8e5c61f96fbcb639929e640e59f8cf810794f406432"
|
|
end
|
|
|
|
resource "test_hive" do
|
|
url "https://raw.githubusercontent.com/mkorman90/regipy/71acd6a65bdee11ff776dbd44870adad4632404c/regipy_tests/data/SYSTEM.xz"
|
|
sha256 "b1582ab413f089e746da0528c2394f077d6f53dd4e68b877ffb2667bd027b0b0"
|
|
end
|
|
|
|
def install
|
|
venv = virtualenv_create(libexec, "python3.9")
|
|
res = resources.map(&:name).to_set
|
|
res -= %w[test_hive]
|
|
|
|
res.each do |r|
|
|
venv.pip_install resource(r)
|
|
end
|
|
|
|
venv.pip_install_and_link buildpath
|
|
end
|
|
|
|
test do
|
|
resource("test_hive").stage do
|
|
system bin/"registry-plugins-run", "-p", "computer_name", "-o", "out.json", "SYSTEM"
|
|
h = JSON.parse(File.read("out.json"))
|
|
assert_equal h["computer_name"][0]["name"], "WKS-WIN732BITA"
|
|
assert_equal h["computer_name"][1]["name"], "WIN-V5T3CSP8U4H"
|
|
end
|
|
end
|
|
end
|