update to 2.0.0

f38
Mamoru TASAKA 3 years ago
parent 3a45f720e3
commit f0e9bc545f

@ -0,0 +1,30 @@
#!/bin/bash
if [ $# -lt 1 ]
then
echo "$0 <version>"
exit 1
fi
set -x
set -e
GEMNAME=aruba
CURRDIR=$(pwd)
VERSION=$1
TMPDIRPATH=$(mktemp -d /var/tmp/${GEMNAME}-tar-XXXXXX)
pushd $TMPDIRPATH
git clone https://github.com/cucumber/${GEMNAME}.git
pushd ${GEMNAME}
git reset --hard v${VERSION}
popd
ln -sf ${GEMNAME} ${GEMNAME}-${VERSION}
tar czf ${CURRDIR}/rubygem-${GEMNAME}-${VERSION}-testsuite.tar.gz \
${GEMNAME}-${VERSION}/{features,fixtures,spec}
popd
rm -rf $TMPDIRPATH

@ -1,43 +0,0 @@
commit 3f8ed748d73fa9d39fe163f14540a7ef2a53a5c1
Author: Jarl Friis <jarl@softace.dk>
Date: Fri Oct 12 23:28:31 2012 +0200
These tests are actually not testing output from the process anyway, because the process is actually never started.
diff --git a/features/exit_statuses.feature b/features/exit_statuses.feature
index 5c5dffe..b971152 100644
--- a/features/exit_statuses.feature
+++ b/features/exit_statuses.feature
@@ -30,13 +30,3 @@ Feature: exit statuses
Scenario: Unsuccessfully run something
When I do aruba I successfully run `ruby -e 'exit 10'`
Then aruba should fail with "Exit status was 10"
-
- @posix
- Scenario: Try to run something that doesn't exist
- When I run `does_not_exist`
- Then the exit status should be 1
-
- @posix
- Scenario: Try to run something that doesn't exist with `
- When I run `does_not_exist`
- Then the exit status should be 1
diff --git a/features/output.feature b/features/output.feature
index 35b931d..f577d26 100644
--- a/features/output.feature
+++ b/features/output.feature
@@ -5,14 +5,6 @@ Feature: Output
I want to use the "the output should contain" step
@posix
- Scenario: Run unknown command
- When I run `neverever gonna work`
- Then the output should contain:
- """
- No such file or directory - neverever
- """
-
- @posix
Scenario: Detect subset of one-line output
When I run `ruby -e 'puts \"hello world\"'`
Then the output should contain "hello world"

@ -1,32 +0,0 @@
--- specifications/aruba-0.4.11.gemspec.orig 2012-04-19 08:35:59.000000000 +0200
+++ specifications/aruba-0.4.11.gemspec 2012-04-19 08:38:14.294458217 +0200
@@ -20,8 +20,7 @@
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<cucumber>, [">= 1.1.1"])
- s.add_runtime_dependency(%q<childprocess>, [">= 0.2.3"])
+ s.add_runtime_dependency(%q<childprocess>, [">= 0.2.0"])
- s.add_runtime_dependency(%q<ffi>, [">= 1.0.11"])
s.add_runtime_dependency(%q<rspec>, [">= 2.7.0"])
s.add_development_dependency(%q<bcat>, [">= 0.6.1"])
s.add_development_dependency(%q<rdiscount>, [">= 1.6.8"])
@@ -28,8 +28,7 @@
s.add_development_dependency(%q<rake>, [">= 0.9.2"])
else
s.add_dependency(%q<cucumber>, [">= 1.1.1"])
- s.add_dependency(%q<childprocess>, [">= 0.2.3"])
+ s.add_dependency(%q<childprocess>, [">= 0.2.0"])
- s.add_dependency(%q<ffi>, [">= 1.0.11"])
s.add_dependency(%q<rspec>, [">= 2.7.0"])
s.add_dependency(%q<bcat>, [">= 0.6.1"])
s.add_dependency(%q<rdiscount>, [">= 1.6.8"])
@@ -37,8 +37,7 @@
end
else
s.add_dependency(%q<cucumber>, [">= 1.1.1"])
- s.add_dependency(%q<childprocess>, [">= 0.2.3"])
+ s.add_dependency(%q<childprocess>, [">= 0.2.0"])
- s.add_dependency(%q<ffi>, [">= 1.0.11"])
s.add_dependency(%q<rspec>, [">= 2.7.0"])
s.add_dependency(%q<bcat>, [">= 0.6.1"])
s.add_dependency(%q<rdiscount>, [">= 1.6.8"])

