# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Artem Vorotnikov <artem@vorotnikov.me>
_gemname=rspec-expectations
pkgname=ruby-${_gemname}
pkgver=3.12.3
pkgrel=1
pkgdesc='Provides a readable API to express expected outcomes of a code example'
url='https://github.com/rspec/rspec-expectations'
arch=('any')
license=('MIT')
depends=('ruby-rspec-support' 'ruby-diff-lcs')
options=('!emptydirs')
source=(https://rubygems.org/downloads/${_gemname}-${pkgver}.gem)
noextract=(${_gemname}-${pkgver}.gem)
sha512sums=('58717c22078f09b9b5fce785cbc2b210a513067ede9210bc6391bc06325dfc8c1f6ffeffacbeed955ec556bada210b36ec236e49249dce96d3d20ed61258d009')
package() {
local _gemdir="$(ruby -e'puts Gem.default_dir')"
gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
install -Dm 644 "${pkgdir}${_gemdir}/gems/${_gemname}-${pkgver}/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm 644 "${pkgdir}${_gemdir}/gems/${_gemname}-${pkgver}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README"
rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
}
# vim: ts=2 sw=2 et: