1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00

testing/ruby-minitest-reporters: new aport

This commit is contained in:
Will Sinatra 2024-10-24 21:55:07 -04:00 committed by achill (fossdd)
parent 0e9af0464f
commit 2e6adbda6a

View file

@ -0,0 +1,59 @@
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
# Contributor: Will Sinatra <wpsinatra@gmail.com>
pkgname=ruby-minitest-reporters
_gemname=${pkgname#ruby-}
pkgver=1.7.1
pkgrel=0
pkgdesc="create customizable minitest formats"
url="https://rubygems.org/gems/minitest-reporters"
arch="noarch"
license="MIT"
checkdepends="ruby-rake ruby-bundler ruby-maruku"
makedepends="ruby-rdoc"
depends="ruby ruby-minitest ruby-ansi ruby-builder ruby-ruby-progressbar"
source="$pkgname-$pkgver.tar.gz::https://github.com/minitest-reporters/minitest-reporters/archive/refs/tags/v$pkgver.tar.gz
https://rubygems.org/downloads/$_gemname-$pkgver.gem"
builddir="$srcdir/$_gemname-$pkgver"
options="!check" # depends on rubocop
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
}
check() {
rake test
}
package() {
local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
gem install --local \
--install-dir "$gemdir" \
--ignore-dependencies \
--no-document \
--verbose \
$_gemname
rm -r "$gemdir"/cache \
"$gemdir"/build_info \
"$gemdir"/doc
cd "$gemdir/gems/$_gemname-$pkgver"
rm -r ./*.md ./*.yml Rakefile LICENSE assets test .github .gitignore
rm .rubocop.yml .rubocop_todo.yml .ruby-gemset .yardopts
install -Dm644 "$builddir"/LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}
sha512sums="
b845c2bd8464f929b9ec8a986eb5ad1fa2f5469ef13b4af59c00468010da52b2c9bf8285612ea159d213edf8fc04b793c52e95e012471dcf8d5d98efbc4c5a87 ruby-minitest-reporters-1.7.1.tar.gz
c58bf397f06f8ee6e917946d702b8287342b838e5c3f076aaee39026a7ac63c3abb238331b1db2131fc009f420c83ff962023f6064cbde1e7f6646a26bfc5e8a minitest-reporters-1.7.1.gem
"