dev-ruby/ruby-net-ldap: add 0.14.0
[gentoo.git] / dev-ruby / sprockets / sprockets-3.4.0.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 USE_RUBY="ruby19 ruby20 ruby21"
7
8 RUBY_FAKEGEM_TASK_DOC=""
9 RUBY_FAKEGEM_EXTRADOC="README.md"
10
11 RUBY_FAKEGEM_GEMSPEC="sprockets.gemspec"
12
13 inherit ruby-fakegem versionator
14
15 DESCRIPTION="Ruby library for compiling and serving web assets"
16 HOMEPAGE="https://github.com/rails/sprockets"
17 SRC_URI="https://github.com/rails/sprockets/archive/v${PV}.tar.gz -> ${P}-git.tgz"
18
19 LICENSE="MIT"
20 SLOT="$(get_version_component_range 1)"
21 KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
22
23 IUSE=""
24
25 ruby_add_rdepend "
26         =dev-ruby/rack-1*:*
27         !!<dev-ruby/sprockets-2.12.3-r1:2"
28
29 ruby_add_bdepend "test? (
30                 dev-ruby/json
31                 dev-ruby/rack-test
32                 =dev-ruby/coffee-script-2*
33                 =dev-ruby/execjs-2*
34                 =dev-ruby/sass-3* >=dev-ruby/sass-3.1
35                 dev-ruby/uglifier
36         )"
37
38 all_ruby_prepare() {
39         # Avoid tests for template types that we currently don't package:
40         # eco and ejs.
41         sed -i -e '/eco templates/,/end/ s:^:#:' \
42                 -e '/ejs templates/,/end/ s:^:#:' test/test_environment.rb || die
43         sed -i -e '/.ejs/ s:^:#:' test/test_asset.rb || die
44         rm -f test/test_require.rb test/test_{closure,eco,ejs,yui}_{compressor,processor}.rb || die
45 }
46
47 each_ruby_prepare() {
48         sed -i -e "s:ruby:${RUBY}:" test/test_sprocketize.rb || die
49 }
50
51 each_ruby_test() {
52         # Make sure we have completely separate copies. Hardlinks won't work
53         # for this test suite.
54         cp -R test test-new || die
55         rm -rf test || die
56         mv test-new test || die
57
58         each_fakegem_test
59 }