summaryrefslogtreecommitdiff
path: root/dev-ruby/settingslogic
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ruby/settingslogic')
-rw-r--r--dev-ruby/settingslogic/Manifest2
-rw-r--r--dev-ruby/settingslogic/files/settingslogic-2.0.9-psych-4.patch31
-rw-r--r--dev-ruby/settingslogic/settingslogic-2.0.9-r2.ebuild26
3 files changed, 59 insertions, 0 deletions
diff --git a/dev-ruby/settingslogic/Manifest b/dev-ruby/settingslogic/Manifest
index 145aa8e30c85..b9641a7af82f 100644
--- a/dev-ruby/settingslogic/Manifest
+++ b/dev-ruby/settingslogic/Manifest
@@ -1,3 +1,5 @@
+AUX settingslogic-2.0.9-psych-4.patch 1279 BLAKE2B 6fafc241e1dab8aca1ae541c2057fd2649e04aa7b1b17c0bc99ee848ebac83fc3042b489d6d3bd96728234e23db7f63e9212d24964711f9815d221842ce3d79d SHA512 f4516b58bf0f8bfa83ab2d365d6fa083fa353cc54e81a815f1992c1d58deb04e827a589b5f182385f2025efd379143a96468e32e99a7daaf60b600068184c440
DIST settingslogic-2.0.9.gem 10752 BLAKE2B 7910ab9a4e61c92d5b23a34e9ba58ad89bbf71b7aaf8c2e679eab3e517ea38553d83d05a32a13151c9deaa36d0e6ae44a6afd1b13cfe452a69c668e07fa618b8 SHA512 e9229231815c8d80b7539724cda78c0cfd17bcf8423d0bc2643b3ce2a046e8014f3b398c5314b095aef480a0c7de16e0c93a6592fe8eabfea4ae94742f3dab57
EBUILD settingslogic-2.0.9-r1.ebuild 534 BLAKE2B 71362e5e0c3f13c958969a71039ea67de5d65a04a2d82850bd0f348908e5a827d07c7a7fa826fbaaa945c6010db661ae33ca2074293502b5c124bfececfb62b1 SHA512 9e876d17e6eaf096542e4ab478557d462864c86c1c620fc343b278a8dea34e7c0404484df9c8b45a5ac83755b1f2cc4678dbaaf9d0ee367f1de07718b00b6383
+EBUILD settingslogic-2.0.9-r2.ebuild 580 BLAKE2B 650728143812963c5dd91ed42835e5d24aff7f5b6c1ac2d2bff672a5134196a66ce69ea0e33597f63436dc6665589f74467c9df6883847b96059da19d9618aaa SHA512 5d6b79a5dd3716aad825198f0de1f377e7ed38a5f5f14f76c39fb6da986aab463c82346486a472b629887a3383f566e23c96851f38d1dd176c3c6281bb92234b
MISC metadata.xml 352 BLAKE2B c8579ec17f151942684fb320b577fabd2d0ec4e7dbeb0ff7e86d548ef213522c48a61197c2fb50ab5fa8c660a5549fbd0da2374c13c990106209f0c8241cc796 SHA512 5824d698f1d9abfcb1c65a84095194bca44958b70a4642186631870809f32ab1c9ec78bdb981cbb3b3fe534fbbbfbb7178e24f769ed162085a03099e3f790dca
diff --git a/dev-ruby/settingslogic/files/settingslogic-2.0.9-psych-4.patch b/dev-ruby/settingslogic/files/settingslogic-2.0.9-psych-4.patch
new file mode 100644
index 000000000000..aecb968e9766
--- /dev/null
+++ b/dev-ruby/settingslogic/files/settingslogic-2.0.9-psych-4.patch
@@ -0,0 +1,31 @@
+From bd477f59560f3dea86f0cf43dabd814ac459d2ee Mon Sep 17 00:00:00 2001
+From: Tomohiko Mimura <mito.5525@gmail.com>
+Date: Mon, 2 Aug 2021 13:26:22 +0900
+Subject: [PATCH] Support Psych v4.0.0
+
+Ruby master ships with Psych 4.0.0 which makes `YAML.load`
+defaults to safe mode (https://github.com/ruby/psych/pull/487).
+
+Keep compatibility by using `unsafe_load`.
+---
+ lib/settingslogic.rb | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/lib/settingslogic.rb b/lib/settingslogic.rb
+index a99acaf..e7ea37e 100644
+--- a/lib/settingslogic.rb
++++ b/lib/settingslogic.rb
+@@ -100,7 +100,12 @@ def initialize(hash_or_file = self.class.source, section = nil)
+ self.replace hash_or_file
+ else
+ file_contents = open(hash_or_file).read
+- hash = file_contents.empty? ? {} : YAML.load(ERB.new(file_contents).result).to_hash
++ hash = if file_contents.empty?
++ {}
++ else
++ payload = ERB.new(file_contents).result
++ (YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(payload) : YAML.load(payload)).to_hash
++ end
+ if self.class.namespace
+ hash = hash[self.class.namespace] or return missing_key("Missing setting '#{self.class.namespace}' in #{hash_or_file}")
+ end
diff --git a/dev-ruby/settingslogic/settingslogic-2.0.9-r2.ebuild b/dev-ruby/settingslogic/settingslogic-2.0.9-r2.ebuild
new file mode 100644
index 000000000000..5d2b70ee8217
--- /dev/null
+++ b/dev-ruby/settingslogic/settingslogic-2.0.9-r2.ebuild
@@ -0,0 +1,26 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby26 ruby27"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_EXTRADOC="README.rdoc"
+
+RUBY_FAKEGEM_RECIPE_TEST="rspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="A simple configuration / settings solution that uses an ERB enabled YAML file"
+HOMEPAGE="https://github.com/binarylogic/settingslogic"
+LICENSE="MIT"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+IUSE=""
+
+PATCHES=( "${FILESDIR}/${P}-psych-4.patch" )
+
+all_ruby_prepare() {
+ sed -i -e '/check_dependencies/d' Rakefile || die
+}