Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termsql 0.3 (new formula) #7801

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Formula/termsql.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class Termsql < Formula
desc "Convert text into SQL table and query it"
homepage "https://tobimensch.github.io/termsql/"

url "https://github.com/tobimensch/termsql/archive/22501e5c982ec04229643802e36756feb4687e89.tar.gz"
Copy link
Member

Choose a reason for hiding this comment

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

Still need an upstream tag before we can include this, I'm afraid.

version "22501e5c982ec04229643802e36756feb4687e89"
sha256 "d8fabe96f57153a2e2852995d66f4506cf593bae4a6b9d7d76d3aef6150fb07e"

depends_on :python => ["sqlite3", "sqlparse"]
Copy link
Member

Choose a reason for hiding this comment

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

These should be vendored instead e.g. like ansible.rb


def install
# Replace path to man pages in hard-coded setup.py
inreplace "setup.py", %r{/usr/share/man/man1/}, "#{man1}/"

system "python", *Language::Python.setup_install_args(prefix)
end

test do
# Run an example query (count processes)
assert_equal "bar", pipe_output("#{bin}/termsql 'select COL1 from tbl'", "foo bar baz").strip
end
end