Skip to content

Commit 2d22a15

Browse files
release: 0.1.0-alpha.14 (#145)
* fix: invalid enum names * chore(internal): remove unnecessary `rbi/lib` folder * chore: more accurate type annotations and aliases * chore(internal): annotate request options with type aliases in sorbet * chore: add generator safe directory * feat(api): api update * feat(api): api update * feat(api): api update * feat(api): api update * feat(api): api update * feat(api): api update * feat(api): api update * feat(api): api update * chore: loosen rubocop rules that don't always make sense * feat(api): api update * chore(internal): codegen related update * docs(readme): fix typo * chore: remove Gemfile.lock during bootstrap * chore: reorganize type aliases * feat(api): api update * feat(api): api update * chore: re-export top level models under library namespace * chore: always check if current page is empty in `next_page?` * chore: validate request option coercion correctness * chore(internal): codegen related update * feat(api): api update * chore(internal): codegen related update * feat(api): api update * feat(api): api update * chore: accept all nd-json mimetype variants * feat(api): api update * fix(internal): fix formatting script for macos * chore: revert ignoring Gemfile.lock * fix(internal): ensure formatting always uses c.utf-8 locale * release: 0.1.0-alpha.14 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 54cdc75 commit 2d22a15

File tree

472 files changed

+17124
-10606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

472 files changed

+17124
-10606
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
uses: ruby/setup-ruby@v1
2121
with:
2222
bundler-cache: false
23-
ruby-version: '3.1'
2423
- run: |-
2524
bundle install
2625
@@ -36,7 +35,6 @@ jobs:
3635
uses: ruby/setup-ruby@v1
3736
with:
3837
bundler-cache: false
39-
ruby-version: '3.1'
4038
- run: |-
4139
bundle install
4240

.github/workflows/publish-gem.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
uses: ruby/setup-ruby@v1
2020
with:
2121
bundler-cache: false
22-
ruby-version: '3.1'
2322
- run: |-
2423
bundle install
2524

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.1.0-alpha.13"
2+
".": "0.1.0-alpha.14"
33
}

.rubocop.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Layout/MultilineMethodParameterLineBreaks:
6363
# Prefer compact hash literals.
6464
Layout/SpaceInsideHashLiteralBraces:
6565
EnforcedStyle: no_space
66+
Exclude:
67+
- "**/*.rbi"
6668

6769
Lint/BooleanSymbol:
6870
Enabled: false
@@ -90,6 +92,10 @@ Lint/MissingSuper:
9092
Exclude:
9193
- "**/*.rbi"
9294

95+
Lint/SymbolConversion:
96+
Exclude:
97+
- "**/*.rbi"
98+
9399
# Disabled for safety reasons, this option changes code semantics.
94100
Lint/UnusedMethodArgument:
95101
AutoCorrect: false
@@ -244,6 +250,10 @@ Style/RedundantInitialize:
244250
Exclude:
245251
- "**/*.rbi"
246252

253+
Style/RedundantParentheses:
254+
Exclude:
255+
- "**/*.rbi"
256+
247257
# Prefer slashes for regex literals.
248258
Style/RegexpLiteral:
249259
EnforcedStyle: slashes

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.0
1+
3.2.0

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 46
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e5ab676f0996530fe4c702d8cbb88862ab8382792d01197a9576e06f5a359d00.yml
3-
openapi_spec_hash: 5c0dec3d2e1fea26d5f99560b226aedd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-f09e5f2c555d7ee764478b7bc73e92cd21f403d6ec189be14574c8367bc131ce.yml
3+
openapi_spec_hash: bd0a8e001f14132c105992d40149909a
44
config_hash: 53778a0b839c4f6ad34fbba051f5e8a6

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Changelog
22

