summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2023-03-27 10:20:01 +0200
committerHans de Graaff <graaff@gentoo.org>2023-03-27 10:20:01 +0200
commit8be317aabb4336d206fb2cf392d863aba3eea847 (patch)
treeef426070c513907a5c19e0ea1da31214e1959535
parentdev-ruby/hiera-eyaml-plaintext: enable ruby31 (diff)
downloadgentoo-8be317aabb4336d206fb2cf392d863aba3eea847.tar.gz
gentoo-8be317aabb4336d206fb2cf392d863aba3eea847.tar.bz2
gentoo-8be317aabb4336d206fb2cf392d863aba3eea847.zip
dev-ruby/hiera-eyaml: add ruby30, ruby31
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
-rw-r--r--dev-ruby/hiera-eyaml/hiera-eyaml-3.3.0-r1.ebuild55
1 files changed, 55 insertions, 0 deletions
diff --git a/dev-ruby/hiera-eyaml/hiera-eyaml-3.3.0-r1.ebuild b/dev-ruby/hiera-eyaml/hiera-eyaml-3.3.0-r1.ebuild
new file mode 100644
index 000000000000..4b4f8c618ace
--- /dev/null
+++ b/dev-ruby/hiera-eyaml/hiera-eyaml-3.3.0-r1.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+USE_RUBY="ruby27 ruby30 ruby31"
+
+RUBY_FAKEGEM_TASK_DOC=""
+RUBY_FAKEGEM_EXTRADOC="README.md CHANGELOG.md PLUGINS.md"
+
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
+
+inherit ruby-fakegem
+
+DESCRIPTION="Encrypted YAML backend for hiera"
+HOMEPAGE="https://github.com/voxpupuli/hiera-eyaml"
+SRC_URI="https://github.com/voxpupuli/hiera-eyaml/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="3"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+ruby_add_rdepend ">=dev-ruby/highline-1.6.19:*"
+ruby_add_rdepend "dev-ruby/optimist"
+ruby_add_rdepend "!!dev-ruby/hiera-eyaml:0" # both install the /usr/bin/eyaml binary
+
+ruby_add_bdepend "test? (
+ dev-util/cucumber
+ ~dev-util/aruba-0.6.2
+ dev-ruby/hiera-eyaml-plaintext
+)"
+
+BDEPEND+=" test? ( || ( app-admin/puppet-agent app-admin/puppet ) )"
+
+all_ruby_prepare() {
+ # Fix highline dependency to be compatible with more versions.
+ sed -i -e '/highline/ s/~>/>=/' \
+ -e '/gem.files/d' ${RUBY_FAKEGEM_GEMSPEC} || die
+
+ sed -i -e "s:/tmp:${T}:" \
+ features/sandbox/puppet/environments/local/modules/test/manifests/run.pp \
+ features/sandbox/puppet-hiera-merge/environments/local/modules/test/manifests/run.pp \
+ features/sandbox/puppet-envvar/environments/local/modules/test/manifests/run.pp \
+ features/puppet.feature
+}
+
+each_ruby_prepare() {
+ # Run tests with the correct ruby interpreter
+ sed -i -e 's:I run `eyaml:I run `'${RUBY}' '"${S}"'/bin/eyaml:' features/*.feature || die
+
+}
+
+each_ruby_test() {
+ CUCUMBER_PUBLISH_QUIET=true ${RUBY} -S cucumber --format progress features || die
+}