some sed usage cleanup

f38
Mamoru TASAKA 6 years ago
parent 0a64fa121d
commit 0f8a9a0294

@ -23,8 +23,6 @@ BuildRequires: rubygem(pry)
BuildRequires: rubygem(rspec) >= 3
BuildRequires: rubygem(contracts) >= 0.9
BuildRequires: rubygem(thor) >= 0.19
# features/steps/command/shell.feature:68 # Scenario: Running zsh commands
BuildRequires: /usr/bin/zsh
# features/steps/command/shell.feature:97 # Scenario: Running python commands
BuildRequires: /usr/bin/python3
BuildArch: noarch
@ -78,20 +76,27 @@ pushd .%{gem_instdir}
rm .rspec
# We don't care about code coverage.
sed -i "/simplecov/I s/^/#/" spec/spec_helper.rb
# We don't need Bundler.
sed -i "/bundler/I s/^/#/" spec/spec_helper.rb
sed -i spec/spec_helper.rb \
-e '\@[sS]imple[Cc]ov@d' \
-e '\@[Bb]undler@d' \
%{nil}
RUBYOPT=-rtime rspec spec
# We don't care about code coverage.
sed -i "/require 'simplecov'/ s/^/#/" features/support/env.rb
sed -i "/ENV\['RUBYOPT'\]/,/\send/ s/^/#/" features/support/env.rb
mv features/support/simplecov_setup.rb{,.disable}
sed -i features/support/env.rb \
-e '\@require.*simplecov@d'
> features/support/simplecov_setup.rb
# Let the test cli-app find Aruba.
sed -i '/$LOAD_PATH/ s/\.\.\/\.\.\//\.\.\/\.\.\/\.\.\/\.\.\/\.\.\//' fixtures/cli-app/spec/spec_helper.rb
sed -i fixtures/cli-app/spec/spec_helper.rb \
-e "\@\$LOAD_PATH@s|\.\./\.\./lib|$(pwd)/lib|"
# zsh?? I don't use it. Just use echo -e
sed -i features/steps/command/shell.feature \
-e 's|zsh|bash|' \
-e '\@echo.*Hello.*c@s|echo|echo -e|'
# /usr/bin/python is reporting deprecation warning :/
sed -i 's/python/python3/' features/steps/command/shell.feature

Loading…
Cancel
Save