# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=ruby-minitest _gemname=minitest # Keep version in sync with "Bundled gems" (https://stdgems.org) for the # packaged Ruby version. pkgver=5.16.3 pkgrel=0 pkgdesc="Suite of testing facilities supporting TDD, BDD, mocking, and benchmarking for Ruby" url="https://github.com/minitest/minitest" arch="noarch" license="MIT" depends="ruby" makedepends="ruby-rdoc" checkdepends="ruby-rake" subpackages="$pkgname-doc" source="https://github.com/minitest/minitest/archive/v$pkgver/$_gemname-$pkgver.tar.gz https://rubygems.org/downloads/$_gemname-$pkgver.gem test-remove-hoe.patch " builddir="$srcdir/$_gemname-$pkgver" options="!check" # circular dependency on ruby-rake prepare() { default_prepare # Generate gemspec (there's no gemspec in the source). gem specification -l --ruby "$srcdir"/$_gemname-$pkgver.gem \ > "$builddir"/$_gemname.gemspec } build() { gem build $_gemname.gemspec } check() { ruby -Ilib -Itest -e "Dir.glob('./test/**/test_*.rb', &method(:require))" } package() { local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" local geminstdir="$gemdir/gems/$_gemname-$pkgver" gem install \ --local \ --install-dir "$gemdir" \ --ignore-dependencies \ --document ri \ --verbose \ $_gemname # Remove unnessecary files cd "$gemdir" rm -rf build_info cache extensions plugins cd "$geminstdir" rm -rf History.* Manifest.* README.* Rakefile test/ } doc() { pkgdesc="$pkgdesc (ri docs)" amove "$(ruby -e 'puts Gem.default_dir')"/doc } sha512sums=" f5ebd3994b42cefc1d0ecb6e18c8b39f41ea60fc5ec22d2cd27e3b09c34aa6085f44a8e096f08aad0c6f72c91cdf4cc22411327b6b3d95aa7a1f3aac459ecbda minitest-5.16.3.tar.gz 1463b12842a914df663d0d796bafd418ead038d32c935f3970062492f248f3f4fcf3a5c2f45e2fb71ac13e3b94fca1e6497e7cd7fe9e7050587b7efe2b275453 minitest-5.16.3.gem fdfc066799a351c1b237c2991501dc0c5e394c6066c873e8cc32941adc4ef956b5550fffae5d62a275917c82075264504dd1b457370703c2b870bfb28510f2ef test-remove-hoe.patch "