Skip to content

Commit 91a7610

Browse files
Merge pull request #446 from OneBusAway/release-please--branches--main--changes--next
release: 0.1.0-alpha.207
2 parents 2ab6d43 + adf43a1 commit 91a7610

File tree

159 files changed

+2956
-1922
lines changed

Some content is hidden

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

159 files changed

+2956
-1922
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ jobs:
4242
4343
- name: Run tests
4444
run: ./scripts/test
45-

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

.rubocop.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,16 @@ Layout/MultilineMethodParameterLineBreaks:
5858
Layout/SpaceInsideHashLiteralBraces:
5959
EnforcedStyle: no_space
6060

61+
# This option occasionally mangles identifier names
62+
Lint/DeprecatedConstants:
63+
Exclude:
64+
- "**/*.rbi"
65+
66+
# Fairly useful in tests for pattern assertions.
67+
Lint/EmptyInPattern:
68+
Exclude:
69+
- "test/**/*"
70+
6171
Lint/MissingSuper:
6272
Exclude:
6373
- "**/*.rbi"
@@ -115,11 +125,6 @@ Style/BisectedAttrAccessor:
115125
Exclude:
116126
- "**/*.rbi"
117127

118-
# Fairly useful in tests for pattern matching.
119-
Style/CaseEquality:
120-
Exclude:
121-
- "test/**/*"
122-
123128
# We prefer nested modules in lib/, but are currently using compact style for tests.
124129
Style/ClassAndModuleChildren:
125130
Exclude:

.yardopts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
--markup markdown
2+
--exclude /rbi
3+
--exclude /sig

CHANGELOG.md

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

