Skip to content

feat: expose casks in tap.to_hash for tap-info --json#7043

Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
forivall:feat/casks-in-tap-info
Feb 18, 2020
Merged

feat: expose casks in tap.to_hash for tap-info --json#7043
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
forivall:feat/casks-in-tap-info

Conversation

@forivall
Copy link
Copy Markdown
Contributor

@forivall forivall commented Feb 17, 2020

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Hey yall. I wanted to install [meme] all the fonts [/meme] from homebrew-cask-fonts (well, i really want to generate specimens for all of them so i can find a font that looks like the ✨ aesthetic ✨ i'm looking for, but that's a larger change and my ruby experience is minimal), and so i wanted to see all of the casks it provides, and adding it to the hash seems like the correct place, as formula_files and command_files are there.

With this, I was able to complete my task with brew tap-info homebrew/homebrew-cask-fonts --json|jq -r '.[] | .cask_files[]' | sed -e 's|.*/||' -e 's/\.rb$//' | xargs brew cask install.

@forivall
Copy link
Copy Markdown
Contributor Author

and as far as tests go, a lot of unrelated tests were failing, and it looks like the only test for to_hash is not something that would fail. https://github.com/Homebrew/brew/blob/a915114/Library/Homebrew/test/tap_spec.rb#L141 . Let me know if there's anything that needs to be done for that.

@MikeMcQuaid
Copy link
Copy Markdown
Member

Thanks for the PR! Seems reasonable to be but interested in @EricFromCanada and @reitermarkus' thoughts.

Copy link
Copy Markdown
Member

@EricFromCanada EricFromCanada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since a list of formula_names is defined, I think cask_tokens should be provided as well.

@MikeMcQuaid
Copy link
Copy Markdown
Member

Thanks so much for your contribution! Without people like you submitting PRs we couldn't run this project. You rock, @forivall!

@MikeMcQuaid MikeMcQuaid merged commit e7130bf into Homebrew:master Feb 18, 2020
@lock lock bot added the outdated PR was locked due to age label Mar 21, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants