# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-ruby/ammeter/ammeter-0.2.9-r1.ebuild,v 1.3 2014/12/28 09:34:00 graaff Exp $ EAPI=5 USE_RUBY="ruby19 ruby20 ruby21" RUBY_FAKEGEM_TASK_DOC="" RUBY_FAKEGEM_RECIPE_TEST="rspec" RUBY_FAKEGEM_EXTRADOC="README.md" RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" inherit ruby-fakegem DESCRIPTION="Write specs for your Rails 3+ generators" HOMEPAGE="https://github.com/alexrothenberg/ammeter" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" IUSE="test" ruby_add_rdepend " >=dev-ruby/activesupport-3.0 >=dev-ruby/railties-3.0 >=dev-ruby/rspec-2.2 >=dev-ruby/rspec-rails-2.2 " ruby_add_bdepend " test? ( >=dev-ruby/rails-3.1 =/~>/' \ ${RUBY_FAKEGEM_GEMSPEC} || die # Specs are not compatible with Rails 4.1 sed -i -e '23i s.add_development_dependency "rails", "<4.1"' ${RUBY_FAKEGEM_GEMSPEC} || die # Avoid spec that returns a different but valid response on ruby21 sed -e '/when the file is not there/,/^ end/ s:^:#:' -i spec/ammeter/rspec/generator/matchers/contain_spec.rb || die } each_ruby_test() { ${RUBY} -S bundle exec ${RUBY} -S rspec-2 spec || die }