Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 7 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cliVersion": "5.50.0",
"generatorName": "fernapi/fern-ruby-sdk",
"generatorVersion": "1.1.13",
"generatorVersion": "1.23.2",
"generatorConfig": {
"module": "SchematicHQ",
"rubocopVariableNumberStyle": "disabled",
Expand All @@ -13,6 +13,10 @@
"webrick": ">= 1.0"
}
},
"originGitCommit": "1ab5d36abb4de887dde605f8b82a71dce464a26b",
"sdkVersion": "1.4.14"
"originGitCommit": "008b7147a27272499bf4b17fa96d4357ca3b62e9",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "1.4.15",
"ciProvider": "github",
"sdkVersion": "1.4.15"
}
12 changes: 9 additions & 3 deletions .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,39 @@ Style/FrozenStringLiteralComment:
Exclude:
- "dynamic-snippets/**/*"

# Indent hash elements 2 spaces from the start of the enclosing line rather than
# aligning with the preceding paren or bracket. Generated code nests hashes inside
# arrays and method calls; the "consistent" style is more readable there.
Layout/FirstHashElementIndentation:
EnforcedStyle: consistent
Exclude:
- "dynamic-snippets/**/*"

# Match Layout/FirstHashElementIndentation: indent the first argument 2 spaces
# from the start of the method call's line, regardless of parenthesis position.
# Dynamic snippets are code samples, not standalone Ruby files; exclude them to
# keep this config symmetric with Layout/FirstHashElementIndentation above.
Layout/FirstArgumentIndentation:
EnforcedStyle: consistent
Exclude:
- "dynamic-snippets/**/*"

# The generator emits non-idiomatic class names (e.g. Get_With_Query, JSON_)
# derived from IR type names whose wire form contains underscores or digits.
# Rubocop never auto-corrected these (naming cops have no autocorrecter), so
# disabling the cop keeps CI green without changing customer output. Fixing at
# source would rename public types across every existing SDK and therefore
# requires a ruby-v2 major-version bump with a generator migration.
Naming/ClassAndModuleCamelCase:
Enabled: false

# Integer literals are emitted unformatted (e.g. 1000000, not 1_000_000).
# Rubocop has an autocorrecter for this cop, but the only caller of integer
# emission is the dynamic-snippets path, which feeds customer-facing surfaces:
# (1) snippet markdown in reference docs, (2) dynamic-snippets/*.rb sample
# files. Neither is rubocop-gated (markdown isn't Ruby, dynamic-snippets/**/*
# is excluded above), so formatting integers there would change docs/dashboard
# output without any rubocop benefit. Disabling the cop keeps integers raw
# everywhere and avoids customer-visible diffs.
Style/NumericLiterals:
Enabled: false
120 changes: 120 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Contributing

Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project.

## Getting Started

### Prerequisites

- Ruby 3.0+
- Bundler

### Installation

Install the project dependencies:

```bash
bundle install
```

### Building

Build the gem:

```bash
gem build *.gemspec
```

### Testing

Run the test suite:

```bash
bundle exec rspec
```

### Linting and Formatting

Check code style:

```bash
bundle exec rubocop
```

Fix code style issues:

```bash
bundle exec rubocop -a
```

## About Generated Code

**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.

### Generated Files

The following directories contain generated code:
- `lib/` - API client classes and types
- Most Ruby files in the project

### How to Customize

If you need to customize the SDK, you have two options:

#### Option 1: Use `.fernignore`

For custom code that should persist across SDK regenerations:

1. Create a `.fernignore` file in the project root
2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax)
3. Add your custom code to those files

Files listed in `.fernignore` will not be overwritten when the SDK is regenerated.

For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code).

#### Option 2: Contribute to the Generator

If you want to change how code is generated for all users of this SDK:

1. The Ruby SDK generator lives in the [Fern repository](https://github.com/fern-api/fern)
2. Generator code is located at `generators/ruby-v2/`
3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md)
4. Submit a pull request with your changes to the generator

This approach is best for:
- Bug fixes in generated code
- New features that would benefit all users
- Improvements to code generation patterns

## Making Changes

### Workflow

1. Create a new branch for your changes
2. Make your modifications
3. Run tests to ensure nothing breaks: `bundle exec rspec`
4. Run linting: `bundle exec rubocop`
5. Build the gem: `gem build *.gemspec`
6. Commit your changes with a clear commit message
7. Push your branch and create a pull request

