Package Details: ruby-puppet_forge 2.3.4-1

Git Clone URL: https://aur.archlinux.org/ruby-puppet_forge.git (read-only, click to copy)
Package Base: ruby-puppet_forge
Description: Ruby client for the Puppet Forge API. Access and manipulate the Puppet Forge API from Ruby.
Upstream URL: https://github.com/puppetlabs/forge-ruby
Keywords: puppet
Licenses: Apache
Submitter: supermario
Maintainer: bastelfreak
Last Packager: bastelfreak
Votes: 0
Popularity: 0.000000
First Submitted: 2016-09-07 12:03
Last Updated: 2020-10-17 21:56

Latest Comments

bastelfreak commented on 2020-03-09 21:56

Updated to latest version:

_gemname='puppet_forge'
pkgname="ruby-${_gemname}"
pkgver=2.3.3
pkgrel=1
pkgdesc='Ruby client for the Puppet Forge API. Access and manipulate the Puppet Forge API from Ruby.'
arch=('any')
url='https://github.com/puppetlabs/forge-ruby'
license=('Apache')
makedepends=('ruby-rdoc' 'ruby-rspec' 'ruby-bundler')
depends=('ruby' 'ruby-faraday' 'ruby-faraday-middleware' 'ruby-gettext-setup' 'ruby-semantic_puppet' 'ruby-minitar')
source=("https://github.com/puppetlabs/forge-ruby/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
options=("!emptydirs")
sha512sums=('990ba97406a04df90d8b809ff68cfac524e1b61d6dfff3251c1ea674d85485fae686e734559d1b1f0048eb9a4c17d35bcf7a4692bd9a8ad8c7868ae94a5bc9bf')

# update the gemspec to allow newer versions of rake
# remove deprecated options from the gemspec
prepare() {
  cd "forge-ruby-${pkgver}"
  sed --in-place 's|~>|>=|g' "${_gemname}.gemspec"
  # We don't download a git archive, so this won't work
  sed --in-place 's|spec.files .*|spec.files         = `find`.split("\\n")|' "${_gemname}.gemspec"
  # Allow latest ruby-faraday version
  sed --in-place 's/spec.add_runtime_dependency "faraday",.*/spec.add_runtime_dependency "faraday"/' "${_gemname}.gemspec"
  # Allow latest ruby-faraday_middleware version. Already fixed at master
  sed --in-place 's/spec.add_runtime_dependency "faraday_middleware",.*/spec.add_runtime_dependency "faraday_middleware"/' "${_gemname}.gemspec"
}

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

check() {
  cd "forge-ruby-${pkgver}"
  # https://tickets.puppetlabs.com/browse/FORGE-535
  # tests are currently, in parts, broken
  #rspec
}

package() {
  cd "forge-ruby-${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.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

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

# vim: ts=2 sw=2 et:

bastelfreak commented on 2020-01-05 13:37

Hi, I updated the package to build properly from source:

_gemname='puppet_forge'
pkgname="ruby-${_gemname}"
pkgver=2.3.1
pkgrel=1
pkgdesc='Ruby client for the Puppet Forge API. Access and manipulate the Puppet Forge API from Ruby.'
arch=('any')
url='https://github.com/puppetlabs/forge-ruby'
license=('Apache')
makedepends=('ruby-rdoc' 'ruby-rspec' 'ruby-bundler')
depends=('ruby' 'ruby-faraday' 'ruby-faraday-middleware' 'ruby-gettext-setup' 'ruby-semantic_puppet' 'ruby-minitar')
source=("https://github.com/puppetlabs/forge-ruby/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz")
options=("!emptydirs")
sha512sums=('554cb5edb7db7be0540778ddab4100edfa5edb3612754889bc3244731a296fb2ebaa1643512210a9e43a9b9c77a0043980314aa2f6a5e7585a711e7cb54e62b5')

# update the gemspec to allow newer versions of rake
# remove deprecated options from the gemspec
prepare() {
  cd "forge-ruby-${pkgver}"
  sed --in-place 's|~>|>=|g' "${_gemname}.gemspec"
  # We don't download a git archive, so this won't work
  sed --in-place 's|spec.files .*|spec.files         = `find`.split("\\n")|' "${_gemname}.gemspec"
  # Allow latest ruby-faraday version
  sed --in-place 's/spec.add_runtime_dependency "faraday",.*/spec.add_runtime_dependency "faraday"/' "${_gemname}.gemspec"
  # Allow latest ruby-faraday_middleware version. Already fixed at master
  sed --in-place 's/spec.add_runtime_dependency "faraday_middleware",.*/spec.add_runtime_dependency "faraday_middleware"/' "${_gemname}.gemspec"
}

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

check() {
  cd "forge-ruby-${pkgver}"
  # https://tickets.puppetlabs.com/browse/FORGE-535
  # tests are currently, in parts, broken
  #rspec
}

package() {
  cd "forge-ruby-${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.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

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

# vim: ts=2 sw=2 et:

tjaart commented on 2018-04-10 22:26

The dependency ruby-faraday_middleware does not exist

EDIT: There is a package called ruby-faraday-middleware in the Community repo. Maybe this package was moved from AUR?

voyd commented on 2017-01-14 00:48

Upstream depends on faraday-0.9, while ruby-faraday is currently at 0.11