Commit Graph

37 Commits

Author SHA1 Message Date
raucao 682f66f476 Allow selecting image type via Regexp
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
For example, SVG images might be of type "image/svg" or "image/svg+xml"
2024-08-14 16:13:50 +02:00
raucao 339508bf41 Don't break on icon size "any"
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
... and any other strings failing to match the "sizes" number format
for that matter
2024-08-14 15:46:58 +02:00
raucao f46d5b938d Release v1.0.1
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2024-02-02 17:49:44 +02:00
raucao aa1bd15427 Update version
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2024-02-02 13:43:56 +02:00
raucao 999bc49e2d Handle empty manifest values
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Fall back to HTML if possible, discard otherwise
2024-02-01 16:45:58 +02:00
Râu Cao 8d79113438 Move all metadata parsing to Metadata class
continuous-integration/drone/push Build is passing
2023-09-15 21:40:33 +02:00
Râu Cao 79e3fbdb21 Don't filter out icons with a purpose by default
continuous-integration/drone/push Build is failing
2023-09-15 20:56:46 +02:00
Râu Cao db7b202876 Fix icons accessor being overwritten by search
continuous-integration/drone/push Build is passing
2023-09-15 20:55:38 +02:00
Râu Cao 8a32dcfbc7 Store correct list of available manifest properties
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2023-09-15 20:53:00 +02:00
Râu Cao b57a8e8717 Update dependencies 2023-09-15 20:00:59 +02:00
basti 4c36da46fe Improve handling of failed requests
This adds a custom exception class with an error type that can be more
easily used by clients. It also explicitly handles failed connections as
such.

closes #9
2020-06-09 10:48:26 +02:00
basti 8826b1d672 Guard against empty strings
As suggested by @galfert
2020-05-26 16:27:55 +02:00
basti 7c89900c70 Ignore inadequate icon sources
Icons with data URLs as source are throwing exceptions when trying to
parse their type via the file extension. This fix ignores all icons with
data URLs to begin with.
2020-05-26 11:30:21 +02:00
basti e503ada44e Load additional icons from HTML
When a Web App Manifest is found and loaded, we still want to check HTML
for some additional icons that are usually not added to manifests.
2018-07-27 17:20:27 +02:00
basti 6cbcbdb54a Remove obsolete require 2018-07-14 00:34:28 +02:00
basti c98efb9171 Remove obsolete require 2018-07-13 13:05:01 +02:00
basti d98c925a5a Add helper method for finding icons
closes #3
2018-07-13 13:00:55 +02:00
basti 44bf2404f6 Refactor icon parsing, add apple touch icons 2018-07-04 09:27:03 +02:00
basti 87baa5960c Turn implicitly unique arrays into sets 2018-07-04 09:26:05 +02:00
basti cee7f7e174 Make client's internal methods private 2018-07-04 08:58:49 +02:00
basti 14b1f5befe Don't fail silently when parsing manifest JSON
Also, explicitly require json stdlib, so it's definitely loaded in all
environments.
2018-07-04 08:49:58 +02:00
basti 9042ca0b87 Parse mask icon from HTML 2018-07-02 12:48:46 -05:00
basti 7be7e45493 Parse icons from HTML 2018-07-02 12:39:27 -05:00
basti 08bdd0a18c Extract more metadata from HTML
And don't overwrite existing metadata properties
2018-07-02 11:54:58 -05:00
basti 39ae311acb Refactor metadata object and loading, parse HTML 2018-06-29 16:58:26 -07:00
basti b05cad0f3f Store manifest props as metadata props 2018-06-29 15:21:28 -07:00
basti 4c0d40bd34 Fetch and return metadata 2018-06-29 14:39:12 -07:00
basti 936aa38ff8 Handle missing manifest link 2018-06-29 10:39:58 -07:00
basti 26836d68d0 Remove TODO
Turns out link headers aren't supported (anymore) after all.
2018-06-29 10:12:22 -07:00
basti 193319945a Discover Web App Manifest in HTML
... and return a hash of the JSON data.
2018-06-28 21:11:52 -07:00
basti ee49c0bfaf Successful requests 2018-06-28 17:35:07 -07:00
basti 180dfc482e Switch to RSpec 2018-06-28 17:23:09 -07:00
basti bd6f74f09f Handle failed requests 2018-06-26 18:29:30 -07:00
basti adbee52e52 Fetch given URL 2018-06-26 17:50:44 -07:00
basti ac3efc7c15 Validate URLs 2018-06-26 17:40:26 -07:00
basti 1b142006fa WIP first steps 2018-06-26 17:13:55 -07:00
basti a8c84035b4 Hello world 2018-06-26 13:03:33 -07:00