Diff of the two buildlogs: -- --- b1/build.log 2024-12-12 05:11:33.733748032 +0000 +++ b2/build.log 2024-12-12 05:12:08.532163856 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Wed Dec 11 17:07:39 -12 2024 -I: pbuilder-time-stamp: 1733980059 +I: Current time: Thu Jan 15 01:34:34 +14 2026 +I: pbuilder-time-stamp: 1768390474 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration @@ -26,54 +26,86 @@ dpkg-source: info: unpacking ruby-necromancer_0.7.0-1.debian.tar.xz I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/56096/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/11278/tmp/hooks/D01_modify_environment starting +debug: Running on ionos6-i386. +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 Jan 14 11:34 /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/11278/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/11278/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='i386' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=11 ' - DISTRIBUTION='unstable' - HOME='/root' - HOST_ARCH='i386' + 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]="37" [3]="1" [4]="release" [5]="i686-pc-linux-gnu") + BASH_VERSION='5.2.37(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=i386 + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=21 ' + DIRSTACK=() + DISTRIBUTION=unstable + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=i686 + HOST_ARCH=i386 IFS=' ' - INVOCATION_ID='87cb14b20d1f49db8f041fed7541e1fe' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - LD_LIBRARY_PATH='/usr/lib/libeatmydata' - LD_PRELOAD='libeatmydata.so' - 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='56096' - PS1='# ' - PS2='> ' + INVOCATION_ID=2ced1d80308a4edc82c7bba6325a995f + LANG=C + LANGUAGE=de_CH:de + LC_ALL=C + LD_LIBRARY_PATH=/usr/lib/libeatmydata + LD_PRELOAD=libeatmydata.so + MACHTYPE=i686-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=11278 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.IaZx22v7/pbuilderrc_cIGO --distribution unstable --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.IaZx22v7/b1 --logfile b1/build.log ruby-necromancer_0.7.0-1.dsc' - SUDO_GID='112' - SUDO_UID='107' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://46.16.76.132: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.IaZx22v7/pbuilderrc_UV2r --distribution unstable --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.IaZx22v7/b2 --logfile b2/build.log ruby-necromancer_0.7.0-1.dsc' + SUDO_GID=112 + SUDO_UID=107 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://213.165.73.152:3128 I: uname -a - Linux ionos2-i386 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Nov 22 14:40 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/56096/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Nov 22 2024 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/11278/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -250,7 +282,7 @@ Get: 133 http://deb.debian.org/debian unstable/main i386 ruby-rspec-expectations all 3.13.0c0e0m0s1-2 [90.2 kB] Get: 134 http://deb.debian.org/debian unstable/main i386 ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.3 kB] Get: 135 http://deb.debian.org/debian unstable/main i386 ruby-rspec all 3.13.0c0e0m0s1-2 [5184 B] -Fetched 44.8 MB in 5s (8574 kB/s) +Fetched 44.8 MB in 1s (70.5 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libpython3.12-minimal:i386. (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 ... 19952 files and directories currently installed.) @@ -705,8 +737,8 @@ Setting up tzdata (2024b-4) ... Current default time zone: 'Etc/UTC' -Local time is now: Thu Dec 12 05:09:48 UTC 2024. -Universal Time is now: Thu Dec 12 05:09:48 UTC 2024. +Local time is now: Wed Jan 14 11:34:54 UTC 2026. +Universal Time is now: Wed Jan 14 11:34:54 UTC 2026. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up autotools-dev (20220109.1) ... @@ -826,7 +858,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/ruby-necromancer-0.7.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-necromancer_0.7.0-1_source.changes +I: user script /srv/workspace/pbuilder/11278/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for unstable +I: user script /srv/workspace/pbuilder/11278/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/ruby-necromancer-0.7.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-necromancer_0.7.0-1_source.changes dpkg-buildpackage: info: source package ruby-necromancer dpkg-buildpackage: info: source version 0.7.0-1 dpkg-buildpackage: info: source distribution unstable @@ -859,7 +895,7 @@ │ ruby-necromancer: Installing files and building extensions for ruby3.1 │ └──────────────────────────────────────────────────────────────────────────────┘ -/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20241211-9682-uftgo1/gemspec +/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20260115-15978-vbxu02/gemspec Failed to load /dev/null because it doesn't contain valid YAML hash WARNING: description and summary are identical WARNING: open-ended dependency on rake (>= 0, development) is not recommended @@ -872,7 +908,7 @@ Name: necromancer Version: 0.7.0 File: necromancer-0.7.0.gem -/usr/bin/ruby3.1 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-necromancer/usr/share/rubygems-integration/all /tmp/d20241211-9682-uftgo1/necromancer-0.7.0.gem +/usr/bin/ruby3.1 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-necromancer/usr/share/rubygems-integration/all /tmp/d20260115-15978-vbxu02/necromancer-0.7.0.gem Failed to load /dev/null because it doesn't contain valid YAML hash /build/reproducible-path/ruby-necromancer-0.7.0/debian/ruby-necromancer/usr/share/rubygems-integration/all/gems/necromancer-0.7.0/lib/necromancer.rb /build/reproducible-path/ruby-necromancer-0.7.0/debian/ruby-necromancer/usr/share/rubygems-integration/all/gems/necromancer-0.7.0/lib/necromancer/configuration.rb @@ -919,348 +955,348 @@ RUBYLIB=. GEM_PATH=/build/reproducible-path/ruby-necromancer-0.7.0/debian/ruby-necromancer/usr/share/rubygems-integration/all:/build/reproducible-path/ruby-necromancer-0.7.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/i386-linux-gnu/ruby/gems/3.1.0:/usr/share/rubygems-integration/3.1.0:/usr/share/rubygems-integration/all:/usr/lib/i386-linux-gnu/rubygems-integration/3.1.0 ruby3.1 -S rake --rakelibdir /gem2deb-nonexistent -f debian/ruby-tests.rake /usr/bin/ruby3.1 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec --pattern ./spec/\*\*/\*_spec.rb --format documentation -Randomized with seed 30584 +Randomized with seed 9920 + +Necromancer.convert + allows to specify class as conversion target + allows to specify object as conversion target + allows replacing #to with #>> call + indicates inability to perform the requested conversion + allows for module level convert call + when numeric + converts string to float + allows for block for conversion method + doesn't raise error when in non-strict mode + converts string to integer + converts string to numeric + allows for null type conversion + convers integer to string + raises error when in strict mode + when datetime + converts string to datetime + converts string to time + converts string to date + when boolean + converts integer to boolean + converts boolean to integer + converts string to boolean + converts boolean to boolean + when range + converts string to range + when array + converts array to numerics + converts object to array + fails to convert in strict mode + converts string to array of integers + converts string to array of numerics + converts string to array of booleans + converts string to array + converts array to array of booleans + when hash + converts string to bool hash + converts string to hash + converts string to integer hash + converts string to numeric hash + converts hash to hash + converts string to float hash + converts string to boolean hash Necromancer::Configuration.new + is expected to respond to #strict= allows to set copy mode through method - is in copy mode by default is in non-strict mode by default - is expected to respond to #copy= + is in copy mode by default allows to set strict through method - is expected to respond to #strict= + is expected to respond to #copy= -Necromancer::BooleanConverters#call - :boolean -> :integer - converts true to 1 - converts "unknown" to "unknown" - converts false to 0 - fails to convert in strict mode - :string -> :boolean - converts 'off' to false value - converts 'T' to true value - converts 'YES' to true value - converts 'OFF' to false value - converts 'N' to false value - converts 'f' to false value - converts 'yes' to true value - converts 'n' to false value - converts 'FALSE' to false value - raises error for empty string strict mode - fails to convert unkonwn value FOO - converts 't' to true value - converts 'ON' to true value - converts '0' to false value - converts 'F' to false value - converts 'NO' to false value - converts 'true' to true value - converts 'TRUE' to true value - converts 'No' to false value - converts 'no' to false value - converts 'on' to true value - converts 'false' to false value - converts 'y' to true value - passes through boolean value - converts '1' to true value - converts 'Y' to true value - :integer -> :boolean - converts 1 to true - fails to convert in strict mode - converts 0 to false - converts "unknown" to "unknown" +Necromancer::Conversions#to_hash + exports default conversions to hash + +Necromancer::HashConverters#call + :string -> :hash + converts "a= & b=2" to {:a=>"", :b=>"2"} + converts "a=1 & b=2 & a=3" to {:a=>["1", "3"], :b=>"2"} + converts "a:1 b:2 a:3" to {:a=>["1", "3"], :b=>"2"} + converts "a=1" to {:a=>"1"} + converts "a:1 b:2" to {:a=>"1", :b=>"2"} + converts "a=1&b=2" to {:a=>"1", :b=>"2"} + :string -> :int_hash + converts "a:1 b:2 c:3" to {:a=>1, :b=>2, :c=>3} + fails to convert '1.2o' value in strict mode + converts "a=1 & b=2 & a=3" to {:a=>[1, 3], :b=>2} + :string -> :numeric_hash + converts "a=1 & b=2.0 & a=3.0" to {:a=>[1, 3.0], :b=>2.0} + converts "a:1 b:2.0 c:3.0" to {:a=>1, :b=>2.0, :c=>3.0} + fails to convert '1.2o' value in strict mode + :string -> :bool_hash + converts "a:yes b:no c:t" to {:a=>true, :b=>false, :c=>true} + converts "a=t & b=t & a=f" to {:a=>[true, false], :b=>true} + fails to convert '1.2o' value in strict mode + :string -> :float_hash + fails to convert '1.2o' value in strict mode + converts "a:1 b:2 c:3" to {:a=>1.0, :b=>2.0, :c=>3.0} + converts "a=1 & b=2 & a=3" to {:a=>[1.0, 3.0], :b=>2.0} + +Necromancer config + configures global settings per instance + configures global settings through instance block + +Necromancer.inspect + inspects converter instance + inspects conversion target Necromancer#new creates context -Necromancer.register - allows ro register converter +Necromancer::ArrayConverters#call + :array -> :integers + converts ["1.2", "2.3", "3.4"] to [1, 2, 3] + converts ["1", "2", "3"] to [1, 2, 3] + fails to convert `['1','2.3']` to integer array in strict mode + :string -> :floats + converts "1.2, 2.3, 3.4" to [1.2, 2.3, 3.4] + fails to convert in strict mode + converts "1,2,3" to [1.0, 2.0, 3.0] + :array -> :set + converts `[:x,:y,:x,1,2,1]` to set + fails to convert `1` to set + :string -> :integers/:ints + converts "1.2, 2.3, 3.4" to [1, 2, 3] + fails to convert in strict mode + converts "1,2,3" to [1, 2, 3] + :object -> :array + converts custom object to array + converts nil to array + :array -> :floats + converts ["1.2", "2.3", "3.4"] to [1.2, 2.3, 3.4] + converts ["1", "2", "3"] to [1.0, 2.0, 3.0] + fails to convert `['1','2.3',false]` to float array in strict mode + :array -> :booleans/:bools + converts ["t", "f", "yes", "no"] to [true, false, true, false] + fails to convert `['t', 'no', 5]` to boolean array in strict mode + converts ["t", "no", "5"] to [true, false, "5"] + :array -> :numerics/:nums + converts ["1", "2.3", "false"] to [1, 2.3, "false"] + fails to convert `['1','2.3',false]` to numeric array in strict mode + converts ["1", "2.3", "3.0"] to [1, 2.3, 3.0] + :string -> :array + converts " 1 - 2 - 3 " to [" 1 ", " 2 ", " 3 "] + converts "1-2-3" to ["1", "2", "3"] + converts "" to [] + converts "1 , 2 , 3" to ["1 ", " 2 ", " 3"] + converts "a,b,c" to ["a", "b", "c"] + converts "aa a,b bb,c c c" to ["aa a", "b bb", "c c c"] + converts "1,2,3" to ["1", "2", "3"] + converts "a-b-c" to ["a", "b", "c"] + converts "1.2,2.3,3.4" to ["1.2", "2.3", "3.4"] + converts "123" to ["123"] + fails to convert empty string to array in strict mode + :string -> :booleans + converts "t,f,t" to [true, false, true] + fails to convert in strict mode + converts "yes,no,Y" to [true, false, true] + converts "1-0-FALSE" to [true, false, false] + :string -> :numerics/:nums + converts "1.2, 2.3, 3.4" to [1.2, 2.3, 3.4] + converts "1,2.0,3" to [1, 2.0, 3] + fails to convert in strict mode + +Necromancer::RangeConverters#call + :string -> :range + converts "A , Z" to range type + converts "a" to range type + converts "1 . . 10" to range type + converts "1.0" to range type + converts "a . . . z" to range type + converts "1..10" to range type + converts "1" to range type + converts "1.0..10.0" to range type + converts "a..z" to range type + raises error for empty string in strict mode + converts "1..-10" to range type + converts "-1..10" to range type + converts "1...10" to range type + converts "a-z" to range type + converts "" to range type + converts "1 , 10" to range type + converts "1-10" to range type Necromancer::Conversions.register - allows to register anonymous converter allows to register converter with no target allows to register converter with no source - allows to register anonymous converter with class names - allows to register custom converter + allows to register anonymous converter allows to register converter + allows to register custom converter + allows to register anonymous converter with class names Necromancer::NumericConverters#call - :string -> :integer - converts '1ab' to float value - converts '+1' to float value + :string -> :float + converts ' -1.1 ' to float value + converts '-.1e-1' to float value + converts '1.0e+1' to float value converts '.1e-1' to float value - converts '.1' to float value - converts '1e+1' to float value - converts '' to float value + converts ' 1.0' to float value + converts '1' to float value + converts '-1e1' to float value + converts '1.0' to float value converts '-1' to float value + converts '1e-1' to float value + converts '-.1e+1' to float value + converts '' to float value + converts '1.0e-1' to float value + converts '1e1' to float value raises error for empty string in strict mode - converts ' 1 ' to float value - converts '-1e1' to float value - converts '1' to float value + converts '-1e-1' to float value + converts ' 1. 10 ' to float value + converts '.1' to float value + converts ' -1 . 1' to float value + converts ' .1 ' to float value + converts '-1.0e+1' to float value + fails to convert '1.2a' in strict mode + converts '+1' to float value + converts '1.2a' to float value converts '.1e+1' to float value - converts '+1e-1' to float value - converts '1.0' to float value - converts '1.0e+1' to float value converts '-1.0e-1' to float value - raises error for float in strict mode - raises error for mixed string in strict mode - converts '-.1e+1' to float value + :string -> :integer + converts '-1e1' to float value converts ' -1 ' to float value converts '1.0e-1' to float value + converts '-.1e+1' to float value + converts '-1.0e-1' to float value + converts '1.0e+1' to float value + converts '.1e+1' to float value converts ' 1 00' to float value - converts '-1e-1' to float value + raises error for mixed string in strict mode + raises error for float in strict mode + raises error for empty string in strict mode converts '-.1e-1' to float value + converts '' to float value + converts '1.0' to float value + converts '-1' to float value + converts '1ab' to float value converts '-1.0e+1' to float value + converts '.1e-1' to float value + converts '.1' to float value + converts '1e+1' to float value + converts '-1e-1' to float value + converts '+1' to float value + converts '+1e-1' to float value + converts ' 1 ' to float value + converts '1' to float value :string -> :numeric - converts ' -1 ' to '-1' - converts '-1.0e-1' to '-0.1' + converts '1.0e+1' to '10.0' + converts '+1' to '1' converts '1.0' to '1.0' - converts ' 1. 10 ' to '1.0' - converts '.1' to '0.1' - converts '-1e-1' to '-0.1' + converts ' -1 . 1' to '-1.0' + converts ' 1 00' to '1' converts '-.1e-1' to '-0.01' + converts '.1' to '0.1' + converts '-.1e+1' to '-1.0' converts '-1.0e+1' to '-10.0' + converts '.1e-1' to '0.01' + converts '.1e+1' to '1.0' + converts ' 1 ' to '1' + converts '1.0e-1' to '0.1' + converts '-1' to '-1' converts '' to '0' - converts '1e-1' to '0.1' - converts '1.0e+1' to '10.0' + converts '-1e-1' to '-0.1' + converts ' -1 ' to '-1' + converts ' .1 ' to '0.1' converts '-1e1' to '-10.0' - converts '-.1e+1' to '-1.0' + converts ' -1.1 ' to '-1.1' + converts '1e1' to '10.0' converts '1' to '1' - converts '-1' to '-1' converts ' 1.0' to '1.0' - converts '1.0e-1' to '0.1' - converts ' 1 00' to '1' - converts ' -1 . 1' to '-1.0' - converts '1e1' to '10.0' - converts ' .1 ' to '0.1' - converts '.1e-1' to '0.01' - converts ' -1.1 ' to '-1.1' - converts ' 1 ' to '1' - converts '+1' to '1' - converts '.1e+1' to '1.0' - :string -> :float - converts ' .1 ' to float value - converts '1.0' to float value - converts '-.1e+1' to float value - converts '1.2a' to float value - converts ' -1.1 ' to float value - converts '1.0e+1' to float value - converts '.1e-1' to float value - converts '.1e+1' to float value - converts '-1e1' to float value - converts '-1.0e+1' to float value - fails to convert '1.2a' in strict mode - converts '-1.0e-1' to float value - converts '' to float value - converts '1.0e-1' to float value - converts '-1e-1' to float value - converts ' -1 . 1' to float value - converts '1' to float value - converts ' 1.0' to float value - raises error for empty string in strict mode - converts '.1' to float value - converts ' 1. 10 ' to float value - converts '1e1' to float value - converts '+1' to float value - converts '-1' to float value - converts '1e-1' to float value - converts '-.1e-1' to float value - -Necromancer::Conversions#fetch - fails to find conversion - retrieves conversion given source & target + converts ' 1. 10 ' to '1.0' + converts '1e-1' to '0.1' + converts '-1.0e-1' to '-0.1' Necromancer::DateTimeConverters#call :string -> :time - converts "" to range type - fails to convert in strict mode - converts "01/01/2015 08:35" to range type converts "01/01/2015" to range type + fails to convert in strict mode converts "12:35" to range type - :string -> :datetime - converts "7th December 2014 17:19:44" to range type converts "" to range type + converts "01/01/2015 08:35" to range type + :string -> :date converts "2014-12-07" to range type - converts "7th December 2014" to range type + converts "1-1-2015" to range type fails to convert in strict mode converts "2014/12/07" to range type - :string -> :date + converts "" to range type + :string -> :datetime + converts "7th December 2014 17:19:44" to range type converts "2014/12/07" to range type - fails to convert in strict mode - converts "1-1-2015" to range type converts "2014-12-07" to range type converts "" to range type - -Necromancer.inspect - inspects converter instance - inspects conversion target - -Necromancer.convert - indicates inability to perform the requested conversion - allows to specify object as conversion target - allows to specify class as conversion target - allows replacing #to with #>> call - allows for module level convert call - when datetime - converts string to datetime - converts string to time - converts string to date - when range - converts string to range - when hash - converts string to bool hash - converts string to boolean hash - converts hash to hash - converts string to integer hash - converts string to numeric hash - converts string to hash - converts string to float hash - when array - converts array to numerics - converts string to array of booleans fails to convert in strict mode - converts string to array of integers - converts string to array - converts string to array of numerics - converts object to array - converts array to array of booleans - when numeric - converts string to numeric - allows for block for conversion method - convers integer to string - raises error when in strict mode - doesn't raise error when in non-strict mode - converts string to float - allows for null type conversion - converts string to integer - when boolean - converts boolean to integer - converts integer to boolean - converts boolean to boolean - converts string to boolean - -Necromancer::RangeConverters#call - :string -> :range - converts "a . . . z" to range type - converts "a-z" to range type - converts "1.0..10.0" to range type - converts "a..z" to range type - converts "1" to range type - converts "1-10" to range type - converts "a" to range type - converts "1 . . 10" to range type - converts "1 , 10" to range type - converts "1..10" to range type - converts "1.0" to range type - converts "1..-10" to range type - converts "" to range type - converts "-1..10" to range type - raises error for empty string in strict mode - converts "A , Z" to range type - converts "1...10" to range type - -Necromancer config - configures global settings through instance block - configures global settings per instance - -Necromancer::ArrayConverters#call - :string -> :integers/:ints - converts "1,2,3" to [1, 2, 3] - fails to convert in strict mode - converts "1.2, 2.3, 3.4" to [1, 2, 3] - :string -> :floats - converts "1,2,3" to [1.0, 2.0, 3.0] - converts "1.2, 2.3, 3.4" to [1.2, 2.3, 3.4] - fails to convert in strict mode - :string -> :numerics/:nums - fails to convert in strict mode - converts "1,2.0,3" to [1, 2.0, 3] - converts "1.2, 2.3, 3.4" to [1.2, 2.3, 3.4] - :array -> :numerics/:nums - converts ["1", "2.3", "3.0"] to [1, 2.3, 3.0] - fails to convert `['1','2.3',false]` to numeric array in strict mode - converts ["1", "2.3", "false"] to [1, 2.3, "false"] - :object -> :array - converts nil to array - converts custom object to array - :array -> :set - fails to convert `1` to set - converts `[:x,:y,:x,1,2,1]` to set - :array -> :integers - converts ["1", "2", "3"] to [1, 2, 3] - fails to convert `['1','2.3']` to integer array in strict mode - converts ["1.2", "2.3", "3.4"] to [1, 2, 3] - :array -> :floats - converts ["1.2", "2.3", "3.4"] to [1.2, 2.3, 3.4] - converts ["1", "2", "3"] to [1.0, 2.0, 3.0] - fails to convert `['1','2.3',false]` to float array in strict mode - :string -> :array - converts "aa a,b bb,c c c" to ["aa a", "b bb", "c c c"] - converts "" to [] - converts "1-2-3" to ["1", "2", "3"] - converts "123" to ["123"] - converts "a-b-c" to ["a", "b", "c"] - converts "1.2,2.3,3.4" to ["1.2", "2.3", "3.4"] - fails to convert empty string to array in strict mode - converts " 1 - 2 - 3 " to [" 1 ", " 2 ", " 3 "] - converts "1,2,3" to ["1", "2", "3"] - converts "a,b,c" to ["a", "b", "c"] - converts "1 , 2 , 3" to ["1 ", " 2 ", " 3"] - :array -> :booleans/:bools - fails to convert `['t', 'no', 5]` to boolean array in strict mode - converts ["t", "no", "5"] to [true, false, "5"] - converts ["t", "f", "yes", "no"] to [true, false, true, false] - :string -> :booleans - fails to convert in strict mode - converts "yes,no,Y" to [true, false, true] - converts "t,f,t" to [true, false, true] - converts "1-0-FALSE" to [true, false, false] + converts "7th December 2014" to range type -Necromancer::HashConverters#call - :string -> :int_hash - converts "a=1 & b=2 & a=3" to {:a=>[1, 3], :b=>2} - fails to convert '1.2o' value in strict mode - converts "a:1 b:2 c:3" to {:a=>1, :b=>2, :c=>3} - :string -> :float_hash - converts "a=1 & b=2 & a=3" to {:a=>[1.0, 3.0], :b=>2.0} - fails to convert '1.2o' value in strict mode - converts "a:1 b:2 c:3" to {:a=>1.0, :b=>2.0, :c=>3.0} - :string -> :hash - converts "a=1" to {:a=>"1"} - converts "a=1&b=2" to {:a=>"1", :b=>"2"} - converts "a:1 b:2" to {:a=>"1", :b=>"2"} - converts "a:1 b:2 a:3" to {:a=>["1", "3"], :b=>"2"} - converts "a= & b=2" to {:a=>"", :b=>"2"} - converts "a=1 & b=2 & a=3" to {:a=>["1", "3"], :b=>"2"} - :string -> :numeric_hash - converts "a:1 b:2.0 c:3.0" to {:a=>1, :b=>2.0, :c=>3.0} - converts "a=1 & b=2.0 & a=3.0" to {:a=>[1, 3.0], :b=>2.0} - fails to convert '1.2o' value in strict mode - :string -> :bool_hash - converts "a=t & b=t & a=f" to {:a=>[true, false], :b=>true} - converts "a:yes b:no c:t" to {:a=>true, :b=>false, :c=>true} - fails to convert '1.2o' value in strict mode +Necromancer::Conversions#fetch + fails to find conversion + retrieves conversion given source & target Necromancer can? checks if conversion is possible -Necromancer::Conversions#to_hash - exports default conversions to hash +Necromancer.register + allows ro register converter + +Necromancer::BooleanConverters#call + :string -> :boolean + converts 'ON' to true value + converts 'F' to false value + converts 'no' to false value + converts 'OFF' to false value + converts 'N' to false value + fails to convert unkonwn value FOO + passes through boolean value + converts 'yes' to true value + converts '1' to true value + converts 'y' to true value + converts 'false' to false value + converts 'No' to false value + converts 'true' to true value + converts 'n' to false value + converts '0' to false value + converts 'off' to false value + converts 'NO' to false value + converts 'T' to true value + converts 'Y' to true value + converts 'f' to false value + raises error for empty string strict mode + converts 'FALSE' to false value + converts 'YES' to true value + converts 't' to true value + converts 'TRUE' to true value + converts 'on' to true value + :boolean -> :integer + converts false to 0 + fails to convert in strict mode + converts true to 1 + converts "unknown" to "unknown" + :integer -> :boolean + converts 1 to true + fails to convert in strict mode + converts 0 to false + converts "unknown" to "unknown" -Top 2 slowest examples (0.00901 seconds, 2.7% of total time): - Necromancer::BooleanConverters#call :string -> :boolean converts 'No' to false value - 0.00535 seconds ./spec/unit/converters/boolean_spec.rb:20 - Necromancer::BooleanConverters#call :boolean -> :integer fails to convert in strict mode - 0.00366 seconds ./spec/unit/converters/boolean_spec.rb:53 +Top 2 slowest examples (0.00264 seconds, 2.3% of total time): + Necromancer.convert indicates inability to perform the requested conversion + 0.00148 seconds ./spec/unit/convert_spec.rb:6 + Necromancer::Configuration.new is expected to respond to #strict= + 0.00116 seconds ./spec/unit/configuration/new_spec.rb:6 Top 2 slowest example groups: + Necromancer config + 0.00093 seconds average (0.00185 seconds / 2 examples) ./spec/unit/config_spec.rb:3 Necromancer#new - 0.00382 seconds average (0.00382 seconds / 1 example) ./spec/unit/new_spec.rb:3 - Necromancer.inspect - 0.00186 seconds average (0.00372 seconds / 2 examples) ./spec/unit/inspect_spec.rb:3 + 0.00089 seconds average (0.00089 seconds / 1 example) ./spec/unit/new_spec.rb:3 -Finished in 0.33419 seconds (files took 0.53246 seconds to load) +Finished in 0.11613 seconds (files took 0.17243 seconds to load) 260 examples, 0 failures -Randomized with seed 30584 +Randomized with seed 9920 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -1291,12 +1327,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/11278/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/11278/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/56096 and its subdirectories -I: Current time: Wed Dec 11 17:11:31 -12 2024 -I: pbuilder-time-stamp: 1733980291 +I: removing directory /srv/workspace/pbuilder/11278 and its subdirectories +I: Current time: Thu Jan 15 01:35:06 +14 2026 +I: pbuilder-time-stamp: 1768390506