dev-ruby/ruby-net-ldap: add 0.14.0
[gentoo.git] / dev-ruby / actionpack / actionpack-3.2.22.1.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 USE_RUBY="ruby19 ruby20 ruby21"
8
9 # The default test task tries to test activerecord with SQLite as well.
10 RUBY_FAKEGEM_TASK_TEST="test_action_pack"
11
12 RUBY_FAKEGEM_TASK_DOC=""
13 RUBY_FAKEGEM_DOCDIR="doc"
14 RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.rdoc"
15
16 RUBY_FAKEGEM_GEMSPEC="actionpack.gemspec"
17
18 inherit ruby-fakegem versionator
19
20 DESCRIPTION="Eases web-request routing, handling, and response"
21 HOMEPAGE="https://github.com/rails/rails"
22 SRC_URI="https://github.com/rails/rails/archive/v${PV}.tar.gz -> rails-${PV}.tgz"
23
24 LICENSE="MIT"
25 SLOT="$(get_version_component_range 1-2)"
26 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
27 IUSE=""
28
29 RUBY_S="rails-${PV}/${PN}"
30
31 ruby_add_rdepend "
32         ~dev-ruby/activemodel-${PV}
33         ~dev-ruby/activesupport-${PV}
34         >=dev-ruby/rack-cache-1.2
35         >=dev-ruby/builder-3.0.0:3
36         >=dev-ruby/rack-1.4.5:1.4
37         >=dev-ruby/rack-test-0.6.1:0.6
38         >=dev-ruby/journey-1.0.4:1.0
39         >=dev-ruby/sprockets-2.2.1:2.2
40         >=dev-ruby/erubis-2.7.0"
41
42 ruby_add_bdepend "
43         test? (
44                 dev-ruby/mocha:0.13
45                 dev-ruby/bundler
46                 ~dev-ruby/activerecord-${PV}
47                 ~dev-ruby/actionmailer-${PV}
48                 >=dev-ruby/tzinfo-0.3.29:0
49                 >=dev-ruby/uglifier-1.0.3
50         )"
51
52 all_ruby_prepare() {
53         # Remove items from the common Gemfile that we don't need for this
54         # test run. This also requires handling some gemspecs.
55         sed -i -e "/\(system_timer\|sdoc\|w3c_validators\|pg\|jquery-rails\|'mysql'\|journey\|ruby-prof\|benchmark-ips\|nokogiri\|execjs\)/d" \
56                 -e 'agem "i18n", "~>0.6.11"' ../Gemfile || die
57
58         sed -i -e '/rack-ssl/d' -e 's/~> 3.4/>= 3.4/' ../railties/railties.gemspec || die
59         sed -i -e '/mail/d' ../actionmailer/actionmailer.gemspec || die
60
61         sed -i -e '/bcrypt/ s/3.0.0/3.0/' ../Gemfile || die
62
63         # Avoid fragile tests depending on hash ordering
64         sed -i -e '/cookie_3=chocolate/ s:^:#:' test/controller/integration_test.rb || die
65         sed -i -e '/test_to_s/,/end/ s:^:#:' test/template/html-scanner/tag_node_test.rb || die
66         sed -i -e '/"name":"david"/ s:^:#:' test/controller/mime_responds_test.rb || die
67         sed -i -e '/test_option_html_attributes_with_multiple_element_hash/, / end/ s:^:#:' test/template/form_options_helper_test.rb || die
68         sed -i -e '/test_option_html_attributes_with_multiple_hashes/, / end/ s:^:#:' test/template/form_options_helper_test.rb || die
69
70         # Avoid fragile test that gets more output than it expects.
71         sed -i -e '/test_locals_option_to_assert_template_is_not_supported/,/end/ s:^:#:'  test/controller/render_test.rb || die
72
73         # Avoid test broken by security updates in i18n.
74         sed -i -e '/test_number_to_i18n_currency/,/end/ s:^:#:' test/template/number_helper_i18n_test.rb || die
75
76         # Avoid test that chokes on bad UTF-8.
77         sed -i -e '/test_handles_urls_with_bad_encoding/,/^  end/ s:^:#:' test/dispatch/static_test.rb || die
78 }