10 Commits

Author SHA1 Message Date
Markus Reiter
480e264d9a
Lint Ruby docs. 2024-05-01 11:35:21 +02:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Michael Cho
89b6d471e5
livecheck/strategy: fix **unused type 2024-02-28 12:32:21 -05:00
Issy Long
f682147598
Fix RuboCop Style/RedundantFreeze offenses 2024-01-18 22:20:01 +00:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Douglas Eichelberger
47ffcd5cb7 Add types to block params 2023-04-04 22:42:27 -07:00
Sam Ford
7f0a735828
Json: Fix a whitespace oversight in comment 2023-03-01 17:27:33 -05:00
Sam Ford
cebb951baf
Json: Add #parse_json method
This setup mimics the `#parse_xml` method that was implemented in the
`Xml` strategy. Isolating the parsing code means that other strategies
can take only what they need from `Json` (i.e., it's not required for
them to use `Json#find_versions`).
2023-03-01 17:27:33 -05:00
Douglas Eichelberger
1ab278f74c Fix style/type violations 2023-02-27 20:34:07 -08:00
Sam Ford
7735036c56
livecheck: Add Json strategy
This adds a generic `Json` strategy to livecheck that requires a
`strategy` block to operate. This is primarily intended as a
replacement for existing `strategy` blocks in formulae/casks that
use `JSON#parse`, as it allows us to internalize/standardize that
boilerplate while improving error-handling.

Additionally, future strategies that parse JSON data can use the
`Json#find_versions` method instead of having to reinvent the wheel
(similar to how we currently have a number of strategies that
leverage `PageMatch#find_versions`).
2023-02-23 13:17:35 -05:00