File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments