1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-23 17:12:41 +00:00
Commit graph

1455 commits

Author SHA1 Message Date
J. King
8ebcb01cb5 Made out-of-order transaction handling more predictable 2017-05-07 18:27:16 -04:00
J. King
2083c6e397 Change transactions to auto-rollback on exceptions 2017-05-06 12:02:27 -04:00
J. King
c2a7ad7b19 Optimize initial feed update 2017-05-04 22:43:18 -04:00
J. King
fb922e65e4 Tests for strict binding 2017-05-04 19:38:54 -04:00
J. King
db132c0c24 Various changes to Database
- Introduced "strict" binding types for use when inserting into NOT NULL columns: any null value supplied is always cast to the supplied type rather than passing through
- Fixed feed updating further
- Filled out full complement of subscription manipulation functions
- made folderPropertiesSet possibly return false
2017-05-04 19:12:33 -04:00
J. King
9c7f4710aa Fix feed fetching
There are almost certainly other bugs; proper tests forthcoming
2017-05-04 14:42:40 -04:00
J. King
9dccdb32a7 Fold feedAdd into subscriptionAdd
A feed will enver been added independently of a subscription
2017-05-04 11:13:24 -04:00
J. King
717e74fb2e Refactored special case for testing 2017-05-03 20:00:29 -04:00
J. King
8376cc9cb9 Mark articles as unread when they are updated 2017-05-01 18:29:07 -04:00
J. King
7546e3b11b Add the ability to throw exceptions in a feed update if desired
This is useful when adding a new feed
2017-04-30 18:36:31 -04:00
J. King
43f73b5d71 Make better use of prepared statements when updating feeds 2017-04-30 18:14:11 -04:00
J. King
3bc9082cfa Integrated adaptive update intervals Fixes #51 2017-04-30 17:54:29 -04:00
J. King
3b4d79abc8 Implement second part of adaptive update interval; improves #51
Implements part of algorithm used when feed has been updated
2017-04-27 09:47:40 -04:00
J. King
2e64e60f2e Implement part of adaptive update interval; improves #51
Implements part of algorithm used when a feed has not been updated; this is much simpler than when a feed has been modified
2017-04-24 21:51:56 -04:00
J. King
f842439b01 Deduplicate feed items within the feed itself 2017-04-23 13:12:33 -04:00
J. King
93c010d3d5 Move feed item change detection to Feed class 2017-04-22 23:40:57 -04:00
J. King
b1b96bb806 Completed refactoring of feed updates
- In-feed deduplication still to do
- Content scraping still to do
- Lots and lots of testing still required
2017-04-20 21:59:12 -04:00
J. King
119d42907e More feed update refactoring
Still very much incomplete: in its present form it would yield many false duplicates
2017-04-15 22:07:22 -04:00
J. King
4e57e56ca7 Start on refactoring of feed processing 2017-04-13 22:17:53 -04:00
J. King
557d17ef5d Add rollbacks in error cases 2017-04-09 18:15:00 -04:00
J. King
a67fe30408 Fix whitespace
Also fixed my editor so tabs won't happen again!
2017-04-06 21:41:21 -04:00
J. King
b02abec250 Added test for recursive binding
Also fixed a bug uncovered by the test
2017-04-06 21:24:26 -04:00
J. King
818707b067 Fix adding a subscription (again)
Also ensured HTTP last modified date is parsed properly.
2017-04-06 20:50:47 -04:00
J. King
e6f2f22888 use list() instead of extract()
Improves clarity where Database::generateSet() is actually used at the expense of clarity within the method itself
2017-04-06 13:29:39 -04:00
J. King
929d763981 Simplify the creation of arbitrary UPDATEs
The type parameters of Db\Driver::prepare() and the parameters of Db\Statement::run() can now be arrays, which will be iterated over recursively to bind scalar values to the SQL statement.

This simplifies the construction of arbitrary UPDATE statements (the WHERE clause no longer needs to be taken into account) and should make it clearer what is happening in these cases.

