1 # Maintainer: Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
3 _gemname='rails-dom-testing'
4 pkgname="ruby-${_gemname}"
7 pkgdesc='Dom and Selector assertions for Rails applications'
9 url='https://github.com/rails/rails-dom-testing'
12 depends=('ruby' 'ruby-activesupport' 'ruby-nokogiri')
13 makedepends=('ruby-bundler' 'ruby-rake')
14 source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
15 sha512sums=('0103cb494a28faa24c050c5659d7ac6858941f67fa977d1565193f30a2035b030450db4f091739cac86ff765677ea801bc7cd0966eea98866f5f582d8250d9b9')
18 cd "${_gemname}-${pkgver}"
20 # update gemspec/Gemfile to allow newer version of the dependencies
21 sed --in-place --regexp-extended 's|~>|>=|g' "${_gemname}.gemspec"
26 cd "${_gemname}-${pkgver}"
32 cd "${_gemname}-${pkgver}"
38 cd "${_gemname}-${pkgver}"
40 local _gemdir="$(gem env gemdir)"
42 gem install --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "pkg/${_gemname}-${pkgver}.gem"
44 rm "${pkgdir}/${_gemdir}/cache/${_gemname}-${pkgver}.gem"
46 install -Dm 644 MIT-LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
47 install -Dm 644 CONTRIBUTING.md README.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"