public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-ruby/globalid/files/, dev-ruby/globalid/
@ 2021-03-11 10:54 Hans de Graaff
  0 siblings, 0 replies; only message in thread
From: Hans de Graaff @ 2021-03-11 10:54 UTC (permalink / raw
  To: gentoo-commits

commit:     56727587de325b4357b445256a7e96cdf2fcfd01
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 11 10:33:01 2021 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Thu Mar 11 10:54:51 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56727587

dev-ruby/globalid: fix tests

Forward port upstream fix for activesupport time extensions.

Closes: https://bugs.gentoo.org/775203
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 .../files/globalid-0.4.2-integer-time.patch        | 23 ++++++++++++++++
 dev-ruby/globalid/globalid-0.4.2-r2.ebuild         | 31 ++++++++++++++++++++++
 2 files changed, 54 insertions(+)

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 00000000000..7cd1c627daf
--- /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 00000000000..8a4c361b25e
--- /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
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-11 10:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-11 10:54 [gentoo-commits] repo/gentoo:master commit in: dev-ruby/globalid/files/, dev-ruby/globalid/ Hans de Graaff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox