aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-08-04 16:44:22 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-08-04 17:13:53 +0000
commit15815c73b33285e546baee96a74218cbc068b6eb (patch)
treef4607b71f3fe2947c038cc6f772ab2b144dd007d
parent04ad24954232d40d34f69602796f618185a58656 (diff)
devel/rubygem-constant_resolver: Add rubygem-constant_resolver 0.2.0
ConstantResolver resolves partially qualified constant reference to the fully qualified name and the path of the file defining it. It does not load the files to do that, its inference engine purely works on file paths and constant names. ConstantResolver uses the same assumptions as Rails' code loader, Zeitwerk to infer constant locations. Please see Zeitwerk's documentation on file structure and inflection for more information.
-rw-r--r--devel/Makefile1
-rw-r--r--devel/rubygem-constant_resolver/Makefile17
-rw-r--r--devel/rubygem-constant_resolver/distinfo3
-rw-r--r--devel/rubygem-constant_resolver/pkg-descr7
4 files changed, 28 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 8c591c4cccf0..4225542238f0 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -6933,6 +6933,7 @@
SUBDIR += rubygem-configstruct
SUBDIR += rubygem-configuration
SUBDIR += rubygem-console
+ SUBDIR += rubygem-constant_resolver
SUBDIR += rubygem-contracts
SUBDIR += rubygem-contracts016
SUBDIR += rubygem-cookbook-omnifetch
diff --git a/devel/rubygem-constant_resolver/Makefile b/devel/rubygem-constant_resolver/Makefile
new file mode 100644
index 000000000000..f79488e83c4c
--- /dev/null
+++ b/devel/rubygem-constant_resolver/Makefile
@@ -0,0 +1,17 @@
+PORTNAME= constant_resolver
+PORTVERSION= 0.2.0
+CATEGORIES= devel rubygems
+MASTER_SITES= RG
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Resolve any constant to the path of the file that defines it
+WWW= https://github.com/Shopify/constant_resolver
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+
+USES= gem
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/rubygem-constant_resolver/distinfo b/devel/rubygem-constant_resolver/distinfo
new file mode 100644
index 000000000000..355f4d2f8ca7
--- /dev/null
+++ b/devel/rubygem-constant_resolver/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1722711137
+SHA256 (rubygem/constant_resolver-0.2.0.gem) = 4f59ff7ed6ee7a19c1d4b35c84fdec9b19f0391801991723c566eb40b4fc226f
+SIZE (rubygem/constant_resolver-0.2.0.gem) = 15360
diff --git a/devel/rubygem-constant_resolver/pkg-descr b/devel/rubygem-constant_resolver/pkg-descr
new file mode 100644
index 000000000000..ee4f2b5684d9
--- /dev/null
+++ b/devel/rubygem-constant_resolver/pkg-descr
@@ -0,0 +1,7 @@
+ConstantResolver resolves partially qualified constant reference to the fully
+qualified name and the path of the file defining it. It does not load the files
+to do that, its inference engine purely works on file paths and constant names.
+
+ConstantResolver uses the same assumptions as Rails' code loader, Zeitwerk to
+infer constant locations. Please see Zeitwerk's documentation on file structure
+and inflection for more information.