+ set -e
+ set -o pipefail
++ dirname ./run.sh
+ cd .
+ echo 28754
+ echo '1.68.4 61d95181d'
1.68.4 61d95181d
+ date
Wed Jul 3 15:00:48 CEST 2019
+ uptime
15:00:48 up 200 days, 4:31, 0 users, load average: 4.87, 4.81, 4.60
+ ff=default
+ image=yegor256/rultor
+ rebase=false
+ head_branch=master
+ pull_title='xcop.rb: Removes \n at the end of the corrected output'
+ author=yegor256
+ directory=
+ head=git@github.com:yegor256/xcop.git
+ pull_id=26
+ fork=git@github.com:aashraybhandar1/xcop.git
+ fork_branch=issue-25
+ squash=false
+ vars=('--env=head=git@github.com:yegor256/xcop.git' '--env=pull_id=26' '--env=fork=git@github.com:aashraybhandar1/xcop.git' '--env=fork_branch=issue-25' '--env=head_branch=master' '--env=pull_title=xcop.rb: Removes \n at the end of the corrected output' '--env=author=yegor256' '--env=scripts=( '\''export '\''\'\'''\''head=git@github.com:yegor256/xcop.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_id=26'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork=git@github.com:aashraybhandar1/xcop.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork_branch=issue-25'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_title=xcop.rb: Removes \n at the end of the corrected output'\''\'\'''\'''\'' '\'';'\'' '\''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'\'' '\'';'\'' )')
+ scripts=('export '\''head=git@github.com:yegor256/xcop.git'\''' ';' 'export '\''pull_id=26'\''' ';' 'export '\''fork=git@github.com:aashraybhandar1/xcop.git'\''' ';' 'export '\''fork_branch=issue-25'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''pull_title=xcop.rb: Removes \n at the end of the corrected output'\''' ';' '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' ';')
+ container=yegor256_xcop_26
+ 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 '\''pull_id=26'\''' ';' 'export '\''fork=git@github.com:aashraybhandar1/xcop.git'\''' ';' 'export '\''fork_branch=issue-25'\''' ';' 'export '\''head_branch=master'\''' ';' 'export '\''pull_title=xcop.rb: Removes \n at the end of the corrected output'\''' ';' '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' ';'
+ sensitive=()
+ rm -rf .gpg
+ cd repo
+ git remote add fork git@github.com:aashraybhandar1/xcop.git
+ git remote update
Fetching origin
Fetching fork
From github.com:aashraybhandar1/xcop
* [new branch] feature-no-color -> fork/feature-no-color
* [new branch] issue-25 -> fork/issue-25
* [new branch] master -> fork/master
+ args=
+ '[' default == default ']'
+ args=' --ff'
+ '[' default == no ']'
+ '[' default == only ']'
+ export BRANCH=__rultor
+ BRANCH=__rultor
++ git show-branch __rultor
++ wc -l
+ '[' 0 -gt 0 ']'
+ git checkout -B __rultor fork/issue-25
Switched to a new branch '__rultor'
Branch __rultor set up to track remote branch issue-25 from fork.
+ git checkout -B master origin/master
Switched to and reset branch 'master'
Branch master set up to track remote branch master from origin.
Your branch is up-to-date with 'origin/master'.
+ '[' false == true ']'
+ '[' false == true ']'
+ git merge --ff __rultor
Auto-merging lib/xcop.rb
Merge made by the 'recursive' strategy.
lib/xcop.rb | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
+ docker_when_possible
+ true
++ uptime
++ sed 's/ /\n/g'
++ tail -n 1
+ load=4.61
++ echo 4.61 '>' 30
++ bc
+ '[' 0 -eq 1 ']'
+ echo 'load average is 4.61, low enough to run a new Docker container'
load average is 4.61, low enough to run a new Docker container
+ break
+ cd ..
+ '[' -n '' ']'
+ use_image=yegor256/rultor
+ docker pull yegor256/rultor
Using default tag: latest
latest: Pulling from yegor256/rultor
Digest: sha256:89ad567752735f414ef0f6408fd08b5aeed93259147b0dfe2df279054c27a472
Status: Image is up to date for yegor256/rultor:latest
+ docker ps --filter=status=exited
+ grep --quiet '\syegor256_xcop_26\s*$'
+ ls -al .
total 716
drwx--x--x 3 rultor rultor 4096 Jul 3 15:00 .
drwxrwxrwt 16 root root 684032 Jul 3 15:00 ..
-rw-rw-r-- 1 rultor rultor 444 Jul 3 15:00 end.sh
-rwxrwxr-x 1 rultor rultor 338 Jul 3 15:00 entry.sh
-rw-rw-r-- 1 rultor rultor 6 Jul 3 15:00 pid
drwxrwxr-x 8 rultor rultor 4096 Jul 3 15:00 repo
-rw-rw-r-- 1 rultor rultor 56 Jul 3 15:00 rubygems.yml
-rwxrwxr-x 1 rultor rultor 5961 Jul 3 15:00 run.sh
-rw-rw-r-- 1 rultor rultor 591 Jul 3 15:00 script.sh
-rw-rw-r-- 1 rultor rultor 5045 Jul 3 15:00 stdout
++ pwd
++ pwd
+ docker run -t --rm -v /tmp/rultor-Rtqn:/main --env=head=git@github.com:yegor256/xcop.git --env=pull_id=26 --env=fork=git@github.com:aashraybhandar1/xcop.git --env=fork_branch=issue-25 --env=head_branch=master '--env=pull_title=xcop.rb: Removes \n at the end of the corrected output' --env=author=yegor256 '--env=scripts=( '\''export '\''\'\'''\''head=git@github.com:yegor256/xcop.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_id=26'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork=git@github.com:aashraybhandar1/xcop.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork_branch=issue-25'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_title=xcop.rb: Removes \n at the end of the corrected output'\''\'\'''\'''\'' '\'';'\'' '\''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'\'' '\'';'\'' )' --hostname=docker --privileged --memory=6g --memory-swap=16g --oom-kill-disable --cidfile=/tmp/rultor-Rtqn/cid -w=/main -v /var/run/docker.sock:/var/run/docker.sock --name=yegor256_xcop_26 yegor256/rultor /main/entry.sh
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
+ set -e
+ set -o pipefail
+ shopt -s dotglob
+ useradd -m -G sudo r
+ echo '%sudo ALL=(ALL) NOPASSWD:ALL'
+ cp -R /root/.bashrc /root/.composer /root/.gem /root/.gnupg /root/.m2 /root/.profile /root/texmf /root/.wget-hsts /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: change /dev/pts/0 mode failed: Operation not permitted
+ 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 pull_id=26
+ pull_id=26
+ export fork=git@github.com:aashraybhandar1/xcop.git
+ fork=git@github.com:aashraybhandar1/xcop.git
+ export fork_branch=issue-25
+ fork_branch=issue-25
+ export head_branch=master
+ head_branch=master
+ export 'pull_title=xcop.rb: Removes \n at the end of the corrected output'
+ pull_title='xcop.rb: Removes \n at the end of the corrected output'
+ 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 xenial-security InRelease [109 kB]
Get:2ahttp://ppa.launchpad.net/git-core/ppa/ubuntuBtrustyWInReleaser[20.8ekB] [
Hit:3ahttp://archive.ubuntu.com/ubuntu2xenial1InRelease [2 InRelease 1140 B/20.
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates InReleaseB[109%kB]Connect
Get:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:6 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease [15.5 kB]
Ign:7 http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise InRelease
Get:8 http://ppa.launchpad.net/git-core/ppa/ubuntu xenial InRelease [23.8 kB]
Get:9 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease [23.9 kB]
Get:10 https://deb.nodesource.com/node_6.x xenial InRelease [4607 B]
Get:11 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease [56.4 kB]
Hit:12Ihttp://ppa.launchpad.net/natecarlson/maven3/ubuntu precise Release
Get:13Ihttp://archive.ubuntu.com/ubuntuoxenial-updates/main amd64 Packages [1276 kB]
Get:14Ihttp://security.ubuntu.com/ubuntugxenial-security/maingamd64hPackages[[892 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/restrictedramd64ePackages [13.1 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/universegamd64.Packages [974 kB]
Get:17 http://ppa.launchpad.net/git-core/ppa/ubuntuBtrusty/maingamd640Packagesk[3494 B]
Get:18Ihttp://archive.ubuntu.com/ubuntugxenial-updates/multiversenamd64nPackages [19.1 kB]
Get:19Ihttp://security.ubuntu.com/ubuntuhxenial-security/universeramd64ePackages [567 kB]
Get:20 https://deb.nodesource.com/node_6.xpxenial/main6amd64aPackages9[10065B]p
Get:21 http://security.ubuntu.com/ubuntugxenial-security/multiversetamd64.Packages [6121 B]
Get:23ohttp://apt.postgresql.org/pub/repos/apt5xenial-pgdg/mainoamd64dPackagesW[206 kB]
Get:24ohttp://ppa.launchpad.net/git-core/ppa/ubuntu]xenial/main1amd649PackagesB[3522 B]
Get:25ohttp://ppa.launchpad.net/ondrej/php/ubuntu3xenial/main amd64 Packages [63.1 kB]
Fetchedo4495gkBeins2sr(2051]kB/s)%]
Reading package lists... Done
W: http://ppa.launchpad.net/natecarlson/maven3/ubuntu/dists/precise/Release.gpg: Signature by key 1F6F5A1396D75B0DB6FECE5AB70731143DD9F856 uses weak digest algorithm (SHA1)
+ sudo -i gem install pdd -v 0.20.5
Fetching mini_portile2-2.4.0.gem
Fetching pdd-0.20.5.gem
Fetching nokogiri-1.10.3.gem
Fetching rainbow-3.0.0.gem
Fetching slop-4.6.1.gem
Successfully installed mini_portile2-2.4.0
Building native extensions. This could take a while...
Successfully installed nokogiri-1.10.3
Successfully installed rainbow-3.0.0
Successfully installed slop-4.6.1
Successfully installed pdd-0.20.5
Parsing documentation for mini_portile2-2.4.0
Installing ri documentation for mini_portile2-2.4.0
Parsing documentation for nokogiri-1.10.3
Installing ri documentation for nokogiri-1.10.3
Parsing documentation for rainbow-3.0.0
Installing ri documentation for rainbow-3.0.0
Parsing documentation for slop-4.6.1
Installing ri documentation for slop-4.6.1
Parsing documentation for pdd-0.20.5
Installing ri documentation for pdd-0.20.5
Done installing documentation for mini_portile2, nokogiri, rainbow, slop, pdd after 3 seconds
5 gems installed
+ bundle install
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
32mFetching rake 12.0.00m
32mInstalling rake 12.0.00m
32mFetching concurrent-ruby 1.1.50m
32mInstalling concurrent-ruby 1.1.50m
32mFetching i18n 1.6.00m
32mInstalling i18n 1.6.00m
32mFetching minitest 5.5.00m
32mInstalling minitest 5.5.00m
32mFetching thread_safe 0.3.60m
32mInstalling thread_safe 0.3.60m
32mFetching tzinfo 1.2.50m
32mInstalling tzinfo 1.2.50m
32mFetching activesupport 5.2.30m
32mInstalling activesupport 5.2.30m
32mFetching builder 3.2.30m
32mInstalling builder 3.2.30m
32mFetching erubi 1.8.00m
32mInstalling erubi 1.8.00m
Using mini_portile2 2.4.0
Using nokogiri 1.10.3
32mFetching rails-dom-testing 2.0.30m
32mInstalling rails-dom-testing 2.0.30m
32mFetching crass 1.0.40m
32mInstalling crass 1.0.40m
32mFetching loofah 2.2.30m
32mInstalling loofah 2.2.30m
32mFetching rails-html-sanitizer 1.0.40m
32mInstalling rails-html-sanitizer 1.0.40m
32mFetching actionview 5.2.30m
32mInstalling actionview 5.2.30m
32mFetching rack 2.0.70m
32mInstalling rack 2.0.70m
GemWrappers: Can not wrap missing file: rackup
32mFetching rack-test 1.1.00m
32mInstalling rack-test 1.1.00m
32mFetching actionpack 5.2.30m
32mInstalling actionpack 5.2.30m
32mFetching ast 2.4.00m
32mInstalling ast 2.4.00m
Using bundler 1.17.2
32mFetching json 1.8.60m
32mInstalling json 1.8.6 with native extensions0m
32mFetching docile 1.3.20m
32mInstalling docile 1.3.20m
32mFetching simplecov-html 0.10.20m
32mInstalling simplecov-html 0.10.20m
32mFetching simplecov 0.17.00m
32mInstalling simplecov 0.17.00m
32mFetching url 0.3.20m
32mInstalling url 0.3.20m
32mFetching codecov 0.1.100m
32mInstalling codecov 0.1.100m
32mFetching diff-lcs 1.30m
32mInstalling diff-lcs 1.30m
GemWrappers: Can not wrap missing file: htmldiff
GemWrappers: Can not wrap missing file: ldiff
32mFetching multi_json 1.13.10m
32mInstalling multi_json 1.13.10m
32mFetching gherkin 2.12.20m
32mInstalling gherkin 2.12.2 with native extensions0m
32mFetching multi_test 0.1.20m
32mInstalling multi_test 0.1.20m
32mFetching cucumber 1.3.170m
32mInstalling cucumber 1.3.170m
GemWrappers: Can not wrap missing file: cucumber
32mFetching differ 0.1.20m
32mInstalling differ 0.1.20m
32mFetching method_source 0.9.20m
32mInstalling method_source 0.9.20m
32mFetching parallel 1.17.00m
32mInstalling parallel 1.17.00m
32mFetching parser 2.6.3.00m
32mInstalling parser 2.6.3.00m
GemWrappers: Can not wrap missing file: ruby-parse
GemWrappers: Can not wrap missing file: ruby-rewrite
32mFetching powerpack 0.1.20m
32mInstalling powerpack 0.1.20m
32mFetching thor 0.20.30m
32mInstalling thor 0.20.30m
GemWrappers: Can not wrap missing file: thor
32mFetching railties 5.2.30m
32mInstalling railties 5.2.30m
GemWrappers: Can not wrap missing file: rails
Using rainbow 3.0.0
32mFetching rdoc 4.2.00m
32mInstalling rdoc 4.2.00m
32mFetching rspec-support 3.1.20m
32mInstalling rspec-support 3.1.20m
32mFetching rspec-core 3.1.70m
32mInstalling rspec-core 3.1.70m
GemWrappers: Can not wrap missing file: rspec
32mFetching rspec-expectations 3.1.20m
32mInstalling rspec-expectations 3.1.20m
32mFetching rspec-mocks 3.1.30m
32mInstalling rspec-mocks 3.1.30m
32mFetching rspec-rails 3.1.00m
32mInstalling rspec-rails 3.1.00m
32mFetching ruby-progressbar 1.10.10m
32mInstalling ruby-progressbar 1.10.10m
32mFetching unicode-display_width 1.6.00m
32mInstalling unicode-display_width 1.6.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.7.00m
32mInstalling slop 4.7.00m
Using xcop 1.0.snapshot from source at `.`
GemWrappers: Can not wrap missing file: xcop
32mBundle complete! 9 Gemfile dependencies, 52 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.
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.
For more info see:
https://github.com/svenfuchs/i18n/releases/tag/v1.1.0
32mPost-install message from rdoc:0m
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
+ bundle exec rake
/home/r/.ruby/gems/minitest-5.5.0/lib/minitest/assertions.rb:413: warning: mismatched indentations at 'ensure' with 'begin' at 404
/home/r/.ruby/gems/minitest-5.5.0/lib/minitest/assertions.rb:452: warning: mismatched indentations at 'ensure' with 'begin' at 437
/home/r/.ruby/gems/slop-4.7.0/lib/slop/parser.rb:55: warning: assigned but unused variable - orig_arg
Run options: --seed 63767
# Running:
32m.0m32m.0m32m.0m32m.0m32m.0m32m.0m32m.0mRunning xcop...
Inspecting 1 file...
31m<z><a><b></b></a>
0m32m<?xml version="1.0"?>
<z>
<a>
<b/>
</a>0m
</z>
Invalid XML formatting in broken.xml
32m.0m
Finished in 0.005378s, 1487.6741 runs/s, 1487.6741 assertions/s.
8 runs, 8 assertions, 0 failures, 0 errors, 0 skips
Coverage report generated for Unit Tests to /home/r/repo/coverage. 84 / 92 LOC (91.3%) covered.
/usr/local/rvm/rubies/ruby-2.6.0/bin/ruby -S bundle exec cucumber
/home/r/.ruby/gems/cucumber-1.3.17/lib/cucumber/ast/step.rb:80: warning: circular argument reference - name
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 printed90m # 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 printed90m # 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 file90m # 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 license90m # 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 file90m # 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 license90m # 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 file90m # 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 packaged90m # 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/test20190703-12904-csvhut/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 Rakefile90m # 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.479s
Coverage report generated for Cucumber Features, Unit Tests to /home/r/repo/coverage. 84 / 92 LOC (91.3%) covered.
Running RuboCop...
.rubocop.yml: Style/MultilineMethodCallIndentation has the wrong namespace - should be Layout
Inspecting 11 files
32m.0m32m.0m32m.0m32m.0m32m.0m32m.0m33mC0m32m.0m32m.0m32m.0m32m.0m
Offenses:
36mlib/xcop.rb0m:109:7: 33mC0m: Style/IfUnlessModifier: Favor modifier 33munless0m usage when having a single-line body. Another good alternative is the usage of control flow 33m&&0m/33m||0m.
unless nocolor
^^^^^^
36mlib/xcop.rb0m:116:12: 33mC0m: Performance/StringReplacement: Use 33mtr0m instead of 33mgsub0m.
text.gsub(/\n/, "\n")
^^^^^^^^^^^^^^^^
11 files inspected, 31m2 offenses0m detected
RuboCop failed!
container ae4eee566236d4c763f63aa2bad56b073dba946e88fefae3b12259414d343bf0 is dead
Wed Jul 3 15:03:29 CEST 2019