Package Details: ruby-colored2 3.1.2-3

Git Clone URL: https://aur.archlinux.org/ruby-colored2.git (read-only, click to copy)
Package Base: ruby-colored2
Description: Add even more color to your life.
Upstream URL: http://github.com/kigster/colored2
Licenses: MIT
Submitter: farwayer
Maintainer: farwayer
Last Packager: farwayer
Votes: 0
Popularity: 0.000000
First Submitted: 2017-02-03 03:32
Last Updated: 2019-03-13 16:07

Latest Comments

bastelfreak commented on 2020-01-29 18:31

The issue with the current gem based installation is that the tests aren't executed. We don't know for sure if the code actually works on the Ruby version bundled in Arch. Most of the maintainers don't yet test on Ruby 2.7 so it seems like common practice to execute the tests within the PKGBUILD.

farwayer commented on 2020-01-28 15:21

@bastelfreak thanks, but what the problem you try to solve?

bastelfreak commented on 2020-01-27 21:13

Hi, I did some further cleanups for the PKGBUILD:

# Maintainer: farawayer <farwayer@gmail.com>
# Contributor: Tim Meusel <tim@bastelfreak.de>

_gemname='colored2'
pkgname="ruby-${_gemname}"
pkgver=3.1.2
pkgrel=4
pkgdesc='Simple gem that adds various color methods to String class'
arch=('any')
url='https://github.com/kigster/colored2'
license=('MIT')
makedepends=('ruby-rdoc')
checkdepends=('ruby-rspec')
depends=('ruby')
source=("${url}/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
options=("!emptydirs")
sha512sums=('fa318c71e253ea5d55e31bf477f4296973fc30f5963a473465becb411c51b2ded5eaa4017d54c1a793332ef334b72c77498821c9a172dd6e2bd07d3c34326489')

prepare() {
  cd "${srcdir}/${_gemname}-${pkgver}"

  # update the gemspec to allow newer dependency versions
  sed --in-place 's|~>|>=|g' "${_gemname}.gemspec"

  # disable coverage reporting to the cloud
  sed --in-place '/codeclimate-test-reporter/d' "${_gemname}.gemspec"
  sed --in-place '/simplecov/d' spec/spec_helper.rb
  sed --in-place '/SimpleCov/d' spec/spec_helper.rb
}

build() {
  cd "${srcdir}/${_gemname}-${pkgver}"
  gem build "${_gemname}.gemspec"
}

check() {
  cd "${srcdir}/${_gemname}-${pkgver}"
  rspec
}

package() {
  cd "${srcdir}/${_gemname}-${pkgver}"
  local _gemdir="$(gem env gemdir)"
  gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"

  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
  install -Dm 644 README.md -t "${pkgdir}/usr/share/doc/${pkgname}"

  rm -rf "${pkgdir}/${_gemdir}/cache"
}

# vim: ts=2 sw=2 et:

bastelfreak commented on 2020-01-09 21:39

hi, I updated the PKGBUILD to built properly from source and to execute tests during the build:

# Maintainer: farawayer <farwayer@gmail.com>
# Contributor: Tim Meusel <tim@bastelfreak.de>

_gemname='colored2'
pkgname="ruby-${_gemname}"
pkgver=3.1.2
pkgrel=4
pkgdesc='Simple gem that adds various color methods to String class'
arch=('any')
url='https://github.com/kigster/colored2'
license=('MIT')
makedepends=('ruby-rdoc' 'ruby-rspec' 'ruby-rake')
depends=('ruby')
source=("https://github.com/kigster/colored2/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
options=("!emptydirs")
sha512sums=('fa318c71e253ea5d55e31bf477f4296973fc30f5963a473465becb411c51b2ded5eaa4017d54c1a793332ef334b72c77498821c9a172dd6e2bd07d3c34326489')

# update the gemspec to allow newer versions of rake
# remove deprecated options from the gemspec
prepare() {
  cd "${_gemname}-${pkgver}"
  sed --in-place 's|~>|>=|g' "${_gemname}.gemspec"
  sed --in-place '/s.rubyforge_project/d' "${_gemname}.gemspec"
  # disable coverage reporting to the cloud
  sed --in-place '/codeclimate-test-reporter/d' "${_gemname}.gemspec"
  sed --in-place '/simplecov/d' spec/spec_helper.rb
  sed --in-place '/SimpleCov/d' spec/spec_helper.rb
}

build() {
  cd "${_gemname}-${pkgver}"
  gem build "${_gemname}.gemspec"
}

check() {
  cd "${_gemname}-${pkgver}"
  rspec
}

package() {
  cd "${_gemname}-${pkgver}"
  local _gemdir="$(gem env gemdir)"
  gem install --verbose --ignore-dependencies --no-user-install --install-dir "${pkgdir}/${_gemdir}" --bindir "${pkgdir}/usr/bin" "${_gemname}-${pkgver}.gem"

  rm -rf "${pkgdir}/${_gemdir}/cache"
}

# vim: ts=2 sw=2 et: