Diff of the two buildlogs: -- --- b1/build.log 2025-02-03 13:18:14.042052369 +0000 +++ b2/build.log 2025-02-03 13:19:02.179882631 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Mon Feb 3 01:17:33 -12 2025 -I: pbuilder-time-stamp: 1738588653 +I: Current time: Mon Mar 9 09:41:16 +14 2026 +I: pbuilder-time-stamp: 1772998876 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration @@ -26,52 +26,84 @@ dpkg-source: info: applying 0006-Disable-coveralls.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/2838127/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/3357797/tmp/hooks/D01_modify_environment starting +debug: Running on codethink03-arm64. +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 Mar 8 19:41 /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/3357797/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/3357797/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='arm64' - DEBIAN_FRONTEND='noninteractive' + 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]="aarch64-unknown-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=arm64 + DEBIAN_FRONTEND=noninteractive DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=12 ' - DISTRIBUTION='trixie' - HOME='/root' - HOST_ARCH='arm64' + DIRSTACK=() + DISTRIBUTION=trixie + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=aarch64 + HOST_ARCH=arm64 IFS=' ' - INVOCATION_ID='37a3270182764485852c610d68a646e1' - 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='2838127' - PS1='# ' - PS2='> ' + INVOCATION_ID=b4e667bde34c405ab9867278c8e58eaf + LANG=C + LANGUAGE=nl_BE:nl + LC_ALL=C + MACHTYPE=aarch64-unknown-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=3357797 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.h2MtHMRP/pbuilderrc_uPav --distribution trixie --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.h2MtHMRP/b1 --logfile b1/build.log ruby-listen_3.9.0-1.dsc' - SUDO_GID='109' - SUDO_UID='104' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://192.168.101.4: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.h2MtHMRP/pbuilderrc_8nPY --distribution trixie --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.h2MtHMRP/b2 --logfile b2/build.log ruby-listen_3.9.0-1.dsc' + SUDO_GID=109 + SUDO_UID=104 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://192.168.101.4:3128 I: uname -a - Linux codethink04-arm64 6.1.0-30-cloud-arm64 #1 SMP Debian 6.1.124-1 (2025-01-12) aarch64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-30-cloud-arm64 #1 SMP Debian 6.1.124-1 (2025-01-12) aarch64 GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Nov 22 14:40 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/2838127/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Nov 22 2024 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/3357797/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -259,7 +291,7 @@ Get: 140 http://deb.debian.org/debian trixie/main arm64 ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.3 kB] Get: 141 http://deb.debian.org/debian trixie/main arm64 ruby-rspec all 3.13.0c0e0m0s1-2 [5184 B] Get: 142 http://deb.debian.org/debian trixie/main arm64 ruby-thor all 1.3.2-1 [49.3 kB] -Fetched 54.3 MB in 0s (153 MB/s) +Fetched 54.3 MB in 0s (185 MB/s) Preconfiguring packages ... Selecting previously unselected package libpython3.13-minimal:arm64. (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 ... 19958 files and directories currently installed.) @@ -730,8 +762,8 @@ Setting up tzdata (2024b-6) ... Current default time zone: 'Etc/UTC' -Local time is now: Mon Feb 3 13:17:54 UTC 2025. -Universal Time is now: Mon Feb 3 13:17:54 UTC 2025. +Local time is now: Sun Mar 8 19:41:37 UTC 2026. +Universal Time is now: Sun Mar 8 19:41:37 UTC 2026. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up autotools-dev (20220109.1) ... @@ -862,7 +894,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/ruby-listen-3.9.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-listen_3.9.0-1_source.changes +I: user script /srv/workspace/pbuilder/3357797/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for trixie +I: user script /srv/workspace/pbuilder/3357797/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/ruby-listen-3.9.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-listen_3.9.0-1_source.changes dpkg-buildpackage: info: source package ruby-listen dpkg-buildpackage: info: source version 3.9.0-1 dpkg-buildpackage: info: source distribution unstable @@ -899,12 +935,12 @@ │ ruby-listen: Installing files and building extensions for ruby3.1 │ └──────────────────────────────────────────────────────────────────────────────┘ -/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20250203-2852780-3xynnf/gemspec +/usr/bin/ruby3.1 -S gem build --config-file /dev/null --verbose /tmp/d20260309-3373270-deqx3d/gemspec Successfully built RubyGem Name: listen Version: 3.9.0 File: listen-3.9.0.gem -/usr/bin/ruby3.1 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-listen/usr/share/rubygems-integration/all /tmp/d20250203-2852780-3xynnf/listen-3.9.0.gem +/usr/bin/ruby3.1 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-listen/usr/share/rubygems-integration/all /tmp/d20260309-3373270-deqx3d/listen-3.9.0.gem /build/reproducible-path/ruby-listen-3.9.0/debian/ruby-listen/usr/share/rubygems-integration/all/gems/listen-3.9.0/bin/listen /build/reproducible-path/ruby-listen-3.9.0/debian/ruby-listen/usr/share/rubygems-integration/all/gems/listen-3.9.0/lib/listen.rb /build/reproducible-path/ruby-listen-3.9.0/debian/ruby-listen/usr/share/rubygems-integration/all/gems/listen-3.9.0/lib/listen/adapter.rb @@ -977,119 +1013,84 @@ All examples were filtered out; ignoring {:focus=>true} -Randomized with seed 27861 +Randomized with seed 26736 -Listen - .to - initalizes listener - .stop - stops all listeners - -Listen::Event::Config - with a given block - calls the block - is callable - -Listen::QueueOptimizer - smoosh_changes - with no cookie - with ignored file - is expected to eq {:added=>[], :modified=>[], :removed=>[]} - with cookie - when related moved_to - is expected to eq {:added=>["bar"], :modified=>[], :removed=>[]} - when single moved - is expected to eq {:added=>["foo"], :modified=>[], :removed=>[]} - when related moved_to with ignored moved_from - is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} - with a detected temp file - is expected to eq {:added=>[], :modified=>[], :removed=>[]} - with rename from temp file - is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} - when double move - is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} +Listen::Event::Loop + when set up / started + #stop + waits for the thread to finish + frees the thread + sets the reason for waking up + #start + is started + when state change to :started takes longer than 5 seconds + raises Error::NotStarted + when start is called again + returns silently Listen::File #inaccurate_mac_time? - with all accurate times - is expected to be falsey with one accurate time is expected to be falsey with no accurate times is expected to be truthy + with all accurate times + is expected to be falsey #change + with empty record + with existing path + returns added + sets path in record with expected data with file record with existing file - with different mode in record - sets path in record with expected data - is expected to equal :modified with same mode in record + with earlier mtime than in record + sets path in record with expected data + is expected to equal :modified + with later mtime than in record + sets path in record with expected data + is expected to equal :modified with identical mtime in record with inaccurate stat times + with real mtime barely not within last second + is expected to be nil with real mtime barely within last second with available sha - with different sha in record - is expected to equal :modified - sets path in record with expected data with same sha in record is expected to be nil with no sha in record is expected to be nil + with different sha in record + sets path in record with expected data + is expected to equal :modified without available sha should not unset record is expected to equal :removed - with real mtime barely not within last second - is expected to be nil with accurate stat times is expected to be nil - with earlier mtime than in record - sets path in record with expected data - is expected to equal :modified - with later mtime than in record - sets path in record with expected data - is expected to equal :modified + with different mode in record + is expected to equal :modified + sets path in record with expected data with non-existing file is expected to eq :removed sets path in record - with empty record - with existing path - returns added - sets path in record with expected data - -Listen::Adapter::Linux - class methods - is expected to be usable - instance methods - _callback - recognizes close_write as modify - recognizes moved_from as moved_from - recognizes moved_to as moved_to - inotify max watches exceeded - raises exception - watch events - starts by calling watch with default events - #stop - when configured - stops the worker - when not even initialized - does not crash Listen::CLI + directories option + with a single directory + is set to app + not specified + is set to local directory + with a multiple directories + is set to an array of the directories relative option + when -r + is set to true when --relative supports --relative option supports -r option without relative option is set to false - when -r - is set to true - directories option - with a multiple directories - is set to an array of the directories - not specified - is set to local directory - with a single directory - is set to app Listen::Adapter::Polling class @@ -1098,157 +1099,15 @@ #start notifies change on every listener directories path #_latency - with custom latency overriding - is expected to eq 1234 with no overriding option is expected to eq 1.0 - -Listen::Adapter::BSD - class - is expected not to be usable + with custom latency overriding + is expected to eq 1234 Listen::Forwarder passes relative option to Listen -Listen::Adapter::Base - #start - runs the adapter - builds record - handling events - when an event occurs - passes invalidates the snapshot based on the event - -Listen::Event::Loop - #start - is started - when start is called again - returns silently - when state change to :started takes longer than 5 seconds - raises Error::NotStarted - when set up / started - #stop - sets the reason for waking up - frees the thread - waits for the thread to finish - -Listen::Silencer - #silenced? - is expected to accept :file and # - when accepting only *foo* - is expected to accept :file and "foo" - is expected not to accept :file and "bar" - with default ignore - is expected not to accept :file and "sed86w1kB" - is expected to accept :dir and "foo.git" - is expected to accept :dir and "vendor/bundlefoo" - is expected to accept :file and "14913" - is expected not to accept :file and "foo.rb___jb_old___" - is expected to accept :file and "foo.sedq7eVAR" - is expected not to accept :dir and ".git" - is expected not to accept :file and "4913" - is expected not to accept :file and "foo.rbB22583.new" - is expected to accept :file and ".sedq7eVAR" - is expected to accept :dir and "logfoo" - is expected to accept :file and "file.new" - is expected to accept :file and "foo.tmpl" - is expected not to accept :file and "foo.rb.kate-swp" - is expected not to accept :file and ".mutagen-temporary-cross-device-rename0" - is expected to accept :dir and ".rbxfoo" - is expected to accept :dir and "foo.rbx" - is expected not to accept :file and "sedq7eVAR" - is expected to accept :dir and "footmp" - is expected not to accept :dir and "tmp" - is expected not to accept :file and "foo.tmp" - is expected not to accept :file and "foo~" - is expected to accept :dir and "foovendor/ruby" - is expected to accept :dir and ".gitfoo" - is expected to accept :file and "49131" - is expected not to accept :file and "foo.rb___jb_bak___" - is expected to accept :dir and "vendor/rubyfoo" - is expected to accept :dir and "bundlefoo" - is expected not to accept :file and "foo.swp" - is expected to accept :file and "sedatives" - is expected not to accept :dir and ".hg" - is expected to accept :dir and "foo.bundle" - is expected not to accept :file and "foo.swx" - is expected not to accept :dir and ".svn" - is expected not to accept :dir and "log" - is expected to accept :file and "sed_ABCDE" - is expected not to accept :file and ".DS_Store" - is expected not to accept :file and "#hello.rb#" - is expected not to accept :dir and "bundle" - is expected to accept :file and "a.swf" - is expected not to accept :file and ".#hello.rb" - is expected to accept :file and "sediments" - is expected to accept :dir and "foo.hg" - is expected not to accept :file and "foo.swpx" - is expected not to accept :dir and ".bundle" - is expected to accept :dir and ".hgfoo" - is expected to accept :dir and "foobundle" - is expected not to accept :file and ".mutagen-temporary-unicode-test-\u00E9ntry0" - is expected to accept :dir and "foo.svn" - is expected to accept :dir and ".svnfoo" - is expected not to accept :file and "foo.rbo54321.new" - is expected to accept :dir and "tmpfoo" - is expected not to accept :dir and "vendor/bundle" - is expected to accept :dir and ".bundlefoo" - is expected not to accept :dir and ".rbx" - is expected to accept :dir and "foolog" - is expected to accept :file and "sedabcdefg" - is expected to accept :dir and "foovendor/bundle" - is expected not to accept :dir and "vendor/ruby" - is expected to accept :file and "file54321.new" - is expected to accept :file and "sedan2014" - is expected not to accept :file and ".goutputstream-S3FBGX" - when accepting only *.pid - when ignoring bar* - is expected to accept :file and "foo.pid" - is expected not to accept :file and "foo.rb" - is expected not to accept :file and "bar.pid" - when ignoring only *.pid - is expected to accept :file and ".git" - is expected not to accept :file and "foo.pid" - when ignoring foo/bar* and *.pid - is expected not to accept :file and "foo/bar/baz" - is expected not to accept :file and "foo.pid" - when ignoring *.pid - is expected not to accept :file and "foo.pid" - when accepting only foo/* and *.txt - is expected not to accept :file and "bar/baz.rb" - is expected to accept :file and "foo/bar.rb" - is expected to accept :file and "bar.txt" - is expected not to accept :file and "bar.rb" - -Listen::Event::Queue - #empty? - when not empty - is expected not to be empty - when empty - is expected to be empty - #pop - when empty - forward the call to the queue - #<< - when relative option is true - when watched dir is not the current dir - registers relative path - when watched dir is on another drive - registers full path - when watched dir is the current dir - registers relative paths - -Listen::Backend - #initialize - with config - sets up an adapter class - #stop - stops the adapter - #start - starts the adapter - Listen::Adapter::Config - #queue - provides a direct queue for filesystem events #initialize with directories as array with Pathnames for directories @@ -1258,67 +1117,94 @@ returns array of pathnames when not resolved returns array of resolved pathnames - with no directories - returns the current path in array - with file path - raises argument error requesting a directory with directories as messy array implement me (PENDING: Not yet implemented) - #silencer - provides a silencer object + with file path + raises argument error requesting a directory + with no directories + returns the current path in array #adapter_options provides a set of adapter_specific options + #silencer + provides a silencer object + #queue + provides a direct queue for filesystem events -Listen::Directory - #scan with recursive on - with file.rb & subdir in record - with subdir2 path present - snapshots changes for file, file2 & subdir paths - with empty dir - snapshots changes for file & subdir path - with empty record - with subdir present in dir - snapshots changes for subdir - with non-existing dir - reports no changes - #scan with recursive off - with file & subdir in record - when subdir is removed - notices subdir does not exist - when file2.rb is added - notices file removed and file2 changed - when file.rb removed - notices file was removed - with empty dir - sets record dir path - snapshots changes for file path and dir that doesn't exist - when file.rb no longer exists after scan - rescans - with empty record - with non-existing dir path - reports no changes - unsets record dir path - when network share is disconnected - reports no changes - unsets record dir path - with file.rb in dir - snapshots changes for file & file2 paths +Listen::Backend + #initialize + with config + sets up an adapter class + #start + starts the adapter + #stop + stops the adapter -Listen::Adapter - .select - returns Windows adapter when usable - returns Darwin adapter when usable - returns Polling adapter if forced - returns BSD adapter when usable - returns Linux adapter when usable - no usable adapters - doesn't warn if polling_fallback_message is false - warns polling fallback with custom message if set - warns polling fallback with default message - returns Polling adapter +Listen::Listener::Config + options + custom options + extract adapter selecting options + extracts adapter options + +Listen::QueueOptimizer + smoosh_changes + with a detected temp file + is expected to eq {:added=>[], :modified=>[], :removed=>[]} + with rename from temp file + is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} + with no cookie + with ignored file + is expected to eq {:added=>[], :modified=>[], :removed=>[]} + with cookie + when related moved_to + is expected to eq {:added=>["bar"], :modified=>[], :removed=>[]} + when related moved_to with ignored moved_from + is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} + when single moved + is expected to eq {:added=>["foo"], :modified=>[], :removed=>[]} + when double move + is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} + +Listen::Event::Config + with a given block + calls the block + is callable + +Listen::Adapter::Base + handling events + when an event occurs + passes invalidates the snapshot based on the event + #start + runs the adapter + builds record + +Listen::Adapter::BSD + class + is expected not to be usable + +Listen::Adapter::Linux + instance methods + inotify max watches exceeded + raises exception + #stop + when not even initialized + does not crash + when configured + stops the worker + watch events + starts by calling watch with default events + _callback + recognizes moved_from as moved_from + recognizes moved_to as moved_to + recognizes close_write as modify + class methods + is expected to be usable Listen::Change #change + with build options + calls still_building! on record + directory + calls Listen::Directory#new file with unknown change calls Listen::File#change @@ -1331,285 +1217,435 @@ that returns no change doesn't notifies no change with known change - doesn't notify to listener if path is silenced notifies change directly to listener - with build options - calls still_building! on record - directory - calls Listen::Directory#new + doesn't notify to listener if path is silenced Listen::Silencer::Controller append_ignores with previous :ignore rules + when providing as array + appends the given :ignore rules when providing a single regexp as argument appends the given :ignore rules as array when providing multiple arguments appends the given :ignore rules as a flat array when providing a nil reconfigures with existing :ignore rules - when providing as array - appends the given :ignore rules with no previous :ignore rules - when providing a nil - sets the given :ignore rules as empty array when providing multiple arguments sets the given :ignore rules as a flat array + when providing a nil + sets the given :ignore rules as empty array when providing a single regexp as argument sets the given :ignore rules as array when providing as array sets the given :ignore rules +Listen::Listener + #ignore! + with existing ignore options + deletes ignore options + with no existing options + sets options + with existing ignore! options + overwrites existing ignore options + #stop + when fully started + terminates + when only initialized + terminates + #only + with existing only options + overwrites existing ignore options + #listen? + when processing + is expected to be processing + when paused + is expected not to be processing + when stopped + is expected not to be processing + #paused? + returns false when not paused + returns true when paused + unpause with start + sets paused to false + #ignore + with existing ignore options + adds up to existing ignore options + with existing ignore options (array) + adds up to existing ignore options + #pause + sets paused to true + initialize + is expected not to be paused + with directories + passes directories to backend + with a block + passes the block to the event processor + #start + sets paused to false + starts adapter + +Listen::Thread + .rescue_and_log + rescues and logs nested exceptions + when exception raised that is not derived from StandardError + raises out + .new + calls Thread.new + when nested exceptions raised + details exception causes + when exception raised + rescues and logs backtrace + exception backtrace + rescues and logs exceptions + when exception raised that is not derived from StandardError + SystemExit + does not rescue + SystemStackError + does not rescue + TestExceptionDerivedFromException + does not rescue + NoMemoryError + does not rescue + SecurityError + does not rescue + +Listen::Record + #build + re-inits paths + with subdir containing symlink to parent + shows a warning + with no subdirs + builds record + with subdir containing files + builds record, skipping silenced patterns + with a normal symlinked directory to another + shows message + with subdir containing dirs + builds record + with subdir containing symlinked file + shows a warning + #file_data + with path in watched dir + when path is present + returns file data + path not present + return empty hash + with path in subdir + path not present + return empty hash + when path is present + returns file data + #unset_path + within watched dir + when path not present + unsets path + when path is present + unsets path + within subdir + when path is present + unsets path + when path not present + unsets path + #dir_entries + in subdir /path + with path renamed to file + is expected to be empty + with no entries + is expected to be empty + with path/file.rb already in record + is expected to eq {"file.rb"=>{:mtime=>1.1}} + with path/subdir with file + is expected to be empty + with empty path/subdir + is expected to be empty + when there is a file with a similar name to a dir + is expected to eq {"README.md"=>{:mtime=>1.2}} + when there is a file with the same name as a dir + is expected to eq {"README.md"=>{:mtime=>1.2}} + in watched dir + with no entries + is expected to be empty + with file.rb in record + is expected to eq {"file.rb"=>{:mtime=>1.1}} + with subdir/file.rb in record + is expected to eq {"subdir"=>{}} + #add_dir + sets itself when empty + correctly sets new directory data + sets itself when nil + sets itself when . + sets path and keeps old data not overwritten + #update_file + with subdir path + sets path by splitting dirname and basename + sets path and keeps old data not overwritten + with path in watched dir + sets path by spliting dirname and basename + sets path and keeps old data not overwritten + +Listen::Directory + #scan with recursive off + with empty record + with file.rb in dir + snapshots changes for file & file2 paths + when network share is disconnected + unsets record dir path + reports no changes + with non-existing dir path + reports no changes + unsets record dir path + with file & subdir in record + when file.rb removed + notices file was removed + when file2.rb is added + notices file removed and file2 changed + when file.rb no longer exists after scan + rescans + with empty dir + snapshots changes for file path and dir that doesn't exist + sets record dir path + when subdir is removed + notices subdir does not exist + #scan with recursive on + with file.rb & subdir in record + with empty dir + snapshots changes for file & subdir path + with subdir2 path present + snapshots changes for file, file2 & subdir paths + with empty record + with non-existing dir + reports no changes + with subdir present in dir + snapshots changes for subdir + Listen::Event::Processor + _process_changes + when it raises an exception derived from StandardError + rescues and logs exception and continues #loop_for when stopped with pending changes - does not sleep does not change the event queue + does not sleep when not stopped when initially processing - when event queue is empty - when stopped after sleeping - breaks - sleeps, waiting to be woken up when event queue has events when there were events ages ago processes events + when event queue is empty + when stopped after sleeping + sleeps, waiting to be woken up + breaks when initially paused - when stopped after sleeping - sleeps, waiting to be woken up - breaks when still paused after sleeping when there were no events before sleeps for latency to possibly later optimize some events when there were no events for ages still does not process events because it is paused - _process_changes - when it raises an exception derived from StandardError - rescues and logs exception and continues + when stopped after sleeping + breaks + sleeps, waiting to be woken up + +Listen::Event::Queue + #empty? + when empty + is expected to be empty + when not empty + is expected not to be empty + #pop + when empty + forward the call to the queue + #<< + when relative option is true + when watched dir is the current dir + registers relative paths + when watched dir is not the current dir + registers relative path + when watched dir is on another drive + registers full path + +Listen + .stop + stops all listeners + .to + initalizes listener + +Listen::Silencer + #silenced? + is expected to accept :file and # + when accepting only foo/* and *.txt + is expected to accept :file and "foo/bar.rb" + is expected not to accept :file and "bar/baz.rb" + is expected not to accept :file and "bar.rb" + is expected to accept :file and "bar.txt" + when accepting only *foo* + is expected to accept :file and "foo" + is expected not to accept :file and "bar" + when ignoring foo/bar* and *.pid + is expected not to accept :file and "foo/bar/baz" + is expected not to accept :file and "foo.pid" + with default ignore + is expected not to accept :dir and ".git" + is expected to accept :file and "foo.tmpl" + is expected not to accept :file and ".DS_Store" + is expected not to accept :file and ".#hello.rb" + is expected not to accept :file and "#hello.rb#" + is expected not to accept :file and "sedq7eVAR" + is expected to accept :dir and "footmp" + is expected not to accept :dir and "bundle" + is expected not to accept :dir and ".svn" + is expected not to accept :dir and "vendor/ruby" + is expected not to accept :file and ".mutagen-temporary-unicode-test-\u00E9ntry0" + is expected to accept :file and "file54321.new" + is expected not to accept :file and "foo.swx" + is expected not to accept :file and "sed86w1kB" + is expected to accept :dir and "foovendor/ruby" + is expected not to accept :file and ".mutagen-temporary-cross-device-rename0" + is expected not to accept :dir and ".rbx" + is expected to accept :dir and ".hgfoo" + is expected not to accept :file and "foo.rb.kate-swp" + is expected not to accept :file and "foo~" + is expected to accept :dir and "logfoo" + is expected to accept :dir and "foolog" + is expected to accept :file and "a.swf" + is expected to accept :dir and "tmpfoo" + is expected to accept :dir and "vendor/bundlefoo" + is expected to accept :file and "sed_ABCDE" + is expected to accept :dir and "foo.hg" + is expected not to accept :dir and ".bundle" + is expected not to accept :dir and "vendor/bundle" + is expected not to accept :file and "foo.rbB22583.new" + is expected to accept :dir and "vendor/rubyfoo" + is expected not to accept :file and "foo.rb___jb_old___" + is expected not to accept :dir and "log" + is expected to accept :file and "sedan2014" + is expected to accept :file and "sedatives" + is expected not to accept :file and "foo.swpx" + is expected to accept :dir and "foo.git" + is expected not to accept :file and "foo.rb___jb_bak___" + is expected to accept :dir and "foovendor/bundle" + is expected to accept :file and "sedabcdefg" + is expected to accept :file and ".sedq7eVAR" + is expected to accept :dir and "foobundle" + is expected to accept :file and "49131" + is expected to accept :dir and ".rbxfoo" + is expected not to accept :file and ".goutputstream-S3FBGX" + is expected to accept :dir and ".bundlefoo" + is expected to accept :dir and ".svnfoo" + is expected not to accept :file and "foo.swp" + is expected to accept :dir and "bundlefoo" + is expected to accept :file and "sediments" + is expected not to accept :file and "4913" + is expected to accept :dir and "foo.rbx" + is expected not to accept :dir and "tmp" + is expected to accept :file and "file.new" + is expected to accept :file and "14913" + is expected not to accept :file and "foo.rbo54321.new" + is expected not to accept :file and "foo.tmp" + is expected not to accept :dir and ".hg" + is expected to accept :dir and "foo.svn" + is expected to accept :file and "foo.sedq7eVAR" + is expected to accept :dir and "foo.bundle" + is expected to accept :dir and ".gitfoo" + when ignoring only *.pid + is expected not to accept :file and "foo.pid" + is expected to accept :file and ".git" + when accepting only *.pid + when ignoring bar* + is expected not to accept :file and "foo.rb" + is expected not to accept :file and "bar.pid" + is expected to accept :file and "foo.pid" + when ignoring *.pid + is expected not to accept :file and "foo.pid" logger.rb Listen.logger logger - infers DEBUG level from LISTEN_GEM_DEBUGGING="2 " - infers ERROR level from LISTEN_GEM_DEBUGGING="ERROR" infers FATAL level from LISTEN_GEM_DEBUGGING="fatal" - infers WARN level from LISTEN_GEM_DEBUGGING="WARN" + infers ERROR level from LISTEN_GEM_DEBUGGING="error" infers WARN level from LISTEN_GEM_DEBUGGING="warn" - infers INFO level from LISTEN_GEM_DEBUGGING="true" + infers WARN level from LISTEN_GEM_DEBUGGING="warning" + infers FATAL level from LISTEN_GEM_DEBUGGING="FATAL" + infers INFO level from LISTEN_GEM_DEBUGGING="info" infers INFO level from LISTEN_GEM_DEBUGGING=" true" - infers FATAL level from LISTEN_GEM_DEBUGGING=" fatal" - infers INFO level from LISTEN_GEM_DEBUGGING=" yesss!" - infers DEBUG level from LISTEN_GEM_DEBUGGING="debug" infers DEBUG level from LISTEN_GEM_DEBUGGING="DEBUG" - infers INFO level from LISTEN_GEM_DEBUGGING="INFO" - infers WARN level from LISTEN_GEM_DEBUGGING=" warn" infers INFO level from LISTEN_GEM_DEBUGGING="1" - infers INFO level from LISTEN_GEM_DEBUGGING="yes" + infers DEBUG level from LISTEN_GEM_DEBUGGING="debug" + infers WARN level from LISTEN_GEM_DEBUGGING="WARN" + infers INFO level from LISTEN_GEM_DEBUGGING="TRUE " + infers FATAL level from LISTEN_GEM_DEBUGGING=" fatal" + infers WARN level from LISTEN_GEM_DEBUGGING=" warn" + infers ERROR level from LISTEN_GEM_DEBUGGING="OTHER" + infers INFO level from LISTEN_GEM_DEBUGGING=" yesss!" infers INFO level from LISTEN_GEM_DEBUGGING="YES" - infers ERROR level from LISTEN_GEM_DEBUGGING="error" - infers FATAL level from LISTEN_GEM_DEBUGGING="FATAL" - infers INFO level from LISTEN_GEM_DEBUGGING="info" - infers WARN level from LISTEN_GEM_DEBUGGING="warning" - infers DEBUG level from LISTEN_GEM_DEBUGGING="2" returns default logger if none set - infers INFO level from LISTEN_GEM_DEBUGGING="TRUE" + infers INFO level from LISTEN_GEM_DEBUGGING="yes" infers INFO level from LISTEN_GEM_DEBUGGING="level1" + infers ERROR level from LISTEN_GEM_DEBUGGING="ERROR" + infers DEBUG level from LISTEN_GEM_DEBUGGING="2" infers DEBUG level from LISTEN_GEM_DEBUGGING="level2" - infers INFO level from LISTEN_GEM_DEBUGGING="TRUE " - infers ERROR level from LISTEN_GEM_DEBUGGING="OTHER" + infers INFO level from LISTEN_GEM_DEBUGGING="INFO" + infers DEBUG level from LISTEN_GEM_DEBUGGING="2 " + infers INFO level from LISTEN_GEM_DEBUGGING="true" + infers INFO level from LISTEN_GEM_DEBUGGING="TRUE" logger= - allows nil to be set (implying default logger) allows the logger to be set + allows nil to be set (implying default logger) Listen.adapter_warn_behavior + allows the adapter_warn_behavior to be set to :log defaults to :warn allows the adapter_warn_behavior to be set to silent to silence the warnings allows the adapter_warn_behavior to be set to to silence the warnings allows the adapter_warn_behavior to be set to false to silence the warnings - allows the adapter_warn_behavior to be set to :log when adapter_warn_behavior is set to a callable object like a proc - when the message matches a true pattern - respects :warn when the message matches a #{behavior} pattern respects :silent - when the message matches a :silent pattern - respects :silent when the message matches a :warn pattern respects :warn when the message matches a #{behavior} pattern respects :silent + when the message matches a true pattern + respects :warn + when the message matches a :silent pattern + respects :silent when LISTEN_GEM_ADAPTER_WARN_BEHAVIOR is set to 'log' respects the environment variable over :silent respects the environment variable over nil respects the environment variable over a callable config - respects the environment variable over false respects the environment variable over :warn - -Listen::Thread - .rescue_and_log - rescues and logs nested exceptions - when exception raised that is not derived from StandardError - raises out - .new - calls Thread.new - when exception raised - rescues and logs exceptions - rescues and logs backtrace + exception backtrace - when nested exceptions raised - details exception causes - when exception raised that is not derived from StandardError - NoMemoryError - does not rescue - SystemExit - does not rescue - TestExceptionDerivedFromException - does not rescue - SecurityError - does not rescue - SystemStackError - does not rescue - -Listen::Listener::Config - options - custom options - extract adapter selecting options - extracts adapter options + respects the environment variable over false Listen::FSM FSM with no start state raises ArgumentError on new - FSM with string state name - raises ArgumentError on new simple FSM - starts in start_state declares transition and transition! private - raises on disallowed transitions allows transitions + starts in start_state + raises on disallowed transitions #wait_for_state - waits for the next state change and returns falsey if then not the desired state + returns truthy immediately if already in the desired state passes nil (infinite) timeout: down to wait, if none given - waits for the next state change and returns truthy if then in the desired state enforces precondition that states must be symbols - returns truthy immediately if already in the desired state + waits for the next state change and returns falsey if then not the desired state passes the timeout: down to wait, if given + waits for the next state change and returns truthy if then in the desired state + FSM with string state name + raises ArgumentError on new -Listen::Listener - #start - starts adapter - sets paused to false - #only - with existing only options - overwrites existing ignore options - #paused? - returns false when not paused - returns true when paused - initialize - is expected not to be paused - with directories - passes directories to backend - with a block - passes the block to the event processor - #listen? - when stopped - is expected not to be processing - when processing - is expected to be processing - when paused - is expected not to be processing - #stop - when only initialized - terminates - when fully started - terminates - #ignore! - with no existing options - sets options - with existing ignore! options - overwrites existing ignore options - with existing ignore options - deletes ignore options - #ignore - with existing ignore options (array) - adds up to existing ignore options - with existing ignore options - adds up to existing ignore options - #pause - sets paused to true - unpause with start - sets paused to false - -Listen::Record - #update_file - with subdir path - sets path and keeps old data not overwritten - sets path by splitting dirname and basename - with path in watched dir - sets path by spliting dirname and basename - sets path and keeps old data not overwritten - #file_data - with path in watched dir - path not present - return empty hash - when path is present - returns file data - with path in subdir - when path is present - returns file data - path not present - return empty hash - #dir_entries - in watched dir - with file.rb in record - is expected to eq {"file.rb"=>{:mtime=>1.1}} - with subdir/file.rb in record - is expected to eq {"subdir"=>{}} - with no entries - is expected to be empty - in subdir /path - with no entries - is expected to be empty - with path renamed to file - is expected to be empty - with path/file.rb already in record - is expected to eq {"file.rb"=>{:mtime=>1.1}} - with empty path/subdir - is expected to be empty - with path/subdir with file - is expected to be empty - when there is a file with a similar name to a dir - is expected to eq {"README.md"=>{:mtime=>1.2}} - when there is a file with the same name as a dir - is expected to eq {"README.md"=>{:mtime=>1.2}} - #build - re-inits paths - with no subdirs - builds record - with subdir containing files - builds record, skipping silenced patterns - with subdir containing dirs - builds record - with subdir containing symlink to parent - shows a warning - with subdir containing symlinked file - shows a warning - with a normal symlinked directory to another - shows message - #unset_path - within watched dir - when path not present - unsets path - when path is present - unsets path - within subdir - when path not present - unsets path - when path is present - unsets path - #add_dir - sets itself when empty - sets path and keeps old data not overwritten - sets itself when . - correctly sets new directory data - sets itself when nil +Listen::Adapter + .select + returns BSD adapter when usable + returns Windows adapter when usable + returns Linux adapter when usable + returns Darwin adapter when usable + returns Polling adapter if forced + no usable adapters + returns Polling adapter + warns polling fallback with default message + doesn't warn if polling_fallback_message is false + warns polling fallback with custom message if set Pending: (Failures listed here are expected and do not affect your suite's status) @@ -1617,10 +1653,10 @@ # Not yet implemented # ./spec/lib/listen/adapter/config_spec.rb:87 -Finished in 0.74263 seconds (files took 0.26911 seconds to load) +Finished in 0.80037 seconds (files took 0.27692 seconds to load) 331 examples, 0 failures, 1 pending -Randomized with seed 27861 +Randomized with seed 26736 /usr/bin/ruby3.3 /usr/bin/gem2deb-test-runner @@ -1640,565 +1676,480 @@ All examples were filtered out; ignoring {:focus=>true} -Randomized with seed 27056 +Randomized with seed 65163 + +Listen::Adapter + .select + returns Windows adapter when usable + returns Darwin adapter when usable + returns BSD adapter when usable + returns Polling adapter if forced + returns Linux adapter when usable + no usable adapters + doesn't warn if polling_fallback_message is false + returns Polling adapter + warns polling fallback with default message + warns polling fallback with custom message if set + +Listen::Adapter::Linux + instance methods + _callback + recognizes close_write as modify + recognizes moved_from as moved_from + recognizes moved_to as moved_to + inotify max watches exceeded + raises exception + watch events + starts by calling watch with default events + #stop + when configured + stops the worker + when not even initialized + does not crash + class methods + is expected to be usable + +Listen::Event::Processor + _process_changes + when it raises an exception derived from StandardError + rescues and logs exception and continues + #loop_for + when not stopped + when initially processing + when event queue has events + when there were events ages ago + processes events + when event queue is empty + when stopped after sleeping + sleeps, waiting to be woken up + breaks + when initially paused + when still paused after sleeping + when there were no events for ages + still does not process events because it is paused + when there were no events before + sleeps for latency to possibly later optimize some events + when stopped after sleeping + breaks + sleeps, waiting to be woken up + when stopped + with pending changes + does not change the event queue + does not sleep + +Listen::File + #inaccurate_mac_time? + with all accurate times + is expected to be falsey + with one accurate time + is expected to be falsey + with no accurate times + is expected to be truthy + #change + with file record + with non-existing file + sets path in record + is expected to eq :removed + with existing file + with same mode in record + with later mtime than in record + sets path in record with expected data + is expected to equal :modified + with identical mtime in record + with inaccurate stat times + with real mtime barely not within last second + is expected to be nil + with real mtime barely within last second + without available sha + should not unset record + is expected to equal :removed + with available sha + with no sha in record + is expected to be nil + with same sha in record + is expected to be nil + with different sha in record + is expected to equal :modified + sets path in record with expected data + with accurate stat times + is expected to be nil + with earlier mtime than in record + is expected to equal :modified + sets path in record with expected data + with different mode in record + is expected to equal :modified + sets path in record with expected data + with empty record + with existing path + sets path in record with expected data + returns added Listen::FSM - FSM with string state name - raises ArgumentError on new FSM with no start state raises ArgumentError on new + FSM with string state name + raises ArgumentError on new simple FSM - declares transition and transition! private allows transitions starts in start_state raises on disallowed transitions + declares transition and transition! private #wait_for_state - passes nil (infinite) timeout: down to wait, if none given - passes the timeout: down to wait, if given - waits for the next state change and returns truthy if then in the desired state + enforces precondition that states must be symbols returns truthy immediately if already in the desired state waits for the next state change and returns falsey if then not the desired state - enforces precondition that states must be symbols - -Listen::Adapter::Base - #start - runs the adapter - builds record - handling events - when an event occurs - passes invalidates the snapshot based on the event - -Listen::Event::Loop - when set up / started - #stop - waits for the thread to finish - sets the reason for waking up - frees the thread - #start - is started - when start is called again - returns silently - when state change to :started takes longer than 5 seconds - raises Error::NotStarted - -logger.rb - Listen.adapter_warn_behavior - allows the adapter_warn_behavior to be set to to silence the warnings - allows the adapter_warn_behavior to be set to silent to silence the warnings - defaults to :warn - allows the adapter_warn_behavior to be set to false to silence the warnings - allows the adapter_warn_behavior to be set to :log - when LISTEN_GEM_ADAPTER_WARN_BEHAVIOR is set to 'log' - respects the environment variable over a callable config - respects the environment variable over nil - respects the environment variable over :silent - respects the environment variable over :warn - respects the environment variable over false - when adapter_warn_behavior is set to a callable object like a proc - when the message matches a :warn pattern - respects :warn - when the message matches a #{behavior} pattern - respects :silent - when the message matches a true pattern - respects :warn - when the message matches a #{behavior} pattern - respects :silent - when the message matches a :silent pattern - respects :silent - Listen.logger - logger= - allows nil to be set (implying default logger) - allows the logger to be set - logger - infers DEBUG level from LISTEN_GEM_DEBUGGING="2" - infers DEBUG level from LISTEN_GEM_DEBUGGING="debug" - infers ERROR level from LISTEN_GEM_DEBUGGING="OTHER" - infers FATAL level from LISTEN_GEM_DEBUGGING="fatal" - infers DEBUG level from LISTEN_GEM_DEBUGGING="2 " - infers FATAL level from LISTEN_GEM_DEBUGGING=" fatal" - infers INFO level from LISTEN_GEM_DEBUGGING="info" - infers DEBUG level from LISTEN_GEM_DEBUGGING="level2" - infers ERROR level from LISTEN_GEM_DEBUGGING="error" - infers INFO level from LISTEN_GEM_DEBUGGING="level1" - returns default logger if none set - infers WARN level from LISTEN_GEM_DEBUGGING="WARN" - infers INFO level from LISTEN_GEM_DEBUGGING=" true" - infers WARN level from LISTEN_GEM_DEBUGGING=" warn" - infers INFO level from LISTEN_GEM_DEBUGGING="INFO" - infers INFO level from LISTEN_GEM_DEBUGGING="1" - infers DEBUG level from LISTEN_GEM_DEBUGGING="DEBUG" - infers WARN level from LISTEN_GEM_DEBUGGING="warn" - infers INFO level from LISTEN_GEM_DEBUGGING="TRUE" - infers ERROR level from LISTEN_GEM_DEBUGGING="ERROR" - infers INFO level from LISTEN_GEM_DEBUGGING="TRUE " - infers INFO level from LISTEN_GEM_DEBUGGING="YES" - infers WARN level from LISTEN_GEM_DEBUGGING="warning" - infers INFO level from LISTEN_GEM_DEBUGGING=" yesss!" - infers INFO level from LISTEN_GEM_DEBUGGING="yes" - infers FATAL level from LISTEN_GEM_DEBUGGING="FATAL" - infers INFO level from LISTEN_GEM_DEBUGGING="true" - -Listen::Directory - #scan with recursive on - with file.rb & subdir in record - with empty dir - snapshots changes for file & subdir path - with subdir2 path present - snapshots changes for file, file2 & subdir paths - with empty record - with subdir present in dir - snapshots changes for subdir - with non-existing dir - reports no changes - #scan with recursive off - with file & subdir in record - when subdir is removed - notices subdir does not exist - when file2.rb is added - notices file removed and file2 changed - when file.rb removed - notices file was removed - with empty dir - snapshots changes for file path and dir that doesn't exist - sets record dir path - when file.rb no longer exists after scan - rescans - with empty record - with file.rb in dir - snapshots changes for file & file2 paths - when network share is disconnected - unsets record dir path - reports no changes - with non-existing dir path - reports no changes - unsets record dir path - -Listen::Adapter::Polling - class - is expected to be usable - with a valid configuration - #_latency - with no overriding option - is expected to eq 1.0 - with custom latency overriding - is expected to eq 1234 - #start - notifies change on every listener directories path - -Listen::Silencer::Controller - append_ignores - with previous :ignore rules - when providing a nil - reconfigures with existing :ignore rules - when providing multiple arguments - appends the given :ignore rules as a flat array - when providing as array - appends the given :ignore rules - when providing a single regexp as argument - appends the given :ignore rules as array - with no previous :ignore rules - when providing as array - sets the given :ignore rules - when providing a single regexp as argument - sets the given :ignore rules as array - when providing multiple arguments - sets the given :ignore rules as a flat array - when providing a nil - sets the given :ignore rules as empty array - -Listen::QueueOptimizer - smoosh_changes - with a detected temp file - is expected to eq {:added=>[], :modified=>[], :removed=>[]} - with cookie - when related moved_to with ignored moved_from - is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} - when single moved - is expected to eq {:added=>["foo"], :modified=>[], :removed=>[]} - when related moved_to - is expected to eq {:added=>["bar"], :modified=>[], :removed=>[]} - with rename from temp file - is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} - with no cookie - with ignored file - is expected to eq {:added=>[], :modified=>[], :removed=>[]} - when double move - is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} - -Listen::Adapter::Config - #adapter_options - provides a set of adapter_specific options - #silencer - provides a silencer object - #queue - provides a direct queue for filesystem events - #initialize - with directories as array - with strings for directories - when already resolved - returns array of pathnames - when not resolved - returns array of resolved pathnames - with Pathnames for directories - returns array of pathnames - with file path - raises argument error requesting a directory - with directories as messy array - implement me (PENDING: Not yet implemented) - with no directories - returns the current path in array - -Listen::Listener::Config - options - custom options - extract adapter selecting options - extracts adapter options + waits for the next state change and returns truthy if then in the desired state + passes nil (infinite) timeout: down to wait, if none given + passes the timeout: down to wait, if given Listen::Silencer #silenced? is expected to accept :file and # + when accepting only *foo* + is expected to accept :file and "foo" + is expected not to accept :file and "bar" + when accepting only foo/* and *.txt + is expected to accept :file and "foo/bar.rb" + is expected not to accept :file and "bar.rb" + is expected to accept :file and "bar.txt" + is expected not to accept :file and "bar/baz.rb" + when ignoring foo/bar* and *.pid + is expected not to accept :file and "foo.pid" + is expected not to accept :file and "foo/bar/baz" with default ignore - is expected not to accept :file and "foo.tmp" - is expected not to accept :file and "foo.rb___jb_bak___" - is expected to accept :file and "sedan2014" - is expected not to accept :dir and "tmp" - is expected to accept :dir and "footmp" - is expected to accept :dir and "logfoo" - is expected to accept :file and "foo.sedq7eVAR" - is expected not to accept :file and "4913" - is expected to accept :file and "sed_ABCDE" - is expected to accept :dir and "foo.hg" - is expected to accept :file and "49131" - is expected not to accept :dir and ".svn" - is expected to accept :dir and "foolog" - is expected not to accept :dir and ".rbx" - is expected to accept :file and "sedatives" - is expected not to accept :dir and ".hg" - is expected not to accept :file and ".goutputstream-S3FBGX" - is expected not to accept :dir and "bundle" - is expected not to accept :file and ".mutagen-temporary-unicode-test-\u00E9ntry0" is expected not to accept :file and "sedq7eVAR" + is expected to accept :file and "foo.tmpl" + is expected not to accept :dir and "log" + is expected not to accept :dir and "bundle" + is expected to accept :file and ".sedq7eVAR" + is expected not to accept :file and "foo.swp" is expected not to accept :file and ".#hello.rb" - is expected to accept :dir and ".rbxfoo" - is expected to accept :dir and "vendor/rubyfoo" - is expected not to accept :dir and ".bundle" + is expected to accept :file and "foo.sedq7eVAR" + is expected to accept :dir and "foo.git" is expected to accept :file and "sediments" - is expected not to accept :file and "foo.rbB22583.new" - is expected to accept :dir and "foo.bundle" - is expected to accept :file and "14913" - is expected not to accept :dir and "log" - is expected not to accept :dir and ".git" - is expected to accept :dir and "foobundle" - is expected not to accept :file and "foo.rb___jb_old___" - is expected to accept :dir and ".bundlefoo" + is expected not to accept :file and ".mutagen-temporary-unicode-test-\u00E9ntry0" + is expected to accept :dir and "foo.rbx" is expected to accept :dir and "bundlefoo" - is expected to accept :file and ".sedq7eVAR" - is expected to accept :file and "sedabcdefg" + is expected not to accept :file and "#hello.rb#" + is expected not to accept :file and "foo.swpx" + is expected not to accept :file and "foo.rb___jb_old___" + is expected not to accept :file and "4913" + is expected to accept :dir and "foobundle" is expected to accept :file and "file.new" + is expected to accept :dir and "footmp" + is expected not to accept :dir and "tmp" is expected not to accept :file and "sed86w1kB" - is expected not to accept :file and "foo.swpx" - is expected not to accept :file and "foo.rb.kate-swp" - is expected to accept :dir and "foo.git" - is expected to accept :dir and "foovendor/bundle" - is expected to accept :dir and ".gitfoo" + is expected not to accept :dir and ".bundle" + is expected to accept :dir and ".bundlefoo" + is expected not to accept :dir and ".rbx" + is expected to accept :dir and "logfoo" + is expected to accept :file and "a.swf" + is expected to accept :dir and ".svnfoo" + is expected to accept :file and "14913" is expected not to accept :file and "foo.rbo54321.new" - is expected not to accept :dir and "vendor/bundle" - is expected not to accept :file and "foo.swp" - is expected to accept :dir and "foo.rbx" - is expected to accept :file and "file54321.new" + is expected not to accept :file and "foo.tmp" + is expected to accept :dir and "vendor/rubyfoo" + is expected to accept :dir and "foo.bundle" + is expected not to accept :file and "foo~" + is expected not to accept :dir and ".hg" + is expected not to accept :file and "foo.swx" + is expected to accept :dir and "tmpfoo" is expected not to accept :file and ".DS_Store" is expected to accept :dir and "foovendor/ruby" is expected not to accept :dir and "vendor/ruby" - is expected not to accept :file and "foo.swx" + is expected to accept :file and "sedabcdefg" + is expected to accept :dir and ".gitfoo" + is expected to accept :dir and "foolog" + is expected not to accept :dir and "vendor/bundle" + is expected to accept :dir and "foovendor/bundle" + is expected not to accept :file and "foo.rbB22583.new" + is expected to accept :file and "sedatives" + is expected not to accept :file and ".goutputstream-S3FBGX" + is expected to accept :file and "sed_ABCDE" + is expected not to accept :file and "foo.rb___jb_bak___" + is expected not to accept :dir and ".git" + is expected to accept :file and "file54321.new" is expected to accept :dir and ".hgfoo" - is expected to accept :file and "foo.tmpl" - is expected to accept :dir and "tmpfoo" - is expected not to accept :file and ".mutagen-temporary-cross-device-rename0" - is expected not to accept :file and "foo~" - is expected to accept :file and "a.swf" + is expected to accept :dir and ".rbxfoo" + is expected to accept :file and "sedan2014" + is expected not to accept :dir and ".svn" + is expected to accept :dir and "foo.hg" is expected to accept :dir and "foo.svn" - is expected not to accept :file and "#hello.rb#" - is expected to accept :dir and ".svnfoo" + is expected not to accept :file and ".mutagen-temporary-cross-device-rename0" is expected to accept :dir and "vendor/bundlefoo" - when accepting only foo/* and *.txt - is expected to accept :file and "foo/bar.rb" - is expected to accept :file and "bar.txt" - is expected not to accept :file and "bar.rb" - is expected not to accept :file and "bar/baz.rb" - when accepting only *foo* - is expected to accept :file and "foo" - is expected not to accept :file and "bar" - when accepting only *.pid - when ignoring bar* - is expected to accept :file and "foo.pid" - is expected not to accept :file and "foo.rb" - is expected not to accept :file and "bar.pid" - when ignoring *.pid - is expected not to accept :file and "foo.pid" + is expected not to accept :file and "foo.rb.kate-swp" + is expected to accept :file and "49131" when ignoring only *.pid is expected not to accept :file and "foo.pid" is expected to accept :file and ".git" - when ignoring foo/bar* and *.pid + when ignoring *.pid is expected not to accept :file and "foo.pid" - is expected not to accept :file and "foo/bar/baz" - -Listen - .to - initalizes listener - .stop - stops all listeners + when accepting only *.pid + when ignoring bar* + is expected not to accept :file and "foo.rb" + is expected to accept :file and "foo.pid" + is expected not to accept :file and "bar.pid" Listen::Event::Queue + #pop + when empty + forward the call to the queue #<< when relative option is true when watched dir is not the current dir registers relative path - when watched dir is on another drive - registers full path when watched dir is the current dir registers relative paths + when watched dir is on another drive + registers full path #empty? - when not empty - is expected not to be empty when empty is expected to be empty - #pop - when empty - forward the call to the queue - -Listen::Event::Processor - #loop_for - when stopped - with pending changes - does not change the event queue - does not sleep - when not stopped - when initially paused - when still paused after sleeping - when there were no events before - sleeps for latency to possibly later optimize some events - when there were no events for ages - still does not process events because it is paused - when stopped after sleeping - breaks - sleeps, waiting to be woken up - when initially processing - when event queue has events - when there were events ages ago - processes events - when event queue is empty - when stopped after sleeping - breaks - sleeps, waiting to be woken up - _process_changes - when it raises an exception derived from StandardError - rescues and logs exception and continues + when not empty + is expected not to be empty -Listen::CLI - relative option - when -r - is set to true - without relative option - is set to false - when --relative - supports --relative option - supports -r option - directories option - with a single directory - is set to app - with a multiple directories - is set to an array of the directories - not specified - is set to local directory +Listen::Backend + #start + starts the adapter + #stop + stops the adapter + #initialize + with config + sets up an adapter class -Listen::Adapter::Linux - class methods - is expected to be usable - instance methods - watch events - starts by calling watch with default events - inotify max watches exceeded - raises exception - #stop - when not even initialized - does not crash - when configured - stops the worker - _callback - recognizes close_write as modify - recognizes moved_from as moved_from - recognizes moved_to as moved_to +Listen::Listener::Config + options + custom options + extracts adapter options + extract adapter selecting options -Listen::Forwarder - passes relative option to Listen +Listen::Silencer::Controller + append_ignores + with no previous :ignore rules + when providing as array + sets the given :ignore rules + when providing multiple arguments + sets the given :ignore rules as a flat array + when providing a nil + sets the given :ignore rules as empty array + when providing a single regexp as argument + sets the given :ignore rules as array + with previous :ignore rules + when providing multiple arguments + appends the given :ignore rules as a flat array + when providing a nil + reconfigures with existing :ignore rules + when providing a single regexp as argument + appends the given :ignore rules as array + when providing as array + appends the given :ignore rules -Listen::Thread - .new - calls Thread.new - when exception raised that is not derived from StandardError - SystemExit - does not rescue - TestExceptionDerivedFromException - does not rescue - SecurityError - does not rescue - NoMemoryError - does not rescue - SystemStackError - does not rescue - when exception raised - rescues and logs exceptions - rescues and logs backtrace + exception backtrace - when nested exceptions raised - details exception causes - .rescue_and_log - rescues and logs nested exceptions - when exception raised that is not derived from StandardError - raises out +Listen + .stop + stops all listeners + .to + initalizes listener -Listen::Listener - #pause - sets paused to true - #paused? - returns true when paused - returns false when not paused +Listen::Adapter::Base + handling events + when an event occurs + passes invalidates the snapshot based on the event #start - starts adapter - sets paused to false - unpause with start - sets paused to false - #stop - when fully started - terminates - when only initialized - terminates - #listen? - when processing - is expected to be processing - when paused - is expected not to be processing - when stopped - is expected not to be processing - #ignore - with existing ignore options - adds up to existing ignore options - with existing ignore options (array) - adds up to existing ignore options - initialize - is expected not to be paused - with a block - passes the block to the event processor - with directories - passes directories to backend - #only - with existing only options - overwrites existing ignore options - #ignore! - with no existing options - sets options - with existing ignore options - deletes ignore options - with existing ignore! options - overwrites existing ignore options + builds record + runs the adapter -Listen::Event::Config - with a given block - calls the block - is callable +Listen::QueueOptimizer + smoosh_changes + with a detected temp file + is expected to eq {:added=>[], :modified=>[], :removed=>[]} + with rename from temp file + is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} + with no cookie + with ignored file + is expected to eq {:added=>[], :modified=>[], :removed=>[]} + when double move + is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} + with cookie + when related moved_to + is expected to eq {:added=>["bar"], :modified=>[], :removed=>[]} + when related moved_to with ignored moved_from + is expected to eq {:added=>[], :modified=>["foo"], :removed=>[]} + when single moved + is expected to eq {:added=>["foo"], :modified=>[], :removed=>[]} -Listen::Change - #change - directory - calls Listen::Directory#new - with build options - calls still_building! on record - file - with unknown change - calls Listen::File#change - doesn't call Listen::File#change if path is silenced - that returns a change - listener listen - notifies change to listener - silence option - notifies change to listener - that returns no change - doesn't notifies no change - with known change - notifies change directly to listener - doesn't notify to listener if path is silenced +logger.rb + Listen.logger + logger + infers FATAL level from LISTEN_GEM_DEBUGGING=" fatal" + infers WARN level from LISTEN_GEM_DEBUGGING="WARN" + infers INFO level from LISTEN_GEM_DEBUGGING="true" + returns default logger if none set + infers WARN level from LISTEN_GEM_DEBUGGING="warning" + infers DEBUG level from LISTEN_GEM_DEBUGGING="2 " + infers FATAL level from LISTEN_GEM_DEBUGGING="FATAL" + infers INFO level from LISTEN_GEM_DEBUGGING="level1" + infers DEBUG level from LISTEN_GEM_DEBUGGING="DEBUG" + infers DEBUG level from LISTEN_GEM_DEBUGGING="debug" + infers INFO level from LISTEN_GEM_DEBUGGING=" yesss!" + infers WARN level from LISTEN_GEM_DEBUGGING="warn" + infers DEBUG level from LISTEN_GEM_DEBUGGING="level2" + infers WARN level from LISTEN_GEM_DEBUGGING=" warn" + infers INFO level from LISTEN_GEM_DEBUGGING="YES" + infers INFO level from LISTEN_GEM_DEBUGGING="yes" + infers FATAL level from LISTEN_GEM_DEBUGGING="fatal" + infers INFO level from LISTEN_GEM_DEBUGGING="TRUE " + infers INFO level from LISTEN_GEM_DEBUGGING="INFO" + infers INFO level from LISTEN_GEM_DEBUGGING="info" + infers INFO level from LISTEN_GEM_DEBUGGING="1" + infers ERROR level from LISTEN_GEM_DEBUGGING="OTHER" + infers DEBUG level from LISTEN_GEM_DEBUGGING="2" + infers ERROR level from LISTEN_GEM_DEBUGGING="ERROR" + infers INFO level from LISTEN_GEM_DEBUGGING="TRUE" + infers ERROR level from LISTEN_GEM_DEBUGGING="error" + infers INFO level from LISTEN_GEM_DEBUGGING=" true" + logger= + allows the logger to be set + allows nil to be set (implying default logger) + Listen.adapter_warn_behavior + allows the adapter_warn_behavior to be set to to silence the warnings + allows the adapter_warn_behavior to be set to false to silence the warnings + defaults to :warn + allows the adapter_warn_behavior to be set to :log + allows the adapter_warn_behavior to be set to silent to silence the warnings + when LISTEN_GEM_ADAPTER_WARN_BEHAVIOR is set to 'log' + respects the environment variable over a callable config + respects the environment variable over nil + respects the environment variable over false + respects the environment variable over :warn + respects the environment variable over :silent + when adapter_warn_behavior is set to a callable object like a proc + when the message matches a :warn pattern + respects :warn + when the message matches a :silent pattern + respects :silent + when the message matches a #{behavior} pattern + respects :silent + when the message matches a #{behavior} pattern + respects :silent + when the message matches a true pattern + respects :warn -Listen::Adapter - .select - returns Polling adapter if forced - returns Darwin adapter when usable - returns BSD adapter when usable - returns Windows adapter when usable - returns Linux adapter when usable - no usable adapters - warns polling fallback with custom message if set - doesn't warn if polling_fallback_message is false - warns polling fallback with default message - returns Polling adapter +Listen::Forwarder + passes relative option to Listen + +Listen::Adapter::Polling + with a valid configuration + #start + notifies change on every listener directories path + #_latency + with custom latency overriding + is expected to eq 1234 + with no overriding option + is expected to eq 1.0 + class + is expected to be usable Listen::Adapter::BSD class is expected not to be usable +Listen::Directory + #scan with recursive on + with empty record + with subdir present in dir + snapshots changes for subdir + with non-existing dir + reports no changes + with file.rb & subdir in record + with empty dir + snapshots changes for file & subdir path + with subdir2 path present + snapshots changes for file, file2 & subdir paths + #scan with recursive off + with file & subdir in record + when file2.rb is added + notices file removed and file2 changed + when subdir is removed + notices subdir does not exist + with empty dir + snapshots changes for file path and dir that doesn't exist + sets record dir path + when file.rb no longer exists after scan + rescans + when file.rb removed + notices file was removed + with empty record + with non-existing dir path + unsets record dir path + reports no changes + with file.rb in dir + snapshots changes for file & file2 paths + when network share is disconnected + unsets record dir path + reports no changes + Listen::Record #add_dir - sets itself when . - sets path and keeps old data not overwritten sets itself when nil - correctly sets new directory data + sets itself when . sets itself when empty + correctly sets new directory data + sets path and keeps old data not overwritten + #update_file + with path in watched dir + sets path by spliting dirname and basename + sets path and keeps old data not overwritten + with subdir path + sets path by splitting dirname and basename + sets path and keeps old data not overwritten #dir_entries - in watched dir - with file.rb in record - is expected to eq {"file.rb"=>{:mtime=>1.1}} - with no entries - is expected to be empty - with subdir/file.rb in record - is expected to eq {"subdir"=>{}} + when there is a file with a similar name to a dir + is expected to eq {"README.md"=>{:mtime=>1.2}} in subdir /path with path/subdir with file is expected to be empty - with no entries + with path renamed to file is expected to be empty with empty path/subdir is expected to be empty - with path renamed to file - is expected to be empty with path/file.rb already in record is expected to eq {"file.rb"=>{:mtime=>1.1}} - when there is a file with a similar name to a dir - is expected to eq {"README.md"=>{:mtime=>1.2}} + with no entries + is expected to be empty when there is a file with the same name as a dir is expected to eq {"README.md"=>{:mtime=>1.2}} + in watched dir + with file.rb in record + is expected to eq {"file.rb"=>{:mtime=>1.1}} + with no entries + is expected to be empty + with subdir/file.rb in record + is expected to eq {"subdir"=>{}} #unset_path - within subdir + within watched dir when path not present unsets path when path is present unsets path - within watched dir + within subdir when path not present unsets path when path is present unsets path #build re-inits paths + with subdir containing files + builds record, skipping silenced patterns + with subdir containing dirs + builds record with a normal symlinked directory to another shows message with no subdirs builds record - with subdir containing files - builds record, skipping silenced patterns - with subdir containing symlink to parent - shows a warning with subdir containing symlinked file shows a warning - with subdir containing dirs - builds record + with subdir containing symlink to parent + shows a warning #file_data with path in subdir when path is present @@ -2210,69 +2161,154 @@ return empty hash when path is present returns file data - #update_file - with path in watched dir - sets path and keeps old data not overwritten - sets path by spliting dirname and basename - with subdir path - sets path by splitting dirname and basename - sets path and keeps old data not overwritten -Listen::Backend - #initialize - with config - sets up an adapter class - #start - starts the adapter +Listen::Change + #change + directory + calls Listen::Directory#new + file + with unknown change + doesn't call Listen::File#change if path is silenced + calls Listen::File#change + that returns no change + doesn't notifies no change + that returns a change + listener listen + notifies change to listener + silence option + notifies change to listener + with known change + notifies change directly to listener + doesn't notify to listener if path is silenced + with build options + calls still_building! on record + +Listen::Listener + #pause + sets paused to true #stop - stops the adapter + when only initialized + terminates + when fully started + terminates + #ignore! + with no existing options + sets options + with existing ignore options + deletes ignore options + with existing ignore! options + overwrites existing ignore options + #only + with existing only options + overwrites existing ignore options + #paused? + returns true when paused + returns false when not paused + #ignore + with existing ignore options + adds up to existing ignore options + with existing ignore options (array) + adds up to existing ignore options + initialize + is expected not to be paused + with directories + passes directories to backend + with a block + passes the block to the event processor + #start + starts adapter + sets paused to false + unpause with start + sets paused to false + #listen? + when stopped + is expected not to be processing + when paused + is expected not to be processing + when processing + is expected to be processing -Listen::File - #inaccurate_mac_time? - with one accurate time - is expected to be falsey - with no accurate times - is expected to be truthy - with all accurate times - is expected to be falsey - #change - with file record - with existing file - with different mode in record - sets path in record with expected data - is expected to equal :modified - with same mode in record - with earlier mtime than in record - is expected to equal :modified - sets path in record with expected data - with identical mtime in record - with accurate stat times - is expected to be nil - with inaccurate stat times - with real mtime barely not within last second - is expected to be nil - with real mtime barely within last second - with available sha - with no sha in record - is expected to be nil - with different sha in record - sets path in record with expected data - is expected to equal :modified - with same sha in record - is expected to be nil - without available sha - is expected to equal :removed - should not unset record - with later mtime than in record - sets path in record with expected data - is expected to equal :modified - with non-existing file - sets path in record - is expected to eq :removed - with empty record - with existing path - sets path in record with expected data - returns added +Listen::Event::Loop + when set up / started + #stop + sets the reason for waking up + frees the thread + waits for the thread to finish + #start + is started + when start is called again + returns silently + when state change to :started takes longer than 5 seconds + raises Error::NotStarted + +Listen::CLI + relative option + when --relative + supports --relative option + supports -r option + when -r + is set to true + without relative option + is set to false + directories option + with a multiple directories + is set to an array of the directories + not specified + is set to local directory + with a single directory + is set to app + +Listen::Event::Config + with a given block + is callable + calls the block + +Listen::Adapter::Config + #queue + provides a direct queue for filesystem events + #adapter_options + provides a set of adapter_specific options + #silencer + provides a silencer object + #initialize + with no directories + returns the current path in array + with directories as messy array + implement me (PENDING: Not yet implemented) + with file path + raises argument error requesting a directory + with directories as array + with strings for directories + when not resolved + returns array of resolved pathnames + when already resolved + returns array of pathnames + with Pathnames for directories + returns array of pathnames + +Listen::Thread + .new + calls Thread.new + when exception raised + rescues and logs exceptions + rescues and logs backtrace + exception backtrace + when nested exceptions raised + details exception causes + when exception raised that is not derived from StandardError + SystemStackError + does not rescue + NoMemoryError + does not rescue + SecurityError + does not rescue + TestExceptionDerivedFromException + does not rescue + SystemExit + does not rescue + .rescue_and_log + rescues and logs nested exceptions + when exception raised that is not derived from StandardError + raises out Pending: (Failures listed here are expected and do not affect your suite's status) @@ -2280,10 +2316,10 @@ # Not yet implemented # ./spec/lib/listen/adapter/config_spec.rb:87 -Finished in 0.74399 seconds (files took 0.27945 seconds to load) +Finished in 0.6995 seconds (files took 0.2883 seconds to load) 331 examples, 0 failures, 1 pending -Randomized with seed 27056 +Randomized with seed 65163 ┌──────────────────────────────────────────────────────────────────────────────┐ @@ -2317,12 +2353,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/3357797/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/3357797/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/2838127 and its subdirectories -I: Current time: Mon Feb 3 01:18:13 -12 2025 -I: pbuilder-time-stamp: 1738588693 +I: removing directory /srv/workspace/pbuilder/3357797 and its subdirectories +I: Current time: Mon Mar 9 09:42:00 +14 2026 +I: pbuilder-time-stamp: 1772998920