Diff of the two buildlogs: -- --- b1/build.log 2023-06-09 16:36:33.353919476 +0000 +++ b2/build.log 2023-06-09 16:39:39.709773947 +0000 @@ -1,7 +1,6 @@ -W: cgroups are not available on the host, not using them. I: pbuilder: network access will be disabled during build -I: Current time: Fri Jun 9 04:34:53 -12 2023 -I: pbuilder-time-stamp: 1686328493 +I: Current time: Fri Jul 12 12:59:56 +14 2024 +I: pbuilder-time-stamp: 1720738796 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/bookworm-reproducible-base.tgz] I: copying local configuration @@ -17,7 +16,7 @@ I: copying [./ruby-virtus_2.0.0.orig.tar.gz] I: copying [./ruby-virtus_2.0.0-1.debian.tar.xz] I: Extracting source -gpgv: Signature made Tue Dec 13 08:00:35 2022 -12 +gpgv: Signature made Wed Dec 14 10:00:35 2022 +14 gpgv: using RSA key 8ED6C3F8BAC9DB7FC130A870F823A2729883C97C gpgv: issuer "kanashiro@debian.org" gpgv: Can't check signature: No public key @@ -30,134 +29,167 @@ dpkg-source: info: applying 0002-Skip-tests-failing-with-ruby3.1.patch I: using fakeroot in build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/19554/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/2957226/tmp/hooks/D01_modify_environment starting +debug: Running on ionos5-amd64. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Jul 12 13:00 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/2957226/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/2957226/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='amd64' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=15 ' - DISTRIBUTION='bookworm' - HOME='/root' - HOST_ARCH='amd64' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="15" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu") + BASH_VERSION='5.2.15(1)-release' + BUILDDIR=/build + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=amd64 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=16 ' + DIRSTACK=() + DISTRIBUTION=bookworm + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=x86_64 + HOST_ARCH=amd64 IFS=' ' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='19554' - PS1='# ' - PS2='> ' + INVOCATION_ID=ed7377c9f56e4d6c92fcb64ece2eada6 + LANG=C + LANGUAGE=et_EE:et + LC_ALL=C + MACHTYPE=x86_64-pc-linux-gnu + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnu + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=2957226 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.6MP5BHKY/pbuilderrc_GOn9 --distribution bookworm --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bookworm-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.6MP5BHKY/b1 --logfile b1/build.log ruby-virtus_2.0.0-1.dsc' - SUDO_GID='111' - SUDO_UID='106' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/sbin/chroot' - http_proxy='http://78.137.99.97:3128' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.6MP5BHKY/pbuilderrc_hBdo --distribution bookworm --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/bookworm-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.6MP5BHKY/b2 --logfile b2/build.log --extrapackages usrmerge ruby-virtus_2.0.0-1.dsc' + SUDO_GID=110 + SUDO_UID=105 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://85.184.249.68:3128 I: uname -a - Linux ionos11-amd64 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-0.deb11.7-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.20-2~bpo11+1 (2023-04-23) x86_64 GNU/Linux I: ls -l /bin total 5632 - -rwxr-xr-x 1 root root 1265648 Apr 23 09:23 bash - -rwxr-xr-x 3 root root 39224 Sep 18 2022 bunzip2 - -rwxr-xr-x 3 root root 39224 Sep 18 2022 bzcat - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzcmp -> bzdiff - -rwxr-xr-x 1 root root 2225 Sep 18 2022 bzdiff - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzegrep -> bzgrep - -rwxr-xr-x 1 root root 4893 Nov 27 2021 bzexe - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzfgrep -> bzgrep - -rwxr-xr-x 1 root root 3775 Sep 18 2022 bzgrep - -rwxr-xr-x 3 root root 39224 Sep 18 2022 bzip2 - -rwxr-xr-x 1 root root 14568 Sep 18 2022 bzip2recover - lrwxrwxrwx 1 root root 6 Sep 18 2022 bzless -> bzmore - -rwxr-xr-x 1 root root 1297 Sep 18 2022 bzmore - -rwxr-xr-x 1 root root 44016 Sep 20 2022 cat - -rwxr-xr-x 1 root root 68656 Sep 20 2022 chgrp - -rwxr-xr-x 1 root root 64496 Sep 20 2022 chmod - -rwxr-xr-x 1 root root 72752 Sep 20 2022 chown - -rwxr-xr-x 1 root root 151152 Sep 20 2022 cp - -rwxr-xr-x 1 root root 125640 Jan 5 01:20 dash - -rwxr-xr-x 1 root root 121904 Sep 20 2022 date - -rwxr-xr-x 1 root root 89240 Sep 20 2022 dd - -rwxr-xr-x 1 root root 102200 Sep 20 2022 df - -rwxr-xr-x 1 root root 151344 Sep 20 2022 dir - -rwxr-xr-x 1 root root 88656 Mar 22 22:02 dmesg - lrwxrwxrwx 1 root root 8 Dec 19 01:33 dnsdomainname -> hostname - lrwxrwxrwx 1 root root 8 Dec 19 01:33 domainname -> hostname - -rwxr-xr-x 1 root root 43856 Sep 20 2022 echo - -rwxr-xr-x 1 root root 41 Jan 24 02:43 egrep - -rwxr-xr-x 1 root root 35664 Sep 20 2022 false - -rwxr-xr-x 1 root root 41 Jan 24 02:43 fgrep - -rwxr-xr-x 1 root root 85600 Mar 22 22:02 findmnt - -rwsr-xr-x 1 root root 35128 Mar 22 20:35 fusermount - -rwxr-xr-x 1 root root 203152 Jan 24 02:43 grep - -rwxr-xr-x 2 root root 2346 Apr 9 2022 gunzip - -rwxr-xr-x 1 root root 6447 Apr 9 2022 gzexe - -rwxr-xr-x 1 root root 98136 Apr 9 2022 gzip - -rwxr-xr-x 1 root root 22680 Dec 19 01:33 hostname - -rwxr-xr-x 1 root root 72824 Sep 20 2022 ln - -rwxr-xr-x 1 root root 53024 Mar 23 00:40 login - -rwxr-xr-x 1 root root 151344 Sep 20 2022 ls - -rwxr-xr-x 1 root root 207168 Mar 22 22:02 lsblk - -rwxr-xr-x 1 root root 97552 Sep 20 2022 mkdir - -rwxr-xr-x 1 root root 72912 Sep 20 2022 mknod - -rwxr-xr-x 1 root root 43952 Sep 20 2022 mktemp - -rwxr-xr-x 1 root root 59712 Mar 22 22:02 more - -rwsr-xr-x 1 root root 59704 Mar 22 22:02 mount - -rwxr-xr-x 1 root root 18744 Mar 22 22:02 mountpoint - -rwxr-xr-x 1 root root 142968 Sep 20 2022 mv - lrwxrwxrwx 1 root root 8 Dec 19 01:33 nisdomainname -> hostname - lrwxrwxrwx 1 root root 14 Apr 2 18:25 pidof -> /sbin/killall5 - -rwxr-xr-x 1 root root 43952 Sep 20 2022 pwd - lrwxrwxrwx 1 root root 4 Apr 23 09:23 rbash -> bash - -rwxr-xr-x 1 root root 52112 Sep 20 2022 readlink - -rwxr-xr-x 1 root root 72752 Sep 20 2022 rm - -rwxr-xr-x 1 root root 56240 Sep 20 2022 rmdir - -rwxr-xr-x 1 root root 27560 Nov 2 2022 run-parts - -rwxr-xr-x 1 root root 126424 Jan 5 07:55 sed - lrwxrwxrwx 1 root root 4 Jan 5 01:20 sh -> dash - -rwxr-xr-x 1 root root 43888 Sep 20 2022 sleep - -rwxr-xr-x 1 root root 85008 Sep 20 2022 stty - -rwsr-xr-x 1 root root 72000 Mar 22 22:02 su - -rwxr-xr-x 1 root root 39824 Sep 20 2022 sync - -rwxr-xr-x 1 root root 531984 Apr 6 02:25 tar - -rwxr-xr-x 1 root root 14520 Nov 2 2022 tempfile - -rwxr-xr-x 1 root root 109616 Sep 20 2022 touch - -rwxr-xr-x 1 root root 35664 Sep 20 2022 true - -rwxr-xr-x 1 root root 14568 Mar 22 20:35 ulockmgr_server - -rwsr-xr-x 1 root root 35128 Mar 22 22:02 umount - -rwxr-xr-x 1 root root 43888 Sep 20 2022 uname - -rwxr-xr-x 2 root root 2346 Apr 9 2022 uncompress - -rwxr-xr-x 1 root root 151344 Sep 20 2022 vdir - -rwxr-xr-x 1 root root 72024 Mar 22 22:02 wdctl - lrwxrwxrwx 1 root root 8 Dec 19 01:33 ypdomainname -> hostname - -rwxr-xr-x 1 root root 1984 Apr 9 2022 zcat - -rwxr-xr-x 1 root root 1678 Apr 9 2022 zcmp - -rwxr-xr-x 1 root root 6460 Apr 9 2022 zdiff - -rwxr-xr-x 1 root root 29 Apr 9 2022 zegrep - -rwxr-xr-x 1 root root 29 Apr 9 2022 zfgrep - -rwxr-xr-x 1 root root 2081 Apr 9 2022 zforce - -rwxr-xr-x 1 root root 8103 Apr 9 2022 zgrep - -rwxr-xr-x 1 root root 2206 Apr 9 2022 zless - -rwxr-xr-x 1 root root 1842 Apr 9 2022 zmore - -rwxr-xr-x 1 root root 4577 Apr 9 2022 znew -I: user script /srv/workspace/pbuilder/19554/tmp/hooks/D02_print_environment finished + -rwxr-xr-x 1 root root 1265648 Apr 24 2023 bash + -rwxr-xr-x 3 root root 39224 Sep 19 2022 bunzip2 + -rwxr-xr-x 3 root root 39224 Sep 19 2022 bzcat + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzcmp -> bzdiff + -rwxr-xr-x 1 root root 2225 Sep 19 2022 bzdiff + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzegrep -> bzgrep + -rwxr-xr-x 1 root root 4893 Nov 28 2021 bzexe + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzfgrep -> bzgrep + -rwxr-xr-x 1 root root 3775 Sep 19 2022 bzgrep + -rwxr-xr-x 3 root root 39224 Sep 19 2022 bzip2 + -rwxr-xr-x 1 root root 14568 Sep 19 2022 bzip2recover + lrwxrwxrwx 1 root root 6 Sep 19 2022 bzless -> bzmore + -rwxr-xr-x 1 root root 1297 Sep 19 2022 bzmore + -rwxr-xr-x 1 root root 44016 Sep 21 2022 cat + -rwxr-xr-x 1 root root 68656 Sep 21 2022 chgrp + -rwxr-xr-x 1 root root 64496 Sep 21 2022 chmod + -rwxr-xr-x 1 root root 72752 Sep 21 2022 chown + -rwxr-xr-x 1 root root 151152 Sep 21 2022 cp + -rwxr-xr-x 1 root root 125640 Jan 6 2023 dash + -rwxr-xr-x 1 root root 121904 Sep 21 2022 date + -rwxr-xr-x 1 root root 89240 Sep 21 2022 dd + -rwxr-xr-x 1 root root 102200 Sep 21 2022 df + -rwxr-xr-x 1 root root 151344 Sep 21 2022 dir + -rwxr-xr-x 1 root root 88656 Mar 24 2023 dmesg + lrwxrwxrwx 1 root root 8 Dec 20 2022 dnsdomainname -> hostname + lrwxrwxrwx 1 root root 8 Dec 20 2022 domainname -> hostname + -rwxr-xr-x 1 root root 43856 Sep 21 2022 echo + -rwxr-xr-x 1 root root 41 Jan 25 2023 egrep + -rwxr-xr-x 1 root root 35664 Sep 21 2022 false + -rwxr-xr-x 1 root root 41 Jan 25 2023 fgrep + -rwxr-xr-x 1 root root 85600 Mar 24 2023 findmnt + -rwsr-xr-x 1 root root 35128 Mar 23 2023 fusermount + -rwxr-xr-x 1 root root 203152 Jan 25 2023 grep + -rwxr-xr-x 2 root root 2346 Apr 10 2022 gunzip + -rwxr-xr-x 1 root root 6447 Apr 10 2022 gzexe + -rwxr-xr-x 1 root root 98136 Apr 10 2022 gzip + -rwxr-xr-x 1 root root 22680 Dec 20 2022 hostname + -rwxr-xr-x 1 root root 72824 Sep 21 2022 ln + -rwxr-xr-x 1 root root 53024 Mar 24 2023 login + -rwxr-xr-x 1 root root 151344 Sep 21 2022 ls + -rwxr-xr-x 1 root root 207168 Mar 24 2023 lsblk + -rwxr-xr-x 1 root root 97552 Sep 21 2022 mkdir + -rwxr-xr-x 1 root root 72912 Sep 21 2022 mknod + -rwxr-xr-x 1 root root 43952 Sep 21 2022 mktemp + -rwxr-xr-x 1 root root 59712 Mar 24 2023 more + -rwsr-xr-x 1 root root 59704 Mar 24 2023 mount + -rwxr-xr-x 1 root root 18744 Mar 24 2023 mountpoint + -rwxr-xr-x 1 root root 142968 Sep 21 2022 mv + lrwxrwxrwx 1 root root 8 Dec 20 2022 nisdomainname -> hostname + lrwxrwxrwx 1 root root 14 Apr 3 2023 pidof -> /sbin/killall5 + -rwxr-xr-x 1 root root 43952 Sep 21 2022 pwd + lrwxrwxrwx 1 root root 4 Apr 24 2023 rbash -> bash + -rwxr-xr-x 1 root root 52112 Sep 21 2022 readlink + -rwxr-xr-x 1 root root 72752 Sep 21 2022 rm + -rwxr-xr-x 1 root root 56240 Sep 21 2022 rmdir + -rwxr-xr-x 1 root root 27560 Nov 3 2022 run-parts + -rwxr-xr-x 1 root root 126424 Jan 6 2023 sed + lrwxrwxrwx 1 root root 9 Jul 12 13:00 sh -> /bin/bash + -rwxr-xr-x 1 root root 43888 Sep 21 2022 sleep + -rwxr-xr-x 1 root root 85008 Sep 21 2022 stty + -rwsr-xr-x 1 root root 72000 Mar 24 2023 su + -rwxr-xr-x 1 root root 39824 Sep 21 2022 sync + -rwxr-xr-x 1 root root 531984 Apr 7 2023 tar + -rwxr-xr-x 1 root root 14520 Nov 3 2022 tempfile + -rwxr-xr-x 1 root root 109616 Sep 21 2022 touch + -rwxr-xr-x 1 root root 35664 Sep 21 2022 true + -rwxr-xr-x 1 root root 14568 Mar 23 2023 ulockmgr_server + -rwsr-xr-x 1 root root 35128 Mar 24 2023 umount + -rwxr-xr-x 1 root root 43888 Sep 21 2022 uname + -rwxr-xr-x 2 root root 2346 Apr 10 2022 uncompress + -rwxr-xr-x 1 root root 151344 Sep 21 2022 vdir + -rwxr-xr-x 1 root root 72024 Mar 24 2023 wdctl + lrwxrwxrwx 1 root root 8 Dec 20 2022 ypdomainname -> hostname + -rwxr-xr-x 1 root root 1984 Apr 10 2022 zcat + -rwxr-xr-x 1 root root 1678 Apr 10 2022 zcmp + -rwxr-xr-x 1 root root 6460 Apr 10 2022 zdiff + -rwxr-xr-x 1 root root 29 Apr 10 2022 zegrep + -rwxr-xr-x 1 root root 29 Apr 10 2022 zfgrep + -rwxr-xr-x 1 root root 2081 Apr 10 2022 zforce + -rwxr-xr-x 1 root root 8103 Apr 10 2022 zgrep + -rwxr-xr-x 1 root root 2206 Apr 10 2022 zless + -rwxr-xr-x 1 root root 1842 Apr 10 2022 zmore + -rwxr-xr-x 1 root root 4577 Apr 10 2022 znew +I: user script /srv/workspace/pbuilder/2957226/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -353,7 +385,7 @@ Get: 140 http://deb.debian.org/debian bookworm/main amd64 ruby-rspec-expectations all 3.12.0c0e1m1s0-1 [89.5 kB] Get: 141 http://deb.debian.org/debian bookworm/main amd64 ruby-rspec-mocks all 3.12.0c0e1m1s0-1 [79.5 kB] Get: 142 http://deb.debian.org/debian bookworm/main amd64 ruby-rspec all 3.12.0c0e1m1s0-1 [5084 B] -Fetched 46.8 MB in 3s (14.2 MB/s) +Fetched 46.8 MB in 1s (51.5 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libpython3.11-minimal:amd64. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19591 files and directories currently installed.) @@ -947,10 +979,17 @@ Reading package lists... Building dependency tree... Reading state information... +usrmerge is already the newest version (35). fakeroot is already the newest version (1.31-1.2). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. I: Building the package -I: Running cd /build/ruby-virtus-2.0.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../ruby-virtus_2.0.0-1_source.changes +I: user script /srv/workspace/pbuilder/2957226/tmp/hooks/A99_set_merged_usr starting +Re-configuring usrmerge... +removed '/etc/unsupported-skip-usrmerge-conversion' +The system has been successfully converted. +I: user script /srv/workspace/pbuilder/2957226/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/ruby-virtus-2.0.0/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../ruby-virtus_2.0.0-1_source.changes dpkg-buildpackage: info: source package ruby-virtus dpkg-buildpackage: info: source version 2.0.0-1 dpkg-buildpackage: info: source distribution unstable @@ -1036,950 +1075,950 @@ RUBYLIB=/build/ruby-virtus-2.0.0/debian/ruby-virtus/usr/lib/ruby/vendor_ruby:. GEM_PATH=/build/ruby-virtus-2.0.0/debian/ruby-virtus/usr/share/rubygems-integration/all:/build/ruby-virtus-2.0.0/debian/.debhelper/generated/_source/home/.local/share/gem/ruby/3.1.0:/var/lib/gems/3.1.0:/usr/local/lib/ruby/gems/3.1.0:/usr/lib/ruby/gems/3.1.0:/usr/lib/x86_64-linux-gnu/ruby/gems/3.1.0:/usr/share/rubygems-integration/3.1.0:/usr/share/rubygems-integration/all:/usr/lib/x86_64-linux-gnu/rubygems-integration/3.1.0 ruby3.1 -S rake -f debian/ruby-tests.rake /usr/bin/ruby3.1 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.12.0/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.12.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.12.0/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation -Randomized with seed 16577 - -Virtus#freeze - is expected to be frozen - does not change default attributes that have been explicitly set - does not change dynamic default values - #age - is expected to equal 30 - #name - is expected to eql "foo" - -Virtus::AttributeSet#define_writer_method - with public visibility - defines public writer - with protected visibility - defines protected writer - with private visibility - defines private writer - -Virtus::ValueObject - writer visibility - writer methods are set to private - attributes are configured for private writers - attempts to call attribute writer methods raises NameError - equality - #equal? - returns false for different objects with different state - returns false for different objects with the same state - #eql? - returns true for different objects with the same state - returns false for different objects with different state - #== - returns false for different objects with different state - returns true for different objects with the same state - #hash - returns different values for different objects with different state - returns the same value for different objects with the same state - #inspect - includes the class name and attribute values - initialization - sets the attribute values provided to Class.new - -Virtus::Attribute#defined? - when the attribute value has been defined - is expected to equal true - when the attribute value has not been defined - is expected to equal false - -custom attributes - allows you to define coercion methods - allows you to define custom attributes +Randomized with seed 25922 I can extend objects defining attributes on an object -Virtus.module - with another module - provides attributes for the model - behaves like an object extended with virtus module - with default configuration - sets defaults - behaves like a valid virtus object - reads and writes attribute - with coercion turned off - builds non-coercible attributes - behaves like a valid virtus object - reads and writes attribute - with constructor turned off - skips including constructor - behaves like a valid virtus object - reads and writes attribute - with mass assignment is turned off - skips including mass assignment - behaves like a valid virtus object - reads and writes attribute - as a peer to another module within a class - provides attributes for the model from both modules - includes the attributes from both modules - with multiple other modules mixed into it - provides attributes for the model from all modules - includes the attributes from all modules - with a model instance - provides attributes for the instance - behaves like an object extended with virtus module - with default configuration - sets defaults - behaves like a valid virtus object - reads and writes attribute - with mass assignment is turned off - skips including mass assignment - behaves like a valid virtus object - reads and writes attribute - with coercion turned off - builds non-coercible attributes - behaves like a valid virtus object - reads and writes attribute - with constructor turned off - skips including constructor - behaves like a valid virtus object - reads and writes attribute - with a class - defaults to Object for attribute type - provides attributes for the model - behaves like an object extended with virtus module - with mass assignment is turned off - skips including mass assignment - behaves like a valid virtus object - reads and writes attribute - with default configuration - sets defaults - behaves like a valid virtus object - reads and writes attribute - with constructor turned off - skips including constructor - behaves like a valid virtus object - reads and writes attribute - with coercion turned off - builds non-coercible attributes - behaves like a valid virtus object - reads and writes attribute +Virtus::Attribute#required? + when required option is true + is expected to equal true + when required option is false + is expected to equal false -Virtus#attributes - with an instance - behaves like attribute hash - includes all attributes - with a class - behaves like attribute hash - includes all attributes +Virtus::Attribute#coercible? + when :coerce is set to true + is expected to equal true + when :coerce is set to false + is expected to equal false -Virtus::AttributeSet#[]= - with a new attribute - allows #reset to track overridden attributes - allows #[] to access the attribute with a string - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - allows #[] to access the attribute with a symbol - adds an attribute +Virtus::AttributeSet#<< with a duplicate attribute - allows #[] to access the attribute with a string + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> replaces the original attribute object + with a new attribute + indexes the new attribute under the string version of its #name property + adds an attribute + indexes the new attribute under its #name property is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - allows #reset to track overridden attributes - allows #[] to access the attribute with a symbol -Virtus#set_default_attributes! - is expected to equal #<#:0x00007f8f403b7820 @age=30, @name="foo"> +Virtus#freeze + does not change default attributes that have been explicitly set + is expected to be frozen + does not change dynamic default values #age is expected to equal 30 #name is expected to eql "foo" Virtus::Attribute.build - when type is Set - sets default member type - behaves like a valid collection attribute instance - is expected to be frozen - is expected to be an instance of Virtus::Attribute::Collection - when type is Array - sets default member type - behaves like a valid collection attribute instance - is expected to be frozen - is expected to be an instance of Virtus::Attribute::Collection - when type is Set[Float] - sets member type - behaves like a valid collection attribute instance - is expected to be an instance of Virtus::Attribute::Collection - is expected to be frozen - when type is Array[Virtus::Attribute::Boolean] - sets member type - behaves like a valid collection attribute instance - is expected to be frozen - is expected to be an instance of Virtus::Attribute::Collection - when type is Array[String, Integer] - is expected to raise NotImplementedError with "build SumType from list of types ([String, Integer])" - when type is a custom collection instance - sets member type - behaves like a valid collection attribute instance - is expected to be frozen - is expected to be an instance of Virtus::Attribute::Collection - when type is an Enumerable - behaves like a valid collection attribute instance - is expected to be frozen - is expected to be an instance of Virtus::Attribute::Collection - when type is Array subclass - behaves like a valid collection attribute instance - is expected to be frozen - is expected to be an instance of Virtus::Attribute::Collection - when strict mode is used - sets strict mode for member type - when type is Array[Float] - sets member type - behaves like a valid collection attribute instance - is expected to be an instance of Virtus::Attribute::Collection - is expected to be frozen - -Virtus#[] - is expected to eq "foo" - -Virtus::Attribute#coerce - when the input is an empty String - when both nullify_blank and strict are turned on - does not raises an coercion error - when nullify_blank is turned on - returns the ouput if it was coerced - returns nil - when strict mode is turned off - uses coercer to coerce the input value - when strict mode is turned on - raises error when input was not coerced - uses coercer to coerce the input value - when attribute is not required and input is nil - returns nil - when attribute is required and input is nil - returns raises error - -Virtus::AttributeSet#define_reader_method - with protected visibility - defines protected writer - with private visibility - defines public writer - with public visibility - defines public writer - -Using Struct as an embedded value attribute - initialize a struct object with correct attributes - -Virtus::Attribute.coerce - with a value - sets the value and return self - when it is set to true - is expected to equal true - when it is set to false - is expected to equal false - -Virtus::Attribute::Collection#coerce - when input is an array - when member type is a hash with key/value coercion - coerces members - when member type is a primitive - uses coercer to coerce members - when member type is an EV - coerces members - when input is nil - returns nil - -Virtus.new - without attribute hash - sets default values for non-lazy attributes - skips setting default values for lazy attributes - with attribute hash - skips setting attributes with private writers - sets attributes with public writers - -Using required attributes - raises coercion error when required attribute is nil - does not raise coercion error when not required attribute is nil - -Adding attribute called 'attributes' - when mass assignment is disabled - doesn't accept `attributes` key in initializer - allows model to use `attributes` attribute - -embedded values - #attributes returns instances of the embedded values - allows you to pass a hash for the embedded value - -User - is expected to respond to #addresses= - is expected to respond to #phone_numbers= - is expected to respond to #addresses - is expected to respond to #phone_numbers - #phone_numbers - last entry - is expected to be an instance of PhoneNumber - #number - is expected to eql "919-444-3265" - first entry - is expected to be an instance of PhoneNumber - #number - is expected to eql "212-555-1212" - #addresses - is expected to be an instance of Address - #region - is expected to eql "DC" - #postal_code - is expected to eql "21234" - #address - is expected to eql "1234 Any St." - #locality - is expected to eql "Anytown" - -Virtus::Attribute.build - when custom collection-like attribute class exists for a given enumerable primitive - is expected to be an instance of # + when name is passed as a string + #name + is expected to equal :something + when custom attribute class exists for a given primitive + is expected to be an instance of # #type - is expected to be < Axiom::Types::Collection - when options specify lazy accessor - is expected to be lazy + is expected to equal Axiom::Types::Object (BasicObject) + when options specify reader visibility + is expected not to be public reader + is expected to be public writer behaves like a valid attribute instance - is expected to be an instance of Virtus::Attribute is expected to be frozen - when options specify strict mode - is expected to be strict + is expected to be an instance of Virtus::Attribute + when type is a string + #type + is expected to equal Axiom::Types::Integer (Integer) behaves like a valid attribute instance is expected to be an instance of Virtus::Attribute is expected to be frozen - when custom attribute class exists for a given primitive - is expected to be an instance of # + when custom attribute class exists for a given array with member coercion defined + is expected to be an instance of # #type - is expected to equal Axiom::Types::Object (BasicObject) - when name is passed as a string - #name - is expected to equal :something - without options - is expected to be coercible - is expected not to be lazy - is expected to be public reader - sets up a coercer - is expected to be public writer + is expected to be < Axiom::Types::Collection + when options specify nullify blank mode + is expected to be nullify blank behaves like a valid attribute instance + is expected to be an instance of Virtus::Attribute is expected to be frozen + when options specify lazy accessor + is expected to be lazy + behaves like a valid attribute instance is expected to be an instance of Virtus::Attribute + is expected to be frozen when options specify writer visibility is expected to be public reader is expected not to be public writer behaves like a valid attribute instance is expected to be frozen is expected to be an instance of Virtus::Attribute - when type is a symbol of an existing class constant + when options specify strict mode + is expected to be strict behaves like a valid attribute instance - is expected to be an instance of Virtus::Attribute is expected to be frozen + is expected to be an instance of Virtus::Attribute + when custom collection-like attribute class exists for a given enumerable primitive + is expected to be an instance of # #type - is expected to equal Axiom::Types::String (String) + is expected to be < Axiom::Types::Collection when type is a range + behaves like a valid attribute instance + is expected to be an instance of Virtus::Attribute + is expected to be frozen #type is expected to equal Axiom::Types::Object (Enumerable) + when type is an axiom type behaves like a valid attribute instance is expected to be an instance of Virtus::Attribute is expected to be frozen + #type + is expected to equal Axiom::Types::Integer (Integer) when coercion is turned off in options is expected not to be coercible behaves like a valid attribute instance is expected to be an instance of Virtus::Attribute is expected to be frozen - when options specify nullify blank mode - is expected to be nullify blank - behaves like a valid attribute instance - is expected to be frozen - is expected to be an instance of Virtus::Attribute - when options specify reader visibility + without options + is expected to be coercible + sets up a coercer + is expected to be public reader + is expected not to be lazy is expected to be public writer - is expected not to be public reader - behaves like a valid attribute instance - is expected to be an instance of Virtus::Attribute - is expected to be frozen - when type is an axiom type behaves like a valid attribute instance is expected to be an instance of Virtus::Attribute is expected to be frozen + when type is a symbol of an existing class constant #type - is expected to equal Axiom::Types::Integer (Integer) - when custom attribute class exists for a given array with member coercion defined - is expected to be an instance of # - #type - is expected to be < Axiom::Types::Collection - when type is a string - #type - is expected to equal Axiom::Types::Integer (Integer) + is expected to equal Axiom::Types::String (String) behaves like a valid attribute instance - is expected to be an instance of Virtus::Attribute is expected to be frozen + is expected to be an instance of Virtus::Attribute -Virtus::AttributeSet#<< - with a duplicate attribute - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - replaces the original attribute object - with a new attribute - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - indexes the new attribute under the string version of its #name property - adds an attribute - indexes the new attribute under its #name property - -Virtus::AttributeSet#each - with a block - when the parent has no attributes - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - yields the expected attributes - when the parent has attributes that are duplicates - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - yields the expected attributes - when the parent has attributes that are not duplicates - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> and #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - yields the expected attributes - with no block - yields the expected attributes - returns an enumerator when block is not provided - -Virtus#attribute - raises error when :name is a reserved name on a class - returns self - allows :attributes as an attribute name when mass-assignment is not included - raises error when :name is a reserved name on an instance - allows specifying attribute without type - with a module - included in the class - behaves like an object with string attribute - is expected to respond to #test= - can write and read the attribute - is expected to respond to #test - included in the class - adds attributes from the module to a class that includes it - behaves like an object with string attribute - is expected to respond to #test= - is expected to respond to #test - can write and read the attribute - using custom module - is expected to respond to #test= - writes and reads attributes - is expected to respond to #test - with a class - when type is :Boolean - behaves like a class with boolean attribute - defines reader and writer - defines predicate method - with a subclass - behaves like a class with boolean attribute - gets attributes from the parent class - defines reader and writer - defines predicate method - when type is Decimal - maps type to the corresponding axiom type - when type is Boolean - behaves like a class with boolean attribute - defines predicate method - defines reader and writer - when type is Axiom::Types::Boolean - behaves like a class with boolean attribute - defines reader and writer (PENDING: this will be fixed once Attribute::Boolean subclass is gone) - defines predicate method (PENDING: this will be fixed once Attribute::Boolean subclass is gone) - when type is "Boolean" - behaves like a class with boolean attribute - defines predicate method - defines reader and writer - with an instance - behaves like an object with string attribute - is expected to respond to #test= - can write and read the attribute - is expected to respond to #test - -Virtus::Attribute#coercible? - when :coerce is set to false +Virtus::Attribute#value_coerced? + when input is not coerced is expected to equal false - when :coerce is set to true + when input is coerced is expected to equal true -Virtus::Attribute::EmbeddedValue#coerce - when :strict mode is enabled - when input is not coercible - raises error - when input is coercible - is expected to eql # - when primitive is OpenStruct - when input is nil - is expected to equal nil - when input is an attribute hash - is expected to be an instance of OpenStruct - #name - is expected to eql "Piotr" - #age - is expected to eql 30 - when input is a model instance - is expected to equal # - when primitive is Struct - when input is nil - is expected to equal nil - when input is an attribute hash - is expected to be an instance of # - #name - is expected to eql "Piotr" - #age - is expected to eql 30 - when input is a model instance - is expected to equal # +User + is expected to respond to #addresses + is expected to respond to #addresses= + is expected to respond to #phone_numbers + is expected to respond to #phone_numbers= + #phone_numbers + last entry + is expected to be an instance of PhoneNumber + #number + is expected to eql "919-444-3265" + first entry + is expected to be an instance of PhoneNumber + #number + is expected to eql "212-555-1212" + #addresses + is expected to be an instance of Address + #address + is expected to eql "1234 Any St." + #region + is expected to eql "DC" + #locality + is expected to eql "Anytown" + #postal_code + is expected to eql "21234" -virtus attribute definitions - virtus creates accessor methods - Boolean attributes have a predicate method - the constructor accepts a hash for mass-assignment - with attributes - #to_h returns the object's attributes as a hash - #to_hash returns the object's attributes as a hash - #attributes returns the object's attributes as a hash - inheritance - lets you add attributes to the base class at runtime - inherits all the attributes from the base class - lets you add attributes to the subclass at runtime +Virtus::Attribute#set_default_value + with a clonable + #test + is expected to eq [] + #test + is expected not to equal + with a symbol + when it is not a method name + #test + is expected to eq "hello_world" + when it is a method name + when method is public + #test + is expected to eq "hello world" + when method is private + #test + is expected to eq "hello world" + with a callable + #test + is expected to eq "model-test" + with a non-clonable object + #test + is expected to equal true + #instance_variables + is expected to include :@test + with a nil + #instance_variables + is expected to include :@test + #test + is expected to equal nil Virtus#[]= is expected to change `object.test` from nil to "foo" -I can create a Virtus module - including a custom module with coercion disabled - including a custom module with coercion enabled - including a custom module with strict enabled - including a custom module with nullify blank enabled - -Virtus::Attribute#lazy? - when :lazy is set to true - is expected to equal true - when :lazy is set to false +Virtus::Attribute.coerce + when it is set to false is expected to equal false + when it is set to true + is expected to equal true + with a value + sets the value and return self -Virtus::Attribute#set - is expected to equal "Jane Doe" - without coercion - is expected to change `instance.test` to "Jane Doe" - with coercion - is expected to change `instance.test` to "Jane Doe" +embedded values + allows you to pass a hash for the embedded value + #attributes returns instances of the embedded values + +Virtus::AttributeSet#define_reader_method + with protected visibility + defines protected writer + with private visibility + defines public writer + with public visibility + defines public writer + +Virtus::AttributeSet#merge + with a duplicate attribute + replaces the original attribute object + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + with a new attribute + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + adds an attribute + +Virtus::Attribute::Hash.build + when strict mode is used + sets the strict mode for key/value types + when type is Hash[String => Integer] + sets value type + is expected to be an instance of Virtus::Attribute::Hash + sets key type + when type is Hash[Struct.new(:id) => Integer] + is expected to be an instance of Virtus::Attribute::Hash + sets value type + sets key type + when type is Hash + sets default value type + is expected to be an instance of Virtus::Attribute::Hash + sets default key type + when type is Hash[Virtus::Attribute::Hash => Virtus::Attribute::Boolean] + sets value type + sets key type + is expected to be an instance of Virtus::Attribute::Hash + when type is Hash[String => Integer, Integer => String] + is expected to raise ArgumentError with "more than one [key => value] pair in `{String=>Integer, :Integer=>:String}`" + when type is Hash[String => Struct.new(:id)] + sets value type + sets key type + is expected to be an instance of Virtus::Attribute::Hash + +Virtus::Attribute::Hash#coerce + when input is not coercible to hash + is expected to equal "not really a hash" + when input is coercible to hash + is expected to eq {:hello=>"World"} + when input is a hash + when key/value types are primitives + uses coercer to coerce key and value + when key type is an array and value type is another hash + coerces keys and values + when key/value types are EVs + coerces keys and values Virtus::Attribute::Boolean#coerce - when strict is turned on - with a coercible input - is expected to equal true - with a non-coercible input - raises coercion error when strict is turned off with a falsy value is expected to equal false with a truthy value is expected to equal true + when strict is turned on + with a non-coercible input + raises coercion error + with a coercible input + is expected to equal true -Inheritance - inherits model from the base class - sets correct attributes on the descendant classes +Virtus instance level attributes + adding an attribute + allows setting the attribute value on the instance + +custom collection attributes + with an enumerable + behaves like a collection + can be used as Virtus attributes + coerces an empty array + coerces its members + defaults to an empty collection + coerces nil + coerces an array of attribute hashes + with an array subclass + behaves like a collection + defaults to an empty collection + coerces an array of attribute hashes + can be used as Virtus attributes + coerces an empty array + coerces its members + coerces nil Virtus::ValueObject + using deprecated inclusion + behaves like a valid value object + disallows cloning + defines #inspect + allows to construct new values using #with + sets private writers + defines #hash + defines #eql? + defines #== + #id + is expected to equal 1 + #name + is expected to eql "Jane Doe" using new values {} block with mass-assignment + behaves like a valid value object with mass-assignment turned on + disallows mass-assignment + behaves like a valid value object + allows to construct new values using #with + sets private writers + defines #inspect + defines #eql? + defines #== + defines #hash + disallows cloning + #name + is expected to eql "Jane Doe" + #id + is expected to equal 1 with a model subclass behaves like a valid value object + defines #eql? + sets private writers for additional values defines valid #== for a subclass - allows to construct new values using #with defines #inspect - disallows cloning + defines #hash defines #== - defines #eql? sets private writers - sets private writers for additional values - defines #hash - #name - is expected to eql "Jane Doe" + disallows cloning + allows to construct new values using #with #id is expected to equal 1 #email is expected to eql "jane@doe.com" - behaves like a valid value object - defines #== - sets private writers - disallows cloning - defines #hash - allows to construct new values using #with - defines #eql? - defines #inspect - #id - is expected to equal 1 - #name - is expected to eql "Jane Doe" - behaves like a valid value object with mass-assignment turned on - disallows mass-assignment + #name + is expected to eql "Jane Doe" without mass-assignment behaves like a valid value object - defines #hash + allows to construct new values using #with defines #inspect - defines #== disallows cloning - sets private writers defines #eql? - allows to construct new values using #with + defines #== + defines #hash + sets private writers #name is expected to eql "Jane Doe" #id is expected to equal 1 - using deprecated inclusion - behaves like a valid value object - defines #eql? - disallows cloning - sets private writers - allows to construct new values using #with - defines #hash - defines #== - defines #inspect - #id - is expected to equal 1 - #name - is expected to eql "Jane Doe" -I can define attributes within a module - including a module with attributes into a class - including a module with attributes into an instance - -Virtus::Attribute::Hash.build - when type is Hash[String => Integer] - sets key type - sets value type - is expected to be an instance of Virtus::Attribute::Hash - when type is Hash[String => Integer, Integer => String] - is expected to raise ArgumentError with "more than one [key => value] pair in `{String=>Integer, :Integer=>:String}`" - when type is Hash[Struct.new(:id) => Integer] - sets value type - sets key type - is expected to be an instance of Virtus::Attribute::Hash - when type is Hash[String => Struct.new(:id)] - is expected to be an instance of Virtus::Attribute::Hash - sets value type - sets key type - when strict mode is used - sets the strict mode for key/value types - when type is Hash[Virtus::Attribute::Hash => Virtus::Attribute::Boolean] - is expected to be an instance of Virtus::Attribute::Hash - sets key type - sets value type - when type is Hash - sets default value type - sets default key type - is expected to be an instance of Virtus::Attribute::Hash +Virtus::Attribute#coerce + when strict mode is turned on + raises error when input was not coerced + uses coercer to coerce the input value + when attribute is not required and input is nil + returns nil + when attribute is required and input is nil + returns raises error + when strict mode is turned off + uses coercer to coerce the input value + when the input is an empty String + when both nullify_blank and strict are turned on + does not raises an coercion error + when nullify_blank is turned on + returns the ouput if it was coerced + returns nil -Virtus instance level attributes - adding an attribute - allows setting the attribute value on the instance +default values + without a default the value is nil + can be supplied with the :default option + you can reset attribute to its default + you can pass a 'callable-object' to the :default option + you can set defaults for private attributes + a Set + without a default the value is an empty Set + an Array + without a default the value is an empty Array + a Hash + without a default the value is an empty Hash + a ValueObject + does not duplicate the ValueObject -Virtus::Attribute#required? - when required option is false - is expected to equal false - when required option is true +Virtus::Attribute#lazy? + when :lazy is set to true is expected to equal true + when :lazy is set to false + is expected to equal false -Virtus::AttributeSet#reset - when the parent has no attributes - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - #to_set - is expected to eq #:public, :strict=>...lue value=nil>, :coercer=>#}>}> - when the parent has changed - includes changes from the parent - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> and #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - when the parent has attributes that are duplicates - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - #to_set - is expected to eq #:public, :strict=>...lue value=nil>, :coercer=>#}>}> - when the parent is nil - includes changes from the parent - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - when the parent has attributes that are not duplicates - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> and #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - #to_set - is expected to eq #:public, :strict=>...lue value=nil>, :coercer=>#}>}> +Virtus::AttributeSet#[] + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + allows indexed access to attributes by the string representation of their name + +I can define attributes within a module + including a module with attributes into an instance + including a module with attributes into a class Virtus.finalize it finalizes value type for a hash attribute - automatically resolves constant when it is already available - sets attributes that don't require finalization it finalizes key type for a hash attribute + automatically resolves constant when it is already available it finalizes type for an EV attribute it finalizes member type for a collection attribute + sets attributes that don't require finalization -Virtus::Attribute#value_coerced? - when input is coerced - is expected to equal true - when input is not coerced - is expected to equal false +Adding attribute called 'attributes' + when mass assignment is disabled + allows model to use `attributes` attribute + doesn't accept `attributes` key in initializer + +Using required attributes + raises coercion error when required attribute is nil + does not raise coercion error when not required attribute is nil + +Virtus::Attribute::EmbeddedValue.build + when type is a Virtus.model + is expected to be frozen + is expected to be an instance of Virtus::Attribute::EmbeddedValue + #coercer + is expected to be an instance of Virtus::Attribute::EmbeddedValue::FromOpenStruct + when type is an OpenStruct subclass + is expected to be frozen + is expected to be an instance of Virtus::Attribute::EmbeddedValue + #coercer + is expected to be an instance of Virtus::Attribute::EmbeddedValue::FromOpenStruct + when type is Struct + is expected to be frozen + is expected to be an instance of Virtus::Attribute::EmbeddedValue + #coercer + is expected to be an instance of Virtus::Attribute::EmbeddedValue::FromStruct + when type is OpenStruct + is expected to be an instance of Virtus::Attribute::EmbeddedValue + is expected to be frozen + #coercer + is expected to be an instance of Virtus::Attribute::EmbeddedValue::FromOpenStruct + when type includes Virtus + is expected to be an instance of Virtus::Attribute::EmbeddedValue + is expected to be frozen + #coercer + is expected to be an instance of Virtus::Attribute::EmbeddedValue::FromOpenStruct + +Virtus#set_default_attributes! + is expected to equal #<#:0x00007f9c0f4e1558 @age=30, @name="foo"> + #age + is expected to equal 30 + #name + is expected to eql "foo" + +Virtus.new + with attribute hash + skips setting attributes with private writers + sets attributes with public writers + without attribute hash + skips setting default values for lazy attributes + sets default values for non-lazy attributes + +Virtus::Attribute.build + when type is an Enumerable + behaves like a valid collection attribute instance + is expected to be an instance of Virtus::Attribute::Collection + is expected to be frozen + when type is Array subclass + behaves like a valid collection attribute instance + is expected to be an instance of Virtus::Attribute::Collection + is expected to be frozen + when type is Set[Float] + sets member type + behaves like a valid collection attribute instance + is expected to be frozen + is expected to be an instance of Virtus::Attribute::Collection + when type is Set + sets default member type + behaves like a valid collection attribute instance + is expected to be an instance of Virtus::Attribute::Collection + is expected to be frozen + when type is Array[Float] + sets member type + behaves like a valid collection attribute instance + is expected to be frozen + is expected to be an instance of Virtus::Attribute::Collection + when type is a custom collection instance + sets member type + behaves like a valid collection attribute instance + is expected to be frozen + is expected to be an instance of Virtus::Attribute::Collection + when type is Array[String, Integer] + is expected to raise NotImplementedError with "build SumType from list of types ([String, Integer])" + when strict mode is used + sets strict mode for member type + when type is Array + sets default member type + behaves like a valid collection attribute instance + is expected to be frozen + is expected to be an instance of Virtus::Attribute::Collection + when type is Array[Virtus::Attribute::Boolean] + sets member type + behaves like a valid collection attribute instance + is expected to be an instance of Virtus::Attribute::Collection + is expected to be frozen + +Virtus::AttributeSet#each + with a block + when the parent has no attributes + yields the expected attributes + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + when the parent has attributes that are duplicates + yields the expected attributes + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + when the parent has attributes that are not duplicates + yields the expected attributes + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> and #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + with no block + yields the expected attributes + returns an enumerator when block is not provided + +Virtus#[] + is expected to eq "foo" + +Virtus.module + with a class + defaults to Object for attribute type + provides attributes for the model + behaves like an object extended with virtus module + with constructor turned off + skips including constructor + behaves like a valid virtus object + reads and writes attribute + with default configuration + sets defaults + behaves like a valid virtus object + reads and writes attribute + with coercion turned off + builds non-coercible attributes + behaves like a valid virtus object + reads and writes attribute + with mass assignment is turned off + skips including mass assignment + behaves like a valid virtus object + reads and writes attribute + with another module + provides attributes for the model + behaves like an object extended with virtus module + with default configuration + sets defaults + behaves like a valid virtus object + reads and writes attribute + with mass assignment is turned off + skips including mass assignment + behaves like a valid virtus object + reads and writes attribute + with constructor turned off + skips including constructor + behaves like a valid virtus object + reads and writes attribute + with coercion turned off + builds non-coercible attributes + behaves like a valid virtus object + reads and writes attribute + with a model instance + provides attributes for the instance + behaves like an object extended with virtus module + with coercion turned off + builds non-coercible attributes + behaves like a valid virtus object + reads and writes attribute + with constructor turned off + skips including constructor + behaves like a valid virtus object + reads and writes attribute + with mass assignment is turned off + skips including mass assignment + behaves like a valid virtus object + reads and writes attribute + with default configuration + sets defaults + behaves like a valid virtus object + reads and writes attribute + with multiple other modules mixed into it + includes the attributes from all modules + provides attributes for the model from all modules + as a peer to another module within a class + includes the attributes from both modules + provides attributes for the model from both modules + +Virtus::ValueObject + #inspect + includes the class name and attribute values + initialization + sets the attribute values provided to Class.new + equality + #equal? + returns false for different objects with different state + returns false for different objects with the same state + #eql? + returns false for different objects with different state + returns true for different objects with the same state + #== + returns false for different objects with different state + returns true for different objects with the same state + #hash + returns different values for different objects with different state + returns the same value for different objects with the same state + writer visibility + attempts to call attribute writer methods raises NameError + writer methods are set to private + attributes are configured for private writers + +Virtus::Attribute::Collection#coerce + when input is nil + returns nil + when input is an array + when member type is an EV + coerces members + when member type is a primitive + uses coercer to coerce members + when member type is a hash with key/value coercion + coerces members + +Virtus.config + provides global configuration Package - #meta_info - should be coerced to [String => String] format - has 2 keys - is expected to have key "to" - is expected to have key "from" #dimensions + is expected to have key :length is expected to have key :width - should be coerced to [Symbol => Float] format is expected to have key :height + should be coerced to [Symbol => Float] format has 3 keys - is expected to have key :length - -Virtus::Attribute#== (defined by including Virtus::Equalizer) - returns false when attributes have different options - returns true when attributes have same type and options - returns false when attributes have different type + #meta_info + should be coerced to [String => String] format + has 2 keys + is expected to have key "from" + is expected to have key "to" -Virtus::Attribute#get - with :lazy is set to true - is expected to eql "Jane Doe" - sets default only on first access - with :lazy is set to false - is expected to equal "Jane Doe" +Virtus#attributes= + with a class + raises when attributes is not hash-like object (PENDING: Temporarily skipped with xit) + behaves like mass-assignment + allows writing known attributes + skips writing unknown attributes + with an instance + behaves like mass-assignment + skips writing unknown attributes + allows writing known attributes Virtus.model - when mass-assignment is disabled - with a class - is expected not to respond to #attributes - is expected not to respond to #attributes= - with an instance - is expected not to respond to #attributes - is expected not to respond to #attributes= when :required is set - with an instance - has attributes with strict set to true with a class has attributes with :required option inherited from module + with an instance + has attributes with strict set to true with default configuration with a class defaults to Object for attribute type behaves like a model with strict mode turned off has attributes with strict set to false - behaves like a model with constructor - accepts attribute hash with a sub-class has its own attributes + behaves like a model with mass-assignment + accepts attribute hash behaves like a model with strict mode turned off has attributes with strict set to false behaves like a model with constructor accepts attribute hash - behaves like a model with mass-assignment - accepts attribute hash behaves like a model with mass-assignment accepts attribute hash + behaves like a model with constructor + accepts attribute hash with an instance behaves like a model with strict mode turned off has attributes with strict set to false behaves like a model with mass-assignment accepts attribute hash + when constructor is disabled + does not accept attribute hash in the constructor + when mass-assignment is disabled + with a class + is expected not to respond to #attributes= + is expected not to respond to #attributes + with an instance + is expected not to respond to #attributes= + is expected not to respond to #attributes when strict mode is enabled with a class has attributes with strict set to true with an instance has attributes with strict set to true - when constructor is disabled - does not accept attribute hash in the constructor -Virtus::Attribute::Collection custom subclass - when primitive is not set on the attribute subclass - #primitive - is expected to equal # - when primitive is set on the attribute subclass - #primitive - is expected to equal # +Virtus::Attribute::EmbeddedValue#coerce + when primitive is Struct + when input is a model instance + is expected to equal # + when input is an attribute hash + is expected to be an instance of # + #age + is expected to eql 30 + #name + is expected to eql "Piotr" + when input is nil + is expected to equal nil + when primitive is OpenStruct + when input is a model instance + is expected to equal # + when input is an attribute hash + is expected to be an instance of OpenStruct + #name + is expected to eql "Piotr" + #age + is expected to eql 30 + when input is nil + is expected to equal nil + when :strict mode is enabled + when input is coercible + is expected to eql # + when input is not coercible + raises error -Virtus#attributes= - with an instance - behaves like mass-assignment - skips writing unknown attributes - allows writing known attributes - with a class - raises when attributes is not hash-like object (PENDING: Temporarily skipped with xit) - behaves like mass-assignment - skips writing unknown attributes - allows writing known attributes +Injectible coercer + accepts an email hash + coerces an embedded string -Virtus::Attribute#set_default_value - with a non-clonable object - #test - is expected to equal true - #instance_variables - is expected to include :@test - with a nil - #instance_variables - is expected to include :@test - #test - is expected to equal nil - with a callable - #test - is expected to eq "model-test" - with a clonable - #test - is expected to eq [] - #test - is expected not to equal - with a symbol - when it is not a method name - #test - is expected to eq "hello_world" - when it is a method name - when method is private - #test - is expected to eq "hello world" - when method is public - #test - is expected to eq "hello world" +I can create a Virtus module + including a custom module with nullify blank enabled + including a custom module with strict enabled + including a custom module with coercion disabled + including a custom module with coercion enabled -Virtus.config - provides global configuration +Inheritance + inherits model from the base class + sets correct attributes on the descendant classes + +Virtus::Attribute::Boolean#value_coerced? + when input is not coerced + is expected to equal false + when input is true + is expected to equal true + when input is false + is expected to equal true + +Virtus::AttributeSet#define_writer_method + with protected visibility + defines protected writer + with private visibility + defines private writer + with public visibility + defines public writer Defining a ValueObject with a custom constructor initialize a value object attribute with correct attributes -default values - you can set defaults for private attributes - can be supplied with the :default option - you can pass a 'callable-object' to the :default option - without a default the value is nil - you can reset attribute to its default - a Set - without a default the value is an empty Set - a Hash - without a default the value is an empty Hash - an Array - without a default the value is an empty Array - a ValueObject - does not duplicate the ValueObject +Using Struct as an embedded value attribute + initialize a struct object with correct attributes -Virtus::Attribute::Collection#value_coerced? - when input has correctly typed members - is expected to equal true - when input has incorrectly typed members - is expected to equal false - when the input is empty - is expected to equal true - when the collection type is incorrect - is expected to equal false +Virtus#attribute + allows specifying attribute without type + raises error when :name is a reserved name on a class + allows :attributes as an attribute name when mass-assignment is not included + returns self + raises error when :name is a reserved name on an instance + with a module + included in the class + adds attributes from the module to a class that includes it + behaves like an object with string attribute + can write and read the attribute + is expected to respond to #test + is expected to respond to #test= + included in the class + behaves like an object with string attribute + is expected to respond to #test + is expected to respond to #test= + can write and read the attribute + with an instance + behaves like an object with string attribute + is expected to respond to #test + is expected to respond to #test= + can write and read the attribute + using custom module + writes and reads attributes + is expected to respond to #test= + is expected to respond to #test + with a class + when type is Decimal + maps type to the corresponding axiom type + when type is "Boolean" + behaves like a class with boolean attribute + defines reader and writer + defines predicate method + when type is :Boolean + with a subclass + behaves like a class with boolean attribute + gets attributes from the parent class + defines predicate method + defines reader and writer + behaves like a class with boolean attribute + defines reader and writer + defines predicate method + when type is Axiom::Types::Boolean + behaves like a class with boolean attribute + defines predicate method (PENDING: this will be fixed once Attribute::Boolean subclass is gone) + defines reader and writer (PENDING: this will be fixed once Attribute::Boolean subclass is gone) + when type is Boolean + behaves like a class with boolean attribute + defines reader and writer + defines predicate method -custom collection attributes - with an array subclass - behaves like a collection - coerces an empty array - coerces an array of attribute hashes - defaults to an empty collection - coerces its members - coerces nil - can be used as Virtus attributes - with an enumerable - behaves like a collection - coerces an array of attribute hashes - can be used as Virtus attributes - defaults to an empty collection - coerces nil - coerces its members - coerces an empty array +Virtus::Attribute#set + is expected to equal "Jane Doe" + with coercion + is expected to change `instance.test` to "Jane Doe" + without coercion + is expected to change `instance.test` to "Jane Doe" -Injectible coercer - accepts an email hash - coerces an embedded string +Virtus::Attribute#get + with :lazy is set to false + is expected to equal "Jane Doe" + with :lazy is set to true + is expected to eql "Jane Doe" + sets default only on first access -Virtus::AttributeSet#merge - with a new attribute - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - adds an attribute +Virtus::AttributeSet#[]= with a duplicate attribute + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + allows #reset to track overridden attributes + allows #[] to access the attribute with a symbol + allows #[] to access the attribute with a string replaces the original attribute object + with a new attribute + allows #[] to access the attribute with a symbol + adds an attribute + allows #[] to access the attribute with a string + allows #reset to track overridden attributes is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> -Virtus::AttributeSet#[] - is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> - allows indexed access to attributes by the string representation of their name - -Virtus::Attribute#rename - is expected not to equal #:public, :strict=>true, :r...Value value=nil>, :coercer=>#}> - is expected to be strict - #name - is expected to equal :bar - overriding virtus behavior - overriding an attribute getter - calls the defined getter - super can be used to access the getter defined by virtus overriding an attribute setter super can be used to access the setter defined by virtus calls the defined setter + overriding an attribute getter + super can be used to access the getter defined by virtus + calls the defined getter -Virtus::Attribute::Hash#coerce - when input is not coercible to hash - is expected to equal "not really a hash" - when input is a hash - when key/value types are EVs - coerces keys and values - when key/value types are primitives - uses coercer to coerce key and value - when key type is an array and value type is another hash - coerces keys and values - when input is coercible to hash - is expected to eq {:hello=>"World"} +Virtus#attributes + with a class + behaves like attribute hash + includes all attributes + with an instance + behaves like attribute hash + includes all attributes -Virtus::Attribute::Boolean#value_coerced? - when input is false +custom attributes + allows you to define custom attributes + allows you to define coercion methods + +Virtus::Attribute::Collection custom subclass + when primitive is not set on the attribute subclass + #primitive + is expected to equal # + when primitive is set on the attribute subclass + #primitive + is expected to equal # + +virtus attribute definitions + Boolean attributes have a predicate method + virtus creates accessor methods + the constructor accepts a hash for mass-assignment + with attributes + #attributes returns the object's attributes as a hash + #to_hash returns the object's attributes as a hash + #to_h returns the object's attributes as a hash + inheritance + lets you add attributes to the base class at runtime + lets you add attributes to the subclass at runtime + inherits all the attributes from the base class + +Virtus::Attribute::Collection#value_coerced? + when input has incorrectly typed members + is expected to equal false + when the collection type is incorrect + is expected to equal false + when input has correctly typed members is expected to equal true - when input is true + when the input is empty is expected to equal true - when input is not coerced + +Virtus::Attribute#== (defined by including Virtus::Equalizer) + returns false when attributes have different options + returns true when attributes have same type and options + returns false when attributes have different type + +Virtus::Attribute#defined? + when the attribute value has not been defined is expected to equal false + when the attribute value has been defined + is expected to equal true mass assignment with accessors - works uppon instantiation can be set with #attributes= respects accessor visibility + works uppon instantiation -Virtus::Attribute::EmbeddedValue.build - when type is an OpenStruct subclass - is expected to be frozen - is expected to be an instance of Virtus::Attribute::EmbeddedValue - #coercer - is expected to be an instance of Virtus::Attribute::EmbeddedValue::FromOpenStruct - when type is a Virtus.model - is expected to be an instance of Virtus::Attribute::EmbeddedValue - is expected to be frozen - #coercer - is expected to be an instance of Virtus::Attribute::EmbeddedValue::FromOpenStruct - when type is Struct - is expected to be frozen - is expected to be an instance of Virtus::Attribute::EmbeddedValue - #coercer - is expected to be an instance of Virtus::Attribute::EmbeddedValue::FromStruct - when type includes Virtus - is expected to be frozen - is expected to be an instance of Virtus::Attribute::EmbeddedValue - #coercer - is expected to be an instance of Virtus::Attribute::EmbeddedValue::FromOpenStruct - when type is OpenStruct - is expected to be an instance of Virtus::Attribute::EmbeddedValue - is expected to be frozen - #coercer - is expected to be an instance of Virtus::Attribute::EmbeddedValue::FromOpenStruct +Virtus::Attribute#rename + is expected not to equal #:public, :strict=>true, :r...Value value=nil>, :coercer=>#}> + is expected to be strict + #name + is expected to equal :bar + +Virtus::AttributeSet#reset + when the parent is nil + includes changes from the parent + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + when the parent has changed + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> and #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + includes changes from the parent + when the parent has no attributes + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + #to_set + is expected to eq #:public, :strict=>...lue value=nil>, :coercer=>#}>}> + when the parent has attributes that are duplicates + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + #to_set + is expected to eq #:public, :strict=>...lue value=nil>, :coercer=>#}>}> + when the parent has attributes that are not duplicates + is expected to equal #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> and #:public, :strict=>false, :...Value value=nil>, :coercer=>#}> + #to_set + is expected to eq #:public, :strict=>...lue value=nil>, :coercer=>#}>}> Pending: (Failures listed here are expected and do not affect your suite's status) - 1) Virtus#attribute with a class when type is Axiom::Types::Boolean behaves like a class with boolean attribute defines reader and writer - # this will be fixed once Attribute::Boolean subclass is gone - Failure/Error: expect(object).to be_test - expected # to respond to `test?` - Shared Example Group: "a class with boolean attribute" called from ./spec/unit/virtus/attribute_spec.rb:112 - # ./spec/unit/virtus/attribute_spec.rb:15:in `block (3 levels) in ' + 1) Virtus#attributes= with a class raises when attributes is not hash-like object + # Temporarily skipped with xit + # ./spec/unit/virtus/attributes_writer_spec.rb:32 2) Virtus#attribute with a class when type is Axiom::Types::Boolean behaves like a class with boolean attribute defines predicate method # this will be fixed once Attribute::Boolean subclass is gone Failure/Error: expect(object).to_not be_test - expected # to respond to `test?` + expected # to respond to `test?` Shared Example Group: "a class with boolean attribute" called from ./spec/unit/virtus/attribute_spec.rb:112 # ./spec/unit/virtus/attribute_spec.rb:21:in `block (3 levels) in ' - 3) Virtus#attributes= with a class raises when attributes is not hash-like object - # Temporarily skipped with xit - # ./spec/unit/virtus/attributes_writer_spec.rb:32 + 3) Virtus#attribute with a class when type is Axiom::Types::Boolean behaves like a class with boolean attribute defines reader and writer + # this will be fixed once Attribute::Boolean subclass is gone + Failure/Error: expect(object).to be_test + expected # to respond to `test?` + Shared Example Group: "a class with boolean attribute" called from ./spec/unit/virtus/attribute_spec.rb:112 + # ./spec/unit/virtus/attribute_spec.rb:15:in `block (3 levels) in ' -Finished in 2.31 seconds (files took 1.72 seconds to load) +Finished in 1.24 seconds (files took 0.93664 seconds to load) 468 examples, 0 failures, 3 pending -Randomized with seed 16577 +Randomized with seed 25922 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -2011,12 +2050,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: including full source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/2957226/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/2957226/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/19554 and its subdirectories -I: Current time: Fri Jun 9 04:36:33 -12 2023 -I: pbuilder-time-stamp: 1686328593 +I: removing directory /srv/workspace/pbuilder/2957226 and its subdirectories +I: Current time: Fri Jul 12 13:02:59 +14 2024 +I: pbuilder-time-stamp: 1720738979