Carlo Cabrera ab4f14b359
utils/analytics: improve accuracy of GitHub Packages download counts
`millions_match.captures.first` will typically be a decimal (since it's
matched using `\d+\.\d+`), except we lose accuracy in the `#to_i`
conversion.

Before:
```
❯ brew info --analytics --github-packages-downloads sqlite
==> Analytics
==> install (30 days)
[snip]
==> GitHub Packages Downloads
1,009,898 (30 days)
```

After:

```
❯ brew info --analytics --github-packages-downloads sqlite
==> Analytics
==> install (30 days)
[snip]
==> GitHub Packages Downloads
1,199,898 (30 days)
```

In this case `1.19M` was being rounded down to `1M`.
2024-08-04 05:33:46 +08:00
..
2024-05-23 00:11:53 +00:00
2024-08-02 19:20:38 -04:00
2024-05-23 17:15:43 +01:00
2024-06-11 02:59:31 +01:00
2024-05-02 09:40:09 +02:00
2024-08-02 16:03:49 -04:00
2024-06-14 12:22:02 +01:00
2024-07-14 09:03:18 -04:00
2024-08-03 19:20:22 +00:00
2024-05-23 17:15:43 +01:00
2024-07-13 11:43:17 -04:00
2024-07-30 17:51:02 +01:00
2024-07-30 17:09:11 +08:00
2024-05-01 11:35:21 +02:00
2024-07-04 01:47:13 -04:00
2024-07-15 21:40:39 -07:00
2024-07-30 17:51:02 +01:00
2024-05-02 09:40:09 +02:00
2024-05-01 11:35:21 +02:00
2024-07-14 08:49:39 -04:00
2024-07-30 17:51:02 +01:00
2024-07-30 17:51:02 +01:00
2024-07-30 17:51:02 +01:00
2024-05-01 11:35:21 +02:00
2024-05-01 11:35:21 +02:00
2024-08-03 19:20:22 +00:00
2024-07-30 17:51:02 +01:00
2024-06-30 02:35:29 -04:00
2024-05-23 17:15:43 +01:00
2024-07-14 08:49:39 -04:00
2024-07-14 08:49:39 -04:00
2024-05-17 14:25:54 +09:00
2024-05-17 12:38:16 +09:00
2024-07-14 08:49:39 -04:00
2024-07-30 17:51:02 +01:00
2024-05-01 11:35:21 +02:00
2024-05-13 08:48:41 -04:00
2024-07-15 17:48:47 -04:00
2024-05-01 11:35:21 +02:00
2024-07-17 16:01:59 -04:00
2024-07-14 08:49:39 -04:00
2024-06-30 23:05:29 -04:00
2024-05-31 15:49:12 -07:00
2024-07-14 08:49:39 -04:00
2024-07-14 08:49:39 -04:00
2024-07-14 08:49:39 -04:00
2024-07-14 08:49:39 -04:00

Homebrew Ruby API

This is the API for Homebrew.

The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.

You may also find the Formula Cookbook and Ruby Style Guide helpful in creating formulae.

Good luck!