dev-ruby/rails: add rails 5.0.7
[gentoo.git] / dev-ruby / activesupport / activesupport-5.1.2.ebuild
1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 USE_RUBY="ruby22 ruby23 ruby24"
7
8 RUBY_FAKEGEM_TASK_DOC=""
9
10 RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.rdoc"
11
12 RUBY_FAKEGEM_GEMSPEC="activesupport.gemspec"
13
14 RUBY_FAKEGEM_BINWRAP=""
15
16 inherit ruby-fakegem versionator
17
18 DESCRIPTION="Utility Classes and Extension to the Standard Library"
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="$(get_version_component_range 1-2)"
24 KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
25 IUSE=""
26
27 RUBY_S="rails-${PV}/${PN}"
28
29 ruby_add_rdepend "
30         >=dev-ruby/concurrent-ruby-1.0.2:1
31         >=dev-ruby/i18n-0.7:* =dev-ruby/i18n-0*:*
32         >=dev-ruby/tzinfo-1.1:1
33         >=dev-ruby/minitest-5.1:5"
34
35 # memcache-client, nokogiri, and builder are not strictly
36 # needed, but there are tests using this code.
37 ruby_add_bdepend "test? (
38         >=dev-ruby/dalli-2.2.1
39         >=dev-ruby/nokogiri-1.4.5
40         >=dev-ruby/builder-3.1.0
41         >=dev-ruby/listen-3.0.5:3
42         dev-ruby/rack
43         dev-ruby/mocha:0.14
44         <dev-ruby/minitest-5.4
45         )"
46
47 all_ruby_prepare() {
48         # Set the secure permissions that tests expect.
49         chmod 0755 "${HOME}" || die "Failed to fix permissions on home"
50
51         # Remove items from the common Gemfile that we don't need for this
52         # test run. This also requires handling some gemspecs.
53         sed -i -e "/\(system_timer\|sdoc\|w3c_validators\|pg\|execjs\|jquery-rails\|mysql\|journey\|ruby-prof\|stackprof\|benchmark-ips\|kindlerb\|turbolinks\|coffee-rails\|debugger\|sprockets-rails\|redcarpet\|bcrypt\|uglifier\|minitest\|sprockets\|stackprof\|rack-cache\|sqlite\)/ s:^:#:" \
54                 -e '/:job/,/end/ s:^:#:' \
55                 -e '/group :doc/,/^end/ s:^:#:' \
56                 -e 's/gemspec/gemspec path: "activesupport"/' \
57                 -e '5igem "builder"; gem "rack"' ../Gemfile || die
58         rm ../Gemfile.lock || die
59
60         # Avoid test that depends on timezone
61         sed -i -e '/test_implicit_coercion/,/^  end/ s:^:#:' test/core_ext/duration_test.rb || die
62
63         # Avoid tests that seem to trigger race conditions.
64         rm -f test/evented_file_update_checker_test.rb || die
65 }