Commit graph

226 commits

Author SHA1 Message Date
da092d5f8c Changed Misc\DateFormatter to a collection of static methods and renamed it to Date; renamed Data to Arsse to avoid confusion and better reflect its centrality 2017-07-17 07:47:57 -04:00
fd1f23fd82 Docblocks for Conf
- Improves #36
- Updated dependencies
2017-07-16 22:27:55 -04:00
bfde232870 Experimental curl-based Service driver
Probably it's not yet functional
2017-07-16 14:56:43 -04:00
9f90756ede Improvements to Service 2017-07-16 14:55:37 -04:00
e797de05c2 Fix NCNv1 tests
- Version report test was failing
- Added test for offset=0
2017-07-16 11:51:18 -04:00
6d4aa4db6e Minimally functional, highly experimental, working server
- Basic update service handles only one feed at a time and possibly leaks memory
- Output for REST requests is still very basic
- No avatar support
- No reporting of whether cron works
- No cleanup before or after feed updates
2017-07-15 16:44:06 -04:00
d4674c61b2 More bug fixes
- use DateFormatter throughout the Feed class
- Ensure dates have TEXT affinity in SQLite, in case it matters
- Add a userPreAuth setting for when relying on the Web server to do authentication
2017-07-15 13:33:17 -04:00
15285dba1e Add PHPHDoc type hints for certain class properties
This should aid autocompletion in IDEs
2017-07-14 10:16:16 -04:00
ac73ed0e7f More tweaks
- Changed Data::$l to Data::$lang; it's not used enough to justify the possibly confusing shortening
- Made database auto-update a general rather than per-driver setting
- Added settings for forthcoming feed fetching service
2017-07-11 20:27:37 -04:00
387b40829b Tweaks 2017-07-11 09:15:44 -04:00
eacada3982 Fix ISO 8601 format strings 2017-07-09 18:31:03 -04:00
4992b2c669 Tests for NCN v1 article listing and marking, with slight fixes
-Fixes #7
-Fixes #13
-Fixes #14
-Fixes #15
-Fixes #16
-Fixes #17
-Fixes #18
-Fixes #19
-Fixes #20
-Fixes #21
-Fixes #22
-Fixes #23
-Fixes #24
2017-07-09 17:57:18 -04:00
b3f631e335 Use more reliable database locking strategy; reorganize tests
PostgreSQL and MySQL both have better locking mechanisms than what was previously implemented, as well
2017-07-07 21:06:38 -04:00
17ec6cf669 Move date formatting out of SQL and standardize on the DateFormatter trait
Fixes #56
2017-07-07 15:25:47 -04:00
7e7b204d85 Cleanup
- Revamped design of Query class to be more consistent and predictable, and generally suck less
- Removed special case for Query class in Statement class
- Cleaned up database schema somewhat
2017-07-07 11:49:54 -04:00
3fad820be4 REST functions for article listing and marking
Needs testing
2017-07-07 08:13:03 -04:00
761c1054f3 Added context options to mark multiple specific articles or editions
This required significant rewrites of queries because of stale editions
2017-07-06 22:53:17 -04:00
c51ee594aa Last of the article series of tests 2017-07-05 10:59:13 -04:00
d78318bed7 Last of marking context tests 2017-07-05 09:09:38 -04:00
5742d949cc More article marking tests, some context tests
Various fixes as a result
2017-06-30 13:53:19 -04:00
c2f60bc5d2 More article tests
- Test the values returned by articleList
- Test paged and reversed listing
- Test marking, un/read, un/starred, and both
- Nearly complete rewrite of marking queries; previous efforts simply did not work, or overzealously updated or inserted
- Testing of marking contexts still required
2017-06-29 23:56:43 -04:00
ee9d8c1ceb First tests for articleList
Fixed many errors in queries:
- Prepared statement wasn't running at all :)
- Returning feed ID rather than subscription ID
- latestEdition wasn't matching
2017-06-22 13:07:56 -04:00
7e458dddbc More test re-organization 2017-06-18 12:48:29 -04:00
845b47e656 Re-organize test data for Database tests 2017-06-18 12:24:19 -04:00
483874e21d Implemented query contexts
- Fixes #55
- Included test for Context
- Adjusted Database::editionLatest() to use Context
- Adjusted NCN handler and tests accordingly
- Also refined experimental Database::articleList() method and added experimental Database::articlePropertiesSet() method
2017-06-18 10:23:37 -04:00
87fce033bd Fix failing tests
Not sure how I missed this...
2017-06-16 19:22:42 -04:00
21db3d0f52 Tweaks 2017-06-10 13:29:46 -04:00
c37d476ba0 Changes to Database internals
- Driver->prepare() can now take a new Database\Query object as the first parameter
- The Query class allows for building a complex query out of a main body, common table expressions, WHERE coniditions, ordering conditions, a limit, and offset
- The subscriptionList method is the prototypical example of usage
- The experimental articleList method will in time be adapted to use this as well
- A generic means of specifying a selection context is forthcoming; this would remove subscriptionList's $folder and $id parameters, for instance
2017-06-04 18:00:18 -04:00
2332cd52a3 Cleanup 2017-06-04 08:15:10 -04:00
dd24246f49 Finished last of feedUpdate tests; implemented NCN API functions
- Fixes #26
- Fixes #27
2017-06-03 17:34:37 -04:00
0514321a76 Save enclosures and categories properly in feedUpdate 2017-06-03 14:08:33 -04:00
0ab6210214 Fix feed ID discovery so it doesn't short-circuit the item loop 2017-06-03 13:43:58 -04:00
ba61ca2b2c Add category list to feed items 2017-06-03 11:16:26 -04:00
140d608f0f Split feed fetching tests from feed parsing tests
Lack of curl should not skip all Feed tests, just those that require curl to be reliable.
2017-06-03 09:06:30 -04:00
c6b7e653c5 Tests for feedUpdate and feedListStale
The update process neglects to handle enclosures; this will have to be fixed
2017-06-02 19:16:36 -04:00
78e669fbfc Improvements to database test harness 2017-06-02 14:12:36 -04:00
81419452b5 Added topmost folder to output of subscriptionList. Fixes #54
- Adjusted NCN handler to use the topmost folder for folderId; suppressed the actual folder so as not to pollute output with non-standard data
- Updated tests
2017-06-01 18:12:08 -04:00
ba6b5dee85 Simplify in-database settings
The previous complexity is really not required. Also modified how settingSet() works to avoid a REPLACE query, which is not compatible with PostgreSQL.
2017-06-01 16:24:11 -04:00
719290c82a Remove dependency on Webmozart's Glob outside of testing
Native glob is effectively tested via use of unmodified Lang throughout non-Lang tests
2017-06-01 13:50:46 -04:00
b778e8eacd Fix failing test 2017-05-30 20:55:29 -04:00
5b8f23441c Feed tests: article matching
These should be the last required tests for the Feed class
2017-05-30 20:18:04 -04:00
3e5343e3e8 Feed tests: last set of next-fetch tests, with fixes 2017-05-27 23:14:43 -04:00
4d8def4bfd Document PHP extensions required by Arsse
Does not include extensions required by PicoFeed
2017-05-27 18:39:43 -04:00
91c97b9ed8 Delete accidentally committed file 2017-05-27 18:18:53 -04:00
7656de716b Feed tests: fetching and parsing 2017-05-27 18:15:52 -04:00
ff59f00356 Feed tests: deduplication 2017-05-26 17:55:51 -04:00
c800852f3a Remove stubs to support non-HTTP authentication
Also removes authPreferHTTP setting
2017-05-26 13:06:06 -04:00
835eff9a9e Readme: fill in expected requirements 2017-05-26 12:08:56 -04:00
9c65e31457 Add license file and skeleton of readme 2017-05-26 10:01:35 -04:00
6771e8916a Fixed more Feed bugs
- Two items with differing IDs but identical hashes were matching in the deduplicator; they shouldn't
- They would also match in the database matcher, and shouldn't
- The second-pass database matcher was overaggressively finding items as new
2017-05-23 22:15:57 -04:00