1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 21:22:40 +00:00
Commit graph

74 commits

Author SHA1 Message Date
J. King
b5f118e8cb Cleanup 2020-01-20 13:52:48 -05:00
J. King
bbace7a0ac Use void and nullable return types where practical 2020-01-20 13:34:03 -05:00
J. King
5df89009e6 Merge branch 'master' of https://code.mensbeam.com/MensBeam/arsse 2019-12-02 19:09:16 -05:00
J. King
c59cdfef76 Whitespace fixes 2019-10-25 15:16:35 -04:00
J. King
b6dd8ab20d Improvements to and proper tests for query builder 2019-10-18 13:11:03 -04:00
J. King
c706a76057 Simplify array flattening 2019-10-18 13:10:03 -04:00
J. King
1809fb254e Deal with trailing whitespace in media types 2019-09-27 22:54:33 -04:00
J. King
4f5a8e3180 Make media type checking more robust 2019-09-27 22:38:03 -04:00
J. King
c5337b37b4 Consolidate creation of synthetic server requests 2019-09-25 18:30:53 -04:00
J. King
c9e86e71c4 More style fixes 2019-09-05 11:25:50 -04:00
J. King
0eb0fbcc0d Also normalize relative URLs 2019-09-03 19:34:56 -04:00
J. King
a175561574 Documentation corrections 2019-09-03 13:26:00 -04:00
J. King
bd71ddb929 Percent-encoding and IPv6 normalization 2019-09-03 13:16:05 -04:00
J. King
12fe786a2f Cleanup 2019-08-29 12:28:23 -04:00
J. King
d4802bcdb6 Handle IDNs
While IPv6 address normalization was originally planned, this was deemed
too much effort to bother with such a niche feature; IPv6 addresses are
instead passed through unmodified
2019-08-27 15:18:02 -04:00
J. King
dc750acf07 Handle ports, paths, and credentials correctly 2019-08-27 11:08:13 -04:00
J. King
13c27c2536 Start on URL normalizer 2019-08-26 22:13:30 -04:00
J. King
92b1626dba Remove most unused features of the query builder
Experience has proved programmatically setting joins is not useful, and
getting the types and values of query parts was not being maintained.

The programmatic setting of GROUP BY may be useful in future, however.
2019-06-21 12:00:23 -04:00
J. King
0dc82f64d5 Allow ranges in exclusion contexts 2019-02-26 11:11:42 -05:00
J. King
b950ac066f Restrict options in not-context and hopefully make it easier to use 2019-02-25 22:41:12 -05:00
J. King
f4a74eec5d Add all the other context options allowed by the TTRSS search syntax 2019-02-25 10:46:43 -05:00
J. King
2df7c25b66 Add ability to search note text 2019-02-23 20:14:52 -05:00
J. King
ace94e3ef8 Fix context, and context tests 2019-02-22 12:34:06 -05:00
J. King
f9fde23708 Context changes to support basic text searching 2019-02-22 11:13:42 -05:00
J. King
500851f161 Style fixes 2019-01-23 16:34:54 -05:00
J. King
5cd84c4ab4 Validate configuration parameters on import, and other changes
- Each parameter is checked for type and normalized
- Interval strings are converted to DateInterval objects
- Timeouts can be specified as interval strings
- Most intervals can be null to signify infinity
- Driver classes are checked that they implement the correct interface
- Short driver names may be used, and are used by default
- Helpful errors messages are printed in case of erroneous configuration

Exporting is currently broken; this will be fixed in an upcoming commit
2019-01-20 22:40:49 -05:00
J. King
b0643de21c Add handling of DateInterval objects to ValueInfo 2019-01-17 16:29:42 -05:00
J. King
81acba90dc Use strict equality when comparing strings 2019-01-11 10:38:06 -05:00
J. King
8fc31cfc40 Rewrite various queries to work in PostgreSQL
This involved changes to the driver interface as well as the database
schemata. The most significantly altered queries were for article
selection and marking, which relied upon unusual features of SQLite.
Overall query efficiency should not be adversely affected (it may have
even imprved) in the common case, while very rare cases (not presently
triggered by any REST handlers) require more queries.