@ -0,0 +1,37 @@
--- aruba-2.0.0/lib/aruba/api/bundler.rb.make_optional 2021-07-27 04:28:08.000000000 +0900
+++ aruba-2.0.0/lib/aruba/api/bundler.rb 2022-01-14 14:40:50.369324292 +0900
@@ -1,5 +1,4 @@
require "aruba/api/environment"
-require "bundler"
module Aruba
module Api
@@ -8,6 +7,19 @@ module Aruba
# Unset variables used by bundler
def unset_bundler_env_vars
+ begin
+ require "bundler"
+ unset_bundler_env_vars_new
+ rescue LoadError
+ %w[RUBYOPT BUNDLE_PATH BUNDLE_BIN_PATH BUNDLE_GEMFILE].each do |key|
+ delete_environment_variable(key)
+ end
+ end
+ end
+
+ private
+
+ def unset_bundler_env_vars_new
empty_env = with_environment { with_unbundled_env { ENV.to_h } }
aruba_env = aruba.environment.to_h
(aruba_env.keys - empty_env.keys).each do |key|
@@ -18,8 +30,6 @@ module Aruba
end
end
- private
-
def with_unbundled_env(&block)
if ::Bundler.respond_to?(:with_unbundled_env)
::Bundler.with_unbundled_env(&block)

@ -0,0 +1,9 @@
--- aruba-2.0.0/lib/aruba/platforms/unix_platform.rb.explicit 2021-07-27 04:28:08.000000000 +0900
+++ aruba-2.0.0/lib/aruba/platforms/unix_platform.rb 2022-01-14 15:01:38.513634793 +0900
@@ -1,5 +1,6 @@
require "rbconfig"
require "pathname"
+require "rubygems"
require "aruba/aruba_path"

