Sam Ford
e65c9d02ab
PageMatch: Expand #find_versions tests
2021-08-19 16:07:53 -04:00
Sam Ford
b4adf2a42e
PageMatch#find_versions: Fix return conditions
2021-08-19 09:01:11 -04:00
Sam Ford
26821301e7
livecheck: move url/regex generation into methods
2021-08-17 18:03:40 -04:00
Sam Ford
13b349b4ae
Refactor #find_versions parameters in strategies
2021-08-16 12:01:32 -04:00
Sam Ford
c59d5db631
Remove unnecessary require statements
2021-08-11 19:06:00 -04:00
Sam Ford
c936a9420e
Improve documentation comments
2021-08-11 19:05:59 -04:00
Sam Ford
f2bd39ccef
Add additional method signatures to strategies
2021-08-11 19:05:59 -04:00
Sam Ford
56dd89114d
Standardize valid strategy block return types
...
Valid `strategy` block return types currently vary between
strategies. Some only accept a string whereas others accept a string
or array of strings. [`strategy` blocks also accept a `nil` return
(to simplify early returns) but this was already standardized across
strategies.]
While some strategies only identify one version by default (where a
string is an appropriate return type), it could be that a strategy
block identifies more than one version. In this situation, the
strategy would need to be modified to accept (and work with) an
array from a `strategy` block.
Rather than waiting for this to become a problem, this modifies all
strategies to standardize on allowing `strategy` blocks to return a
string or array of strings (even if only one of these is currently
used in practice). Standardizing valid return types helps to further
simplify the mental model for `strategy` blocks and reduce cognitive
load.
This commit extracts related logic from `#find_versions` into
methods like `#versions_from_content`, which is conceptually similar
to `PageMatch#page_matches` (renamed to `#versions_from_content`
for consistency). This allows us to write tests for the related code
without having to make network requests (or stub them) at this point.
In general, this also helps to better align the structure of
strategies and how the various `#find_versions` methods work with
versions.
There's still more planned work to be done here but this is a step
in the right direction.
2021-08-11 19:05:57 -04:00
Sam Ford
83f261b6f2
HeaderMatch: Refactor default header logic
2021-08-02 18:33:59 -04:00
Sam Ford
af2c45b297
Git: compact, uniq array from strategy block
2021-08-02 18:33:59 -04:00
Sam Ford
a970780851
livecheck: allow nil return from strategy blocks
2021-08-02 18:33:34 -04:00
Bevan Kay
c28db0424d
livecheck: allow query parameter in electron_builder strategy url
...
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2021-07-28 13:20:15 +10:00
Sam Ford
7b864e0aaa
Sourceforge: Do not modify RSS URLs
...
This allows a `livecheck` block to check the RSS feed for a given
path in a SourceForge project. For example:
https://sourceforge.net/projects/example/rss?path=/directory
2021-07-19 15:15:27 -04:00
Sam Ford
87564b6ccb
Sparkle: Use OS::Mac::Version#prerelease?
2021-06-28 16:54:53 -04:00
Sam Ford
4433f4a985
Sparkle: Update minimumSystemVersion condition
2021-06-28 15:48:35 -04:00
Michael Cho
823dc28c21
livecheck/strategy/sparkle: check minimumSystemVersion for compatibility
2021-06-28 15:39:19 -04:00
Sam Ford
2c4a7ae2cb
Sparkle: Replace Nokogiri with REXML
2021-06-25 17:45:25 -04:00
Sam Ford
23f8cb9f4a
Sparkle: Handle ArgumentError from Time#parse
2021-06-22 10:02:57 -04:00
Sam Ford
a5768de0c3
Sparkle: Account for empty pubDate
2021-06-22 09:23:56 -04:00
Sam Ford
e7d3b2cb31
Sparkle: Move default pub_date value
2021-06-22 09:14:56 -04:00
hyuraku
6720f8bd1e
repair pub-date in livecheck
2021-06-22 09:14:55 -04:00
Sam Ford
ccfd01ba38
Strategy: Replace open-uri with curl
2021-06-04 16:16:05 -04:00
Nanda H Krishna
b920949693
Improve Gnome
strategy explanatory comment
...
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2021-05-31 19:47:08 +05:30
Nanda H Krishna
471ce1541d
Modify Gnome
strategy and update comments
...
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2021-05-31 16:07:56 +05:30
Nanda H Krishna
e5cfc0f37b
livecheck/strategy/gnome: handle new GNOME versioning
2021-05-30 22:23:07 +05:30
Nanda H Krishna
1182440f80
livecheck/strategy/sparkle: install bundler gems
2021-05-20 19:58:17 +05:30
Markus Reiter
9bb1ba324f
Always take latest item in Sparkle
strategy.
2021-04-17 01:32:19 +02:00
Markus Reiter
bbf8a10f2c
Always take first item in Sparkle
strategy.
2021-04-15 01:15:59 +02:00
Markus Reiter
a210b1a04e
Add extract_plist
strategy.
2021-04-07 04:58:31 +02:00
nandahkrishna
15102a3234
livecheck/strategy/electron_builder: address changes from review
...
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2021-03-22 12:52:43 +05:30
nandahkrishna
f422b6cdc4
livecheck/strategy: add ElectronBuilder strategy
2021-03-20 15:23:09 +05:30
nandahkrishna
8e5451df2f
style: use parentheses for assignment in conditions
2021-02-12 18:33:37 +05:30
Seeker
fbafaff4fe
rubocop: require braces for Sorbet sig
2021-01-18 16:52:45 -08:00
Mike McQuaid
bc0d1503e8
Merge pull request #7937 from samford/add-livecheck-author-doc
...
docs: add brew livecheck documentation
2021-01-12 09:03:44 +00:00
Sam Ford
308390ba5b
Address feedback and expand documentation
...
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
2021-01-11 17:51:41 -05:00
Markus Reiter
21e543d4e0
Only select Sparkle items for macOS.
2021-01-10 19:58:44 +01:00
Sam Ford
2060f13de1
Refactor livecheck strategies around match regex
2020-12-31 09:18:36 -05:00
Dario Vladovic
86fee106a3
livecheck: strengthen URL patterns
2020-12-31 09:14:53 -05:00
Sam Ford
8ab6922f8c
Merge pull request #10128 from samford/livecheck-extend-strategy-block-support
...
Livecheck: Extend strategy block support
2020-12-28 12:25:32 -05:00
Sam Ford
fef4512b35
Livecheck: Pass regex into strategy blocks
2020-12-25 20:31:37 -05:00
Sam Ford
361743e1fb
Livecheck: Extend strategy block support
2020-12-25 20:31:36 -05:00
Sam Ford
d7fa400930
Livecheck: Surface cached status in debug output
2020-12-24 22:19:14 -05:00
Sam Ford
8b5e334be4
PageMatch: Require provided_content to be a string
2020-12-24 21:49:30 -05:00
Sam Ford
eedd108ace
PageMatch: Return fetched content in match_data
...
If we want caching to work in the `Xorg` strategy, it's necessary to
pass fetched content back in the `match_data` hash.
2020-12-24 21:48:31 -05:00
Sam Ford
ea259da9c7
Livecheck: Demodulize PageMatch name in calls
...
Co-authored-by: Markus Reiter <me@reitermark.us>
2020-12-24 11:15:57 -05:00
Sam Ford
5c9f5b9506
Xorg: Use PageMatch#find_versions
2020-12-24 11:15:55 -05:00
Markus Reiter
bf7efb369c
Fix Sparkle
strategy.
2020-12-24 03:33:14 +01:00
Sam Ford
12afb272bb
Strategy: Manually handle redirections
2020-12-23 00:35:27 -05:00
Markus Reiter
53ef74f674
Merge pull request #10068 from reitermarkus/bitbucket-strategy
...
Use more exact regex for `Bitbucket` strategy.
2020-12-22 18:21:11 +01:00
Sam Ford
466e55c6ab
Bitbucket: Format regex like other strategies
2020-12-20 18:13:51 -05:00