Skip to content

Commit e690b8f

Browse files
fern-api[bot]fern-supportclaude
authored
SDK regeneration (#240)
* [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-ruby-sdk: 1.40.0 * [fern-replay] advance lockfile * chore: drop stale fernignore overrides for iterators and pagination clients Remove item_iterator.rb, inventory/client.rb and transfer_orders/client.rb from .fernignore and take the generated 1.40.0 versions. The hand-patched item_iterator.rb predates track_http_responses, which the regenerated cursor_item_iterator.rb calls, and the generator now handles nil items and body-cursor pagination itself. The old inventory client was also missing 7 endpoints. Co-Authored-By: Claude <noreply@anthropic.com> * chore: remove accidentally committed Gemfile.lock Co-Authored-By: Claude <noreply@anthropic.com> * docs: update README for 48.0 (upgrade notes, errors, pagination, retries, timeouts) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: fern-api[bot] <115122769+fern-api[bot]@users.noreply.github.com> Co-authored-by: fern-support <support@buildwithfern.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 88327e4 commit e690b8f

1,805 files changed

Lines changed: 47353 additions & 6494 deletions

File tree

Some content is hidden

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

‎.fern/metadata.json‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
{
2-
"cliVersion": "5.56.0",
2+
"cliVersion": "5.172.0",
33
"generatorName": "fernapi/fern-ruby-sdk",
4-
"generatorVersion": "1.0.0-rc84",
4+
"generatorVersion": "1.40.0",
55
"generatorConfig": {
6-
"enableWireTests": true
6+
"enableWireTests": true,
7+
"omitUnsetModelFields": true
78
},
8-
"originGitCommit": "f74d4b7e34b9b8676dc4b58d83a38111dc1d595f",
9-
"sdkVersion": "47.0.0.20260916"
9+
"originGitCommit": "f1e181827110c8ff2dad958ade935292d8025065",
10+
"originGitCommitIsDirty": false,
11+
"invokedBy": "ci",
12+
"requestedVersion": "48.0.0.20260916",
13+
"ciProvider": "github",
14+
"sdkVersion": "48.0.0.20260916"
1015
}

‎.fern/replay.lock‎

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.fernignore‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ lib/square/reporting_helper.rb
1414
Gemfile.custom
1515
custom.gemspec.rb
1616

17-
# Pagination is currently broken for endpoints where the page token is not submitted via a query param
18-
# Manually fixed pagination bugs in:
19-
lib/square/inventory/client.rb
20-
lib/square/transfer_orders/client.rb
21-
22-
# Iterator does not handle nil item fields (when API returns nil instead of empty array for no items)
23-
# Manually added nil checks to avoid calling .shift/.empty? on nil
24-
lib/square/internal/iterators/item_iterator.rb
2517
.fern/replay.lock
2618
.fern/replay.yml
2719
.gitattributes

‎.rubocop.yml‎

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,63 @@ Layout/LineLength:
4545
Enabled: false
4646

4747
Naming/VariableNumber:
48-
EnforcedStyle: snake_case
48+
EnforcedStyle: normalcase
49+
Severity: warning
4950

5051
Style/Documentation:
5152
Enabled: false
5253

5354
Style/Lambda:
5455
EnforcedStyle: literal
5556

57+
# Docstrings come from API definitions and often start with words like "Note:".
58+
Style/CommentAnnotation:
59+
Enabled: false
60+
5661
Minitest/MultipleAssertions:
5762
Enabled: false
5863

5964
Minitest/UselessAssertion:
6065
Enabled: false
66+
67+
# Dynamic snippets are code samples for documentation, not standalone Ruby files.
68+
Style/FrozenStringLiteralComment:
69+
Exclude:
70+
- "dynamic-snippets/**/*"
71+
72+
# Indent hash elements 2 spaces from the start of the enclosing line rather than
73+
# aligning with the preceding paren or bracket. Generated code nests hashes inside
74+
# arrays and method calls; the "consistent" style is more readable there.
75+
Layout/FirstHashElementIndentation:
76+
EnforcedStyle: consistent
77+
Exclude:
78+
- "dynamic-snippets/**/*"
79+
80+
# Match Layout/FirstHashElementIndentation: indent the first argument 2 spaces
81+
# from the start of the method call's line, regardless of parenthesis position.
82+
# Dynamic snippets are code samples, not standalone Ruby files; exclude them to
83+
# keep this config symmetric with Layout/FirstHashElementIndentation above.
84+
Layout/FirstArgumentIndentation:
85+
EnforcedStyle: consistent
86+
Exclude:
87+
- "dynamic-snippets/**/*"
88+
89+
# The generator emits non-idiomatic class names (e.g. Get_With_Query, JSON_)
90+
# derived from IR type names whose wire form contains underscores or digits.
91+
# Rubocop never auto-corrected these (naming cops have no autocorrecter), so
92+
# disabling the cop keeps CI green without changing customer output. Fixing at
93+
# source would rename public types across every existing SDK and therefore
94+
# requires a ruby-v2 major-version bump with a generator migration.
95+
Naming/ClassAndModuleCamelCase:
96+
Enabled: false
97+
98+
# Integer literals are emitted unformatted (e.g. 1000000, not 1_000_000).
99+
# Rubocop has an autocorrecter for this cop, but the only caller of integer
100+
# emission is the dynamic-snippets path, which feeds customer-facing surfaces:
101+
# (1) snippet markdown in reference docs, (2) dynamic-snippets/*.rb sample
102+
# files. Neither is rubocop-gated (markdown isn't Ruby, dynamic-snippets/**/*
103+
# is excluded above), so formatting integers there would change docs/dashboard
104+
# output without any rubocop benefit. Disabling the cop keeps integers raw
105+
# everywhere and avoids customer-visible diffs.
106+
Style/NumericLiterals:
107+
Enabled: false

‎CONTRIBUTING.md‎

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Contributing
2+
3+
Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project.
4+
5+
## Getting Started
6+
7+
### Prerequisites
8+
9+
- Ruby 3.0+
10+
- Bundler
11+
12+
### Installation
13+
14+
Install the project dependencies:
15+
16+
```bash
17+
bundle install
18+
```
19+
20+
### Building
21+
22+
Build the gem:
23+
24+
```bash
25+
gem build *.gemspec
26+
```
27+
28+
### Testing
29+
30+
Run the test suite:
31+
32+
```bash
33+
bundle exec rspec
34+
```
35+
36+
### Linting and Formatting
37+
38+
Check code style:
39+
40+
```bash
41+
bundle exec rubocop
42+
```
43+
44+
Fix code style issues:
45+
46+
```bash
47+
bundle exec rubocop -a
48+
```
49+
50+
## About Generated Code
51+
52+
**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated.
53+
54+
### Generated Files
55+
56+
The following directories contain generated code:
57+
- `lib/` - API client classes and types
58+
- Most Ruby files in the project
59+
60+
### How to Customize
61+
62+
If you need to customize the SDK, you have two options:
63+
64+
#### Option 1: Use `.fernignore`
65+
66+
For custom code that should persist across SDK regenerations:
67+
68+
1. Create a `.fernignore` file in the project root
69+
2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax)
70+
3. Add your custom code to those files
71+
72+
Files listed in `.fernignore` will not be overwritten when the SDK is regenerated.
73+
74+
For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code).
75+
76+
#### Option 2: Contribute to the Generator
77+
78+
If you want to change how code is generated for all users of this SDK:
79+
80+
1. The Ruby SDK generator lives in the [Fern repository](https://github.com/fern-api/fern)
81+
2. Generator code is located at `generators/ruby-v2/`
82+
3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md)
83+
4. Submit a pull request with your changes to the generator
84+
85+
This approach is best for:
86+
- Bug fixes in generated code
87+
- New features that would benefit all users
88+
- Improvements to code generation patterns
89+
90+
## Making Changes
91+
92+
### Workflow
93+
94+
1. Create a new branch for your changes
95+
2. Make your modifications
96+
3. Run tests to ensure nothing breaks: `bundle exec rspec`
97+
4. Run linting: `bundle exec rubocop`
98+
5. Build the gem: `gem build *.gemspec`
99+
6. Commit your changes with a clear commit message
100+
7. Push your branch and create a pull request
101+
102+
### Commit Messages
103+
104+
Write clear, descriptive commit messages that explain what changed and why.
105+
106+
### Code Style
107+
108+
This project uses RuboCop for code formatting. Run `bundle exec rubocop` before committing to ensure your code meets the project's style guidelines.
109+
110+
## Questions or Issues?
111+
112+
If you have questions or run into issues:
113+
114+
1. Check the [Fern documentation](https://buildwithfern.com)
115+
2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues)
116+
3. Open a new issue if your question hasn't been addressed
117+
118+
## License
119+
120+
By contributing to this project, you agree that your contributions will be licensed under the same license as the project.

‎Gemfile‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@ source "https://rubygems.org"
55
gemspec
66

77
group :test, :development do
8-
gem "rake", "~> 13.0"
9-
108
gem "minitest", "~> 5.16"
119
gem "minitest-rg"
12-
10+
gem "pry"
11+
gem "rake", "~> 13.0"
1312
gem "rubocop", "~> 1.21"
1413
gem "rubocop-minitest"
15-
16-
gem "pry"
17-
1814
gem "webmock"
1915
end
2016

‎Gemfile.lock‎

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)