diff options
-rw-r--r-- | dev-ruby/globalid/files/globalid-0.4.2-integer-time.patch | 23 | ||||
-rw-r--r-- | dev-ruby/globalid/globalid-0.4.2-r2.ebuild | 31 |
2 files changed, 54 insertions, 0 deletions
diff --git a/dev-ruby/globalid/files/globalid-0.4.2-integer-time.patch b/dev-ruby/globalid/files/globalid-0.4.2-integer-time.patch new file mode 100644 index 000000000000..7cd1c627daf2 --- /dev/null +++ b/dev-ruby/globalid/files/globalid-0.4.2-integer-time.patch @@ -0,0 +1,23 @@ +From 1aec708b98d8657ef241d02813960e8af8ebd952 Mon Sep 17 00:00:00 2001 +From: Eugene Kenny <elkenny@gmail.com> +Date: Sun, 26 Apr 2020 17:35:41 +0100 +Subject: [PATCH] Require time core extension for 1.year + +Since 39ab83a43a64b339739c6e8c7ab24bb1325204ed this file uses `1.year` +without requiring the Active Support core extension that defines it. +--- + lib/global_id/railtie.rb | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/global_id/railtie.rb b/lib/global_id/railtie.rb +index edc90d8..096c20b 100644 +--- a/lib/global_id/railtie.rb ++++ b/lib/global_id/railtie.rb +@@ -5,6 +5,7 @@ + require 'global_id' + require 'active_support' + require 'active_support/core_ext/string/inflections' ++require 'active_support/core_ext/integer/time' + + class GlobalID + # = GlobalID Railtie diff --git a/dev-ruby/globalid/globalid-0.4.2-r2.ebuild b/dev-ruby/globalid/globalid-0.4.2-r2.ebuild new file mode 100644 index 000000000000..8a4c361b25e6 --- /dev/null +++ b/dev-ruby/globalid/globalid-0.4.2-r2.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +USE_RUBY="ruby25 ruby26 ruby27" + +RUBY_FAKEGEM_EXTRADOC="README.md" + +RUBY_FAKEGEM_GEMSPEC="globalid.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="Reference models by URI" +HOMEPAGE="https://github.com/rails/globalid" +SRC_URI="https://github.com/rails/globalid/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux" +IUSE="" + +PATCHES=( "${FILESDIR}/${P}-integer-time.patch" ) + +ruby_add_bdepend "test? ( dev-ruby/bundler >=dev-ruby/activemodel-4.2.0 >=dev-ruby/railties-4.2.0 )" +ruby_add_rdepend ">=dev-ruby/activesupport-4.2.0:*" + +all_ruby_prepare() { + rm -f Gemfile.lock || die + + sed -i -e '2irequire "forwardable"' test/helper.rb || die +} |