Skip to content

Commit f7ede3f

Browse files
chenrui333BrewTestBot
authored andcommitted
rails-new 0.5.0 (new formula)
Closes #39. Signed-off-by: Rui Chen <[email protected]> Signed-off-by: BrewTestBot <[email protected]>
1 parent d3d7d2f commit f7ede3f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Formula/r/rails-new.rb

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
class RailsNew < Formula
2+
desc "Create Rails projects with Ruby installed"
3+
homepage "https://github.com/rails/rails-new"
4+
url "https://github.com/rails/rails-new/archive/refs/tags/v0.5.0.tar.gz"
5+
sha256 "9a309ea0d3f7b7c10327aba30e919bab30efc3bdffc2fcedaa54ce23d9e4ae42"
6+
license "MIT"
7+
head "https://github.com/rails/rails-new.git", branch: "main"
8+
9+
depends_on "rust" => :build
10+
depends_on "docker" => :test
11+
12+
def install
13+
system "cargo", "install", *std_cargo_args
14+
end
15+
16+
test do
17+
ENV["DOCKER_HOST"] = "unix://#{testpath}/invalid.sock"
18+
19+
assert_match version.to_s, shell_output("#{bin}/rails-new --version")
20+
21+
output = shell_output("#{bin}/rails-new testapp 2>&1", 101)
22+
assert_match "Cannot connect to the Docker daemon", output
23+
end
24+
end

0 commit comments

Comments
 (0)