1 |
commit: de4854ce9f81f36efe97c189c5633b38ad6e9f5b |
2 |
Author: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 1 07:29:01 2018 +0000 |
4 |
Commit: Hans de Graaff <graaff <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 1 17:11:08 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de4854ce |
7 |
|
8 |
dev-ruby/safe_yaml: fix issue with missing DateTime constant |
9 |
|
10 |
Package-Manager: Portage-2.3.36, Repoman-2.3.9 |
11 |
|
12 |
.../safe_yaml/files/safe_yaml-1.0.4-datetime.patch | 19 +++++++++++ |
13 |
dev-ruby/safe_yaml/safe_yaml-1.0.4-r4.ebuild | 38 ++++++++++++++++++++++ |
14 |
2 files changed, 57 insertions(+) |
15 |
|
16 |
diff --git a/dev-ruby/safe_yaml/files/safe_yaml-1.0.4-datetime.patch b/dev-ruby/safe_yaml/files/safe_yaml-1.0.4-datetime.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..92e5505985c |
19 |
--- /dev/null |
20 |
+++ b/dev-ruby/safe_yaml/files/safe_yaml-1.0.4-datetime.patch |
21 |
@@ -0,0 +1,19 @@ |
22 |
+From 9dd1e8d9ad0396a8c9092c2e9f17d498c58e0208 Mon Sep 17 00:00:00 2001 |
23 |
+From: elifoster <elifosterwy@×××××.com> |
24 |
+Date: Tue, 5 Dec 2017 14:30:13 -0800 |
25 |
+Subject: [PATCH] Fix uninitialized constant DateTime Close #80 |
26 |
+ |
27 |
+--- |
28 |
+ lib/safe_yaml/parse/date.rb | 2 ++ |
29 |
+ 1 file changed, 2 insertions(+) |
30 |
+ |
31 |
+diff --git a/lib/safe_yaml/parse/date.rb b/lib/safe_yaml/parse/date.rb |
32 |
+index cd3c62a..3a30a8b 100644 |
33 |
+--- a/lib/safe_yaml/parse/date.rb |
34 |
++++ b/lib/safe_yaml/parse/date.rb |
35 |
+@@ -1,3 +1,5 @@ |
36 |
++require 'time' |
37 |
++ |
38 |
+ module SafeYAML |
39 |
+ class Parse |
40 |
+ class Date |
41 |
|
42 |
diff --git a/dev-ruby/safe_yaml/safe_yaml-1.0.4-r4.ebuild b/dev-ruby/safe_yaml/safe_yaml-1.0.4-r4.ebuild |
43 |
new file mode 100644 |
44 |
index 00000000000..5fe2d736f5e |
45 |
--- /dev/null |
46 |
+++ b/dev-ruby/safe_yaml/safe_yaml-1.0.4-r4.ebuild |
47 |
@@ -0,0 +1,38 @@ |
48 |
+# Copyright 1999-2018 Gentoo Foundation |
49 |
+# Distributed under the terms of the GNU General Public License v2 |
50 |
+ |
51 |
+EAPI=6 |
52 |
+ |
53 |
+USE_RUBY="ruby23 ruby24 ruby25" |
54 |
+ |
55 |
+RUBY_FAKEGEM_RECIPE_DOC="rdoc" |
56 |
+RUBY_FAKEGEM_EXTRADOC="README.md" |
57 |
+RUBY_FAKEGEM_RECIPE_TEST="none" |
58 |
+ |
59 |
+inherit ruby-fakegem |
60 |
+ |
61 |
+DESCRIPTION="Parse YAML safely, alternative implementation of YAML.load" |
62 |
+HOMEPAGE="https://dtao.github.com/safe_yaml" |
63 |
+ |
64 |
+LICENSE="MIT" |
65 |
+SLOT="0" |
66 |
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
67 |
+IUSE="test" |
68 |
+ |
69 |
+PATCHES=( "${FILESDIR}/${P}-datetime.patch" ) |
70 |
+ |
71 |
+ruby_add_bdepend "test? ( dev-ruby/hashie |
72 |
+ dev-ruby/heredoc_unindent |
73 |
+ dev-ruby/rspec:3 )" |
74 |
+ |
75 |
+all_ruby_prepare() { |
76 |
+ sed -i -e '/local timezone/askip "timezone"' spec/transform/to_date_spec.rb || die |
77 |
+} |
78 |
+ |
79 |
+each_ruby_test() { |
80 |
+ # Run specs with monkeypatch |
81 |
+ ${RUBY} -S rspec-3 spec --tag ~libraries || die |
82 |
+ |
83 |
+ # Running specs without monkeypatch |
84 |
+ ${RUBY} -S rspec-3 spec --tag libraries || die |
85 |
+} |