diff options
author | Sam James <sam@gentoo.org> | 2023-04-01 23:17:31 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-04-02 00:18:43 +0100 |
commit | b0132230ab70b0edc1056f9c371243dbbb0dfd93 (patch) | |
tree | 5280c0ecaa641c8cd5346dee782980db845ecd01 /dev-ruby/facter | |
parent | dev-ruby/facter: don't automagically build jruby bindings (diff) | |
download | gentoo-b0132230ab70b0edc1056f9c371243dbbb0dfd93.tar.gz gentoo-b0132230ab70b0edc1056f9c371243dbbb0dfd93.tar.bz2 gentoo-b0132230ab70b0edc1056f9c371243dbbb0dfd93.zip |
dev-ruby/facter: enable ruby32, fix tests
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-ruby/facter')
-rw-r--r-- | dev-ruby/facter/facter-4.3.0.ebuild | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/dev-ruby/facter/facter-4.3.0.ebuild b/dev-ruby/facter/facter-4.3.0.ebuild index 1c4e136e7a9c..0c946eea9e22 100644 --- a/dev-ruby/facter/facter-4.3.0.ebuild +++ b/dev-ruby/facter/facter-4.3.0.ebuild @@ -2,9 +2,10 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=8 -USE_RUBY="ruby27 ruby30 ruby31" + +USE_RUBY="ruby27 ruby30 ruby31 ruby32" RUBY_FAKEGEM_GEMSPEC="facter.gemspec" -#RUBY_FAKEGEM_RECIPE_TEST="rspec3" +RUBY_FAKEGEM_RECIPE_TEST="rspec3" RUBY_FAKEGEM_RECIPE_DOC="yard" inherit ruby-ng ruby-fakegem @@ -14,7 +15,7 @@ HOMEPAGE="http://www.puppetlabs.com/puppet/related-projects/facter/" LICENSE="Apache-2.0" SLOT="0" -#IUSE="test" + if [[ ${PV} == 9999 ]] ; then inherit git-r3 EGIT_REPO_URI="https://github.com/puppetlabs/facter.git" @@ -25,10 +26,8 @@ else SRC_URI="https://github.com/puppetlabs/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" fi -#RESTRICT="!test? ( test )" - ruby_add_rdepend "dev-ruby/hocon <dev-ruby/thor-2.0 dev-ruby/ffi" -#ruby_add_bdepend "test? ( dev-ruby/simplecov dev-ruby/timecop dev-ruby/webmock )" +ruby_add_bdepend "test? ( dev-ruby/timecop dev-ruby/webmock )" src_unpack() { if [[ ${PV} == 9999 ]] ; then @@ -41,6 +40,34 @@ all_ruby_prepare() { sed -e 's/__dir__/"."/' \ -e 's/__FILE__/"'${RUBY_FAKEGEM_GEMSPEC}'"/' \ -i ${RUBY_FAKEGEM_GEMSPEC} || die + + # Linting and coverage aren't useful for us in testing + # Also loosen dependencies + sed -i \ + -e '/rubocop/d' \ + -e '/simplecov/d' \ + -e '/rake/s:~> 12.3:>= 12.3:' \ + -e '/yard/s:~> 0.9:>= 0.9:' \ + -e '/sys-filesystem/d' \ + -e '/octokit/d' \ + ${RUBY_FAKEGEM_GEMSPEC} || die + sed -i \ + -e '/octokit/d' \ + -e '/packaging/d' \ + -e '/ronn/d' \ + Gemfile || die + + sed -i \ + -e '/simplecov/d' \ + -e '/SimpleCov.start/,/^end/ s:^:#:' \ + -e '/SimpleCov/d' \ + spec/spec_helper.rb || die + rm tasks/{check,rubocop}.rake || die + # Breaks tests; handle deps ourselves - sed -e "/require 'bundler/d" -i spec/spec_helper.rb || die + #sed -e "/require 'bundler/d" -i spec/spec_helper.rb || die +} + +each_ruby_test() { + each_fakegem_test --trace } |