dev-ruby/*: Update Manifest hashes
[gentoo.git] / dev-ruby / i18n / i18n-0.7.0-r2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 USE_RUBY="ruby21 ruby22 ruby23 ruby24"
7
8 RUBY_FAKEGEM_RECIPE_TEST="test"
9 RUBY_FAKEGEM_RECIPE_DOC="rdoc"
10 RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.md"
11
12 RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
13
14 inherit ruby-fakegem versionator
15
16 DESCRIPTION="Add Internationalization support to your Ruby application"
17 HOMEPAGE="http://rails-i18n.org/"
18 SRC_URI="https://github.com/svenfuchs/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
19
20 LICENSE="MIT"
21 SLOT="$(get_version_component_range 1-2)"
22 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
23 IUSE=""
24
25 RUBY_PATCHES=( ${P}-frozen-classes.patch )
26
27 ruby_add_bdepend "test? (
28         >=dev-ruby/activesupport-3.2 <dev-ruby/activesupport-4.3
29         dev-ruby/bundler
30         >=dev-ruby/mocha-0.13
31         dev-ruby/test_declarative )"
32
33 all_ruby_prepare() {
34         # Remove bundler lock files since we cannot depend on specific
35         # versions in Gentoo.
36         rm gemfiles/*.lock || die
37 }
38
39 each_ruby_test() {
40         case ${RUBY} in
41                 *ruby22|*ruby23|*ruby24)
42                         versions="4.2"
43                         ;;
44                 *)
45                         versions="3.2 4.0 4.1 4.2"
46                         ;;
47         esac
48
49         for version in ${versions} ; do
50                 if has_version "dev-ruby/activesupport:${version}" ; then
51                         einfo "Running tests with activesupport ${version}"
52                         BUNDLE_GEMFILE="${S}/gemfiles/Gemfile.rails-${version}.x" ${RUBY} -S bundle exec ${RUBY} -S rake test || die
53                 fi
54         done
55 }