3+
## 0.1.0-alpha.207 (2025-03-18)
4+
5+
Full Changelog: [v0.1.0-alpha.206...v0.1.0-alpha.207](https://github.com/OneBusAway/ruby-sdk/compare/v0.1.0-alpha.206...v0.1.0-alpha.207)
6+
7+
### Features
8+
9+
* add jsonl support ([#451](https://github.com/OneBusAway/ruby-sdk/issues/451)) ([25b1850](https://github.com/OneBusAway/ruby-sdk/commit/25b18504fbc9e4d0f18a5092f850e9c9ed7d5ec9))
10+
* support client level methods ([#458](https://github.com/OneBusAway/ruby-sdk/issues/458)) ([80ae090](https://github.com/OneBusAway/ruby-sdk/commit/80ae090c4416fdc13af63a92e2235da93cd15672))
11+
* support jsonl uploads ([#468](https://github.com/OneBusAway/ruby-sdk/issues/468)) ([0e1efec](https://github.com/OneBusAway/ruby-sdk/commit/0e1efec0a957d1b38111075b51dfbf082cb41c0b))
12+
* support streaming uploads ([#462](https://github.com/OneBusAway/ruby-sdk/issues/462)) ([6e5afc3](https://github.com/OneBusAway/ruby-sdk/commit/6e5afc38b62457ae05fbea8c045ec63b6625ea45))
13+
14+
15+
### Bug Fixes
16+
17+
* bad documentation url for gemdocs.org ([#479](https://github.com/OneBusAway/ruby-sdk/issues/479)) ([27b42e7](https://github.com/OneBusAway/ruby-sdk/commit/27b42e7f9410fb8dce5dd380d95c5cc428112a12))
18+
* enums should only coerce matching symbols into strings ([#463](https://github.com/OneBusAway/ruby-sdk/issues/463)) ([cfbe9be](https://github.com/OneBusAway/ruby-sdk/commit/cfbe9be99bcc6852262494f20b4f1dd3b67681a8))
19+
* rectify a mistake where wrong lines were chosen during rebase ([#459](https://github.com/OneBusAway/ruby-sdk/issues/459)) ([97aaf84](https://github.com/OneBusAway/ruby-sdk/commit/97aaf848e3cff2491a9d8c9633b674be7b1f06c8))
20+
21+
22+
### Chores
23+
24+
* add `sorbet` section to README ([#456](https://github.com/OneBusAway/ruby-sdk/issues/456)) ([2344889](https://github.com/OneBusAway/ruby-sdk/commit/234488981d74c432b5ded96f26afec9476c62be9))
25+
* add more examples to README.md ([#457](https://github.com/OneBusAway/ruby-sdk/issues/457)) ([617ed08](https://github.com/OneBusAway/ruby-sdk/commit/617ed0802182a4d88c285dc4cf68b0f98db7549d))
26+
* add most doc strings to rbi type definitions ([#469](https://github.com/OneBusAway/ruby-sdk/issues/469)) ([aa9810b](https://github.com/OneBusAway/ruby-sdk/commit/aa9810b04f27775d253b4c2a46d2d0f7af49b3a4))
27+
* bump lockfile ([#448](https://github.com/OneBusAway/ruby-sdk/issues/448)) ([4e18ee5](https://github.com/OneBusAway/ruby-sdk/commit/4e18ee546dc74ab39f1dc01974c97e539732b108))
28+
* do not label modules as abstract ([#478](https://github.com/OneBusAway/ruby-sdk/issues/478)) ([1261344](https://github.com/OneBusAway/ruby-sdk/commit/1261344add41d6d1d2e6142f0e26ac34ec948901))
29+
* document union variants in yard doc ([#473](https://github.com/OneBusAway/ruby-sdk/issues/473)) ([6e217b9](https://github.com/OneBusAway/ruby-sdk/commit/6e217b984fff5adbebe8750788d8649e1da74448))
30+
* ensure doc strings for rbi method arguments ([#470](https://github.com/OneBusAway/ruby-sdk/issues/470)) ([0496e78](https://github.com/OneBusAway/ruby-sdk/commit/0496e78e8d635afe8f570b152f0d203884153e31))
31+
* error fields are now mutable in keeping with rest of SDK ([#472](https://github.com/OneBusAway/ruby-sdk/issues/472)) ([c003722](https://github.com/OneBusAway/ruby-sdk/commit/c003722a3c066ebed6d02cc25b3998f20dbae921))
32+
* fused enum should use faster internal iteration by default ([#460](https://github.com/OneBusAway/ruby-sdk/issues/460)) ([57b8aff](https://github.com/OneBusAway/ruby-sdk/commit/57b8aff20e713aa1096387f84e5f8ab0976b1319))
33+
* generate better supported rbi signatures ([#453](https://github.com/OneBusAway/ruby-sdk/issues/453)) ([4da269a](https://github.com/OneBusAway/ruby-sdk/commit/4da269aa981379cc9f5b94b8a0ac3bf040f648b5))
34+
* improve documentation ([#461](https://github.com/OneBusAway/ruby-sdk/issues/461)) ([30c0847](https://github.com/OneBusAway/ruby-sdk/commit/30c08471d899843c9498e29fba15be42140d7666))
35+
* **internal:** codegen related update ([#445](https://github.com/OneBusAway/ruby-sdk/issues/445)) ([5246f74](https://github.com/OneBusAway/ruby-sdk/commit/5246f743e6b59c6d8e3af57aae9440418cc90878))
36+
* **internal:** codegen related update ([#455](https://github.com/OneBusAway/ruby-sdk/issues/455)) ([72cf612](https://github.com/OneBusAway/ruby-sdk/commit/72cf6124e4fd364f489d460fdd4f9f139afac642))
37+
* **internal:** remove extra empty newlines ([#466](https://github.com/OneBusAway/ruby-sdk/issues/466)) ([56e1673](https://github.com/OneBusAway/ruby-sdk/commit/56e167301c000264a3d57f95c234595d57f8416b))
38+
* mark non-inheritable SDK internal classes as final ([#475](https://github.com/OneBusAway/ruby-sdk/issues/475)) ([c1ebe01](https://github.com/OneBusAway/ruby-sdk/commit/c1ebe018b9948782b8c51fcc548feee0817720df))
39+
* modify sorbet initializers to better support auto-completion ([#454](https://github.com/OneBusAway/ruby-sdk/issues/454)) ([921695d](https://github.com/OneBusAway/ruby-sdk/commit/921695d6562234af1a3fe483af6102108d45fe29))
40+
* move examples into tests ([#450](https://github.com/OneBusAway/ruby-sdk/issues/450)) ([a163039](https://github.com/OneBusAway/ruby-sdk/commit/a1630390cffc694ecab63b64675148b21938f690))
41+
* refactor BasePage to have initializer ([#465](https://github.com/OneBusAway/ruby-sdk/issues/465)) ([0419b24](https://github.com/OneBusAway/ruby-sdk/commit/0419b246d0175d88325ab2a699aeef05d07d8df5))
42+
* remove stale thread local checks ([#464](https://github.com/OneBusAway/ruby-sdk/issues/464)) ([3360161](https://github.com/OneBusAway/ruby-sdk/commit/33601613edd2b2daaec76b21c00693f86805123a))
43+
* rename misleading variable ([#449](https://github.com/OneBusAway/ruby-sdk/issues/449)) ([93f7821](https://github.com/OneBusAway/ruby-sdk/commit/93f7821a5c35e319224d4005e9bde687fa896881))
44+
* sdk client internal refactoring ([#477](https://github.com/OneBusAway/ruby-sdk/issues/477)) ([82bf2d4](https://github.com/OneBusAway/ruby-sdk/commit/82bf2d419e75d9cbb52ebb98e69491fccd7407be))
45+
* sdk internal updates ([#467](https://github.com/OneBusAway/ruby-sdk/issues/467)) ([4339005](https://github.com/OneBusAway/ruby-sdk/commit/433900592cddb951d380a7990b23a893529f84b3))
46+
* slightly more consistent type definition layout ([#474](https://github.com/OneBusAway/ruby-sdk/issues/474)) ([89408be](https://github.com/OneBusAway/ruby-sdk/commit/89408be34720b24845902cd2afc2308cceaf2fb0))
47+
* support different EOLs in streaming ([#452](https://github.com/OneBusAway/ruby-sdk/issues/452)) ([c04993e](https://github.com/OneBusAway/ruby-sdk/commit/c04993eaf7db5de217f6b56ee7ad70e57b8996c1))
48+
* touch up sdk usage examples ([#471](https://github.com/OneBusAway/ruby-sdk/issues/471)) ([50c7f01](https://github.com/OneBusAway/ruby-sdk/commit/50c7f014ee76b5ef7763b2a861b4c6d627f35bab))
49+
* update custom timeout header name ([#447](https://github.com/OneBusAway/ruby-sdk/issues/447)) ([6e9a1a1](https://github.com/OneBusAway/ruby-sdk/commit/6e9a1a1972461f5d74fc337b7fbacc218ce2c4f5))
50+
* use generics instead of overloading for sorbet type definitions ([#476](https://github.com/OneBusAway/ruby-sdk/issues/476)) ([fe3afe1](https://github.com/OneBusAway/ruby-sdk/commit/fe3afe18e524cc777cf4db9aade61fc0b0ad3001))
51+
352
## 0.1.0-alpha.206 (2025-03-05)
453

554
Full Changelog: [v0.1.0-alpha.205...v0.1.0-alpha.206](https://github.com/OneBusAway/ruby-sdk/compare/v0.1.0-alpha.205...v0.1.0-alpha.206)

Gemfile.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
onebusaway-sdk (0.1.0.pre.alpha.206)
14+
onebusaway-sdk (0.1.0.pre.alpha.207)
1515
connection_pool
1616

1717
GEM
@@ -93,7 +93,7 @@ GEM
9393
rbs (3.8.1)
9494
logger
9595
regexp_parser (2.10.0)
96-
rubocop (1.72.2)
96+
rubocop (1.73.2)
9797
json (~> 2.3)
9898
language_server-protocol (~> 3.17.0.2)
9999
lint_roller (~> 1.1.0)
@@ -108,13 +108,13 @@ GEM
108108
parser (>= 3.3.1.0)
109109
ruby-progressbar (1.13.0)
110110
securerandom (0.4.1)
111-
sorbet (0.5.11856)
112-
sorbet-static (= 0.5.11856)
113-
sorbet-runtime (0.5.11856)
114-
sorbet-static (0.5.11856-x86_64-linux)
115-
sorbet-static-and-runtime (0.5.11856)
116-
sorbet (= 0.5.11856)
117-
sorbet-runtime (= 0.5.11856)
111+
sorbet (0.5.11888)
112+
sorbet-static (= 0.5.11888)
113+
sorbet-runtime (0.5.11888)
114+
sorbet-static (0.5.11888-x86_64-linux)
115+
sorbet-static-and-runtime (0.5.11888)
116+
sorbet (= 0.5.11888)
117+
sorbet-runtime (= 0.5.11888)
118118
spoom (1.5.4)
119119
erubi (>= 1.10.0)
120120
prism (>= 0.28.0)
@@ -157,7 +157,7 @@ GEM
157157
tzinfo (2.0.6)
158158
concurrent-ruby (~> 1.0)
159159
unicode-display_width (2.6.0)
160-
uri (1.0.2)
160+
uri (1.0.3)
161161
webrick (1.9.1)
162162
yard (0.9.37)
163163
yard-sorbet (0.9.0)

README.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
# Onebusaway SDK Ruby API library
22

3-
The Onebusaway SDK Ruby library provides convenient access to the Onebusaway SDK REST API from any Ruby 3.0.0+
4-
application.
3+
The Onebusaway SDK Ruby library provides convenient access to the Onebusaway SDK REST API from any Ruby 3.0.0+ application.
54

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

87
## Documentation
98

10-
Documentation for the most recent release of this gem can be found [on RubyDoc](https://gemdocs.org/gems/onebusaway-sdk/latest).
9+
Documentation for released of this gem can be found [on RubyDoc](https://gemdocs.org/gems/onebusaway-sdk).
1110

1211
The underlying REST API documentation can be found on [developer.onebusaway.org](https://developer.onebusaway.org).
1312

1413
## Installation
1514

16-
To use this gem during the beta, install directly from GitHub with Bundler by
17-
adding the following to your application's `Gemfile`:
15+
To use this gem during the beta, install directly from GitHub with Bundler by adding the following to your application's `Gemfile`:
1816

1917
```ruby
2018
gem "onebusaway-sdk", git: "https://github.com/OneBusAway/ruby-sdk", branch: "main"
@@ -26,8 +24,7 @@ To fetch an initial copy of the gem:
2624
bundle install
2725
```
2826

29-
To update the version used by your application when updates are pushed to
30-
GitHub:
27+
To update the version used by your application when updates are pushed to GitHub:
3128

3229
```sh
3330
bundle update onebusaway-sdk
@@ -44,13 +41,13 @@ onebusaway_sdk = OnebusawaySDK::Client.new(
4441
)
4542

4643
current_time = onebusaway_sdk.current_time.retrieve
44+
45+
puts(current_time)
4746
```
4847

4948
### Errors
5049

51-
When the library is unable to connect to the API, or if the API returns a
52-
non-success status code (i.e., 4xx or 5xx response), a subclass of
53-
`OnebusawaySDK::Error` will be thrown:
50+
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 `OnebusawaySDK::Error` will be thrown:
5451

5552
```ruby
5653
begin
@@ -78,10 +75,9 @@ Error codes are as followed:
7875

7976
### Retries
8077

81-
Certain errors will be automatically retried 2 times by default, with a short
82-
exponential backoff. Connection errors (for example, due to a network
83-
connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors,
84-
and timeouts will all be retried by default.
78+
Certain errors will be automatically retried 2 times by default, with a short exponential backoff.
79+
80+
Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, >=500 Internal errors, and timeouts will all be retried by default.
8581

8682
You can use the `max_retries` option to configure or disable this:
8783

@@ -98,8 +94,8 @@ onebusaway_sdk.current_time.retrieve(request_options: {max_retries: 5})
9894
### Timeouts
9995

10096
By default, requests will time out after 60 seconds.
101-
Timeouts are applied separately to the initial connection and the overall request time,
102-
so in some cases a request could wait 2\*timeout seconds before it fails.
97+
98+
Timeouts are applied separately to the initial connection and the overall request time, so in some cases a request could wait 2\*timeout seconds before it fails.
10399

104100
You can use the `timeout` option to configure or disable this:
105101

@@ -113,12 +109,28 @@ onebusaway_sdk = OnebusawaySDK::Client.new(
113109
onebusaway_sdk.current_time.retrieve(request_options: {timeout: 5})
114110
```
115111

112+
## Sorbet Support
113+
114+
This library is written with [Sorbet type definitions](https://sorbet.org/docs/rbi). However, there is no runtime dependency on the `sorbet-runtime`.
115+
116+
What this means is that while you can use Sorbet to type check your code statically, and benefit from the [Sorbet Language Server](https://sorbet.org/docs/lsp) in your editor, there is no runtime type checking and execution overhead from Sorbet itself.
117+
118+
Due to limitations with the Sorbet type system, where a method otherwise can take an instance of `OnebusawaySDK::BaseModel` class, you will need to use the `**` splat operator to pass the arguments:
119+
120+
Please follow Sorbet's [setup guides](https://sorbet.org/docs/adopting) for best experience.
121+
122+
```ruby
123+
model = CurrentTimeRetrieveParams.new
124+
125+
onebusaway_sdk.current_time.retrieve(**model)
126+
```
127+
116128
## Versioning
117129

118-
This package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the
119-
library is in initial development and has a major version of `0`, APIs may change
120-
at any time.
130+
This package follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions. As the library is in initial development and has a major version of `0`, APIs may change at any time.
131+
132+
This package considers improvements to the (non-runtime) `*.rbi` and `*.rbs` type definitions to be non-breaking changes.
121133

122134
## Requirements
123135

124-
Ruby 3.0 or higher.
136+
Ruby 3.0.0 or higher.

lib/onebusaway-sdk.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
require "etc"
88
require "json"
99
require "net/http"
10+
require "pathname"
1011
require "rbconfig"
1112
require "securerandom"
1213
require "set"

0 commit comments

Comments
 (0)