1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 USE_RUBY="ruby20 ruby21 ruby22 ruby23"
8 # Documentation task depends on sdoc which we currently don't have.
9 RUBY_FAKEGEM_TASK_DOC=""
10 RUBY_FAKEGEM_TASK_TEST="none"
11 RUBY_FAKEGEM_EXTRADOC="History.md README.md"
13 RUBY_FAKEGEM_GEMSPEC="cucumber.gemspec"
17 DESCRIPTION="Executable feature scenarios"
18 HOMEPAGE="https://github.com/aslakhellesoy/cucumber/wikis"
28 >=dev-ruby/nokogiri-1.5.2
29 >=dev-ruby/syntax-1.0.0
30 >=dev-util/aruba-0.6.1 =dev-util/aruba-0.6*
33 >=dev-ruby/mime-types-2.99:2
37 >=dev-ruby/builder-2.1.2:*
38 >=dev-util/cucumber-core-1.5.0:0
39 >=dev-util/cucumber-wire-0.0.1:0
40 >=dev-ruby/diff-lcs-1.1.3
41 >=dev-ruby/gherkin-4.0:4
42 >=dev-ruby/multi_json-1.7.5
43 >=dev-ruby/multi_test-0.1.2
47 # Remove development dependencies from the gemspec that we don't
48 # need or can't satisfy.
49 sed -i -e '/\(coveralls\|spork\|simplecov\|bcat\|kramdown\|yard\|capybara\|rack-test\|ramaze\|sinatra\|webrat\|mime-types\|rubyzip\)/d' ${RUBY_FAKEGEM_GEMSPEC} || die
51 # Avoid dependency on unpackaged cucumber-pro
52 sed -i -e '/cucumber-pro/ s:^:#:' Gemfile || die
54 # Avoid harmless failing spec
55 sed -i -e '/converts the snapshot path to a relative path/,/end/ s:^:#:' \
56 spec/cucumber/formatter/html_spec.rb || die
58 # Avoid dependency on git
59 sed -i -e '/executables/ s/=.*/= ["cucumber"]/' \
60 -e '/git ls-files/d' cucumber.gemspec || die
65 # Use the right interpreter
66 sed -i -e 's:ruby:'${RUBY}':' features/lib/step_definitions/ruby_steps.rb || die
70 RSPEC_VERSION=3 ruby-ng_rspec
71 CUCUMBER_USE_RELEASED_CORE=true PATH="${S}"/bin:${PATH} RUBYLIB="${S}"/lib ${RUBY} -Ilib bin/cucumber features || die "Features failed"
78 cp -pPR examples "${D}/usr/share/doc/${PF}" || die "Failed installing example files."