3+
## 0.1.0-alpha.14 (2025-05-07)
4+
5+
Full Changelog: [v0.1.0-alpha.13...v0.1.0-alpha.14](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.13...v0.1.0-alpha.14)
6+
7+
### Features
8+
9+
* **api:** api update ([a1e63ab](https://github.com/Finch-API/finch-api-ruby/commit/a1e63ab1e953ca1a3745ec158e5cbba3336e8cc4))
10+
* **api:** api update ([131b860](https://github.com/Finch-API/finch-api-ruby/commit/131b8600623807e6f9fe61eec0008f466ea9bf51))
11+
* **api:** api update ([0cb263a](https://github.com/Finch-API/finch-api-ruby/commit/0cb263a792ddcd544d4b790dcb87a49af23798de))
12+
* **api:** api update ([664ac2e](https://github.com/Finch-API/finch-api-ruby/commit/664ac2e40a5f79294e19f2536241e3e3080b35bd))
13+
* **api:** api update ([f4d4ab0](https://github.com/Finch-API/finch-api-ruby/commit/f4d4ab0dcfb81d75e0f7fe5bee9583a616e39ac6))
14+
* **api:** api update ([bdab477](https://github.com/Finch-API/finch-api-ruby/commit/bdab47770cdc398d71349734d214d365569311a0))
15+
16+
17+
### Bug Fixes
18+
19+
* **internal:** ensure formatting always uses c.utf-8 locale ([4b68a42](https://github.com/Finch-API/finch-api-ruby/commit/4b68a42729fba915f1d778b306f9a1120f936012))
20+
* **internal:** fix formatting script for macos ([549b415](https://github.com/Finch-API/finch-api-ruby/commit/549b415b8fbb8baf6de342de32798d3096085a3c))
21+
22+
23+
### Chores
24+
25+
* accept all nd-json mimetype variants ([53a8863](https://github.com/Finch-API/finch-api-ruby/commit/53a8863036254bd052c47fb283c82798784859f6))
26+
* always check if current page is empty in `next_page?` ([89f7522](https://github.com/Finch-API/finch-api-ruby/commit/89f7522c76cbf4cb79a171b842fdb9db8ca0fb1f))
27+
* **internal:** codegen related update ([15d107c](https://github.com/Finch-API/finch-api-ruby/commit/15d107cee7ff974a750f1cbfa812392ac1b7fc47))
28+
* **internal:** codegen related update ([bcaecfa](https://github.com/Finch-API/finch-api-ruby/commit/bcaecfa4b137a6a767d69ea15c77885185d8368c))
29+
* **internal:** codegen related update ([f328b3a](https://github.com/Finch-API/finch-api-ruby/commit/f328b3a5c3ea6ffeb01186ea929b4eb6f70ef1aa))
30+
* re-export top level models under library namespace ([e8cc430](https://github.com/Finch-API/finch-api-ruby/commit/e8cc430134d053ce8e3e5d31aea2c43270eb2ffa))
31+
* remove Gemfile.lock during bootstrap ([6a383f0](https://github.com/Finch-API/finch-api-ruby/commit/6a383f0228803c29f1a22658821311ad3239aa97))
32+
* reorganize type aliases ([e527e5d](https://github.com/Finch-API/finch-api-ruby/commit/e527e5d5d118f2d00611a2f790e9fcc67a4794b0))
33+
* revert ignoring Gemfile.lock ([8abcd39](https://github.com/Finch-API/finch-api-ruby/commit/8abcd39a9a0ba36ac5e1a8b65e69762c174408e4))
34+
* validate request option coercion correctness ([41e068d](https://github.com/Finch-API/finch-api-ruby/commit/41e068d7304cd25e4e250a2c724cb99b1bf9d9b8))
35+
36+
37+
### Documentation
38+
39+
* **readme:** fix typo ([15960ca](https://github.com/Finch-API/finch-api-ruby/commit/15960caf4fd7cfd3596326a0605ab61a64441558))
40+
341
## 0.1.0-alpha.13 (2025-04-29)
442

543
Full Changelog: [v0.1.0-alpha.12...v0.1.0-alpha.13](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.12...v0.1.0-alpha.13)

Gemfile.lock

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GIT
22
remote: https://github.com/stainless-api/syntax_tree-rbs.git
3-
revision: 140eb3ba2ff4b959b345ac2a7927cd758a9f1284
3+
revision: c30b50219918be7cfe3ef803a00b59d1e77fcada
44
branch: main
55
specs:
66
syntax_tree-rbs (1.0.0)
@@ -11,13 +11,13 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
finch-api (0.1.0.pre.alpha.12)
14+
finch-api (0.1.0.pre.alpha.13)
1515
connection_pool
1616

1717
GEM
1818
remote: https://rubygems.org/
1919
specs:
20-
activesupport (7.2.2.1)
20+
activesupport (8.0.2)
2121
base64
2222
benchmark (>= 0.3)
2323
bigdecimal
@@ -29,10 +29,11 @@ GEM
2929
minitest (>= 5.1)
3030
securerandom (>= 0.3)
3131
tzinfo (~> 2.0, >= 2.0.5)
32+
uri (>= 0.13.1)
3233
addressable (2.8.7)
3334
public_suffix (>= 2.0.2, < 7.0)
3435
ast (2.4.3)
35-
async (2.23.1)
36+
async (2.24.0)
3637
console (~> 1.29)
3738
fiber-annotation
3839
io-event (~> 1.9)
@@ -42,28 +43,28 @@ GEM
4243
benchmark (0.4.0)
4344
bigdecimal (3.1.9)
4445
concurrent-ruby (1.3.5)
45-
connection_pool (2.5.0)
46+
connection_pool (2.5.3)
4647
console (1.30.2)
4748
fiber-annotation
4849
fiber-local (~> 1.1)
4950
json
5051
crack (1.0.0)
5152
bigdecimal
5253
rexml
53-
csv (3.3.3)
54+
csv (3.3.4)
5455
drb (2.2.1)
5556
erubi (1.13.1)
56-
ffi (1.17.1)
57+
ffi (1.17.2-x86_64-linux-gnu)
5758
fiber-annotation (0.2.0)
5859
fiber-local (1.1.0)
5960
fiber-storage
60-
fiber-storage (1.0.0)
61+
fiber-storage (1.0.1)
6162
fileutils (1.7.3)
6263
hashdiff (1.1.2)
6364
i18n (1.14.7)
6465
concurrent-ruby (~> 1.0)
6566
io-event (1.10.0)
66-
json (2.10.2)
67+
json (2.11.3)
6768
language_server-protocol (3.17.0.4)
6869
lint_roller (1.1.0)
6970
listen (3.9.0)
@@ -82,20 +83,20 @@ GEM
8283
minitest (~> 5.0)
8384
mutex_m (0.3.0)
8485
netrc (0.11.0)
85-
parallel (1.26.3)
86-
parser (3.3.7.4)
86+
parallel (1.27.0)
87+
parser (3.3.8.0)
8788
ast (~> 2.4.1)
8889
racc
8990
prettier_print (1.2.1)
9091
prism (1.4.0)
91-
public_suffix (6.0.1)
92+
public_suffix (6.0.2)
9293
racc (1.8.1)
9394
rainbow (3.1.1)
9495
rake (13.2.1)
9596
rb-fsevent (0.11.2)
9697
rb-inotify (0.11.1)
9798
ffi (~> 1.0)
98-
rbi (0.3.1)
99+
rbi (0.3.2)
99100
prism (~> 1.0)
100101
rbs (>= 3.4.4)
101102
sorbet-runtime (>= 0.5.9204)
@@ -104,29 +105,29 @@ GEM
104105
redcarpet (3.6.1)
105106
regexp_parser (2.10.0)
106107
rexml (3.4.1)
107-
rubocop (1.75.1)
108+
rubocop (1.75.5)
108109
json (~> 2.3)
109110
language_server-protocol (~> 3.17.0.2)
110111
lint_roller (~> 1.1.0)
111112
parallel (~> 1.10)
112113
parser (>= 3.3.0.2)
113114
rainbow (>= 2.2.2, < 4.0)
114115
regexp_parser (>= 2.9.3, < 3.0)
115-
rubocop-ast (>= 1.43.0, < 2.0)
116+
rubocop-ast (>= 1.44.0, < 2.0)
116117
ruby-progressbar (~> 1.7)
117118
unicode-display_width (>= 2.4.0, < 4.0)
118-
rubocop-ast (1.43.0)
119+
rubocop-ast (1.44.1)
119120
parser (>= 3.3.7.2)
120121
prism (~> 1.4)
121122
ruby-progressbar (1.13.0)
122123
securerandom (0.4.1)
123-
sorbet (0.5.11966)
124-
sorbet-static (= 0.5.11966)
125-
sorbet-runtime (0.5.11966)
126-
sorbet-static (0.5.11966-x86_64-linux)
127-
sorbet-static-and-runtime (0.5.11966)
128-
sorbet (= 0.5.11966)
129-
sorbet-runtime (= 0.5.11966)
124+
sorbet (0.5.12067)
125+
sorbet-static (= 0.5.12067)
126+
sorbet-runtime (0.5.12067)
127+
sorbet-static (0.5.12067-x86_64-linux)
128+
sorbet-static-and-runtime (0.5.12067)
129+
sorbet (= 0.5.12067)
130+
sorbet-runtime (= 0.5.12067)
130131
spoom (1.6.1)
131132
erubi (>= 1.10.0)
132133
prism (>= 0.28.0)
@@ -150,7 +151,7 @@ GEM
150151
strscan (>= 1.0.0)
151152
terminal-table (>= 2, < 5)
152153
uri (>= 0.12.0)
153-
strscan (3.1.2)
154+
strscan (3.1.5)
154155
syntax_tree (6.2.0)
155156
prettier_print (>= 1.2.0)
156157
tapioca (0.16.11)
@@ -208,4 +209,4 @@ DEPENDENCIES
208209
yard
209210

210211
BUNDLED WITH
211-
2.3.3
212+
2.4.1

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Finch Ruby API library
22

3-
The Finch Ruby library provides convenient access to the Finch REST API from any Ruby 3.1.0+ application.
3+
The Finch Ruby library provides convenient access to the Finch REST API from any Ruby 3.2.0+ application.
44

55
It is generated with [Stainless](https://www.stainless.com/).
66

@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
1717
<!-- x-release-please-start-version -->
1818

1919
```ruby
20-
gem "finch-api", "~> 0.1.0.pre.alpha.13"
20+
gem "finch-api", "~> 0.1.0.pre.alpha.14"
2121
```
2222

2323
<!-- x-release-please-end -->
@@ -76,7 +76,7 @@ rescue FinchAPI::Errors::APIError => e
7676
end
7777
```
7878

79-
Error codes are as followed:
79+
Error codes are as follows:
8080

8181
| Cause | Error Type |
8282
| ---------------- | -------------------------- |
@@ -191,9 +191,9 @@ Sorbet's typed enums require sub-classing of the [`T::Enum` class](https://sorbe
191191
Since this library does not depend on `sorbet-runtime`, it uses a [`T.all` intersection type](https://sorbet.org/docs/intersection-types) with a ruby primitive type to construct a "tagged alias" instead.
192192

193193
```ruby
194-
module FinchAPI::Models::ConnectionStatusType
194+
module FinchAPI::ConnectionStatusType
195195
# This alias aids language service driven navigation.
196-
TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::Models::ConnectionStatusType) }
196+
TaggedSymbol = T.type_alias { T.all(Symbol, FinchAPI::ConnectionStatusType) }
197197
end
198198
```
199199

@@ -214,7 +214,7 @@ This package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` typ
214214

215215
## Requirements
216216

217-
Ruby 3.1.0 or higher.
217+
Ruby 3.2.0 or higher.
218218

219219
## Contributing
220220

Rakefile

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,39 +31,51 @@ multitask(:test) do
3131
.map { "require_relative(#{_1.dump});" }
3232
.join
3333

34-
ruby(*%w[-e], rb, verbose: false) { fail unless _1 }
34+
ruby(*%w[-w -e], rb, verbose: false) { fail unless _1 }
3535
end
3636

37-
rubo_find = %w[find ./lib ./test ./rbi -type f -and ( -name *.rb -or -name *.rbi ) -print0]
3837
xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --]
38+
locale = {"LC_ALL" => "C.UTF-8"}
3939

4040
desc("Lint `*.rb(i)`")
4141
multitask(:"lint:rubocop") do
42+
find = %w[find ./lib ./test ./rbi -type f -and ( -name *.rb -or -name *.rbi ) -print0]
43+
4244
rubocop = %w[rubocop --fail-level E]
4345
rubocop += %w[--format github] if ENV.key?("CI")
4446

4547
# some lines cannot be shortened
4648
rubocop += %w[--except Lint/RedundantCopDisableDirective,Layout/LineLength]
4749

4850
lint = xargs + rubocop
49-
sh("#{rubo_find.shelljoin} | #{lint.shelljoin}")
51+
sh("#{find.shelljoin} | #{lint.shelljoin}")
5052
end
5153

52-
desc("Format `*.rb(i)`")
53-
multitask(:"format:rubocop") do
54+
desc("Format `*.rb`")
55+
multitask(:"format:rb") do
56+
# while `syntax_tree` is much faster than `rubocop`, `rubocop` is the only formatter with full syntax support
57+
find = %w[find ./lib ./test -type f -and -name *.rb -print0]
5458
fmt = xargs + %w[rubocop --fail-level F --autocorrect --format simple --]
55-
sh("#{rubo_find.shelljoin} | #{fmt.shelljoin}")
59+
sh("#{find.shelljoin} | #{fmt.shelljoin}")
60+
end
61+
62+
desc("Format `*.rbi`")
63+
multitask(:"format:rbi") do
64+
find = %w[find ./rbi -type f -and -name *.rbi -print0]
65+
fmt = xargs + %w[stree write --]
66+
sh(locale, "#{find.shelljoin} | #{fmt.shelljoin}")
5667
end
5768

5869
desc("Format `*.rbs`")
59-
multitask(:"format:syntax_tree") do
70+
multitask(:"format:rbs") do
6071
find = %w[find ./sig -type f -name *.rbs -print0]
61-
inplace = /darwin|bsd/ =~ RUBY_PLATFORM ? %w[-i''] : %w[-i]
72+
inplace = /darwin|bsd/ =~ RUBY_PLATFORM ? ["-i", ""] : %w[-i]
6273
uuid = SecureRandom.uuid
6374

6475
# `syntax_tree` has trouble with `rbs`'s class & module aliases
6576

66-
sed = xargs + %w[sed -E] + inplace + %w[-e]
77+
sed_bin = /darwin/ =~ RUBY_PLATFORM ? "/usr/bin/sed" : "sed"
78+
sed = xargs + [sed_bin, "-E", *inplace, "-e"]
6779
# annotate unprocessable aliases with a unique comment
6880
pre = sed + ["s/(class|module) ([^ ]+) = (.+$)/# \\1 #{uuid}\\n\\2: \\3/", "--"]
6981
fmt = xargs + %w[stree write --plugin=rbs --]
@@ -87,7 +99,7 @@ multitask(:"format:syntax_tree") do
8799
# transform class aliases to type aliases, which syntax tree has no trouble with
88100
sh("#{find.shelljoin} | #{pre.shelljoin}")
89101
# run syntax tree to format `*.rbs` files
90-
sh("#{find.shelljoin} | #{fmt.shelljoin}") do
102+
sh(locale, "#{find.shelljoin} | #{fmt.shelljoin}") do
91103
success = _1
92104
end
93105
# transform type aliases back to class aliases
@@ -98,7 +110,7 @@ multitask(:"format:syntax_tree") do
98110
end
99111

100112
desc("Format everything")
101-
multitask(format: [:"format:rubocop", :"format:syntax_tree"])
113+
multitask(format: [:"format:rb", :"format:rbi", :"format:rbs"])
102114

103115
desc("Typecheck `*.rbs`")
104116
multitask(:"typecheck:steep") do

0 commit comments

Comments
 (0)