Skip to content

Commit 9b28482

Browse files
committed
posting 2.3.0 (new formula)
1 parent cf2a302 commit 9b28482

File tree

1 file changed

+201
-0
lines changed

1 file changed

+201
-0
lines changed

Formula/p/posting.rb

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
class Posting < Formula
2+
include Language::Python::Virtualenv
3+
4+
desc "Modern API client that lives in your terminal"
5+
homepage "https://github.com/darrenburns/posting"
6+
url "https://github.com/darrenburns/posting/archive/refs/tags/2.3.0.tar.gz"
7+
sha256 "960b95c8bb2ae11db3cc4cb6b7ec20af87cd47218f77b62b80a527c8c590a595"
8+
license "Apache-2.0"
9+
10+
depends_on "cmake" => :build
11+
depends_on "rust" => :build
12+
13+
depends_on "brotli"
14+
depends_on "certifi"
15+
depends_on "libyaml"
16+
depends_on "[email protected]"
17+
depends_on "tree-sitter"
18+
19+
resource "annotated-types" do
20+
url "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz"
21+
sha256 "aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"
22+
end
23+
24+
resource "anyio" do
25+
url "https://files.pythonhosted.org/packages/9f/09/45b9b7a6d4e45c6bcb5bf61d19e3ab87df68e0601fa8c5293de3542546cc/anyio-4.6.2.post1.tar.gz"
26+
sha256 "4c8bc31ccdb51c7f7bd251f51c609e038d63e34219b44aa86e47576389880b4c"
27+
end
28+
29+
resource "click" do
30+
url "https://files.pythonhosted.org/packages/96/d3/f04c7bfcf5c1862a2a5b845c6b2b360488cf47af55dfa79c98f6a6bf98b5/click-8.1.7.tar.gz"
31+
sha256 "ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"
32+
end
33+
34+
resource "click-default-group" do
35+
url "https://files.pythonhosted.org/packages/1d/ce/edb087fb53de63dad3b36408ca30368f438738098e668b78c87f93cd41df/click_default_group-1.2.4.tar.gz"
36+
sha256 "eb3f3c99ec0d456ca6cd2a7f08f7d4e91771bef51b01bdd9580cc6450fe1251e"
37+
end
38+
39+
resource "h11" do
40+
url "https://files.pythonhosted.org/packages/f5/38/3af3d3633a34a3316095b39c8e8fb4853a28a536e55d347bd8d8e9a14b03/h11-0.14.0.tar.gz"
41+
sha256 "8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"
42+
end
43+
44+
resource "httpcore" do
45+
url "https://files.pythonhosted.org/packages/6a/41/d7d0a89eb493922c37d343b607bc1b5da7f5be7e383740b4753ad8943e90/httpcore-1.0.7.tar.gz"
46+
sha256 "8551cb62a169ec7162ac7be8d4817d561f60e08eaa485234898414bb5a8a0b4c"
47+
end
48+
49+
resource "httpx" do
50+
url "https://files.pythonhosted.org/packages/78/82/08f8c936781f67d9e6b9eeb8a0c8b4e406136ea4c3d1f89a5db71d42e0e6/httpx-0.27.2.tar.gz"
51+
sha256 "f7c2be1d2f3c3c3160d441802406b206c2b76f5947b11115e6df10c6c65e66c2"
52+
end
53+
54+
resource "idna" do
55+
url "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz"
56+
sha256 "12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"
57+
end
58+
59+
resource "linkify-it-py" do
60+
url "https://files.pythonhosted.org/packages/2a/ae/bb56c6828e4797ba5a4821eec7c43b8bf40f69cda4d4f5f8c8a2810ec96a/linkify-it-py-2.0.3.tar.gz"
61+
sha256 "68cda27e162e9215c17d786649d1da0021a451bdc436ef9e0fa0ba5234b9b048"
62+
end
63+
64+
resource "markdown-it-py" do
65+
url "https://files.pythonhosted.org/packages/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz"
66+
sha256 "e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb"
67+
end
68+
69+
resource "mdit-py-plugins" do
70+
url "https://files.pythonhosted.org/packages/19/03/a2ecab526543b152300717cf232bb4bb8605b6edb946c845016fa9c9c9fd/mdit_py_plugins-0.4.2.tar.gz"
71+
sha256 "5f2cd1fdb606ddf152d37ec30e46101a60512bc0e5fa1a7002c36647b09e26b5"
72+
end
73+
74+
resource "mdurl" do
75+
url "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz"
76+
sha256 "bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"
77+
end
78+
79+
resource "platformdirs" do
80+
url "https://files.pythonhosted.org/packages/13/fc/128cc9cb8f03208bdbf93d3aa862e16d376844a14f9a0ce5cf4507372de4/platformdirs-4.3.6.tar.gz"
81+
sha256 "357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907"
82+
end
83+
84+
resource "pydantic" do
85+
url "https://files.pythonhosted.org/packages/45/0f/27908242621b14e649a84e62b133de45f84c255eecb350ab02979844a788/pydantic-2.10.3.tar.gz"
86+
sha256 "cb5ac360ce894ceacd69c403187900a02c4b20b693a9dd1d643e1effab9eadf9"
87+
end
88+
89+
resource "pydantic-core" do
90+
url "https://files.pythonhosted.org/packages/a6/9f/7de1f19b6aea45aeb441838782d68352e71bfa98ee6fa048d5041991b33e/pydantic_core-2.27.1.tar.gz"
91+
sha256 "62a763352879b84aa31058fc931884055fd75089cccbd9d58bb6afd01141b235"
92+
end
93+
94+
resource "pydantic-settings" do
95+
url "https://files.pythonhosted.org/packages/b5/d4/9dfbe238f45ad8b168f5c96ee49a3df0598ce18a0795a983b419949ce65b/pydantic_settings-2.6.1.tar.gz"
96+
sha256 "e0f92546d8a9923cb8941689abf85d6601a8c19a23e97a34b2964a2e3f813ca0"
97+
end
98+
99+
resource "pygments" do
100+
url "https://files.pythonhosted.org/packages/8e/62/8336eff65bcbc8e4cb5d05b55faf041285951b6e80f33e2bff2024788f31/pygments-2.18.0.tar.gz"
101+
sha256 "786ff802f32e91311bff3889f6e9a86e81505fe99f2735bb6d60ae0c5004f199"
102+
end
103+
104+
resource "pyperclip" do
105+
url "https://files.pythonhosted.org/packages/30/23/2f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d/pyperclip-1.9.0.tar.gz"
106+
sha256 "b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310"
107+
end
108+
109+
resource "python-dotenv" do
110+
url "https://files.pythonhosted.org/packages/bc/57/e84d88dfe0aec03b7a2d4327012c1627ab5f03652216c63d49846d7a6c58/python-dotenv-1.0.1.tar.gz"
111+
sha256 "e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"
112+
end
113+
114+
resource "pyyaml" do
115+
url "https://files.pythonhosted.org/packages/54/ed/79a089b6be93607fa5cdaedf301d7dfb23af5f25c398d5ead2525b063e17/pyyaml-6.0.2.tar.gz"
116+
sha256 "d584d9ec91ad65861cc08d42e834324ef890a082e591037abe114850ff7bbc3e"
117+
end
118+
119+
resource "rich" do
120+
url "https://files.pythonhosted.org/packages/ab/3a/0316b28d0761c6734d6bc14e770d85506c986c85ffb239e688eeaab2c2bc/rich-13.9.4.tar.gz"
121+
sha256 "439594978a49a09530cff7ebc4b5c7103ef57baf48d5ea3184f21d9a2befa098"
122+
end
123+
124+
resource "sniffio" do
125+
url "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz"
126+
sha256 "f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"
127+
end
128+
129+
resource "textual" do
130+
url "https://files.pythonhosted.org/packages/a4/e8/76b3aa49dd2f83410ab78b5ab04d65fee095e4720d2811f9ef72f073d11f/textual-0.88.1.tar.gz"
131+
sha256 "9c56d953dc7d1a8ddf06acc910d9224027e02416551f92920e70f435bd28e062"
132+
end
133+
134+
resource "textual-autocomplete" do
135+
url "https://files.pythonhosted.org/packages/bd/d3/7837e2ee1807c72e2a8a185c6e5e729dbe68161d8476055d989f3a2db348/textual_autocomplete-3.0.0a13.tar.gz"
136+
sha256 "db5a4ae956dd7d6dece53f7f695e97f2ab75819dd96b8a1c064ec5966b3ab113"
137+
end
138+
139+
# Unmaintained package and so use a fork of original
140+
# Issue ref: https://github.com/Aider-AI/grep-ast/issues/7
141+
resource "tree-sitter-languages" do
142+
url "https://github.com/Textualize/py-tree-sitter-languages/archive/refs/tags/v1.11.0b0.tar.gz"
143+
sha256 "17b13f25f479e1ca39cddab1ec59541236ae25449ba136e70e842c3c8340c507"
144+
end
145+
146+
resource "typing-extensions" do
147+
url "https://files.pythonhosted.org/packages/df/db/f35a00659bc03fec321ba8bce9420de607a1d37f8342eee1863174c69557/typing_extensions-4.12.2.tar.gz"
148+
sha256 "1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"
149+
end
150+
151+
resource "uc-micro-py" do
152+
url "https://files.pythonhosted.org/packages/91/7a/146a99696aee0609e3712f2b44c6274566bc368dfe8375191278045186b8/uc-micro-py-1.0.3.tar.gz"
153+
sha256 "d321b92cff673ec58027c04015fcaa8bb1e005478643ff4a500882eaab88c48a"
154+
end
155+
156+
resource "watchfiles" do
157+
url "https://files.pythonhosted.org/packages/9e/5e/5a9dfb8594b075d7c225d5fb628d498001c5dfae62298e9eb85b8754668f/watchfiles-1.0.0.tar.gz"
158+
sha256 "37566c844c9ce3b5deb964fe1a23378e575e74b114618d211fbda8f59d7b5dab"
159+
end
160+
161+
resource "xdg-base-dirs" do
162+
url "https://files.pythonhosted.org/packages/98/58/bf6650c4eba25375f923703b645f8b245ecee75c722ded29189d8b515167/xdg_base_dirs-6.0.1.tar.gz"
163+
sha256 "b4c8f4ba72d1286018b25eea374ec6fbf4fddda3d4137edf50de95de53e195a6"
164+
end
165+
166+
def install
167+
virtualenv_install_with_resources
168+
end
169+
170+
test do
171+
# From the OpenAPI Spec website
172+
# https://web.archive.org/web/20230505222426/https://swagger.io/docs/specification/basic-structure/
173+
(testpath/"minimal.yaml").write <<~YAML
174+
---
175+
openapi: 3.0.3
176+
info:
177+
version: 0.0.0
178+
title: Sample API
179+
servers:
180+
- url: http://api.example.com/v1
181+
description: Optional server description, e.g. Main (production) server
182+
- url: http://staging-api.example.com
183+
description: Optional server description, e.g. Internal staging server for testing
184+
paths:
185+
/users:
186+
get:
187+
summary: Returns a list of users.
188+
responses:
189+
'200':
190+
description: A JSON array of user names
191+
content:
192+
application/json:
193+
schema:
194+
type: array
195+
items:
196+
type: string
197+
YAML
198+
output = shell_output("#{bin}/posting import minimal.yaml")
199+
assert_match "Successfully imported OpenAPI spec", output
200+
end
201+
end

0 commit comments

Comments
 (0)