about summary refs log tree commit homepage
path: root/t/feed.t
DateCommit message (Collapse)
2021-03-15t/feed: switch to create_inbox
This only saves a few milliseconds, but is less code.
2021-01-01update copyrights for 2021
Using "make update-copyrights" after setting GNULIB_PATH in my config.mak
2020-12-09treewide: replace {-inbox} with {ibx} for consistency
{ibx} is shorter and is the most prevalent abbreviation in indexing and IMAP code, and the `$ibx' local variable is already prevalent throughout. In general, the codebase favors removal of vowels in variable and field names to denote non-references (because references are "lighter" than non-references). So update WWW and Filter users to use the same code since it reduces confusion and may allow easier code sharing.
2020-05-09remove most internal Email::MIME usage
We no longer load or use Email::MIME outside of comparison tests.
2020-04-22t/*.t: reduce dependency on Email::MIME APIs
Instead, favor PublicInbox::MIME->new for non-attachment emails. We may support alternatives to Email::MIME down the line. We'll still keep Email::MIME->create to deal with attachments, for now, but there's also a fair amount of test duplication we should eliminate, later.
2020-04-22t/feed: remove useless $ENV{GIT_DIR} assignment
I don't think this has been useful since we stopped supporting ssoma in this test.
2020-04-20import: init_bare: allow use as method, use in tests
Allowing ->init_bare to be used as a method saves some keystrokes, and we can save a little bit of time on systems with our vfork(2)-enabled spawn(). This also sets us up for future improvements where we can avoid spawning a process at all.
2020-02-07tests: switch to XML::TreePP for testing Atom feeds
XML::Feed pulls in a lot of dependencies, some of which XS. That makes testing with blead or any non-OS-supplied Perl installations more time consuming and more difficult because of the need to have development headers and libraries for libexpat1 or libxml2. Performance from libexpat1 or libxml2 for our small tests cases isn't relevant, either, and the pure Perl XML::TreePP seems up to the task. It's also available in CentOS 7.x, FreeBSD 11.x, and Debian, at least.
2020-02-06treewide: run update-copyrights from gnulib for 2019
I didn't wait until September to do it, this year!
2020-01-06treewide: "require" + "use" cleanup and docs
There's a bunch of leftover "require" and "use" statements we no longer need and can get rid of, along with some excessive imports via "use". IO::Handle usage isn't always obvious, so add comments describing why a package loads it. Along the same lines, document the tmpdir support as the reason we depend on File::Temp 0.19, even though every Perl 5.10.1+ user has it. While we're at it, favor "use" over "require", since it it gives us extra compile-time checking.
2020-01-02config: support multi-value inbox.*.*url
Since the beginning of this project, we've implicitly supported inboxes with multiple URLs by relying on the Host: header sent by the client ($env->{HTTP_HOST}). We now offer the option to explicitly configure multiple URLs for every inbox along with the ability to do a best-effort match for matching hostnames.
2019-12-19tests: move t/common.perl to PublicInbox::TestCommon
We want to be able to use run_script with *.t files, so t/common.perl putting subs into the top-level "main" namespace won't work. Instead, make it a module which uses Exporter like other libraries.
2019-11-24tests: use File::Temp->newdir instead of tempdir()
We'll also introduce a tmpdir() API to give tempdirs consistent names.
2019-11-15t/common: inline stream_to_string into t/feed.t
We only use it in one place and have favored test_psgi in newer tests, so move it out-of-the-way to reduce startup overhead of other *.t files.
2019-10-16config: support "inboxdir" in addition to "mainrepo"
"mainrepo" ws a bad name and artifact from the early days when I intended for there to be a "spamrepo" (now just the ENV{PI_EMERGENCY} Maildir). With v2, "mainrepo" can be especially confusing, since v2 needs at least two git repositories (epoch + all.git) to function and we shouldn't confuse users by having them point to a git repository for v2. Much of our documentation already references "INBOX_DIR" for command-line arguments, so use "inboxdir" as the git-config(1)-friendly variant for that. "mainrepo" remains supported indefinitely for compatibility. Users may need to revert to old versions, or may be referring to old documentation and must not be forced to change config files to account for this change. So if you're using "mainrepo" today, I do NOT recommend changing it right away because other bugs can lurk. Link: https://public-inbox.org/meta/874l0ice8v.fsf@alyssa.is/
2019-01-02t/feed.t: remove ssoma use
No need to waste cycles with this anymore.
2018-02-07update copyrights for 2018
Using update-copyrights from gnulib While we're at it, use the SPDX identifier for AGPL-3.0+ to ease mechanical processing.
2017-06-26tests: deal with the removal of '.' from @INC in newer Perl
Oops, this is needed for Perl 5.22 (tested 5.24.1) since '.' was removed due to security problems. Fwiw, I consider this change to Perl an overreaction and do not agree with it.
2016-12-17feed: support publicinbox.<name>.feedmax
This allows users to customize by using smaller or larger Atom feeds than the default value of 25 entries.
2016-06-20inbox: move field population logic to initializer
Inboxes are normally created by Config, but having the population logic in Inbox should make it easier to mock for testing.
2016-06-20feed: various object-orientation cleanups
Favor Inbox objects as our primary source of truth to simplify our code. This increases our coupling with PSGI to make it easier to write tests in the future. A lot of this code was originally designed to be usable standalone without PSGI or CGI at all; but that might increase development effort.
2016-06-15t/feed.t: make IPC::Run usage optional
Since ssoma is optional, here, IPC::Run shall also be optional. (And it may be removed entirely in the future).
2016-05-14rename most instances of "list" to "inbox"
A public-inbox is NOT necessarily a mailing list, but it could serve as an input point for zero, one, or infinite mailing lists :D
2016-04-25t/feed.t: run properly without ssoma installed
While we're at it, update some references to ssoma in the Makefile.PL comment.
2016-04-25remove ssoma dependency
By converting to using ourt git-fast-import-based Import module. This should allow us to be more easily installed.
2016-04-13www: stop generating /$MESSAGE_ID/f/ links
Quote-folding can be detrimental as it fails to hide the real problem of over-quoting. Over-quoting wastes bandwidth and space for all readers, not just WWW readers of the public-inbox. So hopefully removing quote-folding support from the WWW interface can shame those repliers into quoting only relevant portions of what they reply to.
2016-03-03t/*.t: use identifiable tempdir names
This should make identifiying leftover directories due to SIGKILL-ed tests easier.
2015-09-06update copyright headers and email addresses
In the future, it should be possible to use this: git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ xargs /path/to/gnulib/build-aux/update-copyright
2015-09-01completely revamp URL structure to shorten permalinks
This allows common /m/ links to be used without a prefix, saving 2 precious bytes for permalinks and raw messages. Old URLs continue to redirect.
2015-08-27wire up to display non-suffixed Message-ID links
These URLs are preferable in case somebody decides to get cute and use a suffix we would've used to prevent others from linking to their message. The common /m/$MESSAGE_ID/ URLs are now 4 characters shorter so may fit better on terminals.
2015-08-22remove XML::Atom::SimpleFeed dependency
We will attempt to generate Atom feeds "by hand" as the XML::Atom::SimpleFeed API does not support streaming output. Since email is large and servers are small, this should prevent wasting memory when we generate larger feeds. Of course, we hope clients use SAX parsers capable of handling large streams without slurping.
2014-08-28view: increase MAX_INLINE_QUOTED threshold to 12
12 lines is half an 80x24 terminal, so it is probably a reasonable amount to quote. Often 5 lines was not enough for context. This feature is mainly to reduce scrolling necessary to view pages.
2014-04-27Feed: <id> element must be a URI, oops :x
For each feed element, we'll just use the link since there's currently no suitable URN.
2014-04-23t/feed: cleanup test and add test for /f/ link
We already depend on IPC::Run, so just use it our tests.
2014-04-23feed: add tests for <id> element setting
We need to ensure this works This follows commit bd8fd095067b79a0d2a40bbca2b27b923d02b3f8 ("feed: fix address when multiple addresses exist")
2014-04-23t/feed: notify user of missing XML::Feed
One of my dev machines did not have XML::Feed so things were not tested sufficiently.
2014-04-17view: inline shorter quotes
Breaking up short quote messages at 1 line is too disconcerting, try 5 lines as proper quotes shouldn't be too long.
2014-04-07feed: generate takes a hashref for args
Passing a giant argument list is to error prone and hard-to-document.
2014-04-06feed: reuse view class to display message
This reduces duplicated/similar code and hopefully makes things more consistent.
2014-03-24initial cut at Atom feed generation
This should make it easier for non-ssoma users to follow.