@ -3,8 +3,8 @@
Summary: CLI Steps for Cucumber, hand-crafted for you in Aruba
Name: rubygem-%{gem_name}
Version: 0.14.14
Release: 7%{?dist}
Version: 2.0.0
Release: 2%{?dist}
# aruba itself is MIT
# icons in templates/images are CC-BY
@ -13,20 +13,26 @@ Release: 7%{?dist}
License: MIT and CC-BY and (MIT or GPLv2) and (MIT or BSD or GPLv2)
URL: http://github.com/cucumber/aruba
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: %{name}-%{version}-testsuite.tar.gz
# Source1 is created by $ bash %%SOURCE2 %%VERSION
Source2: %{gem_name}-create-test-suite-tarball.sh
# Make bundler runtime dependency optional
Patch1: rubygem-aruba-2.0.0-make-bundler-optional.patch
# Workaround to make rspec-core rspec test suite pass
Patch2: rubygem-aruba-2.0.0-make-rubygems-dependency-explicit.patch
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
# For %%check
BuildRequires: rubygem(cucumber) >= 1.3.19
BuildRequires: rubygem(childprocess) >= 0.5.6
BuildRequires: rubygem(ffi) >= 1.9.10
BuildRequires: rubygem(childprocess)
BuildRequires: rubygem(contracts)
BuildRequires: rubygem(cucumber)
BuildRequires: rubygem(irb)
BuildRequires: rubygem(minitest)
BuildRequires: rubygem(pry)
BuildRequires: rubygem(rspec) >= 3
BuildRequires: rubygem(contracts) >= 0.9
BuildRequires: rubygem(thor) >= 0.19
BuildRequires: rubygem(irb)
BuildRequires: rubygem(thor)
# features/steps/command/shell.feature:97 # Scenario: Running python commands
BuildRequires: %{_bindir}/python3
@ -46,11 +52,13 @@ BuildArch: noarch
Documentation for %{name}
%prep
%setup -q -n %{gem_name}-%{version}
%autosetup -n %{gem_name}-%{version} -p1 -a 1
mv ../%{gem_name}-%{version}.gemspec .
# Relax childprocess dependency
%gemspec_remove_dep -g childprocess '>= 0.6.3' -s %{gem_name}-%{version}.gemspec
%gemspec_remove_dep -g childprocess '>= 2.0' -s %{gem_name}-%{version}.gemspec
# Remove bundler dependency harder
sed -i '\@dependency.*bundler@d' %{gem_name}-%{version}.gemspec
%build
gem build %{gem_name}-%{version}.gemspec
@ -62,32 +70,23 @@ cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
rm -f %{buildroot}%{gem_cache}
pushd %{buildroot}%{gem_instdir}
rm -rf \
.[^.]* \
Gemfile \
Rakefile \
appveyor.yml \
%{gem_name}.gemspec \
cucumber.yml \
config/ \
features/ \
fixtures/ \
spec/ \
script/ \
%{nil}
popd
%check
pushd %{gem_name}-%{version}
for f in *
do
basef=$(basename $f)
target=../%{gem_instdir}/${basef}
unlink $target || true
ln -sf $(pwd)/$f $target
done
popd
pushd .%{gem_instdir}
# Drop the fuubar dependency.
rm .rspec
# We don't care about code coverage.
# We don't need Bundler.
sed -i spec/spec_helper.rb \
-e '\@[sS]imple[Cc]ov@d' \
-e '\@[Bb]undler@d' \
%{nil}
env RUBYOPT=-rtime \
@ -116,13 +115,14 @@ fi
# The following test fails on ppc64le, due to different block size
# (expected: 64k actual: 4k), disabling
mv features/04_aruba_api/filesystem/report_disk_usage.feature{,.skip}
PPC64_ENV_P=$(uname -m | grep -q ppc64 && echo 0 || echo 1)
if test x"${PPC64_ENV_P}" == x0
then
mv features/04_aruba_api/filesystem/report_disk_usage.feature{,.skip}
fi
# Get rid of Bundler
sed -i Rakefile \
-e '\@[Bb]undler@d' \
-e 's|bundle exec ||' \
%{nil}
# Disable bundler tests.
mv features/03_testing_frameworks/cucumber/disable_bundler.feature{,.skip}
# Adjust test cases referring to $HOME.
sed -i features/04_aruba_api/core/expand_path.feature -e "s|/home/\[\^/\]+|$(echo $HOME)|"
@ -133,13 +133,16 @@ sed -i features/02_configure_aruba/home_directory.feature \
# Make the Aruba always awailable.
env RUBYOPT=-I$(pwd)/lib \
cucumber
cucumber --publish-quiet
# Go back the skipped test
mv features/04_aruba_api/filesystem/report_disk_usage.feature{.skip,}
popd
if test x"${PPC64_ENV_P}" == x0
then
mv features/04_aruba_api/filesystem/report_disk_usage.feature{.skip,}
fi
mv features/03_testing_frameworks/cucumber/disable_bundler.feature{.skip,}
popd # from .%%{gem_instdir}
%files
%dir %{gem_instdir}
@ -147,18 +150,23 @@ popd
%doc %{gem_instdir}/README.md
%{gem_libdir}
%{gem_instdir}/bin/
%{gem_instdir}/exe
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CONTRIBUTING.md
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/TODO.md
%{gem_instdir}/doc/
%{gem_instdir}/templates/
%changelog
* Fri Jan 14 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.0.0-2
- Make bundler optional again
- Workaround patch to make rspec-core test suite pass
- Some cleanup
* Mon Sep 06 2021 Pavel Valena <pvalena@redhat.com> - 2.0.0-1
- Update to aruba 2.0.0
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

Loading…
Cancel
Save