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