It should also simplify the creation of IN() clauses down the road if they become necessary.
2017-04-06 11:02:47 -04:00
Dustin Wilson
25aeaf4801 Grab favicon from site's URL, not the feed's
• Changed Feed to where the favicon is gotten when parsing so the
feed’s site URL is used instead of the feed’s for favicons. Some feeds
don’t have the same domain.
• Fixed a bug in Database.
2017-04-02 21:23:15 -05:00
J. King
74ae1106a4 Implement NCN API v1-2 server version reporting
- Fixes #29
- Yes, it's trivial, but now it's done!
2017-04-02 21:49:37 -04:00
J. King
9cbfa378bc Implement NCN API v1-2 folder deleting/renaming
- Fixes #5
- Fixes #6
- Rewrote the NCNv1 dispatcher to better handle URL edge cases
2017-04-02 21:34:30 -04:00
J. King
19abce85c3 Implement NCN API v1-2 folder creation
- Fixes #4
- Tests for failure modes still required
2017-04-02 12:14:15 -04:00
J. King
842e277d43 Implemented NCN API v1-2 folder list
- Fixes #2
- Also re-organized REST handling
2017-04-01 23:06:52 -04:00
J. King
dc9f5e545e Fix adding a feed
Also start on handling the v1-2 API
2017-04-01 15:42:10 -04:00
J. King
718c5a04dd Add authz verification to folder tests 2017-04-01 15:06:34 -04:00
J. King
1e1b848c62 Remove root field from folders table
The field is no longer required with the use of recursive common table expressions, and  presents a possible loss of referential integrity
2017-04-01 14:49:31 -04:00
J. King
a111bcc231 Folder get/set prop funcs and other changes
- Simplified folder removal; now properly relies on foreign keys for dependency resolution
- simplified *propertiesSet() methods by offloading input validation and query building to a generic function
- Implemented function to get the properties of a single folder (useful for internal use)
- Implemented a function to set the properties of a folder
2017-04-01 10:27:26 -04:00
J. King
2344911f78 Tests for removing folders 2017-03-31 18:48:24 -04:00
J. King
458eaac5c6 Tests for listing folders
- Fixed checking for existence of parent before listing
- Changed Result->getAll() to return an empty array rather than null for an empty result set
2017-03-31 17:42:28 -04:00
J. King
b68cea1188 Tests for adding folders 2017-03-31 15:27:59 -04:00
J. King
82e4838162 Re-organize Database tests
- Test files now consist entirely of traits:
 - General setup trait mocking User class and cleaning up
 - Driver trait to set up the database connection
 - Series trait containing tests for the series, independent of driver used
2017-03-31 13:24:00 -04:00
Dustin Wilson
bc863ae935 Updated Database->updateFeeds()
• Added category updating in Database->updateFeeds()
• Made Database->updateFeeds() fail quietly when exceptions are
occurred, logging them in the database instead of failing.
• Changed the categories table name from arsse_tags to arsse_categories.
2017-03-30 09:42:37 -05:00
J. King
dbd735f1f3 Full set of tests for user-related Database funcs
- Fixed a few inconsistencies and bugs along the way
- User manager tests need some equivalent fleshing out
2017-03-29 23:41:05 -04:00
Dustin Wilson
9338219a68 Improved UA String
• Added version constant in bootstrap
• Made the user agent string output information in a format similar to
a web browser with software version along with OS information and
architecture
2017-03-29 09:27:54 -05:00
J. King
6b2be0a877 Use Phake to create mock objects in tests 2017-03-28 20:30:40 -04:00
J. King
f37e6659c8 Merge branch 'master' of https://code.jkingweb.ca/jking/arsse 2017-03-28 19:58:24 -04:00
J. King
6bb129db2f Mock correct method of Lang 2017-03-28 19:58:20 -04:00
Dustin Wilson
85800b111e New UA string
• Now Arsse exposes itself properly
• Conf->userAgentString exists to allow for specifying the string
through configuration
2017-03-28 18:19:12 -05:00
J. King
f902346b6c Eliminated passing of RuntimeData instances
- RuntimeData has now been replaced by a single static Data class
- The Data class has a load() method which fills the same role as the constructor of RuntimeData
- The static Lang class is now an instantiable class and is a member of Data
- All tests have been adjusted and pass
- The Exception tests no longer require convoluted workarounds: a simple mock  for Data::$l suffices; Lang tests also use a mock to prevent loops now instead of using a workaround
2017-03-28 18:50:00 -04:00
J. King
2b8aa75ee3 Row index is not a string 2017-03-28 10:31:49 -04:00
Dustin Wilson
7236020b8b Changed "NewsSync" to "Arsse" 2017-03-27 23:12:12 -05:00
J. King
9d5dab249c Helper methods for testing Database class
May not actually work yet
2017-03-27 23:19:05 -04:00
J. King
b8f9b6070e Experimental method to remove a folder 2017-03-27 08:39:24 -04:00