blob: 40a701276a519d2c7f5676b4c5592421a3588fb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
USE_RUBY="ruby21 ruby22"
RUBY_FAKEGEM_TASK_DOC=""
RUBY_FAKEGEM_EXTRADOC="README.md"
RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
# if ever needed
#GITHUB_USER="bernat"
#GITHUB_PROJECT="${PN}"
#RUBY_S="${GITHUB_USER}-${GITHUB_PROJECT}-*"
inherit virtualx ruby-fakegem
DESCRIPTION="In-place editor helper for Rails 3"
HOMEPAGE="https://github.com/bernat/best_in_place"
LICENSE="MIT"
SLOT="3"
KEYWORDS="~amd64"
IUSE=""
ruby_add_rdepend "
>=dev-ruby/actionpack-3.2:*
>=dev-ruby/railties-3.2:*
"
ruby_add_bdepend "
test? (
dev-ruby/rdiscount
dev-ruby/rspec-rails:3
>=dev-ruby/nokogiri-1.5.0
>=dev-ruby/capybara-1.1.2:0
>=dev-ruby/rails-3.2
>=dev-ruby/sqlite3-1.3.4-r1
dev-ruby/bundler
)"
all_ruby_prepare() {
sed -i \
-e '/git ls-files/d' \
${RUBY_FAKEGEM_GEMSPEC} || die
# Tweak Gemfile so we can use it to run specs but can avoid missing
# dependencies. Also use packaged versions of jquery and jquery-ui.
sed -i -e '/\(rails-assets\|appraisal\)/ s:^:#:' \
-e '2agem "rspec", "~>3.0"' \
-e '2agem "jquery-rails"' -e '2agem "jquery-ui-rails"' \
-e '/byebug/ s:^:#:' \
-e '/\(launchy\|poltergeist\)/d' \
Gemfile
sed -i -e '/poltergeist/,/javascript_driver/ s:^:#:' spec/rails_helper.rb || die
# Remove integration tests. They fail to run and depend on obsolete
# poltergeist/phantomjs.
rm -rf spec/integration || die
}
each_ruby_test() {
${RUBY} -S bundle exec rspec-3 spec || die
}
|