git: 926831c62fe0 - main - devel/rubygem-active_hash: Add rubygem-active_hash 3.3.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 May 2024 06:29:24 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=926831c62fe0344906ccfc40095e5cda258c7a7e commit 926831c62fe0344906ccfc40095e5cda258c7a7e Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2024-05-16 06:13:36 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2024-05-16 06:21:48 +0000 devel/rubygem-active_hash: Add rubygem-active_hash 3.3.0 ActiveHash is a simple base class that allows you to use a ruby hash as a readonly datasource for an ActiveRecord-like model. ActiveHash assumes that every hash has an :id key, which is what you would probably store in a database. This allows you to seamlessly upgrade from ActiveHash objects to full ActiveRecord objects without having to change any code in your app, or any foreign keys in your database. It also allows you to use #has_many and #belongs_to (via belongs_to_active_hash) in your AR objects. ActiveHash can also be useful to create simple test classes that run without a database - ideal for testing plugins or gems that rely on simple AR behavior, but don't want to deal with databases or migrations for the spec suite. ActiveHash also ships with: - ActiveFile: a base class that you can use to create file data sources - ActiveYaml: a base class that will turn YAML into a hash and load the data into an ActiveHash object --- devel/Makefile | 1 + devel/rubygem-active_hash/Makefile | 19 +++++++++++++++++++ devel/rubygem-active_hash/distinfo | 3 +++ devel/rubygem-active_hash/pkg-descr | 19 +++++++++++++++++++ 4 files changed, 42 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index e1df574c474d..c4b66813ffe2 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -6173,6 +6173,7 @@ SUBDIR += rubygem-actionview61 SUBDIR += rubygem-actionview70 SUBDIR += rubygem-actionview71 + SUBDIR += rubygem-active_hash SUBDIR += rubygem-active_scaffold SUBDIR += rubygem-activejob4 SUBDIR += rubygem-activejob5 diff --git a/devel/rubygem-active_hash/Makefile b/devel/rubygem-active_hash/Makefile new file mode 100644 index 000000000000..91904852691f --- /dev/null +++ b/devel/rubygem-active_hash/Makefile @@ -0,0 +1,19 @@ +PORTNAME= active_hash +PORTVERSION= 3.3.0 +CATEGORIES= devel rubygems +MASTER_SITES= RG + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Include the ability to specify data using hashes, yml files or JSON files +WWW= https://github.com/active-hash/active_hash + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= rubygem-activesupport71>=5.0.0:devel/rubygem-activesupport71 + +USES= gem + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/devel/rubygem-active_hash/distinfo b/devel/rubygem-active_hash/distinfo new file mode 100644 index 000000000000..9e06cb86c844 --- /dev/null +++ b/devel/rubygem-active_hash/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1714227800 +SHA256 (rubygem/active_hash-3.3.0.gem) = 44014718d97f04b96df5183d84d0478b9322ec20ee1bfd39a71d43d90cf680f5 +SIZE (rubygem/active_hash-3.3.0.gem) = 26112 diff --git a/devel/rubygem-active_hash/pkg-descr b/devel/rubygem-active_hash/pkg-descr new file mode 100644 index 000000000000..5adffca6decd --- /dev/null +++ b/devel/rubygem-active_hash/pkg-descr @@ -0,0 +1,19 @@ +ActiveHash is a simple base class that allows you to use a ruby hash as a +readonly datasource for an ActiveRecord-like model. + +ActiveHash assumes that every hash has an :id key, which is what you would +probably store in a database. This allows you to seamlessly upgrade from +ActiveHash objects to full ActiveRecord objects without having to change any +code in your app, or any foreign keys in your database. + +It also allows you to use #has_many and #belongs_to (via belongs_to_active_hash) +in your AR objects. + +ActiveHash can also be useful to create simple test classes that run without a +database - ideal for testing plugins or gems that rely on simple AR behavior, +but don't want to deal with databases or migrations for the spec suite. + +ActiveHash also ships with: +- ActiveFile: a base class that you can use to create file data sources +- ActiveYaml: a base class that will turn YAML into a hash and load the data + into an ActiveHash object