One notable benefit of these changes is that functions which query
articles can now have complete control over which columns are returned.
This has not, however, been implemented yet: symbolic column groups are
still used for now.

Note that PostgreSQL still fails many tests, but the test suite runs to
completion. Note also that one line of the Database class is not
covered; later changes will eventually make it easier to cover the line
in question.
2018-12-04 20:41:21 -05:00
J. King
f64f0c6a22 Whitespace cleanup 2018-10-26 14:58:04 -04:00
J. King
cbc9491f75 CS fixes and version bump 2018-01-12 09:48:33 -05:00
J. King
0ec0a5b085 Ensure the request method is always uppercased 2018-01-08 17:11:38 -05:00
J. King
27caf147df Changes to Date helper class
- Changed 'transform' method to use ValueInfo throughout. This fixes a number of obscure bugs
- Changed the 'add' and 'sub' methods to default to "now" rather than null. This means null passes through rather than being interpreted as the current time, to be consistent with other date tools
- Also changed the 'add' and 'sub' methods so that they operate correctly with invalid date strings
- Added tests for the class; improves #66
- Modified TTRSS tests because the "iso8601" format string in ValueInfo is different from Date's older format
2018-01-02 16:53:38 -05:00
J. King
89bfc23d32 Standardize date normalization to immutables
Also move date formats to the ValueInfo class

Standardizing on immutables avoids any possible ambiguity in the API of the resultant value, as well as any ambiguity as to whether a DateTime output instance is the same instance or a clone (they had been clones)
2018-01-02 16:27:58 -05:00
J. King
87faededc6 Backport PDO changes to ValueInfo 2018-01-02 10:29:24 -05:00
J. King
73c8583744 Remove reliance on xdebug; fixes #113
Code coverage information is now gathered via phpdbg (a separate executable) by if available rather than xdebug, as the latter is hard to turn on and off.

A "test:quick" task has also been added to Robo, which excludes 31 tests which together account for almost two thirds of the test run time. This should pave the way for testing to be added as a commit hook for Git.
2017-12-17 10:27:34 -05:00
Dustin Wilson
b8ed7c6bf8 Added missing static keyword to Misc\ValueInfo::normalize() 2017-12-10 11:16:06 -06:00
J. King
79f9808f1f CS fixes 2017-12-07 15:18:25 -05:00
J. King
2037efce61 Added oldestArticle and latestArticle context options 2017-11-18 16:06:49 -05:00
J. King
b0da9a1d06 Added annotation context to satisfy the TTRSS "has_note" view mode 2017-11-17 19:08:35 -05:00
J. King
c88b5c4f18 Make distinction between modified and marked for articles
Also added various sets of fields to include when listing articles.
2017-11-17 17:52:00 -05:00
J. King
6da86428c4 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:51:03 -05:00
J. King
11b2066922 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:23:18 -05:00
J. King
6c8598d897 Implement contexts for non-recursive folders, and any/no label
Adjusted TTRSS handler accordingly
2017-11-16 15:56:14 -05:00
J. King
ea986f5032 Implement TTRSS operation updateArticle; fixes #83
This required adding the "notes" column to the arsse_marks table and adding same as a target value in Database::articleMark()

The Context class was also adjusted to remove the possibility of false positives in some tests
2017-11-09 14:21:12 -05:00
J. King
5c4772d95a CS fixes 2017-10-20 19:02:42 -04:00
J. King
65963f228f CS fixes 2017-10-20 18:41:21 -04:00
J. King
8c6c49d588 Merge changes from master 2017-10-19 22:58:42 -04:00
J. King
f690bbb3a9 Alias Date::normalize to ValueInfo::normalize 2017-10-19 22:39:39 -04:00
J. King
1271a0c8c0 Add ValueInfo::normalize method
This method provides generalized, consistent type casting more versatile than PHP's basic type juggling while hiding the significant complexity in achieving this.

While this commit does not change any existing code to use the new method, the intent is for both API handlers and database drivers to use the same basic rules for type conversion while still allowing for differing failure modes.
2017-10-19 15:18:58 -04:00