git: fd80906ddf5d - main - devel/rubygem-anonymous_loader: Add rubygem-anonymous_loader 0.1.2
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 08 Jul 2026 13:36:00 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=fd80906ddf5d36027d4b79db7a5e9b909307d1f3
commit fd80906ddf5d36027d4b79db7a5e9b909307d1f3
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2026-07-08 12:56:17 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2026-07-08 13:30:20 +0000
devel/rubygem-anonymous_loader: Add rubygem-anonymous_loader 0.1.2
AnonymousLoader evaluates Ruby source files inside fresh anonymous modules. It
is useful when a tool needs to inspect or reuse code that declares constants
whose top-level names may collide with the host process.
The loaded source keeps its normal constant nesting, but that nesting starts
inside the returned anonymous namespace. For example, source that declares
Auth::Sanitizer becomes namespace::Auth::Sanitizer, and does not create
Object::Auth.
AnonymousLoader can load explicitly named files, or resolve a file using
RubyGems metadata with a $LOAD_PATH fallback. The fallback is intended for
Bundler standalone and similar environments where code is loadable but a gem is
not visible through Gem.loaded_specs or the normal RubyGems index.
---
devel/Makefile | 1 +
devel/rubygem-anonymous_loader/Makefile | 20 ++++++++++++++++++++
devel/rubygem-anonymous_loader/distinfo | 3 +++
devel/rubygem-anonymous_loader/pkg-descr | 13 +++++++++++++
4 files changed, 37 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index 647cde29847a..438bd9a9dda6 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -6748,6 +6748,7 @@
SUBDIR += rubygem-amazing_print
SUBDIR += rubygem-analogger
SUBDIR += rubygem-annoy
+ SUBDIR += rubygem-anonymous_loader
SUBDIR += rubygem-ansi
SUBDIR += rubygem-apipie-bindings
SUBDIR += rubygem-apipie-params
diff --git a/devel/rubygem-anonymous_loader/Makefile b/devel/rubygem-anonymous_loader/Makefile
new file mode 100644
index 000000000000..d7db2e6eb2de
--- /dev/null
+++ b/devel/rubygem-anonymous_loader/Makefile
@@ -0,0 +1,20 @@
+PORTNAME= anonymous_loader
+PORTVERSION= 0.1.2
+CATEGORIES= devel rubygems
+MASTER_SITES= RG
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Resolve Ruby files and evaluate them to avoid top-level namespace collisions
+WWW= https://anonymous-loader.galtzo.com/ \
+ https://github.com/ruby-oauth/anonymous_loader
+
+LICENSE= MIT
+#LICENSE_FILE= ${WRKSRC}/MIT.md
+
+RUN_DEPENDS= rubygem-version_gem>=1.1.13<2:devel/rubygem-version_gem
+
+USES= gem
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/rubygem-anonymous_loader/distinfo b/devel/rubygem-anonymous_loader/distinfo
new file mode 100644
index 000000000000..e4b0925d8e41
--- /dev/null
+++ b/devel/rubygem-anonymous_loader/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1782966052
+SHA256 (rubygem/anonymous_loader-0.1.2.gem) = 8ccf77c3f0812fb93d47956fdd6f30344a3835864e3cb1431ca597905985efc2
+SIZE (rubygem/anonymous_loader-0.1.2.gem) = 34816
diff --git a/devel/rubygem-anonymous_loader/pkg-descr b/devel/rubygem-anonymous_loader/pkg-descr
new file mode 100644
index 000000000000..35e278584e72
--- /dev/null
+++ b/devel/rubygem-anonymous_loader/pkg-descr
@@ -0,0 +1,13 @@
+AnonymousLoader evaluates Ruby source files inside fresh anonymous modules. It
+is useful when a tool needs to inspect or reuse code that declares constants
+whose top-level names may collide with the host process.
+
+The loaded source keeps its normal constant nesting, but that nesting starts
+inside the returned anonymous namespace. For example, source that declares
+Auth::Sanitizer becomes namespace::Auth::Sanitizer, and does not create
+Object::Auth.
+
+AnonymousLoader can load explicitly named files, or resolve a file using
+RubyGems metadata with a $LOAD_PATH fallback. The fallback is intended for
+Bundler standalone and similar environments where code is loadable but a gem is
+not visible through Gem.loaded_specs or the normal RubyGems index.