From a34066c47beaefefdd829a6c0c10ed72d78d30e4 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Wed, 20 Mar 2024 17:28:59 -0300 Subject: [PATCH] New project name: bsdcontrol.rb --- Gemfile.lock | 4 ++-- README.md | 14 +++++++------- Rakefile.rb | 4 ++-- hbsdctl.rb.gemspec => bsdcontrol.rb.gemspec | 6 +++--- .../hbsdctl.c => bsdcontrol.rb/bsdcontrol.c} | 2 +- ext/{hbsdctl.rb => bsdcontrol.rb}/context.c | 0 ext/{hbsdctl.rb => bsdcontrol.rb}/context.h | 0 ext/{hbsdctl.rb => bsdcontrol.rb}/extconf.rb | 2 +- ext/{hbsdctl.rb => bsdcontrol.rb}/feature.c | 0 ext/{hbsdctl.rb => bsdcontrol.rb}/feature.h | 0 ext/{hbsdctl.rb => bsdcontrol.rb}/glue.c | 0 ext/{hbsdctl.rb => bsdcontrol.rb}/glue.h | 0 lib/hbsdctl.rb | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) rename hbsdctl.rb.gemspec => bsdcontrol.rb.gemspec (75%) rename ext/{hbsdctl.rb/hbsdctl.c => bsdcontrol.rb/bsdcontrol.c} (97%) rename ext/{hbsdctl.rb => bsdcontrol.rb}/context.c (100%) rename ext/{hbsdctl.rb => bsdcontrol.rb}/context.h (100%) rename ext/{hbsdctl.rb => bsdcontrol.rb}/extconf.rb (59%) rename ext/{hbsdctl.rb => bsdcontrol.rb}/feature.c (100%) rename ext/{hbsdctl.rb => bsdcontrol.rb}/feature.h (100%) rename ext/{hbsdctl.rb => bsdcontrol.rb}/glue.c (100%) rename ext/{hbsdctl.rb => bsdcontrol.rb}/glue.h (100%) diff --git a/Gemfile.lock b/Gemfile.lock index 122acd3..18d9e93 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - hbsdctl.rb (0.1.0) + bsdcontrol.rb (0.1.0) GEM remote: https://rubygems.org/ @@ -18,7 +18,7 @@ PLATFORMS ruby DEPENDENCIES - hbsdctl.rb! + bsdcontrol.rb! rake-compiler (= 1.2.0) test-unit (~> 3.6) diff --git a/README.md b/README.md index 48f8019..0bd3085 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## About -hbsdctl.rb provides Ruby bindings for libhbsdcontrol from the +bsdcontrol.rb provides Ruby bindings for libhbsdcontrol from the [hardenedbsd](https://hardenedbsd.org) project. Through this library, you can query what features are available and if root: enable, disable or query the status of a feature for a @@ -58,21 +58,21 @@ BSD::Control ## Documentation A complete API reference is available at -[0x1eef.github.io/x/hbsdctl.rb](https://0x1eef.github.io/x/hbsdctl.rb). +[0x1eef.github.io/x/bsdcontrol.rb](https://0x1eef.github.io/x/bsdcontrol.rb). ## Install **Rubygems.org** -hbsdctl.rb can be installed via rubygems.org. +bsdcontrol.rb can be installed via rubygems.org. - gem install hbsdctl.rb + gem install bsdcontrol.rb ## Sources -* [GitHub](https://github.com/0x1eef/hbsdctl.rb) -* [GitLab](https://gitlab.com/0x1eef/hbsdctl.rb) -* [git.hardenedbsd.org](https://git.hardenedbsd.org/0x1eef/hbsdctl.rb) +* [GitHub](https://github.com/0x1eef/bsdcontrol.rb) +* [GitLab](https://gitlab.com/0x1eef/bsdcontrol.rb) +* [git.hardenedbsd.org](https://git.hardenedbsd.org/0x1eef/bsdcontrol.rb) ## License diff --git a/Rakefile.rb b/Rakefile.rb index 15ceb81..38f96e5 100644 --- a/Rakefile.rb +++ b/Rakefile.rb @@ -1,12 +1,12 @@ require "bundler/setup" require "rake/extensiontask" -Rake::ExtensionTask.new("hbsdctl.rb") +Rake::ExtensionTask.new("bsdcontrol.rb") task default: %w[clobber compile test] desc "Run C linter" namespace :clang do task :format do - sh "clang-format -style=file:.clang-format -i ext/hbsdctl.rb/*.c" + sh "clang-format -style=file:.clang-format -i ext/bsdcontrol.rb/*.c" end end diff --git a/hbsdctl.rb.gemspec b/bsdcontrol.rb.gemspec similarity index 75% rename from hbsdctl.rb.gemspec rename to bsdcontrol.rb.gemspec index aa9c36f..fd01b3c 100644 --- a/hbsdctl.rb.gemspec +++ b/bsdcontrol.rb.gemspec @@ -1,14 +1,14 @@ require_relative "lib/bsd/control/version" Gem::Specification.new do |gem| - gem.name = "hbsdctl.rb" + gem.name = "bsdcontrol.rb" gem.authors = ["0x1eef"] gem.email = ["0x1eef@protonmail.com"] - gem.homepage = "https://git.hardenedbsd.org/0x1eef/hbsdctl.rb#readme" + gem.homepage = "https://git.hardenedbsd.org/0x1eef/bsdcontrol.rb#readme" gem.version = BSD::Control::VERSION gem.licenses = ["0BSD"] gem.files = `git ls-files`.split($/) gem.require_paths = ["lib"] - gem.extensions = %w[ext/hbsdctl.rb/extconf.rb] + gem.extensions = %w[ext/bsdcontrol.rb/extconf.rb] gem.summary = "Ruby bindings for libhbsdcontrol" gem.description = gem.summary gem.add_development_dependency "rake-compiler", "= 1.2.0" diff --git a/ext/hbsdctl.rb/hbsdctl.c b/ext/bsdcontrol.rb/bsdcontrol.c similarity index 97% rename from ext/hbsdctl.rb/hbsdctl.c rename to ext/bsdcontrol.rb/bsdcontrol.c index 252003a..9ed99f9 100644 --- a/ext/hbsdctl.rb/hbsdctl.c +++ b/ext/bsdcontrol.rb/bsdcontrol.c @@ -4,7 +4,7 @@ #include "feature.h" void -Init_hbsdctl(void) +Init_bsdcontrol(void) { VALUE rb_mBSD = rb_const_get(rb_cObject, rb_intern("BSD")), rb_mControl = rb_const_get(rb_mBSD, rb_intern("Control")), diff --git a/ext/hbsdctl.rb/context.c b/ext/bsdcontrol.rb/context.c similarity index 100% rename from ext/hbsdctl.rb/context.c rename to ext/bsdcontrol.rb/context.c diff --git a/ext/hbsdctl.rb/context.h b/ext/bsdcontrol.rb/context.h similarity index 100% rename from ext/hbsdctl.rb/context.h rename to ext/bsdcontrol.rb/context.h diff --git a/ext/hbsdctl.rb/extconf.rb b/ext/bsdcontrol.rb/extconf.rb similarity index 59% rename from ext/hbsdctl.rb/extconf.rb rename to ext/bsdcontrol.rb/extconf.rb index f9c2f74..18fce36 100644 --- a/ext/hbsdctl.rb/extconf.rb +++ b/ext/bsdcontrol.rb/extconf.rb @@ -1,3 +1,3 @@ require 'mkmf' $LIBS << ' -lsbuf -lhbsdcontrol' -create_makefile("hbsdctl.rb") +create_makefile("bsdcontrol.rb") diff --git a/ext/hbsdctl.rb/feature.c b/ext/bsdcontrol.rb/feature.c similarity index 100% rename from ext/hbsdctl.rb/feature.c rename to ext/bsdcontrol.rb/feature.c diff --git a/ext/hbsdctl.rb/feature.h b/ext/bsdcontrol.rb/feature.h similarity index 100% rename from ext/hbsdctl.rb/feature.h rename to ext/bsdcontrol.rb/feature.h diff --git a/ext/hbsdctl.rb/glue.c b/ext/bsdcontrol.rb/glue.c similarity index 100% rename from ext/hbsdctl.rb/glue.c rename to ext/bsdcontrol.rb/glue.c diff --git a/ext/hbsdctl.rb/glue.h b/ext/bsdcontrol.rb/glue.h similarity index 100% rename from ext/hbsdctl.rb/glue.h rename to ext/bsdcontrol.rb/glue.h diff --git a/lib/hbsdctl.rb b/lib/hbsdctl.rb index 6cbe3e1..f7cd984 100644 --- a/lib/hbsdctl.rb +++ b/lib/hbsdctl.rb @@ -1,4 +1,4 @@ module BSD require_relative "bsd/control" - require_relative "hbsdctl.rb.so" + require_relative "bsdcontrol.rb.so" end