Skip to content

Commit

Permalink
sleek-sql 0.3.0 (new forumla)
Browse files Browse the repository at this point in the history
This adds the sleek command line utility for formatting SQL code.

On the naming:  There is already a cask with the name of sleek.  I am not 100%
sure if that conflicts with formulae but just in case this formula was named
`sleek-sql` instead.

Update Formula/s/sleek-sql.rb

Co-authored-by: Rui Chen <[email protected]>
  • Loading branch information
nemith and chenrui333 committed Oct 21, 2024
1 parent 8ec7f38 commit bd588f7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Formula/s/sleek-sql.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
class SleekSql < Formula
desc "CLI tool for formatting SQL"
homepage "https://github.com/nrempel/sleek"
url "https://github.com/nrempel/sleek/archive/refs/tags/v0.3.0.tar.gz"
sha256 "503e9535ebd7640a4c98c7fd1df2eb98eebed27f9862b4b46e38adbd4a9cf08f"
license "MIT"

depends_on "rust" => :build

def install
system "cargo", "install", *std_cargo_args
end

test do
assert_match version.to_s, shell_output("#{bin}/sleek --version")

(testpath/"test.sql").write "SELECT * from foo WHERE bar = 'quux';"
system bin/"sleek", testpath/"test.sql"
end
end

0 comments on commit bd588f7

Please sign in to comment.