Sam Ford
f03a400e28
Extract latest_version string to a constant
2022-12-19 18:15:51 -05:00
Nanda H Krishna
f2fbbfe70c
Enable use of latest formula version in resource livecheck
URLs
2022-12-19 00:12:16 -05:00
Mike McQuaid
77c0d38c35
brew style --fix
2022-12-13 11:37:06 +00:00
Sam Ford
e56735a171
ElectronBuilder: Allow Date/Time deserialization
...
The `ElectronBuilder` strategy uses `YAML#safe_load` to parse YAML
content and this limits deserialization to appropriate classes. We
recently encountered a `Tried to load unspecified class: Time` error
when using the `ElectronBuilder` strategy on a `latest-mac.yml` file
containing `releaseDate: 2022-12-01T02:02:46.419Z`.
The electron-builder YAML files we usually encounter use single
quotes around the `releaseDate` value to ensure it's treated as a
string (e.g., `releaseDate: '2022-10-12T17:55:26.718Z'`) and this is
what we do in `electron_builder_spec.rb`. The aforementioned YAML
file doesn't use single quotes around the value, so it's treated as
a timestamp and apparently this makes Psych use `Time` (which
`#safe_load` doesn't allow by default).
Seeing as we can't control the YAML content and there's a chance we
may encounter other files like this in the future, this commit
modifies the related `#safe_load` call to allow `Time` (and `Date`
for good measure). This will resolve the aforementioned error and
allow the `ElectronBuilder` strategy to work as expected in this
scenario.
2022-12-05 21:45:18 -05:00
Tim Visher
fc31d5560c
livecheck/strategy/sparkle.rb: Add macos
to the candidate os
values list
...
As can be seen by TextExpander's Sparkle Feed, `macos` is a possible
value.
```
$ date -u '+%FT%T%z' && xmlstarlet sel -t -v '//rss//channel//item//enclosure/@*[name()="url" or name()="sparkle:version" or name()="sparkle:shortVersionString" or name()="sparkle:os"]' <(curl --location --silent https://textexpander.com/appcast/TextExpander-macOS.xml )
2022-10-22T17:07:06+0000
https://cdn.textexpander.com/mac/731.2/TextExpander_7.3.1.dmg
731.2
7.3.1
macos
https://cdn.textexpander.com/mac/720.16/TextExpander_7.2.dmg
720.16
7.2
macos
https://cdn.textexpander.com/mac/710.6/TextExpander_7.1.dmg
710.6
7.1
macos
https://cdn.textexpander.com/mac/702.2/TextExpander_7.0.2.dmg
702.2
7.0.2
macos
https://cdn.textexpander.com/mac/701.2/TextExpander_7.0.1.dmg
701.2
7.0.1
macos
https://cdn.textexpander.com/mac/700.33/TextExpander_7.0.dmg
700.33
7.0
macos
https://cdn.textexpander.com/mac/685.6/TextExpander_6.8.5.zip
685.6
6.8.5
https://cdn.textexpander.com/mac/684.8/TextExpander_6.8.4.zip
684.8
6.8.4
https://cdn.textexpander.com/mac/683.2/TextExpander_6.8.3.zip
683.2
6.8.3
https://cdn.textexpander.com/mac/682.10/TextExpander_6.8.2.zip
682.10
6.8.2
https://cdn.textexpander.com/mac/681.3/TextExpander_6.8.1.zip
681.3
6.8.1
https://cdn.textexpander.com/mac/680.30/TextExpander_6.8.zip
680.30
6.8
https://cdn.textexpander.com/mac/TextExpander_6.5.6.zip
656.3
6.5.6
https://cdn.textexpander.com/mac/TextExpander_6.5.5.zip
655.0
6.5.5
https://cdn.textexpander.com/mac/TextExpander_6.5.4.zip
654.3
6.5.4
https://cdn.textexpander.com/mac/TextExpander_6.5.3.zip
653.3
6.5.3
https://cdn.textexpander.com/mac/TextExpander_6.5.2.zip
652.0
6.5.2
https://smilesoftware.com/downloads/test/TextExpander_6.5.1.zip
651.5
6.5.1
```
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2022-12-04 14:21:27 -05:00
Bo Anderson
eac32f0b20
Additional fixes for Ruby 3 compatibility
2022-10-18 01:54:59 +01:00
Issy Long
b7d997e80d
sorbet: Bump some files from typed: false
to typed: true
...
- This was done with `brew typecheck --update --suggest-typed` which
(as of the previous commit) uses Spoom, yet another gem. I thought I'd
see how well it works. There are no Sorbet errors after these changes!
2022-10-11 01:09:03 +01:00
Nanda H Krishna
b5c8841980
Modified text in comments
2022-09-27 00:59:37 -07:00
Sam Ford
bd9c436d50
Remove unnecessary parameter from method
...
A boolean `resource` parameter was added to `#print_latest_version`
but its only purpose is to identify whether `info` corresponds to a
resource. This can be achieved using `info[:resource].present?`, so
this additional parameter isn't necessary and can be removed.
2022-09-27 00:36:33 -04:00
Sam Ford
fb653c00d8
Improve consistency of *_version methods
...
Minimizing the differences between the `#resource_version` and
`#latest_version` methods will help to ease the process of potentially
merging them into one method in the future.
2022-09-27 00:27:26 -04:00
Sam Ford
7ffeba6380
Convert some multiline code into a single line
...
Using a multiline format in these areas isn't necessary and we can
clean up these lines by converting them to a single line format.
2022-09-27 00:21:18 -04:00
Sam Ford
40b0070beb
Modify comments and other text
...
The `check_for_resources` code arguably speaks for itself, so it
doesn't feel like a necessary addition. Besides that, this cleans up
some other comments and text to better align with existing examples.
2022-09-27 00:18:20 -04:00
Mohammad Zain Abbas
e3cab15e93
Set Homebrew.failed = true
to get correct status code
2022-09-26 19:37:46 +02:00
Mohammad Zain Abbas
e26da060f0
Merge branch 'mohammad' of https://github.com/mohammadzainabbas/brew into mohammad
2022-09-25 20:48:45 +02:00
Mohammad Zain Abbas
ae031041a2
Refactored code
2022-09-25 20:48:44 +02:00
Mohammad Zain Abbas
2f74eb5b5b
Update Library/Homebrew/livecheck/livecheck.rb
...
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2022-09-25 22:21:04 +05:00
Mohammad Zain Abbas
03c372ef52
Minor fixes
2022-09-25 02:06:23 +02:00
Mohammad Zain Abbas
6d993fa642
Fixed minor issues and applied suggestions
2022-09-25 00:53:44 +02:00
Mohammad Zain Abbas
560680bfa3
Minor fix for brew typecheck
2022-09-18 21:36:22 +02:00
Mohammad Zain Abbas
ee1210a495
Fixed style and typecheck issues
2022-09-18 21:27:10 +02:00
Mohammad Zain Abbas
980538b8b2
Exclude :meta
info for resources if latest.blank?
for Formula
2022-09-18 17:29:44 +02:00
Mohammad Zain Abbas
3d9c6ddb75
Minor fix: return error when resource_version
method returns empty hash
2022-09-18 17:09:21 +02:00
Mohammad Zain Abbas
f8ef7bd0e9
Minor fixes
2022-09-14 06:05:43 +02:00
Mohammad Zain Abbas
c06b80c2ca
After brew style --fix
2022-09-14 04:59:01 +02:00
Mohammad Zain Abbas
7a627565ac
Fixed output issue
2022-09-14 04:54:52 +02:00
Mohammad Zain Abbas
8496ca0416
Added skip_conditions
support for resource
2022-09-14 03:42:12 +02:00
Mohammad Zain Abbas
990f71367b
Refactoring resource_version
to always return hash info
2022-08-23 16:08:18 +02:00
Mohammad Zain Abbas
9377346bdf
Minor fixes
2022-08-17 17:41:34 +02:00
Mohammad Zain Abbas
2ae583c836
Removed resource_name
method
2022-08-11 21:50:54 +02:00
Mohammad Zain Abbas
54c9338ed4
Removed use_homebrew_curl?
for resources
2022-08-11 21:25:24 +02:00
Mohammad Zain Abbas
c111a5bc9d
Revert back changes + modified resource_name
method
2022-08-11 21:00:28 +02:00
Mohammad Zain Abbas
f9f3d3d84b
Minor refractoring
2022-08-10 22:00:08 +02:00
Mohammad Zain Abbas
d1584b67b9
Removed the error message for Cask in case --resources
flag is given
2022-08-10 20:50:14 +02:00
Mohammad Zain Abbas
be7dde6aac
Minor fixes
2022-08-08 01:37:45 +02:00
Mohammad Zain Abbas
1ca2350e35
Added an error message if --resources
flag is given with a Cask
2022-08-07 22:24:37 +02:00
Mohammad Zain Abbas
9598cc128c
Disable block length metric for resource_version
2022-08-07 20:02:05 +02:00
Mohammad Zain Abbas
0c9ff722ae
Fixed typecheck errors
2022-08-07 19:36:06 +02:00
Mohammad Zain Abbas
53b0d60f75
After running brew style --fix
2022-08-07 19:14:13 +02:00
Mohammad Zain Abbas
3d83e18142
Updated --json
debug info for livecheckable resources
2022-08-07 19:03:12 +02:00
Mohammad Zain Abbas
b95a5188bf
Refactored code for brew livecheck --resources --json
2022-08-07 18:34:03 +02:00
Mohammad Zain Abbas
6055f78218
Refactored code for resources in livecheck
command
2022-08-07 18:14:24 +02:00
Mohammad Zain Abbas
656b18b13a
Minor change: updated doc for resource_version
method
2022-08-07 17:24:53 +02:00
Mohammad Zain Abbas
eb9bc93fae
Removed unnecessary :meta
from info hash
2022-08-07 17:19:59 +02:00
Mohammad Zain Abbas
81a7d6edd7
Fixed issue with --json flag for resources
2022-08-07 17:13:17 +02:00
Mohammad Zain Abbas
495f8f2193
Return download_name
when --full-name
is passed for resources
2022-08-07 16:59:53 +02:00
Mohammad Zain Abbas
e784377537
Code refactoring for info
Hash for resources
2022-08-03 16:07:48 +02:00
Mohammad Zain Abbas
6f79b5dee2
Minor change: fix the argument for formulae
2022-08-03 15:47:32 +02:00
Mohammad Zain Abbas
9b31dc7e87
Refactored print_latest_version
for resource
...
Co-authored-by: Nanda H Krishna <me@nandahkrishna.com>
2022-08-03 18:41:44 +05:00
Mohammad Zain Abbas
424c5bfce2
Minor change: update parameters
...
Co-authored-by: Nanda H Krishna <me@nandahkrishna.com>
2022-08-03 18:37:36 +05:00
Mohammad Zain Abbas
06d45fea80
Minor fix: ambiguous_cask
should be false for resources
...
Co-authored-by: Nanda H Krishna <me@nandahkrishna.com>
2022-08-03 18:36:55 +05:00