Skip to content

Commit f5f2aff

Browse files
authored
Merge pull request #1 from Hexlet/release-please--branches--main--changes--next
release: 0.0.2
2 parents 19a5abe + 5413199 commit f5f2aff

203 files changed

Lines changed: 2881 additions & 2625 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.

.github/workflows/publish-gem.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to rubygems.org in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/Hexlet/tilda-ruby/actions/workflows/publish-gem.yml
4+
name: Publish Gem
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v6
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
bundler-cache: false
22+
- run: |-
23+
bundle install
24+
25+
- name: Publish to RubyGems.org
26+
run: |
27+
bash ./bin/publish-gem
28+
env:
29+
# `RUBYGEMS_HOST` is only required for private gem repositories, not https://rubygems.org
30+
RUBYGEMS_HOST: ${{ secrets.TILDA_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }}
31+
GEM_HOST_API_KEY: ${{ secrets.TILDA_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
release_doctor:
10+
name: release doctor
11+
runs-on: ubuntu-latest
12+
if: github.repository == 'Hexlet/tilda-ruby' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
13+
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Check release environment
18+
run: |
19+
bash ./bin/check-release-environment
20+
env:
21+
RUBYGEMS_HOST: ${{ secrets.TILDA_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }}
22+
GEM_HOST_API_KEY: ${{ secrets.TILDA_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.2"
3+
}

.rubocop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ Layout/LineLength:
4040
AllowedPatterns:
4141
- "^\\s*#.*$"
4242
- ^require(_relative)?
43-
- "Tilda::Internal::Type::BaseModel$"
43+
- "TildaRuby::Internal::Type::BaseModel$"
4444
- "^\\s*[A-Z0-9_]+ = :"
45-
- "Tilda::(Models|Resources|Test)::"
45+
- "TildaRuby::(Models|Resources|Test)::"
4646
Max: 110
4747

4848
Layout/MultilineArrayLineBreaks:

.solargraph.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ include:
55
- 'Rakefile'
66
- 'examples/**/*.rb'
77
- 'lib/**/*.rb'
8-
- 'test/tilda/resource_namespaces.rb'
9-
- 'test/tilda/test_helper.rb'
8+
- 'test/tilda_ruby/resource_namespaces.rb'
9+
- 'test/tilda_ruby/test_helper.rb'
1010
exclude:
1111
- 'rbi/**/*'

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 7
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hexlet%2Ftilda-d06441794bcf349b37439e4084aa5accb40ad16d553d5013cd33b9379f183dc1.yml
33
openapi_spec_hash: 231389205a35d2d6c56bd1cac4091e81
4-
config_hash: e9e27aada148c323a3b3fc7a44f0b53f
4+
config_hash: 02a97d1e54040f9bd1eeef26fc735da7

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
## 0.0.2 (2026-02-14)
4+
5+
Full Changelog: [v0.0.1...v0.0.2](https://github.com/Hexlet/tilda-ruby/compare/v0.0.1...v0.0.2)
6+
7+
### Chores
8+
9+
* update SDK settings ([fb564fe](https://github.com/Hexlet/tilda-ruby/commit/fb564fe80dbc114998b4a2cc1aaaeaaf5e8c127c))
10+
* update SDK settings ([5ee0a1f](https://github.com/Hexlet/tilda-ruby/commit/5ee0a1f307b5e5a9884b39061d6a409ff014db13))

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This will install all the required dependencies.
1414

1515
## Modifying/Adding code
1616

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/tilda/helpers/` and `examples/` directory.
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/tilda_ruby/helpers/` and `examples/` directory.
1818

1919
## Adding and running examples
2020

@@ -24,7 +24,7 @@ All files in the `examples/` directory are not modified by the generator and can
2424
#!/usr/bin/env ruby
2525
# frozen_string_literal: true
2626

27-
require_relative "../lib/tilda"
27+
require_relative "../lib/tilda_ruby"
2828

2929
# ...
3030
```
@@ -43,17 +43,17 @@ If you’d like to use the repository from source, you can either install from g
4343
To install via git in your `Gemfile`:
4444

4545
```ruby
46-
gem "tilda", git: "https://github.com/stainless-sdks/tilda-ruby"
46+
gem "tilda-ruby", git: "https://github.com/Hexlet/tilda-ruby"
4747
```
4848

4949
Alternatively, reference local copy of the repo:
5050

5151
```bash
52-
$ git clone -- 'https://github.com/stainless-sdks/tilda-ruby' '<path-to-repo>'
52+
$ git clone -- 'https://github.com/Hexlet/tilda-ruby' '<path-to-repo>'
5353
```
5454

5555
```ruby
56-
gem "tilda", path: "<path-to-repo>"
56+
gem "tilda-ruby", path: "<path-to-repo>"
5757
```
5858

5959
## Running commands

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
tilda (0.0.1)
14+
tilda-ruby (0.0.2)
1515
cgi
1616
connection_pool
1717

@@ -219,7 +219,7 @@ DEPENDENCIES
219219
syntax_tree
220220
syntax_tree-rbs!
221221
tapioca
222-
tilda!
222+
tilda-ruby!
223223
webmock
224224
webrick
225225
yard

README.md

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,32 @@
11
# Tilda Ruby API library
22

3-
The Tilda Ruby library provides convenient access to the Tilda REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/stainless-sdks/tilda-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
3+
The Tilda Ruby library provides convenient access to the Tilda REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/Hexlet/tilda-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem.
44

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

77
## Documentation
88

9-
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/tilda).
9+
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/tilda-ruby).
1010

1111
## Installation
1212

1313
To use this gem, install via Bundler by adding the following to your application's `Gemfile`:
1414

15+
<!-- x-release-please-start-version -->
16+
1517
```ruby
16-
gem "tilda", "~> 0.0.1"
18+
gem "tilda-ruby", "~> 0.0.2"
1719
```
1820

21+
<!-- x-release-please-end -->
22+
1923
## Usage
2024

2125
```ruby
2226
require "bundler/setup"
23-
require "tilda"
27+
require "tilda_ruby"
2428

25-
tilda = Tilda::Client.new(
29+
tilda = TildaRuby::Client.new(
2630
api_key: ENV["TILDA_API_KEY"] # This is the default and can be omitted
2731
)
2832

@@ -33,17 +37,17 @@ puts(getpage)
3337

3438
### Handling errors
3539

36-
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `Tilda::Errors::APIError` will be thrown:
40+
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), a subclass of `TildaRuby::Errors::APIError` will be thrown:
3741

3842
```ruby
3943
begin
4044
getpage = tilda.getpage.retrieve(pageid: "REPLACE_ME")
41-
rescue Tilda::Errors::APIConnectionError => e
45+
rescue TildaRuby::Errors::APIConnectionError => e
4246
puts("The server could not be reached")
4347
puts(e.cause) # an underlying Exception, likely raised within `net/http`
44-
rescue Tilda::Errors::RateLimitError => e
48+
rescue TildaRuby::Errors::RateLimitError => e
4549
puts("A 429 status code was received; we should back off a bit.")
46-
rescue Tilda::Errors::APIStatusError => e
50+
rescue TildaRuby::Errors::APIStatusError => e
4751
puts("Another non-200-range status code was received")
4852
puts(e.status)
4953
end
@@ -75,7 +79,7 @@ You can use the `max_retries` option to configure or disable this:
7579

7680
```ruby
7781
# Configure the default for all requests:
78-
tilda = Tilda::Client.new(
82+
tilda = TildaRuby::Client.new(
7983
max_retries: 0 # default is 2
8084
)
8185

@@ -89,23 +93,23 @@ By default, requests will time out after 60 seconds. You can use the timeout opt
8993

9094
```ruby
9195
# Configure the default for all requests:
92-
tilda = Tilda::Client.new(
96+
tilda = TildaRuby::Client.new(
9397
timeout: nil # default is 60
9498
)
9599

96100
# Or, configure per-request:
97101
tilda.getpage.retrieve(pageid: "REPLACE_ME", request_options: {timeout: 5})
98102
```
99103

100-
On timeout, `Tilda::Errors::APITimeoutError` is raised.
104+
On timeout, `TildaRuby::Errors::APITimeoutError` is raised.
101105

102106
Note that requests that time out are retried by default.
103107

104108
## Advanced concepts
105109

106110
### BaseModel
107111

108-
All parameter and response objects inherit from `Tilda::Internal::Type::BaseModel`, which provides several conveniences, including:
112+
All parameter and response objects inherit from `TildaRuby::Internal::Type::BaseModel`, which provides several conveniences, including:
109113

110114
1. All fields, including unknown ones, are accessible with `obj[:prop]` syntax, and can be destructured with `obj => {prop: prop}` or pattern-matching syntax.
111115

@@ -157,9 +161,9 @@ response = client.request(
157161

158162
### Concurrency & connection pooling
159163

160-
The `Tilda::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
164+
The `TildaRuby::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
161165

162-
Each instance of `Tilda::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.
166+
Each instance of `TildaRuby::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.
163167

164168
When all available connections from the pool are checked out, requests wait for a new connection to become available, with queue time counting towards the request timeout.
165169

@@ -182,7 +186,7 @@ Or, equivalently:
182186
tilda.getpage.retrieve(pageid: "REPLACE_ME")
183187

184188
# You can also splat a full Params class:
185-
params = Tilda::GetpageRetrieveParams.new(pageid: "REPLACE_ME")
189+
params = TildaRuby::GetpageRetrieveParams.new(pageid: "REPLACE_ME")
186190
tilda.getpage.retrieve(**params)
187191
```
188192

@@ -198,4 +202,4 @@ Ruby 3.2.0 or higher.
198202

199203
## Contributing
200204

201-
See [the contributing documentation](https://github.com/stainless-sdks/tilda-ruby/tree/main/CONTRIBUTING.md).
205+
See [the contributing documentation](https://github.com/Hexlet/tilda-ruby/tree/main/CONTRIBUTING.md).

0 commit comments

Comments
 (0)