| Age | Commit message (Collapse) | Author |
|
calculating hash using old unnormalized URLs will most likely produce
the same old invalid hash, this commit normalizes URLs first and then
calculate new hash, updating old URLs as well.
|
|
|
|
|
|
- (send-webhook) does not need to validate URLs; (trigger) already does
that; replace validation logic with :pre conditional
- (make-request) does not need to fallback to empty string when
event-key is nil. it should never be nil.
|
|
- simplify (.mkdirs parent-dir) and with (io/make-parents file)
- should return false when HTTP request fails, not nil
- check if corrputed file exitsts before deleting it
- add tests
|
|
|
|
|
|
microformats/JSON-LD/<meta> to JF2 (#80)
closes #75
This is a large squash commit. For details, see https://codeberg.org/eltrac/weepinbell/pulls/80
|
|
- use LEFT JOIN instead of making multiple queries
- put insert/update inside transactions
- add indexes
- fix configuration description
|
|
|
|
|
|
add ADR-0002 about migrating to H2
|
|
|
|
|
|
|
|
fix test cases
|
|
|
|
- new config `:storage-type` (default `:edn`, also support `:sqlite`)
- `LICENSE` change: add exceptions to `next.jdbc` (which uses EPL)
Reviewed-on: https://codeberg.org/eltrac/weepinbell/pulls/73
|
|
- storage-test: worker should handle other storage operations if some of
them throws Exception
- storage-test: microformats and proxied-photo should be stored as is
- microformats-test: use-prop shuold handle both string and keyword
typed keys
- comment unused http client functions
|
|
|
|
- refactored weepinbell.core/start-system. moved config loading outside
start-system, loaded in -main function.
- use :log-level in config and set timbre :min-level in -main
|
|
|
|
|
|
worker
|
|
|
|
thread-safely
fix
|
|
|
|
|
|
- wrap-defaults middleware should be placed outside of
wrap-json-response, otherwise Content-Type would be in correct
- remove unused static resources
|
|
|
|
|
|
- microformats type inferring is more accurate
- before: check if microformats h-entry has a type key (:like-of,
:in-reply-to...)
- now: check if such key's value equals to target URL, so it makes
sure this like/reply/repost/rsvp is sent to this target
- use ring.util.http-response to simplify response
- `?mftype=` filter no longer depends on microformats reduction
- retriever.clj is overall cleaner
|
|
|
|
also remove post-conditional assertion from edn-storage/use-store, since
tests have that covered
|
|
microformats type in original response body (not converted to string by
middleware) is a keyword, not a string. comparing a keyword to a string
is always false.
|
|
- print clear stack trace using timbre when capturing exceptions
- don't pass nil to url/normalize; if url/normalize gets a nil, instead
of NPE, it now returns an empty string
- capture exceptions in processor pipeline to keep it from dying
- http.downloader now checks response status instead of blindly
downloading anything
|
|
- fix page partitioning function not handling Long as a valid page
number
- better error handling when partitioning API page frames
this is a temporary fix. retriever needs refactoring.
|
|
- test loading and merging config
- test start-system and graceful shutdown
- test /endpoint and /api/send
- test receiver handling nil input
- test webserver startup and graceful shutdown
|
|
- config/load-config now accepts one arg, which is the config file path
- core uses WEEPINBELL_CONFIG env, fallback to "config.edn"
|
|
if source or target is nil, it would not return an error message but
will throw an uncaught exception
java.lang.NullPointerException: Cannot invoke "String.length()" because
"this.input" is null
this is fixed by nil-guarding normalize function call
|
|
- handler and core no longer care if storage is a valid vtable
- use-store assert storage is valid before it was returned
- AssertionError should be spotted while testing
|
|
add recursive find-type tests
|
|
- add weepinbell.http.client/with-retry macro
- retry only requests that returns :error with type TimeoutException
- retry is done asynchronously
- with-retry should return a Future
- retry verifier requesting source and target, 3 times with 5 seconds
backoff
|
|
frontend uses /api/send instead of configurable /endpoint
|
|
|
|
|
|
|
|
- some namespaces tests require did not get renamed
- url/extract might throw AssertionError if input contains non-HTTP(S)
urls. it should not check schemes.
- verifier doesn't need to filter non-HTTP(S) urls since they will
return false anyway, and plus it makes localhost urls in tests fail
|
|
|
|
add docstrings
format code
|