|
|
|
@ -3,37 +3,32 @@
|
|
|
|
|
%bcond_without bootstrap
|
|
|
|
|
|
|
|
|
|
Name: rubygem-%{gem_name}
|
|
|
|
|
Version: 7.0.0
|
|
|
|
|
Version: 7.1.0
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Summary: Tool to execute plain-text documents as functional tests
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://cucumber.io/
|
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|
|
|
|
# git clone --no-checkout https://github.com/cucumber/cucumber-ruby.git
|
|
|
|
|
# git -C cucumber-ruby archive -v -o rubygem-cucumber-7.0.0-spec.txz v7.0.0 spec/ cucumber.yml
|
|
|
|
|
# git -C cucumber-ruby archive -v -o rubygem-cucumber-7.1.0-spec.txz v7.1.0 spec/ cucumber.yml
|
|
|
|
|
Source1: %{name}-%{version}-spec.txz
|
|
|
|
|
# git clone --no-checkout https://github.com/cucumber/cucumber-ruby.git
|
|
|
|
|
# git -C cucumber-ruby archive -v -o rubygem-cucumber-7.0.0-features.txz v7.0.0 features/
|
|
|
|
|
# git -C cucumber-ruby archive -v -o rubygem-cucumber-7.1.0-features.txz v7.1.0 features/
|
|
|
|
|
Source2: %{name}-%{version}-features.txz
|
|
|
|
|
Requires: js-jquery < 4
|
|
|
|
|
BuildRequires: ruby(release)
|
|
|
|
|
BuildRequires: rubygems-devel
|
|
|
|
|
BuildRequires: ruby
|
|
|
|
|
BuildRequires: js-jquery < 4
|
|
|
|
|
BuildRequires: web-assets-devel
|
|
|
|
|
# Aruba has circular dependency with Cucumber.
|
|
|
|
|
%if %{without bootstrap}
|
|
|
|
|
BuildRequires: rubygem(aruba)
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: rubygem(builder)
|
|
|
|
|
BuildRequires: rubygem(bundler)
|
|
|
|
|
BuildRequires: rubygem(cucumber-core)
|
|
|
|
|
BuildRequires: rubygem(cucumber-expressions)
|
|
|
|
|
BuildRequires: rubygem(cucumber-wire)
|
|
|
|
|
BuildRequires: rubygem(cucumber-messages)
|
|
|
|
|
BuildRequires: rubygem(cucumber-create-meta)
|
|
|
|
|
BuildRequires: rubygem(multi_json)
|
|
|
|
|
BuildRequires: rubygem(multi_test)
|
|
|
|
|
BuildRequires: rubygem(mime-types)
|
|
|
|
|
BuildRequires: rubygem(webrick)
|
|
|
|
|
BuildRequires: rubygem(nokogiri)
|
|
|
|
|
BuildRequires: rubygem(rspec)
|
|
|
|
|
BuildArch: noarch
|
|
|
|
@ -55,6 +50,22 @@ Documentation for %{name}.
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{gem_name}-%{version} -b 1 -b 2
|
|
|
|
|
|
|
|
|
|
# The rubygem-cucumber-html-formatter is currently not packaged in Fedora.
|
|
|
|
|
%gemspec_remove_dep -g cucumber-html-formatter
|
|
|
|
|
|
|
|
|
|
# Relax requires.
|
|
|
|
|
%gemspec_remove_dep -g diff-lcs "~> 1.4", ">= 1.4.4"
|
|
|
|
|
%gemspec_add_dep -g diff-lcs ">= 1.3"
|
|
|
|
|
|
|
|
|
|
%gemspec_remove_dep -g cucumber-gherkin "~> 22.0", ">= 22.0.0"
|
|
|
|
|
%gemspec_add_dep -g cucumber-gherkin ">= 20.0"
|
|
|
|
|
|
|
|
|
|
%gemspec_remove_dep -g cucumber-cucumber-expressions "~> 14.0", ">= 14.0.0"
|
|
|
|
|
%gemspec_add_dep -g cucumber-cucumber-expressions ">= 12.1"
|
|
|
|
|
|
|
|
|
|
%gemspec_remove_dep -g cucumber-messages "~> 17.1", ">= 17.1.1"
|
|
|
|
|
%gemspec_add_dep -g cucumber-messages ">= 17.0"
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# Create the gem as gem install only works on a gem file
|
|
|
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
|
|
@ -75,9 +86,6 @@ cp -pa .%{_bindir}/* \
|
|
|
|
|
|
|
|
|
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
|
|
|
|
|
|
|
|
|
# Replace the bundled jQuery with system version.
|
|
|
|
|
ln -sf %{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{gem_libdir}/cucumber/formatter/jquery-min.js
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
# Cucumber.yml is needed for both test suites.
|
|
|
|
@ -88,19 +96,15 @@ ln -s %{_builddir}/spec spec
|
|
|
|
|
# We don't need Pry.
|
|
|
|
|
sed -i '/require.*pry/ s/^/#/' spec/spec_helper.rb
|
|
|
|
|
|
|
|
|
|
rspec spec
|
|
|
|
|
rspec -Ilib spec
|
|
|
|
|
|
|
|
|
|
%if %{without bootstrap}
|
|
|
|
|
ln -s %{_builddir}/features features
|
|
|
|
|
# This expects that test suite is executed from git repository.
|
|
|
|
|
sed -i '/Scenario: Passing feature/i\ @skip' features/docs/raketask.feature
|
|
|
|
|
|
|
|
|
|
# TODO: Fails with "/usr/share/ruby/delegate.rb:83:in `method_missing'", not entirely sure why
|
|
|
|
|
# Issue at github: https://github.com/cucumber/cucumber-ruby/issues/1317
|
|
|
|
|
sed -i '/Scenario: Ambiguous steps$/i\ @skip' features/docs/defining_steps/ambiguous_steps.feature
|
|
|
|
|
|
|
|
|
|
# A feature requires Gemfile to work.
|
|
|
|
|
touch Gemfile
|
|
|
|
|
# Skip the test that requires rubygem-cucumber-html-formatter,
|
|
|
|
|
# which is currently not packaged in Fedora.
|
|
|
|
|
sed -i -e '/^ Scenario: output html to stdout$/i @skip' \
|
|
|
|
|
features/docs/formatters/html.feature
|
|
|
|
|
|
|
|
|
|
# Use RUBYOPT to make sure that the Cucumber from current directory has
|
|
|
|
|
# precedence over system Cucumber, which is pulled in as Aruba dependency.
|
|
|
|
@ -124,6 +128,9 @@ popd
|
|
|
|
|
%doc %{gem_instdir}/CHANGELOG.md
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Oct 27 2021 Jarek Prokop <jprokop@redhat.com> - 7.1.0-1
|
|
|
|
|
- Update to cucumber 7.1.0.
|
|
|
|
|
|
|
|
|
|
* Mon Sep 06 2021 Pavel Valena <pvalena@redhat.com> - 7.0.0-1
|
|
|
|
|
- Update to cucumber 7.0.0.
|
|
|
|
|
Resolves: rhbz#1842885
|
|
|
|
|