diff options
author | Hans de Graaff <graaff@gentoo.org> | 2021-08-16 07:33:43 +0200 |
---|---|---|
committer | Hans de Graaff <graaff@gentoo.org> | 2021-08-16 07:33:43 +0200 |
commit | e7c78f9f71f2cbc13def16ceac7758b2c2802e13 (patch) | |
tree | bc06b0b3b60dfba551c579dd59304b4aecded117 /dev-ruby/rspec-rails/rspec-rails-5.0.2.ebuild | |
parent | www-apps/postfixadmin: removed obsolete and vulnerable 3.3.9-r2 (diff) | |
download | gentoo-e7c78f9f71f2cbc13def16ceac7758b2c2802e13.tar.gz gentoo-e7c78f9f71f2cbc13def16ceac7758b2c2802e13.tar.bz2 gentoo-e7c78f9f71f2cbc13def16ceac7758b2c2802e13.zip |
dev-ruby/rspec-rails: add 5.0.2
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-ruby/rspec-rails/rspec-rails-5.0.2.ebuild')
-rw-r--r-- | dev-ruby/rspec-rails/rspec-rails-5.0.2.ebuild | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/dev-ruby/rspec-rails/rspec-rails-5.0.2.ebuild b/dev-ruby/rspec-rails/rspec-rails-5.0.2.ebuild new file mode 100644 index 000000000000..4728ae27c258 --- /dev/null +++ b/dev-ruby/rspec-rails/rspec-rails-5.0.2.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby26 ruby27" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" + +#RUBY_FAKEGEM_TASK_DOC="" +RUBY_FAKEGEM_EXTRADOC="Changelog.md README.md" + +RUBY_FAKEGEM_GEMSPEC="rspec-rails.gemspec" + +inherit ruby-fakegem + +DESCRIPTION="RSpec's official Ruby on Rails plugin" +HOMEPAGE="https://rspec.info/" +SRC_URI="https://github.com/rspec/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="$(ver_cut 1)" +KEYWORDS="~amd64" +IUSE="" + +ruby_add_rdepend " + || ( dev-ruby/activesupport:6.1 dev-ruby/activesupport:6.0 dev-ruby/activesupport:5.2 ) + || ( dev-ruby/actionpack:6.1 dev-ruby/actionpack:6.0 dev-ruby/actionpack:5.2 ) + || ( dev-ruby/railties:6.1 dev-ruby/railties:6.0 dev-ruby/railties:5.2 ) + >=dev-ruby/rspec-3.10:3" + +# Depend on the package being already installed for tests, because +# requiring ammeter will load it, and we need a consistent set of rspec +# and rspec-rails for that to work. +ruby_add_bdepend "test? ( + >=dev-ruby/capybara-2.2.0 + >=dev-ruby/ammeter-1.1.5 + ~dev-ruby/rspec-rails-${PV} +)" + +all_ruby_prepare() { + # Remove .rspec options to avoid dependency on newer rspec when + # bootstrapping. + echo "--require spec_helper" > .rspec || die + + # Avoid bundler-specific specs. + rm -f spec/sanity_check_spec.rb || die + + # Avoid broken controller generator specs for now. + rm -fr spec/generators/rspec || die + + # Test with a compatible rails version + sed -i -e '1igem "rails", "<6.1"' spec/spec_helper.rb || die + + # Fix gemspec. + sed -e 's/git ls-files --/find/' \ + -i ${RUBY_FAKEGEM_GEMSPEC} || die +} |