Skip to content

Commit

Permalink
yo 5.0.0 (new formula)
Browse files Browse the repository at this point in the history
Add Yo formula for running Yeoman generators

Introduce **Yo** formula version `5.0.0`, see also: https://yeoman.io

This commit introduces the Yo formula version `5.0.0`. The details include:

- The URL points to the version `5.0.0` of Yo in the npm registry.
- The SHA256 hash matches the version's hash.
- The formula depends on Node.
- Three tests have been added to check the output of `yo --help`, `yo --version`, and `yo doctor` commands.

The **Yo** formula is a Homebrew formula for the Yo CLI tool, which is used for running Yeoman generators.

> The tests ensure that the Yo tool is installed correctly and functioning as expected. They check the usage instructions, version number, and the output of the `yo doctor` command.

Update Yo formula test

Fix assert_match syntax in test method
Merge three single tests into one

Fix conflict with cask: yo

- Remove unnecessary test assertion
- Change to builtin version test

Add macOS only dependency to Yo formula

Revert "Add macOS only dependency to Yo formula"

This reverts commit fde6b20.

Signed-off-by: Rui Chen <rui@chenrui.dev>

autobump: add yo

Signed-off-by: Rui Chen <rui@chenrui.dev>
  • Loading branch information
Anselmoo authored and chenrui333 committed Mar 18, 2024
1 parent 25418c5 commit c191eb2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Expand Up @@ -1840,6 +1840,7 @@ yamale
yamllint
ykman
yle-dl
yo
yosys
youtubedr
yq
Expand Down
21 changes: 21 additions & 0 deletions Formula/y/yo.rb
@@ -0,0 +1,21 @@
require "language/node"

class Yo < Formula
desc "CLI tool for running Yeoman generators"
homepage "https://yeoman.io"
url "https://registry.npmjs.org/yo/-/yo-5.0.0.tgz"
sha256 "4395888eda54803a590d20d92b285c4abebd81402908b5becdf9cbc6cbeba65f"
license "BSD-2-Clause"

depends_on "node"

def install
system "npm", "install", *Language::Node.std_npm_install_args(libexec)
bin.install_symlink Dir["#{libexec}/bin/*"]
end

test do
assert_match version.to_s, shell_output("#{bin}/yo --version")
assert_match "Everything looks all right!", shell_output("#{bin}/yo doctor")
end
end

0 comments on commit c191eb2

Please sign in to comment.