1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 USE_RUBY="ruby22 ruby23 ruby24"
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 ia64 ~ppc ~ppc64 sparc x86"
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 specs that fail due to changes in the ruby backtrace,
59 # introduced in newer versions of dev-lang/ruby, bug 628580
60 rm -f features/docs/defining_steps/nested_steps.feature
62 # Avoid dependency on git
63 sed -i -e '/executables/ s/=.*/= ["cucumber"]/' \
64 -e '/git ls-files/d' cucumber.gemspec || die
66 sed -i -e '/pry/ s:^:#:' cucumber.gemspec spec/spec_helper.rb || die
70 # Use the right interpreter
71 sed -i -e 's:ruby:'${RUBY}':' features/lib/step_definitions/ruby_steps.rb || die
75 RSPEC_VERSION=3 ruby-ng_rspec
76 CUCUMBER_USE_RELEASED_CORE=true PATH="${S}"/bin:${PATH} RUBYLIB="${S}"/lib ${RUBY} -Ilib bin/cucumber features || die "Features failed"
83 cp -pPR examples "${D}/usr/share/doc/${PF}" || die "Failed installing example files."