### Commit Messages

Write clear, descriptive commit messages that explain what changed and why.

### Code Style

This project uses RuboCop for code formatting. Run `bundle exec rubocop` before committing to ensure your code meets the project's style guidelines.

## Questions or Issues?

If you have questions or run into issues:

1. Check the [Fern documentation](https://buildwithfern.com)
2. Search existing [GitHub issues](https://github.com/fern-api/fern/issues)
3. Open a new issue if your question hasn't been addressed

## License

By contributing to this project, you agree that your contributions will be licensed under the same license as the project.
9 changes: 2 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@ source "https://rubygems.org"
gemspec

group :test, :development do
gem "rake", "~> 13.0"

gem "minitest", "~> 5.16"
gem "minitest-rg"

gem "pry"
gem "rake", "~> 13.0"
gem "rubocop", "~> 1.21"
gem "rubocop-minitest"

gem "pry"

gem "webmock"

gem "webrick", ">= 1.0"
end

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.custom
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# gem 'custom-gem', '~> 2.0'
# end

# Add your custom gem dependencies here
# Add your custom gem dependencies here
100 changes: 0 additions & 100 deletions Gemfile.lock

This file was deleted.

9 changes: 8 additions & 1 deletion lib/schematic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@
require_relative "schematic/types/plan_snapshot_view"
require_relative "schematic/types/plan_version_snapshot_view"
require_relative "schematic/types/subscription_trait_update"
require_relative "schematic/types/trial_status"
require_relative "schematic/types/plan_change_response_data"
require_relative "schematic/companies/types/list_plan_changes_response"
require_relative "schematic/companies/types/get_plan_change_response"
Expand Down Expand Up @@ -436,6 +437,9 @@
require_relative "schematic/entitlements/types/list_feature_usage_params"
require_relative "schematic/entitlements/types/list_feature_usage_response"
require_relative "schematic/types/time_series_granularity"
require_relative "schematic/entitlements/types/list_feature_usage_history_params"
require_relative "schematic/types/feature_usage_history_response_data"
require_relative "schematic/entitlements/types/list_feature_usage_history_response"
require_relative "schematic/entitlements/types/get_feature_usage_time_series_params"
require_relative "schematic/types/limit_time_series_point_response_data"
require_relative "schematic/types/usage_time_series_point_response_data"
Expand Down Expand Up @@ -532,6 +536,7 @@
require_relative "schematic/types/credit_transfer_view"
require_relative "schematic/types/credit_company_grant_view"
require_relative "schematic/types/stripe_embed_info"
require_relative "schematic/types/upcoming_invoice_response_data"
require_relative "schematic/types/component_preview_response_data"
require_relative "schematic/components/types/preview_component_data_response"
require_relative "schematic/types/plan_bundle_response_data"
Expand Down Expand Up @@ -588,7 +593,6 @@
require_relative "schematic/types/check_flag_response_data"
require_relative "schematic/features/types/check_flag_response"
require_relative "schematic/types/company_credit_balance"
require_relative "schematic/types/trial_status"
require_relative "schematic/types/datastream_company_plan"
require_relative "schematic/types/check_flags_response_data"
require_relative "schematic/features/types/check_flags_response"
Expand Down Expand Up @@ -736,6 +740,8 @@
require_relative "schematic/types/update_pay_in_advance_request_body"
require_relative "schematic/types/change_subscription_internal_request_body"
require_relative "schematic/types/change_subscription_request_body"
require_relative "schematic/types/preflight_event_usage_request_body"
require_relative "schematic/types/preflight_request_body"
require_relative "schematic/types/check_flag_request_body"
require_relative "schematic/types/checkout_field_input"
require_relative "schematic/types/company_billing_details_view"
Expand Down Expand Up @@ -945,6 +951,7 @@
require_relative "schematic/entitlements/types/list_feature_companies_request"
require_relative "schematic/entitlements/types/count_feature_companies_request"
require_relative "schematic/entitlements/types/list_feature_usage_request"
require_relative "schematic/entitlements/types/list_feature_usage_history_request"
require_relative "schematic/entitlements/types/get_feature_usage_time_series_request"
require_relative "schematic/entitlements/types/count_feature_usage_request"
require_relative "schematic/entitlements/types/list_feature_users_request"
Expand Down
Loading