dev-qt/linguist-tools: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / dev-ruby / railties / railties-6.0.3.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 USE_RUBY="ruby25 ruby26 ruby27"
6
7 RUBY_FAKEGEM_TASK_TEST="test:regular"
8 RUBY_FAKEGEM_RECIPE_DOC=""
9 RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.rdoc"
10
11 RUBY_FAKEGEM_GEMSPEC="railties.gemspec"
12
13 RUBY_FAKEGEM_BINDIR="exe"
14 RUBY_FAKEGEM_BINWRAP=""
15
16 inherit ruby-fakegem
17
18 DESCRIPTION="Tools for creating, working with, and running Rails applications"
19 HOMEPAGE="https://github.com/rails/rails"
20 SRC_URI="https://github.com/rails/rails/archive/v${PV}.tar.gz -> rails-${PV}.tgz"
21
22 LICENSE="MIT"
23 SLOT="$(ver_cut 1-2)"
24 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
25 IUSE=""
26
27 RUBY_S="rails-${PV}/${PN}"
28
29 # The test suite has many failures, most likely due to a mismatch in
30 # exact dependencies or environment specifics. Needs further
31 # investigation.
32 RESTRICT="test"
33
34 RDEPEND+=">=app-eselect/eselect-rails-0.24"
35
36 ruby_add_rdepend "
37         ~dev-ruby/activesupport-${PV}
38         ~dev-ruby/actionpack-${PV}
39         >=dev-ruby/thor-0.20.3
40         >=dev-ruby/rake-0.8.7
41         dev-ruby/method_source
42 "
43
44 ruby_add_bdepend "
45         test? (
46                 ~dev-ruby/actionview-${PV}
47                 dev-ruby/mocha:0.14
48         )"
49
50 all_ruby_prepare() {
51         rm "${S}/../Gemfile" || die "Unable to remove Gemfile"
52         sed -i -e '/load_paths/d' test/abstract_unit.rb || die "Unable to remove load paths"
53         sed -i -e '1igem "minitest", "~>4.0"' test/abstract_unit.rb || die
54 }
55
56 all_ruby_install() {
57         all_fakegem_install
58
59         ruby_fakegem_binwrapper rails rails-${PV}
60 }
61
62 pkg_postinst() {
63         elog "To select between slots of rails, use:"
64         elog "\teselect rails"
65
66         eselect rails update
67 }
68
69 pkg_postrm() {
70         eselect rails update
71 }