+ set -e + set -o pipefail ++ dirname ./run.sh + cd . + echo 22302 + echo '1.69.1 839260fab' 1.69.1 839260fab + date Tue Dec 1 21:55:48 CET 2020 + uptime 21:55:48 up 65 days, 7:01, 0 users, load average: 0.01, 0.07, 0.06 + head=git@github.com:yegor256/xcop.git + ff=default + image=yegor256/rultor-image + rebase=false + squash=false + head_branch=master + author=yegor256 + tag=0.6.2 + vars=('--env=head=git@github.com:yegor256/xcop.git' '--env=tag=0.6.2' '--env=scripts=( '\''export '\''\'\'''\''head=git@github.com:yegor256/xcop.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''tag=0.6.2'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=yegor256'\''\'\'''\'''\'' '\'';'\'' '\''export GEM_HOME=~/.ruby'\'' '\'';'\'' '\''export GEM_PATH=$GEM_HOME:$GEM_PATH'\'' '\'';'\'' '\''sudo apt-get -y update'\'' '\'';'\'' '\''sudo gem install pdd -v 0.20.5'\'' '\'';'\'' '\''bundle install'\'' '\'';'\'' '\''bundle exec rake'\'' '\'';'\'' '\''pdd -f /dev/null'\'' '\'';'\'' '\''rm -rf *.gem'\'' '\'';'\'' '\''sed -i "s/1\.0\.snapshot/${tag}/g" lib/xcop/version.rb'\'' '\'';'\'' '\''git add lib/xcop/version.rb'\'' '\'';'\'' '\''git commit -m "version set to ${tag}"'\'' '\'';'\'' '\''gem build xcop.gemspec'\'' '\'';'\'' '\''chmod 0600 ../rubygems.yml'\'' '\'';'\'' '\''gem push *.gem --config-file ../rubygems.yml'\'' '\'';'\'' )' '--env=head_branch=master' '--env=author=yegor256') + scripts=('export '\''head=git@github.com:yegor256/xcop.git'\''' ';' 'export '\''tag=0.6.2'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''author=yegor256'\''' ';' 'export GEM_HOME=~/.ruby' ';' 'export GEM_PATH=$GEM_HOME:$GEM_PATH' ';' 'sudo apt-get -y update' ';' 'sudo gem install pdd -v 0.20.5' ';' 'bundle install' ';' 'bundle exec rake' ';' 'pdd -f /dev/null' ';' 'rm -rf *.gem' ';' 'sed -i "s/1\.0\.snapshot/${tag}/g" lib/xcop/version.rb' ';' 'git add lib/xcop/version.rb' ';' 'git commit -m "version set to ${tag}"' ';' 'gem build xcop.gemspec' ';' 'chmod 0600 ../rubygems.yml' ';' 'gem push *.gem --config-file ../rubygems.yml' ';') + directory= + container=yegor256_xcop_30 + as_root=false + mkdir -p /home/rultor/.ssh + echo -e 'Host github.com\n\tStrictHostKeyChecking no\n' + chmod 600 /home/rultor/.ssh/config + git clone git@github.com:yegor256/xcop.git repo Cloning into 'repo'... + cd repo + git config user.email me@rultor.com + git config user.name rultor + '[' -z 'export '\''head=git@github.com:yegor256/xcop.git'\''' ']' + cd .. + cat + '[' false = true ']' + cat + chmod a+x entry.sh + cat + echo 'export '\''head=git@github.com:yegor256/xcop.git'\''' ';' 'export '\''tag=0.6.2'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''author=yegor256'\''' ';' 'export GEM_HOME=~/.ruby' ';' 'export GEM_PATH=$GEM_HOME:$GEM_PATH' ';' 'sudo apt-get -y update' ';' 'sudo gem install pdd -v 0.20.5' ';' 'bundle install' ';' 'bundle exec rake' ';' 'pdd -f /dev/null' ';' 'rm -rf *.gem' ';' 'sed -i "s/1\.0\.snapshot/${tag}/g" lib/xcop/version.rb' ';' 'git add lib/xcop/version.rb' ';' 'git commit -m "version set to ${tag}"' ';' 'gem build xcop.gemspec' ';' 'chmod 0600 ../rubygems.yml' ';' 'gem push *.gem --config-file ../rubygems.yml' ';' + sensitive=() + rm -rf .gpg + '[' -z 0.6.2 ']' + [[ 0.6.2 =~ ^[a-zA-Z0-9\.\-]+$ ]] + echo 'tag name is valid: "0.6.2"' tag name is valid: "0.6.2" + cd repo ++ git tag -l 0.6.2 + '[' ']' + export BRANCH_NAME=__rultor + BRANCH_NAME=__rultor ++ git show-branch __rultor ++ wc -l + '[' 0 -gt 0 ']' + git checkout -b __rultor Switched to a new branch '__rultor' + docker_when_possible + true ++ uptime ++ sed 's/ /\n/g' ++ tail -n 1 + load=0.06 ++ echo 0.06 '>' 30 ++ bc + '[' 0 -eq 1 ']' + echo 'load average is 0.06, low enough to run a new Docker container' load average is 0.06, low enough to run a new Docker container + break + cd .. + '[' -n '' ']' + use_image=yegor256/rultor-image + docker pull yegor256/rultor-image Using default tag: latest latest: Pulling from yegor256/rultor-image 5bed26d33875: Already exists f11b29a9c730: Already exists 930bda195c84: Already exists 78bf9a5ad49e: Already exists bd92b3300a5c: Already exists a4e411970f61: Already exists cd3950cd7df2: Already exists 8f530b1cfb92: Already exists 812074e49c42: Already exists 3a5f1edc3977: Already exists bee1a1b6364d: Already exists f6bfd9b2cfd9: Already exists f150775b93f0: Already exists 2fa35ef3e60f: Already exists 7697dc9f50cb: Already exists baab9a0785c0: Already exists 63f489a107a7: Already exists 8a395104028e: Already exists 49f7433ed3e1: Already exists 27b75b92e685: Already exists 49573aff720b: Already exists 6c7a6acc15a7: Already exists 2fcd87bfa5db: Already exists 0549ec9ec8ed: Already exists 70bdcfc588ca: Already exists 3b367e0aa6a5: Already exists 310891b65deb: Already exists Digest: sha256:9e0007d3c1f97c64052760bdfa4d74366099fc980adbe1cc58bbffbb92ca628a Status: Downloaded newer image for yegor256/rultor-image:latest + docker ps --filter=status=exited + grep --quiet '\syegor256_xcop_30\s*$' + ls -al . total 716 drwx--x--x 3 rultor rultor 4096 Dec 1 21:55 . drwxrwxrwt 10 root root 684032 Dec 1 21:55 .. -rw-rw-r-- 1 rultor rultor 444 Dec 1 21:55 end.sh -rwxrwxr-x 1 rultor rultor 363 Dec 1 21:55 entry.sh -rw-rw-r-- 1 rultor rultor 6 Dec 1 21:55 pid drwxrwxr-x 8 rultor rultor 4096 Dec 1 21:55 repo -rw-rw-r-- 1 rultor rultor 56 Dec 1 21:55 rubygems.yml -rwxrwxr-x 1 rultor rultor 6010 Dec 1 21:55 run.sh -rw-rw-r-- 1 rultor rultor 668 Dec 1 21:55 script.sh -rw-rw-r-- 1 rultor rultor 5045 Dec 1 21:55 stdout ++ pwd ++ pwd + docker run -t --rm -v /tmp/rultor-5xoO:/main --env=head=git@github.com:yegor256/xcop.git --env=tag=0.6.2 '--env=scripts=( '\''export '\''\'\'''\''head=git@github.com:yegor256/xcop.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''tag=0.6.2'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=yegor256'\''\'\'''\'''\'' '\'';'\'' '\''export GEM_HOME=~/.ruby'\'' '\'';'\'' '\''export GEM_PATH=$GEM_HOME:$GEM_PATH'\'' '\'';'\'' '\''sudo apt-get -y update'\'' '\'';'\'' '\''sudo gem install pdd -v 0.20.5'\'' '\'';'\'' '\''bundle install'\'' '\'';'\'' '\''bundle exec rake'\'' '\'';'\'' '\''pdd -f /dev/null'\'' '\'';'\'' '\''rm -rf *.gem'\'' '\'';'\'' '\''sed -i "s/1\.0\.snapshot/${tag}/g" lib/xcop/version.rb'\'' '\'';'\'' '\''git add lib/xcop/version.rb'\'' '\'';'\'' '\''git commit -m "version set to ${tag}"'\'' '\'';'\'' '\''gem build xcop.gemspec'\'' '\'';'\'' '\''chmod 0600 ../rubygems.yml'\'' '\'';'\'' '\''gem push *.gem --config-file ../rubygems.yml'\'' '\'';'\'' )' --env=head_branch=master --env=author=yegor256 --hostname=docker --privileged --memory=6g --memory-swap=16g --oom-kill-disable --cidfile=/tmp/rultor-5xoO/cid -w=/main -v /var/run/docker.sock:/var/run/docker.sock --name=yegor256_xcop_30 yegor256/rultor-image /main/entry.sh + set -e + set -o pipefail + shopt -s dotglob + useradd -m -G sudo r + usermod -s /bin/bash r + echo '%sudo ALL=(ALL) NOPASSWD:ALL' + cp -R /root/.bashrc /root/.cache /root/.composer /root/.gem /root/.gnupg /root/.m2 /root/.profile /root/texmf /home/r + cp -R ./cid ./end.sh ./entry.sh ./pid ./repo ./rubygems.yml ./run.sh ./script.sh ./stdout /home/r + rm -rf repo + chown -R r:r /home/r + chmod a+x /home/r/script.sh + su --login r --command /home/r/script.sh mesg: cannot open /dev/pts/0: Permission denied + set -e + set -o pipefail + shopt -s expand_aliases + alias 'sudo=sudo -i' + export HOME=/home/r + HOME=/home/r + cd /home/r/repo + export head=git@github.com:yegor256/xcop.git + head=git@github.com:yegor256/xcop.git + export tag=0.6.2 + tag=0.6.2 + export head_branch=master + head_branch=master + export author=yegor256 + author=yegor256 + export GEM_HOME=/home/r/.ruby + GEM_HOME=/home/r/.ruby + export GEM_PATH=/home/r/.ruby:/usr/local/rvm/gems/ruby-2.6.0:/usr/local/rvm/gems/ruby-2.6.0@global + GEM_PATH=/home/r/.ruby:/usr/local/rvm/gems/ruby-2.6.0:/usr/local/rvm/gems/ruby-2.6.0@global + sudo -i apt-get -y update Get:1ohttp://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:2ohttp://ppa.launchpad.net/deadsnakes/ppa/ubuntu,bionic8InRelease][15.9tkB] Get:3ohttps://deb.nodesource.com/node_10.xtbioniciInRelease.[4,5841B]89.88.152) Hit:4 http://archive.ubuntu.com/ubuntu bionicaInReleaseInRelease 48.9 kB/88.7 k Get:5 http://ppa.launchpad.net/git-core/ppa/ubuntu]bioniciInReleasea[20.8fkB]he Get:6 http://archive.ubuntu.com/ubuntu bionic-updates5InReleasee[88.76kB]20.8 k Get:7 http://archive.ubuntu.com/ubuntuebionic-backportsnInReleaseo[74.6lkB]chpa Get:8ohttps://deb.nodesource.com/node_10.xtbionic/mainhamd64ePackages9[7698B]][ Get:9ohttp://security.ubuntu.com/ubuntunbionic-security/multiverse.amd645Packages [15.8 kB] Get:10Ihttp://security.ubuntu.com/ubuntuobionic-security/universeoamd64lPackages [1,365 kB] Get:11Ihttp://archive.ubuntu.com/ubuntugbionic-updates/restrictedaamd64ePackages [259 kB] Get:12Ihttp://security.ubuntu.com/ubuntuibionic-security/restrictedgamd64pPackages [230 kB] Get:13 http://security.ubuntu.com/ubuntu6bionic-security/mainWamd64gPackagesd[1,800 kB] Get:14 http://archive.ubuntu.com/ubuntu bionic-updates/universe[amd64aPackagesn[2,130 kB] Get:15 http://ppa.launchpad.net/ondrej/php/ubuntuobioniceInReleasee[20.81kB]ppa Get:16ihttp://archive.ubuntu.com/ubuntu1bionic-updates/multiverse amd64]Packages [54.3 kB] Get:17 http://archive.ubuntu.com/ubuntu1bionic-updates/mainaamd64.Packages8[2,227 kB] Get:184http://ppa.launchpad.net/deadsnakes/ppa/ubuntu2bionic/mainWamd64gPackages [39.5 kB] Get:19ahttp://archive.ubuntu.com/ubuntu2bionic-backports/main3amd64BPackages [11.3 kB] Get:207http://archive.ubuntu.com/ubunturbionic-backports/universepamd64uPackages [11.4 kB] Get:217http://ppa.launchpad.net/git-core/ppa/ubuntucbionic/main1amd649Packagesp[3,189 B] Get:227http://ppa.launchpad.net/ondrej/php/ubuntuubionic/main(amd649Packages [129 kB] Fetchedo8,590]kBsint2se(4,589kkB/s)]ages 14.36kB/129 kB 11%] Reading package lists... Done + sudo -i gem install pdd -v 0.20.5 Successfully installed pdd-0.20.5 Parsing documentation for pdd-0.20.5 Done installing documentation for pdd after 0 seconds 1 gem installed + bundle install Fetching gem metadata from https://rubygems.org/......... Resolving dependencies... 32mFetching rake 13.0.10m 32mInstalling rake 13.0.10m 32mFetching concurrent-ruby 1.1.70m 32mInstalling concurrent-ruby 1.1.70m 32mFetching i18n 1.8.50m 32mInstalling i18n 1.8.50m 32mFetching minitest 5.14.20m 32mInstalling minitest 5.14.20m 32mFetching thread_safe 0.3.60m 32mInstalling thread_safe 0.3.60m 32mFetching tzinfo 1.2.80m 32mInstalling tzinfo 1.2.80m 32mFetching zeitwerk 2.4.20m 32mInstalling zeitwerk 2.4.20m 32mFetching activesupport 6.0.3.40m 32mInstalling activesupport 6.0.3.40m 32mFetching ast 2.4.10m 32mInstalling ast 2.4.10m 32mFetching builder 3.2.40m 32mInstalling builder 3.2.40m Using bundler 2.1.4 32mFetching json 2.3.10m 32mInstalling json 2.3.1 with native extensions0m 32mFetching docile 1.3.20m 32mInstalling docile 1.3.20m 32mFetching simplecov-html 0.12.30m 32mInstalling simplecov-html 0.12.30m 32mFetching simplecov_json_formatter 0.1.20m 32mInstalling simplecov_json_formatter 0.1.20m 32mFetching simplecov 0.20.00m 32mInstalling simplecov 0.20.00m 32mFetching codecov 0.2.120m 32mInstalling codecov 0.2.120m 32mFetching middleware 0.1.00m 32mInstalling middleware 0.1.00m 32mFetching thor 1.0.10m 32mInstalling thor 1.0.10m GemWrappers: Can not wrap missing file: thor 32mFetching protobuf-cucumber 3.10.80m 32mInstalling protobuf-cucumber 3.10.80m GemWrappers: Can not wrap missing file: protoc-gen-ruby GemWrappers: Can not wrap missing file: rpc_server 32mFetching cucumber-messages 13.2.10m 32mInstalling cucumber-messages 13.2.10m 32mFetching cucumber-gherkin 15.0.20m 32mInstalling cucumber-gherkin 15.0.20m GemWrappers: Can not wrap missing file: gherkin-ruby GemWrappers: Can not wrap missing file: gherkin 32mFetching cucumber-tag-expressions 2.0.40m 32mInstalling cucumber-tag-expressions 2.0.40m 32mFetching cucumber-core 8.0.10m 32mInstalling cucumber-core 8.0.10m 32mFetching ffi 1.13.10m 32mInstalling ffi 1.13.1 with native extensions0m 32mFetching sys-uname 1.2.20m 32mInstalling sys-uname 1.2.20m 32mFetching cucumber-create-meta 2.0.40m 32mInstalling cucumber-create-meta 2.0.40m 32mFetching cucumber-cucumber-expressions 10.3.00m 32mInstalling cucumber-cucumber-expressions 10.3.00m 32mFetching cucumber-html-formatter 9.0.00m 32mInstalling cucumber-html-formatter 9.0.00m GemWrappers: Can not wrap missing file: cucumber-html-formatter 32mFetching cucumber-wire 4.0.10m 32mInstalling cucumber-wire 4.0.10m 32mFetching diff-lcs 1.4.40m 32mInstalling diff-lcs 1.4.40m GemWrappers: Can not wrap missing file: htmldiff GemWrappers: Can not wrap missing file: ldiff 32mFetching multi_test 0.1.20m 32mInstalling multi_test 0.1.20m 32mFetching cucumber 5.2.00m 32mInstalling cucumber 5.2.00m GemWrappers: Can not wrap missing file: cucumber Using differ 0.1.2 Using mini_portile2 2.4.0 32mFetching nokogiri 1.10.100m 32mInstalling nokogiri 1.10.10 with native extensions0m 32mFetching parallel 1.20.10m 32mInstalling parallel 1.20.10m 32mFetching parser 2.7.2.00m 32mInstalling parser 2.7.2.00m GemWrappers: Can not wrap missing file: ruby-parse GemWrappers: Can not wrap missing file: ruby-rewrite 32mFetching powerpack 0.1.30m 32mInstalling powerpack 0.1.30m Using rainbow 3.0.0 32mFetching rdoc 6.2.10m 32mInstalling rdoc 6.2.10m 32mFetching ruby-progressbar 1.10.10m 32mInstalling ruby-progressbar 1.10.10m 32mFetching unicode-display_width 1.7.00m 32mInstalling unicode-display_width 1.7.00m 32mFetching rubocop 0.52.00m 32mInstalling rubocop 0.52.00m GemWrappers: Can not wrap missing file: rubocop 32mFetching rubocop-rspec 1.5.10m 32mInstalling rubocop-rspec 1.5.10m 32mFetching slop 4.8.20m 32mInstalling slop 4.8.20m Using xcop 1.0.snapshot from source at `.` 32mBundle complete! 8 Gemfile dependencies, 47 gems now installed.0m 32mUse `bundle info [gemname]` to see where a bundled gem is installed.0m 32mPost-install message from i18n:0m HEADS UP! i18n 1.1 changed fallbacks to exclude default locale. But that may break your application. If you are upgrading your Rails application from an older version of Rails: Please check your Rails app for 'config.i18n.fallbacks = true'. If you're using I18n (>= 1.1.0) and Rails (< 5.2.2), this should be 'config.i18n.fallbacks = [I18n.default_locale]'. If not, fallbacks will be broken in your app by I18n 1.1.x. If you are starting a NEW Rails application, you can ignore this notice. For more info see: https://github.com/svenfuchs/i18n/releases/tag/v1.1.0 + bundle exec rake Run options: --seed 39485 # Running: ......Running xcop... Inspecting 1 file... 31m<z><a><b></b></a>\n \n </z>0m32m<?xml version="1.0"?>\n <z>\n <a>\n <b/>\n </a>\n </z>\n0m Invalid XML formatting in broken.xml .. Finished in 0.007738s, 1033.8149 runs/s, 1033.8149 assertions/s. 8 runs, 8 assertions, 0 failures, 0 errors, 0 skips Coverage report generated for Unit Tests to /home/r/repo/coverage. 84 / 93 LOC (90.32%) covered. /usr/local/rvm/rubies/ruby-2.6.0/bin/ruby -S bundle exec cucumber Using the default profile... Feature: Command Line Processing As an author of XML I want to be able to call XCOP as a command line tool Scenario: Help can be printed 90m# features/cli.feature:50m 32mWhen I run bin/xcop with "32m1m-h0m0m32m"90m # features/step_definitions/steps.rb:500m0m 32mThen Exit code is zero90m # features/step_definitions/steps.rb:660m0m 32mAnd Stdout contains "32m1m--help0m0m32m"90m # features/step_definitions/steps.rb:560m0m Scenario: Version can be printed 90m# features/cli.feature:100m 32mWhen I run bin/xcop with "32m1m--version0m0m32m"90m # features/step_definitions/steps.rb:500m0m 32mThen Exit code is zero90m # features/step_definitions/steps.rb:660m0m Scenario: Validating correct XML file 90m# features/cli.feature:140m 32mGiven I have a "32m1mtest.xml0m0m32m" file with content:90m # features/step_definitions/steps.rb:430m0m 32m """0m 32m <?xml version="1.0"?>0m 32m <hello>Hello, world!</hello>0m 32m0m 32m """0m 32mWhen I run bin/xcop with "32m1mtest.xml0m0m32m"90m # features/step_definitions/steps.rb:500m0m 32mThen Stdout contains "32m1mtest.xml looks good0m0m32m"90m # features/step_definitions/steps.rb:560m0m 32mAnd Exit code is zero90m # features/step_definitions/steps.rb:660m0m Scenario: Validating correct XML file with license 90m# features/cli.feature:250m 32mGiven I have a "32m1mlicensed.xml0m0m32m" file with content:90m # features/step_definitions/steps.rb:430m0m 32m """0m 32m <?xml version="1.0"?>0m 32m <!--0m 32m This is the license,0m 32m which is very very strict!0m 32m -->0m 32m <hello>Hello, world!</hello>0m 32m0m 32m """0m 32mAnd I have a "32m1mLICENSE0m0m32m" file with content:90m # features/step_definitions/steps.rb:430m0m 32m """0m 32m This is the license,0m 32m which is very very strict!0m 32m """0m 32mWhen I run bin/xcop with "32m1m--quiet --license LICENSE licensed.xml0m0m32m"90m # features/step_definitions/steps.rb:500m0m 32mThen Stdout is empty90m # features/step_definitions/steps.rb:620m0m 32mAnd Exit code is zero90m # features/step_definitions/steps.rb:660m0m Scenario: Validating incorrect XML file 90m# features/cli.feature:450m 32mGiven I have a "32m1mabc.xml0m0m32m" file with content:90m # features/step_definitions/steps.rb:430m0m 32m """0m 32m <a><b>something</b>0m 32m </a>0m 32m """0m 32mWhen I run bin/xcop with "32m1mabc.xml0m0m32m"90m # features/step_definitions/steps.rb:500m0m 32mThen Exit code is not zero90m # features/step_definitions/steps.rb:700m0m Scenario: Validating correct XML file with broken license 90m# features/cli.feature:540m 32mGiven I have a "32m1mlicensed.xml0m0m32m" file with content:90m # features/step_definitions/steps.rb:430m0m 32m """0m 32m <?xml version="1.0"?>0m 32m <!--0m 32m This is the wrong license!0m 32m -->0m 32m <hello>Hello, world!</hello>0m 32m0m 32m """0m 32mAnd I have a "32m1mLICENSE0m0m32m" file with content:90m # features/step_definitions/steps.rb:430m0m 32m """0m 32m This is the right license.0m 32m """0m 32mWhen I run bin/xcop with "32m1m--license LICENSE licensed.xml0m0m32m"90m # features/step_definitions/steps.rb:500m0m 32mAnd Stdout contains "32m1mBroken license0m0m32m"90m # features/step_definitions/steps.rb:560m0m 32mAnd Exit code is not zero90m # features/step_definitions/steps.rb:700m0m Scenario: Fixing incorrect XML file 90m# features/cli.feature:720m 32mGiven I have a "32m1mbroken.xml0m0m32m" file with content:90m # features/step_definitions/steps.rb:430m0m 32m """0m 32m <a><b>something</b>0m 32m </a>0m 32m """0m 32mWhen I run bin/xcop with "32m1m--fix broken.xml0m0m32m"90m # features/step_definitions/steps.rb:500m0m 32mThen Exit code is zero90m # features/step_definitions/steps.rb:660m0m 32mThen I run bin/xcop with "32m1mbroken.xml0m0m32m"90m # features/step_definitions/steps.rb:500m0m 32mThen Exit code is zero90m # features/step_definitions/steps.rb:660m0m Feature: Gem Package As a source code writer I want to be able to package the Gem into .gem file Scenario: Gem can be packaged 90m# features/gem_package.feature:50m 32mGiven It is Unix90m # features/step_definitions/steps.rb:860m0m 32mGiven I have a "32m1mexecs.rb0m0m32m" file with content:90m # features/step_definitions/steps.rb:430m0m 32m """0m 32m #!/usr/bin/env ruby0m 32m require 'rubygems'0m 32m spec = Gem::Specification::load('./spec.rb')0m 32m if spec.executables.empty?0m 32m fail 'no executables: ' + File.read('./spec.rb')0m 32m end0m 32m """0m /tmp/test20201201-10886-mp278x/xcop/lib/xcop/version.rb:26: warning: already initialized constant Xcop::VERSION /home/r/repo/lib/xcop/version.rb:26: warning: previous definition of VERSION was here 32mWhen I run bash with:90m # features/step_definitions/steps.rb:800m0m 32m """0m 32m cd xcop0m 32m gem build xcop.gemspec0m 32m gem specification --ruby xcop-*.gem > ../spec.rb0m 32m cd ..0m 32m ruby execs.rb0m 32m """0m 32mThen Exit code is zero90m # features/step_definitions/steps.rb:660m0m Feature: Rake tasks As a source code writer I want to be able to run Xcop from Rakefile Scenario: Xcop can be used in Rakefile 90m# features/rake.feature:50m 32mGiven It is Unix90m # features/step_definitions/steps.rb:860m0m 32mAnd I have a "32m1mRakefile0m0m32m" file with content:90m # features/step_definitions/steps.rb:430m0m 32m """0m 32m require 'xcop/rake_task'0m 32m Xcop::RakeTask.new(:xcop) do |task|0m 32m task.includes = ['good.xml']0m 32m end0m 32m """0m 32mAnd I have a "32m1mgood.xml0m0m32m" file with content:90m # features/step_definitions/steps.rb:430m0m 32m """0m 32m <?xml version="1.0"?>0m 32m <hello>Hello, world!</hello>0m 32m0m 32m """0m 32mWhen I run bash with "32m1mrake xcop0m0m32m"90m # features/step_definitions/steps.rb:740m0m 32mThen Exit code is zero90m # features/step_definitions/steps.rb:660m0m 9 scenarios (32m9 passed0m) 36 steps (32m36 passed0m) 0m3.407s 1m32m┌──────────────────────────────────────────────────────────────────────────┐0m0m 1m32m│0m0m Share your Cucumber Report with your team at 4m1m36mhttps://reports.cucumber.io0m0m0m 1m32m│0m0m 1m32m│0m0m 1m32m│0m0m 1m32m│0m0m Command line option: 36m--publish0m 1m32m│0m0m 1m32m│0m0m Environment variable: 36mCUCUMBER_PUBLISH_ENABLED0m=36mtrue0m 1m32m│0m0m 1m32m│0m0m cucumber.yml: 36mdefault: --publish0m 1m32m│0m0m 1m32m│0m0m 1m32m│0m0m 1m32m│0m0m More information at 4m1m36mhttps://reports.cucumber.io/docs/cucumber-ruby0m0m0m 1m32m│0m0m 1m32m│0m0m 1m32m│0m0m 1m32m│0m0m To disable this message, specify 1mCUCUMBER_PUBLISH_QUIET=true0m or use the 1m32m│0m0m 1m32m│0m0m 1m--publish-quiet0m option. You can also add this to your 1mcucumber.yml:0m 1m32m│0m0m 1m32m│0m0m 1mdefault: --publish-quiet0m 1m32m│0m0m 1m32m└──────────────────────────────────────────────────────────────────────────┘0m0m Coverage report generated for Cucumber Features, Unit Tests to /home/r/repo/coverage. 84 / 93 LOC (90.32%) covered. Running RuboCop... .rubocop.yml: Style/MultilineMethodCallIndentation has the wrong namespace - should be Layout Inspecting 11 files 32m.0m32m.0m32m.0m32m.0m32m.0m32m.0m32m.0m32m.0m32m.0m32m.0m32m.0m 11 files inspected, 32mno offenses0m detected grep -q -r '2017-2020' --include '*.rb' --include '*.txt' --include 'Rakefile' . + pdd -f /dev/null Found 7 lines in /home/r/repo/.pdd My version is 0.20.5 Ruby version is 2.6.0 at x86_64-linux Reading . Excluding target/**/* Excluding coverage/**/* 31 file(s) found, 217 excluded Reading .simplecov... Reading Rakefile... Reading Gemfile... Reading .0pdd.yml... Reading .github/ISSUE_TEMPLATE.md... Reading .github/PULL_REQUEST_TEMPLATE.md... Reading cucumber.yml... Reading .travis.yml... Reading LICENSE.txt... Reading test/test_rake_task.rb... Reading test/test__helper.rb... Reading test/test_xcop.rb... Reading .pdd... Reading .rultor.yml... Reading lib/xcop.rb... Reading lib/xcop/rake_task.rb... Reading lib/xcop/version.rb... Reading README.md... Reading appveyor.yml... Reading .rubocop.yml... Reading .gitignore... Reading Gemfile.lock... Reading features/rake.feature... Reading features/cli.feature... Reading features/support/env.rb... Reading features/gem_package.feature... Reading features/step_definitions/steps.rb... Reading bin/xcop... Reading logo.svg... Reading xcop.gemspec... Reading .gitattributes... + rm -rf '*.gem' + sed -i 's/1\.0\.snapshot/0.6.2/g' lib/xcop/version.rb + git add lib/xcop/version.rb + git commit -m 'version set to 0.6.2' [__rultor 72b3743] version set to 0.6.2 1 file changed, 1 insertion(+), 1 deletion(-) + gem build xcop.gemspec Successfully built RubyGem Name: xcop Version: 0.6.2 File: xcop-0.6.2.gem + chmod 0600 ../rubygems.yml + gem push xcop-0.6.2.gem --config-file ../rubygems.yml Pushing gem to https://rubygems.org... Successfully registered gem: xcop (0.6.2) + mv /home/r/repo . ++ whoami + chown -R root repo + '[' -n '' ']' ++ whoami + sudo chown -R rultor repo + cd repo + git checkout __rultor Already on '__rultor' + git tag 0.6.2 -m '0.6.2: tagged by rultor.com' + git reset --hard HEAD is now at 72b3743 version set to 0.6.2 + git clean -fd + git checkout master Switched to branch 'master' Your branch is up-to-date with 'origin/master'. + git branch -D __rultor Deleted branch __rultor (was 72b3743). + git push --all origin Everything up-to-date + git push --tags origin To git@github.com:yegor256/xcop.git * [new tag] 0.6.2 -> 0.6.2 container 7f76b176b5c12709a0cedb4214553e09b3c9289688f32d188b2e8665a255ff20 is dead Tue Dec 1 21:58:24 CET 2020