Diff of the two buildlogs:
--
--- b1/build.log 2025-01-29 06:24:21.875750117 +0000
+++ b2/build.log 2025-01-29 06:27:04.788379975 +0000
@@ -1,6 +1,6 @@
I: pbuilder: network access will be disabled during build
-I: Current time: Tue Jan 28 18:22:26 -12 2025
-I: pbuilder-time-stamp: 1738131746
+I: Current time: Wed Mar 4 02:47:25 +14 2026
+I: pbuilder-time-stamp: 1772542045
I: Building the build Environment
I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz]
I: copying local configuration
@@ -24,51 +24,83 @@
dpkg-source: info: applying fix-FTBFS-with-ruby-rspec-3.12.patch
I: Not using root during the build.
I: Installing the build-deps
-I: user script /srv/workspace/pbuilder/3413745/tmp/hooks/D02_print_environment starting
+I: user script /srv/workspace/pbuilder/3018400/tmp/hooks/D01_modify_environment starting
+debug: Running on infom02-amd64.
+I: Changing host+domainname to test build reproducibility
+I: Adding a custom variable just for the fun of it...
+I: Changing /bin/sh to bash
+'/bin/sh' -> '/bin/bash'
+lrwxrwxrwx 1 root root 9 Mar 3 12:47 /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/3018400/tmp/hooks/D01_modify_environment finished
+I: user script /srv/workspace/pbuilder/3018400/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='amd64'
- 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]="x86_64-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=amd64
+ DEBIAN_FRONTEND=noninteractive
DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=12 '
- DISTRIBUTION='unstable'
- HOME='/root'
- HOST_ARCH='amd64'
+ DIRSTACK=()
+ DISTRIBUTION=unstable
+ EUID=0
+ FUNCNAME=([0]="Echo" [1]="main")
+ GROUPS=()
+ HOME=/root
+ HOSTNAME=i-capture-the-hostname
+ HOSTTYPE=x86_64
+ HOST_ARCH=amd64
IFS='
'
- INVOCATION_ID='34615f410e3f4bd9a637416492f5f733'
- 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='3413745'
- PS1='# '
- PS2='> '
+ INVOCATION_ID=371245a3efa745a78d137117b5bfa1a1
+ LANG=C
+ LANGUAGE=et_EE:et
+ LC_ALL=C
+ MACHTYPE=x86_64-pc-linux-gnu
+ MAIL=/var/mail/root
+ OPTERR=1
+ OPTIND=1
+ OSTYPE=linux-gnu
+ PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path
+ PBCURRENTCOMMANDLINEOPERATION=build
+ PBUILDER_OPERATION=build
+ PBUILDER_PKGDATADIR=/usr/share/pbuilder
+ PBUILDER_PKGLIBDIR=/usr/lib/pbuilder
+ PBUILDER_SYSCONFDIR=/etc
+ PIPESTATUS=([0]="0")
+ POSIXLY_CORRECT=y
+ PPID=3018400
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.DPtYIg0s/pbuilderrc_ueGV --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.DPtYIg0s/b1 --logfile b1/build.log ruby-slack-messenger_2.3.5-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'
+ 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.DPtYIg0s/pbuilderrc_9a9G --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.DPtYIg0s/b2 --logfile b2/build.log ruby-slack-messenger_2.3.5-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'
I: uname -a
- Linux infom01-amd64 6.1.0-30-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1 (2025-01-12) x86_64 GNU/Linux
+ Linux i-capture-the-hostname 6.12.9+bpo-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.9-1~bpo12+1 (2025-01-19) 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/3413745/tmp/hooks/D02_print_environment finished
+ lrwxrwxrwx 1 root root 7 Nov 22 2024 /bin -> usr/bin
+I: user script /srv/workspace/pbuilder/3018400/tmp/hooks/D02_print_environment finished
-> Attempting to satisfy build-dependencies
-> Creating pbuilder-satisfydepends-dummy package
Package: pbuilder-satisfydepends-dummy
@@ -257,7 +289,7 @@
Get: 143 http://deb.debian.org/debian unstable/main amd64 ruby-rspec-expectations all 3.13.0c0e0m0s1-2 [90.2 kB]
Get: 144 http://deb.debian.org/debian unstable/main amd64 ruby-rspec-mocks all 3.13.0c0e0m0s1-2 [81.3 kB]
Get: 145 http://deb.debian.org/debian unstable/main amd64 ruby-rspec all 3.13.0c0e0m0s1-2 [5184 B]
-Fetched 56.3 MB in 4s (15.8 MB/s)
+Fetched 56.3 MB in 1s (89.2 MB/s)
Preconfiguring packages ...
Selecting previously unselected package libpython3.13-minimal:amd64.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 19843 files and directories currently installed.)
@@ -739,8 +771,8 @@
Setting up tzdata (2025a-1) ...
Current default time zone: 'Etc/UTC'
-Local time is now: Wed Jan 29 06:24:06 UTC 2025.
-Universal Time is now: Wed Jan 29 06:24:06 UTC 2025.
+Local time is now: Tue Mar 3 12:49:28 UTC 2026.
+Universal Time is now: Tue Mar 3 12:49:28 UTC 2026.
Run 'dpkg-reconfigure tzdata' if you wish to change it.
Setting up ruby-minitest (5.22.3-1) ...
@@ -872,7 +904,11 @@
Building tag database...
-> Finished parsing the build-deps
I: Building the package
-I: Running cd /build/reproducible-path/ruby-slack-messenger-2.3.5/ && 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-slack-messenger_2.3.5-1_source.changes
+I: user script /srv/workspace/pbuilder/3018400/tmp/hooks/A99_set_merged_usr starting
+Not re-configuring usrmerge for unstable
+I: user script /srv/workspace/pbuilder/3018400/tmp/hooks/A99_set_merged_usr finished
+hostname: Name or service not known
+I: Running cd /build/reproducible-path/ruby-slack-messenger-2.3.5/ && 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-slack-messenger_2.3.5-1_source.changes
dpkg-buildpackage: info: source package ruby-slack-messenger
dpkg-buildpackage: info: source version 2.3.5-1
dpkg-buildpackage: info: source distribution unstable
@@ -905,7 +941,7 @@
│ ruby-slack-messenger: Installing files and building extensions for ruby3.3 │
└──────────────────────────────────────────────────────────────────────────────┘
-/usr/bin/ruby3.3 -S gem build --config-file /dev/null --verbose /tmp/d20250128-3464140-dh38zu/gemspec
+/usr/bin/ruby3.3 -S gem build --config-file /dev/null --verbose /tmp/d20260304-3030641-8jttx5/gemspec
WARNING: expected RubyGems version 3.6.3, was 3.4.20
WARNING: make sure you specify the oldest ruby version constraint (like ">= 3.0") that you want your gem to support by setting the `required_ruby_version` gemspec attribute
WARNING: See https://guides.rubygems.org/specification-reference/ for help
@@ -913,7 +949,7 @@
Name: slack-messenger
Version: 2.3.5
File: slack-messenger-2.3.5.gem
-/usr/bin/ruby3.3 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-slack-messenger/usr/share/rubygems-integration/all /tmp/d20250128-3464140-dh38zu/slack-messenger-2.3.5.gem
+/usr/bin/ruby3.3 -S gem install --config-file /dev/null --verbose --local --verbose --no-document --ignore-dependencies --install-dir debian/ruby-slack-messenger/usr/share/rubygems-integration/all /tmp/d20260304-3030641-8jttx5/slack-messenger-2.3.5.gem
/build/reproducible-path/ruby-slack-messenger-2.3.5/debian/ruby-slack-messenger/usr/share/rubygems-integration/all/gems/slack-messenger-2.3.5/lib/slack-messenger.rb
/build/reproducible-path/ruby-slack-messenger-2.3.5/debian/ruby-slack-messenger/usr/share/rubygems-integration/all/gems/slack-messenger-2.3.5/lib/slack-messenger/config.rb
/build/reproducible-path/ruby-slack-messenger-2.3.5/debian/ruby-slack-messenger/usr/share/rubygems-integration/all/gems/slack-messenger-2.3.5/lib/slack-messenger/payload_middleware.rb
@@ -961,14 +997,43 @@
All examples were filtered out; ignoring {:focus=>true}
-Randomized with seed 30297
+Randomized with seed 10758
-Slack::Messenger::PayloadMiddleware
- ::registry
- returns a hash if nothing set
- returns memoized version if already set
- ::register
- adds given class to key in registry
+Slack::Messenger::PayloadMiddleware::Stack
+ #set
+ creates a stack from hashes passing them as opts
+ creates the stack in an array
+ initializes each middleware w/ the messenger instance
+ raises if a middleware is missing
+ ::initialize
+ has empty stack
+ sets messenger to given messenger
+ #call
+ calls the middleware in order, passing return of each to the next
+ handles multiple middleware splitting payload
+ allows any middleware to return an array but other's don't need special behavior
+
+Slack::Messenger
+ sends correct payload for #post({:text=>"hello", :http_options=>{:timeout=>5}})
+ sends correct payload for #post({:text=>"[hello](http://example.com/world)"})
+ sends correct payload for #post({:text=>"hello/\u3053\u3093\u306B\u3061\u306F from messenger test"})
+ sends correct payload for #post({:text=>"[John](mailto:john@example.com)"})
+ sends correct payload for #post({:text=>"the message", :channel=>"foo", :attachments=>[{:color=>"#000", :text=>"attachment message", :fallback=>"fallback message"}]})
+ applies options given to middleware
+ sends correct payload for #post({:attachments=>{:color=>"#000", :text=>nil, :fallback=>"fallback message"}})
+ sends correct payload for #post({:text=>"Hello World, enjoy [](http://example.com)."})
+ sends correct payload for #post({:text=>nil, :attachments=>[{:text=>"attachment message"}]})
+ sends correct payload for #post({:text=>"John"})
+ sends correct payload for #post({:text=>"Hello World, enjoy [this](http://example.com)[this2](http://example2.com)"})
+ sends correct payload for #post({:attachments=>{:color=>"#000", :text=>"attachment message [hodor](http://winterfell.com)", :fallback=>"fallback message"}})
+ sends correct payload for #post({:text=>"hello"})
+ sends correct payload for #post({:attachments=>[{:color=>"#000", :text=>"attachment message", :fallback=>"fallback message"}]})
+ sends correct payload for #post({:text=>"example"})
+ sends correct payload for #post({:text=>"hello", :channel=>"hodor"})
+
+Slack::Messenger::PayloadMiddleware::Channels
+ leaves string channels alone
+ splits payload into multiple if given an array of channels
Slack::Messenger::Util::HTTPClient
#initialize
@@ -978,140 +1043,111 @@
#call
raises an error when the response is unsuccessful
-Slack::Messenger::PayloadMiddleware::FormatAttachments
- can handle a single attachment
- wraps attachment into array if given as a single hash
- passes the text of attachments through linkformatter with options[:formats]
- searches through string or symbol keys
- returns the payload unmodified if not :attachments key
-
Slack::Messenger::PayloadMiddleware::At
can handle array at
- generates :text in payload if given :at & no :text
can handle single at option
+ generates :text in payload if given :at & no :text
-Slack::Messenger::PayloadMiddleware::Channels
- splits payload into multiple if given an array of channels
- leaves string channels alone
+Slack::Messenger::PayloadMiddleware::FormatMessage
+ passes the text through linkformatter with options[:formats]
+ returns the payload unmodified if not :text key
Slack::Messenger::Config
#defaults
- is an empty hash by default
sets a hash to default if given
+ is an empty hash by default
raises ArgumentError if not given a hash
- #http_client
- raises an ArgumentError if given class does not respond to ::post
- sets a new client class if given one
- is Util::HTTPClient if not set
#middleware
+ is [:format_message, :format_attachments, :at] if not set
allows passing options to middleware stack
takes an array or a splat of args
- is [:format_message, :format_attachments, :at] if not set
-
-Slack::Messenger::Util::UntrustedRegexp
- #replace_gsub
- replaces nothing when no match
- handles empty text
- replaces all instances of the match in a string
- #match
- when there are matches
- returns a match object
- when there are no matches
- returns nil
- #initialize
- invalid regexp
- is expected to raise RegexpError
-
-Slack::Messenger::PayloadMiddleware::Stack
- #set
- creates a stack from hashes passing them as opts
- raises if a middleware is missing
- initializes each middleware w/ the messenger instance
- creates the stack in an array
- #call
- calls the middleware in order, passing return of each to the next
- handles multiple middleware splitting payload
- allows any middleware to return an array but other's don't need special behavior
- ::initialize
- has empty stack
- sets messenger to given messenger
+ #http_client
+ is Util::HTTPClient if not set
+ raises an ArgumentError if given class does not respond to ::post
+ sets a new client class if given one
-Slack::Messenger::PayloadMiddleware::FormatMessage
- returns the payload unmodified if not :text key
- passes the text through linkformatter with options[:formats]
+Slack::Messenger::PayloadMiddleware::FormatAttachments
+ returns the payload unmodified if not :attachments key
+ wraps attachment into array if given as a single hash
+ searches through string or symbol keys
+ passes the text of attachments through linkformatter with options[:formats]
+ can handle a single attachment
Slack::Messenger::PayloadMiddleware::Base
::options
allows setting default options for a middleware
#call
raises NoMethodError (expects subclass to define)
+ #initialize
+ sets given options as opts
+ sets given messenger as messenger
::middleware_name
uses symbolized name to register
registers class w/ given name
+
+Slack::Messenger::PayloadMiddleware
+ ::registry
+ returns a hash if nothing set
+ returns memoized version if already set
+ ::register
+ adds given class to key in registry
+
+Slack::Messenger::Util::UntrustedRegexp
+ #replace_gsub
+ replaces all instances of the match in a string
+ replaces nothing when no match
+ handles empty text
+ #match
+ when there are no matches
+ returns nil
+ when there are matches
+ returns a match object
#initialize
- sets given messenger as messenger
- sets given options as opts
+ invalid regexp
+ is expected to raise RegexpError
Slack::Messenger
- #ping
- calls #post with the message as the text key in #post
#post
- allows overriding the set defaults
uses the defaults set on initialization
calls the middleware stack with the payload
+ allows overriding the set defaults
#initialize
+ sets the given hook_url to the endpoint URI
sets a custom http client
sets the default_payload options
- sets the given hook_url to the endpoint URI
when given a block
yields the config object
+ #ping
+ calls #post with the message as the text key in #post
Slack::Messenger::Util::LinkFormatter
::format
- doesn't replace valid Japanese
- formats markdown links with no title
- handles mailto links in markdown
- formats markdown links in brackets
- formats markdown links
- handles links with trailing parentheses
- formats html links
handles multiple markdown links
+ formats html links
+ handles multiple html links
handles mailto links in html
+ handles mailto links in markdown
+ formats markdown links in brackets
formats a number of differently formatted links
+ doesn't replace valid Japanese
+ formats markdown links with no title
+ formats markdown links
handles mixed html & markdown links
- handles multiple html links
- when on ruby 2.1+ or have string-scrub installed
- handles invalid unicode sequences
- replaces invalid unicode sequences with the unicode replacement character
+ handles links with trailing parentheses
+ handles malicious strings efficiently
+ takes under a second
with a configured stack
- only formats markdown if markdown is the only item in formats
doesn't format if formats is empty
+ only formats markdown if markdown is the only item in formats
only formats html if html is the only item in formats
- handles malicious strings efficiently
- takes under a second
-
-Slack::Messenger
- sends correct payload for #post({:attachments=>{:color=>"#000", :text=>"attachment message [hodor](http://winterfell.com)", :fallback=>"fallback message"}})
- sends correct payload for #post({:text=>"Hello World, enjoy [this](http://example.com)[this2](http://example2.com)"})
- sends correct payload for #post({:text=>"example"})
- sends correct payload for #post({:attachments=>[{:color=>"#000", :text=>"attachment message", :fallback=>"fallback message"}]})
- sends correct payload for #post({:text=>"hello", :http_options=>{:timeout=>5}})
- sends correct payload for #post({:text=>"hello/\u3053\u3093\u306B\u3061\u306F from messenger test"})
- sends correct payload for #post({:text=>"hello"})
- sends correct payload for #post({:text=>nil, :attachments=>[{:text=>"attachment message"}]})
- sends correct payload for #post({:text=>"Hello World, enjoy [](http://example.com)."})
- sends correct payload for #post({:text=>"hello", :channel=>"hodor"})
- sends correct payload for #post({:text=>"[hello](http://example.com/world)"})
- sends correct payload for #post({:text=>"the message", :channel=>"foo", :attachments=>[{:color=>"#000", :text=>"attachment message", :fallback=>"fallback message"}]})
- sends correct payload for #post({:text=>"[John](mailto:john@example.com)"})
- sends correct payload for #post({:attachments=>{:color=>"#000", :text=>nil, :fallback=>"fallback message"}})
- sends correct payload for #post({:text=>"John"})
- applies options given to middleware
+ when on ruby 2.1+ or have string-scrub installed
+ replaces invalid unicode sequences with the unicode replacement character
+ handles invalid unicode sequences
-Finished in 0.04049 seconds (files took 0.24941 seconds to load)
+Finished in 0.07715 seconds (files took 0.2251 seconds to load)
90 examples, 0 failures
-Randomized with seed 30297
+Randomized with seed 10758
/usr/bin/ruby3.1 /usr/bin/gem2deb-test-runner
@@ -1131,157 +1167,157 @@
All examples were filtered out; ignoring {:focus=>true}
-Randomized with seed 52438
-
-Slack::Messenger::PayloadMiddleware::Channels
- leaves string channels alone
- splits payload into multiple if given an array of channels
-
-Slack::Messenger::Config
- #middleware
- allows passing options to middleware stack
- takes an array or a splat of args
- is [:format_message, :format_attachments, :at] if not set
- #defaults
- raises ArgumentError if not given a hash
- sets a hash to default if given
- is an empty hash by default
- #http_client
- sets a new client class if given one
- raises an ArgumentError if given class does not respond to ::post
- is Util::HTTPClient if not set
-
-Slack::Messenger::Util::UntrustedRegexp
- #replace_gsub
- replaces nothing when no match
- replaces all instances of the match in a string
- handles empty text
- #initialize
- invalid regexp
- is expected to raise RegexpError
- #match
- when there are no matches
- returns nil
- when there are matches
- returns a match object
+Randomized with seed 6659
-Slack::Messenger
- #post
- uses the defaults set on initialization
- allows overriding the set defaults
- calls the middleware stack with the payload
- #ping
- calls #post with the message as the text key in #post
- #initialize
- sets a custom http client
- sets the given hook_url to the endpoint URI
- sets the default_payload options
- when given a block
- yields the config object
-
-Slack::Messenger::PayloadMiddleware
- ::register
- adds given class to key in registry
- ::registry
- returns a hash if nothing set
- returns memoized version if already set
-
-Slack::Messenger::Util::HTTPClient
- ::post
- initializes Util::HTTPClient with the given uri and params then calls
+Slack::Messenger::PayloadMiddleware::Stack
+ #set
+ raises if a middleware is missing
+ initializes each middleware w/ the messenger instance
+ creates the stack in an array
+ creates a stack from hashes passing them as opts
#call
- raises an error when the response is unsuccessful
- #initialize
- allows setting of options for Net::HTTP
-
-Slack::Messenger::PayloadMiddleware::At
- generates :text in payload if given :at & no :text
- can handle array at
- can handle single at option
-
-Slack::Messenger::PayloadMiddleware::FormatAttachments
- wraps attachment into array if given as a single hash
- can handle a single attachment
- passes the text of attachments through linkformatter with options[:formats]
- searches through string or symbol keys
- returns the payload unmodified if not :attachments key
+ calls the middleware in order, passing return of each to the next
+ allows any middleware to return an array but other's don't need special behavior
+ handles multiple middleware splitting payload
+ ::initialize
+ has empty stack
+ sets messenger to given messenger
Slack::Messenger::PayloadMiddleware::Base
- #initialize
- sets given options as opts
- sets given messenger as messenger
::options
allows setting default options for a middleware
::middleware_name
- uses symbolized name to register
registers class w/ given name
+ uses symbolized name to register
+ #initialize
+ sets given options as opts
+ sets given messenger as messenger
#call
raises NoMethodError (expects subclass to define)
-Slack::Messenger::PayloadMiddleware::Stack
- ::initialize
- sets messenger to given messenger
- has empty stack
- #set
- initializes each middleware w/ the messenger instance
- raises if a middleware is missing
- creates a stack from hashes passing them as opts
- creates the stack in an array
- #call
- allows any middleware to return an array but other's don't need special behavior
- calls the middleware in order, passing return of each to the next
- handles multiple middleware splitting payload
-
Slack::Messenger::Util::LinkFormatter
::format
- formats markdown links
- handles mixed html & markdown links
- formats markdown links in brackets
- formats a number of differently formatted links
doesn't replace valid Japanese
+ handles links with trailing parentheses
+ formats html links
handles mailto links in html
handles mailto links in markdown
- formats html links
+ handles mixed html & markdown links
+ handles multiple markdown links
+ formats markdown links
formats markdown links with no title
+ formats markdown links in brackets
+ formats a number of differently formatted links
handles multiple html links
- handles links with trailing parentheses
- handles multiple markdown links
- handles malicious strings efficiently
- takes under a second
with a configured stack
- only formats markdown if markdown is the only item in formats
only formats html if html is the only item in formats
+ only formats markdown if markdown is the only item in formats
doesn't format if formats is empty
when on ruby 2.1+ or have string-scrub installed
replaces invalid unicode sequences with the unicode replacement character
handles invalid unicode sequences
+ handles malicious strings efficiently
+ takes under a second
Slack::Messenger::PayloadMiddleware::FormatMessage
- passes the text through linkformatter with options[:formats]
returns the payload unmodified if not :text key
+ passes the text through linkformatter with options[:formats]
+
+Slack::Messenger::Util::HTTPClient
+ ::post
+ initializes Util::HTTPClient with the given uri and params then calls
+ #call
+ raises an error when the response is unsuccessful
+ #initialize
+ allows setting of options for Net::HTTP
+
+Slack::Messenger::Util::UntrustedRegexp
+ #initialize
+ invalid regexp
+ is expected to raise RegexpError
+ #replace_gsub
+ replaces all instances of the match in a string
+ handles empty text
+ replaces nothing when no match
+ #match
+ when there are matches
+ returns a match object
+ when there are no matches
+ returns nil
+
+Slack::Messenger::PayloadMiddleware::FormatAttachments
+ passes the text of attachments through linkformatter with options[:formats]
+ returns the payload unmodified if not :attachments key
+ wraps attachment into array if given as a single hash
+ searches through string or symbol keys
+ can handle a single attachment
+
+Slack::Messenger::PayloadMiddleware::At
+ can handle array at
+ can handle single at option
+ generates :text in payload if given :at & no :text
+
+Slack::Messenger::PayloadMiddleware::Channels
+ splits payload into multiple if given an array of channels
+ leaves string channels alone
+
+Slack::Messenger::PayloadMiddleware
+ ::registry
+ returns memoized version if already set
+ returns a hash if nothing set
+ ::register
+ adds given class to key in registry
Slack::Messenger
+ #initialize
+ sets a custom http client
+ sets the default_payload options
+ sets the given hook_url to the endpoint URI
+ when given a block
+ yields the config object
+ #ping
+ calls #post with the message as the text key in #post
+ #post
+ allows overriding the set defaults
+ uses the defaults set on initialization
+ calls the middleware stack with the payload
+
+Slack::Messenger
+ sends correct payload for #post({:text=>"John"})
+ applies options given to middleware
+ sends correct payload for #post({:text=>"hello/\u3053\u3093\u306B\u3061\u306F from messenger test"})
sends correct payload for #post({:attachments=>{:color=>"#000", :text=>nil, :fallback=>"fallback message"}})
- sends correct payload for #post({:text=>"the message", :channel=>"foo", :attachments=>[{:color=>"#000", :text=>"attachment message", :fallback=>"fallback message"}]})
- sends correct payload for #post({:text=>"Hello World, enjoy [this](http://example.com)[this2](http://example2.com)"})
sends correct payload for #post({:text=>"hello", :http_options=>{:timeout=>5}})
- sends correct payload for #post({:text=>"example"})
- applies options given to middleware
- sends correct payload for #post({:text=>"hello"})
- sends correct payload for #post({:text=>"John"})
- sends correct payload for #post({:text=>"[hello](http://example.com/world)"})
- sends correct payload for #post({:text=>"[John](mailto:john@example.com)"})
sends correct payload for #post({:text=>"Hello World, enjoy [](http://example.com)."})
sends correct payload for #post({:attachments=>[{:color=>"#000", :text=>"attachment message", :fallback=>"fallback message"}]})
- sends correct payload for #post({:text=>"hello/\u3053\u3093\u306B\u3061\u306F from messenger test"})
- sends correct payload for #post({:attachments=>{:color=>"#000", :text=>"attachment message [hodor](http://winterfell.com)", :fallback=>"fallback message"}})
sends correct payload for #post({:text=>nil, :attachments=>[{:text=>"attachment message"}]})
+ sends correct payload for #post({:text=>"hello"})
+ sends correct payload for #post({:text=>"example"})
+ sends correct payload for #post({:attachments=>{:color=>"#000", :text=>"attachment message [hodor](http://winterfell.com)", :fallback=>"fallback message"}})
+ sends correct payload for #post({:text=>"the message", :channel=>"foo", :attachments=>[{:color=>"#000", :text=>"attachment message", :fallback=>"fallback message"}]})
+ sends correct payload for #post({:text=>"[John](mailto:john@example.com)"})
+ sends correct payload for #post({:text=>"[hello](http://example.com/world)"})
sends correct payload for #post({:text=>"hello", :channel=>"hodor"})
+ sends correct payload for #post({:text=>"Hello World, enjoy [this](http://example.com)[this2](http://example2.com)"})
+
+Slack::Messenger::Config
+ #defaults
+ raises ArgumentError if not given a hash
+ is an empty hash by default
+ sets a hash to default if given
+ #middleware
+ takes an array or a splat of args
+ is [:format_message, :format_attachments, :at] if not set
+ allows passing options to middleware stack
+ #http_client
+ is Util::HTTPClient if not set
+ sets a new client class if given one
+ raises an ArgumentError if given class does not respond to ::post
-Finished in 0.04216 seconds (files took 0.13799 seconds to load)
+Finished in 0.07542 seconds (files took 0.26076 seconds to load)
90 examples, 0 failures
-Randomized with seed 52438
+Randomized with seed 6659
┌──────────────────────────────────────────────────────────────────────────────┐
@@ -1317,12 +1353,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/3018400/tmp/hooks/B01_cleanup starting
+I: user script /srv/workspace/pbuilder/3018400/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/3413745 and its subdirectories
-I: Current time: Tue Jan 28 18:24:21 -12 2025
-I: pbuilder-time-stamp: 1738131861
+I: removing directory /srv/workspace/pbuilder/3018400 and its subdirectories
+I: Current time: Wed Mar 4 02:50:03 +14 2026
+I: pbuilder-time-stamp: 1772542203