Skip to content

Commit 54cdc75

Browse files
release: 0.1.0-alpha.13 (#144)
* 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 * release: 0.1.0-alpha.13 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 8a84596 commit 54cdc75

File tree

407 files changed

+7708
-8914
lines changed

Some content is hidden

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

407 files changed

+7708
-8914
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
name: CI
22
on:
33
push:
4-
branches:
5-
- main
6-
pull_request:
7-
branches:
8-
- main
9-
- next
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
1010

1111
jobs:
1212
lint:
13+
timeout-minutes: 10
1314
name: lint
14-
runs-on: ubuntu-latest
15+
runs-on: ${{ github.repository == 'stainless-sdks/finch-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
16+
1517
steps:
1618
- uses: actions/checkout@v4
1719
- name: Set up Ruby
@@ -25,8 +27,9 @@ jobs:
2527
- name: Run lints
2628
run: ./scripts/lint
2729
test:
30+
timeout-minutes: 10
2831
name: test
29-
runs-on: ubuntu-latest
32+
runs-on: ${{ github.repository == 'stainless-sdks/finch-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
3033
steps:
3134
- uses: actions/checkout@v4
3235
- name: Set up Ruby

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
*.gem
22
.idea/
3+
.ignore
34
.prism.log
45
.ruby-lsp/
56
.yardoc/
6-
Brewfile.lock.json
77
bin/tapioca
8+
Brewfile.lock.json
89
doc/
9-
sorbet/*
10-
!/sorbet/config
10+
sorbet/tapioca/*

.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.12"
2+
".": "0.1.0-alpha.13"
33
}

.rubocop.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,19 @@ Layout/MultilineMethodParameterLineBreaks:
6464
Layout/SpaceInsideHashLiteralBraces:
6565
EnforcedStyle: no_space
6666

67+
Lint/BooleanSymbol:
68+
Enabled: false
69+
6770
# This option occasionally mangles identifier names
6871
Lint/DeprecatedConstants:
6972
Exclude:
7073
- "**/*.rbi"
7174

75+
# We use pattern assertion in tests to ensure correctness.
76+
Lint/DuplicateMatchPattern:
77+
Exclude:
78+
- "test/**/*"
79+
7280
# Fairly useful in tests for pattern assertions.
7381
Lint/EmptyInPattern:
7482
Exclude:
@@ -119,6 +127,9 @@ Metrics/ParameterLists:
119127
Metrics/PerceivedComplexity:
120128
Enabled: false
121129

130+
Naming/AccessorMethodName:
131+
Enabled: false
132+
122133
# Need to preserve block identifier for documentation.
123134
Naming/BlockForwarding:
124135
Enabled: false
@@ -244,6 +255,7 @@ Style/SafeNavigation:
244255
Style/SignalException:
245256
Exclude:
246257
- Rakefile
258+
- "**/*.rake"
247259

248260
# We use these sparingly, where we anticipate future branches for the
249261
# inner conditional.

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.1.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-46640c1b468813b828be61b1af5cb5450f9555c4c757c5a740189906a8d56672.yml
3-
openapi_spec_hash: 1d5845ae61d2c0a143db43d579b048c5
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-e5ab676f0996530fe4c702d8cbb88862ab8382792d01197a9576e06f5a359d00.yml
3+
openapi_spec_hash: 5c0dec3d2e1fea26d5f99560b226aedd
44
config_hash: 53778a0b839c4f6ad34fbba051f5e8a6

.yardopts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
--type-name-tag generic:Generic
2+
--default-return void
13
--markup markdown
24
--markup-provider redcarpet
35
--exclude /rbi

CHANGELOG.md

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

3+
## 0.1.0-alpha.13 (2025-04-29)
4+
5+
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)
6+
7+
### Features
8+
9+
* **api:** api update ([2763397](https://github.com/Finch-API/finch-api-ruby/commit/2763397ba5fb250521e2670796fac35dab3e479d))
10+
* **api:** api update ([e8ea0b2](https://github.com/Finch-API/finch-api-ruby/commit/e8ea0b2f1288158944ee787612d3a7840212e728))
11+
* **api:** api update ([a8916c9](https://github.com/Finch-API/finch-api-ruby/commit/a8916c92f39f9cce9b8b1718e1651d9609b16bb8))
12+
* **api:** api update ([b5ceabb](https://github.com/Finch-API/finch-api-ruby/commit/b5ceabb5157f3cb177c292ac1db38fe2ee2398ed))
13+
* **api:** api update ([9f9b600](https://github.com/Finch-API/finch-api-ruby/commit/9f9b600482ef6c4c257877fab587338311202d1d))
14+
* **api:** api update ([9c98649](https://github.com/Finch-API/finch-api-ruby/commit/9c986495c3111434466d972f42477322385a7794))
15+
* **api:** api update ([7dcee57](https://github.com/Finch-API/finch-api-ruby/commit/7dcee57d8114c3c871e79f660bbf3d6d0aade886))
16+
* **api:** api update ([b0bc9bb](https://github.com/Finch-API/finch-api-ruby/commit/b0bc9bbb1660ee83252d2d646af79cf55dee8ce9))
17+
* **api:** api update ([106335f](https://github.com/Finch-API/finch-api-ruby/commit/106335f11705616838e59a848551c51ca73fec8d))
18+
19+
20+
### Bug Fixes
21+
22+
* invalid enum names ([89de302](https://github.com/Finch-API/finch-api-ruby/commit/89de3026ca9a44c9b038caf0239d5eb1e04c17a1))
23+
24+
25+
### Chores
26+
27+
* add generator safe directory ([7e8da29](https://github.com/Finch-API/finch-api-ruby/commit/7e8da298f02a5cfe40012daffd18ac439c426ff6))
28+
* **internal:** annotate request options with type aliases in sorbet ([6f63db8](https://github.com/Finch-API/finch-api-ruby/commit/6f63db86081f88b411261a50028c95ca16a29e65))
29+
* **internal:** remove unnecessary `rbi/lib` folder ([2238283](https://github.com/Finch-API/finch-api-ruby/commit/2238283c857c1a425133f6ff2f1b4f0ae8b1b84a))
30+
* loosen rubocop rules that don't always make sense ([6699ec0](https://github.com/Finch-API/finch-api-ruby/commit/6699ec06493bd11bd15ef59bdc5c0ba0413f6dba))
31+
* more accurate type annotations and aliases ([b6d3a80](https://github.com/Finch-API/finch-api-ruby/commit/b6d3a804a617710558f198d26947d57fdfefef14))
32+
333
## 0.1.0-alpha.12 (2025-04-18)
434

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

CONTRIBUTING.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
## Setting up the environment
2+
3+
This repository contains a `.ruby-version` file, which should work with either [rbenv](https://github.com/rbenv/rbenv) or [asdf](https://github.com/asdf-vm/asdf) with the [ruby plugin](https://github.com/asdf-vm/asdf-ruby).
4+
5+
Please follow the instructions for your preferred version manager to install the Ruby version specified in the `.ruby-version` file.
6+
7+
To set up the repository, run:
8+
9+
```bash
10+
$ ./scripts/bootstrap
11+
```
12+
13+
This will install all the required dependencies.
14+
15+
## Modifying/Adding code
16+
17+
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may result in merge conflicts between manual patches and changes from the generator. The generator will never modify the contents of `lib/finch_api/helpers/` and `examples/` directory.
18+
19+
## Adding and running examples
20+
21+
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.
22+
23+
```ruby
24+
#!/usr/bin/env ruby
25+
# frozen_string_literal: true
26+
27+
require_relative "../lib/finch_api"
28+
29+
# ...
30+
```
31+
32+
```bash
33+
$ chmod +x './examples/<your-example>.rb'
34+
35+
# run the example against your api
36+
$ ruby './examples/<your-example>.rb'
37+
```
38+
39+
## Using the repository from source
40+
41+
If you’d like to use the repository from source, you can either install from git or reference a cloned repository:
42+
43+
To install via git in your `Gemfile`:
44+
45+
```ruby
46+
gem "finch-api", git: "https://www.github.com/Finch-API/finch-api-ruby"
47+
```
48+
49+
Alternatively, reference local copy of the repo:
50+
51+
```bash
52+
$ git clone -- 'https://www.github.com/Finch-API/finch-api-ruby' '<path-to-repo>'
53+
```
54+
55+
```ruby
56+
gem "finch-api", path: "<path-to-repo>"
57+
```
58+
59+
## Running commands
60+
61+
Running `rake` by itself will show all runnable commands.
62+
63+
```bash
64+
$ bundle exec rake
65+
```
66+
67+
## Running tests
68+
69+
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
70+
71+
```bash
72+
$ npx prism mock path/to/your/openapi.yml
73+
```
74+
75+
```bash
76+
$ bundle exec rake test
77+
```
78+
79+
## Linting and formatting
80+
81+
This repository uses [rubocop](https://github.com/rubocop/rubocop) for linting and formatting of `*.rb` and `*.rbi` files. [syntax_tree](https://github.com/ruby-syntax-tree/syntax_tree) is used for formatting `*.rbs` files.
82+
83+
There are two separate type checkers supported by this library: [sorbet](https://github.com/sorbet/sorbet) and [steep](https://github.com/soutaro/steep) are used for verifying `*.rbi` and `*.rbs` files respectively.
84+
85+
To lint and typecheck:
86+
87+
```bash
88+
$ bundle exec rake lint
89+
```
90+
91+
To format and fix all lint issues automatically:
92+
93+
```bash
94+
$ bundle exec rake format
95+
```
96+
97+
## Editor Support
98+
99+
### Ruby LSP
100+
101+
[Ruby LSP](https://github.com/Shopify/ruby-lsp) has quite good support for go to definition, but not auto-completion.
102+
103+
This can be installed along side Solargraph.
104+
105+
### Solargraph
106+
107+
[Solargraph](https://solargraph.org) has quite good support for auto-completion, but not go to definition.
108+
109+
This can be installed along side Ruby LSP.
110+
111+
### Sorbet
112+
113+
[Sorbet](https://sorbet.org) should mostly work out of the box when editing this library directly. However, there are a some caveats due to the colocation of `*.rb` and `*.rbi` files in the same project. These issues should not otherwise manifest when this library is used as a dependency.
114+
115+
1. For go to definition usages, sorbet might get confused and may not always navigate to the correct location.
116+
117+
2. For each generic type in `*.rbi` files, a spurious "Duplicate type member" error is present.
118+
119+
## Documentation Preview
120+
121+
To preview the documentation, run:
122+
123+
```bash
124+
$ bundle exec rake docs:preview [PORT=8808]
125+
```

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ group :development, :test do
2323
gem "minitest-hooks"
2424
gem "minitest-proveit"
2525
gem "minitest-rg"
26+
gem "webmock"
2627
end
2728

2829
group :development, :docs do

0 commit comments

Comments
 (0)