Skip to content

Commit d318915

Browse files
Merge pull request #558 from OneBusAway/release-please--branches--main--changes--next
release: 1.0.3
2 parents 11f0c7a + ccc1bad commit d318915

File tree

131 files changed

+1736
-144
lines changed

Some content is hidden

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

131 files changed

+1736
-144
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.0.2"
2+
".": "1.0.3"
33
}

CHANGELOG.md

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

3+
## 1.0.3 (2025-05-28)
4+
5+
Full Changelog: [v1.0.2...v1.0.3](https://github.com/OneBusAway/ruby-sdk/compare/v1.0.2...v1.0.3)
6+
7+
### Bug Fixes
8+
9+
* correctly instantiate sorbet type aliases for enums and unions ([c3220da](https://github.com/OneBusAway/ruby-sdk/commit/c3220da9c8dd308037e8713b34a9925c3b2305c9))
10+
* prevent rubocop from mangling `===` to `is_a?` check ([4cc7c41](https://github.com/OneBusAway/ruby-sdk/commit/4cc7c41e75e9bc5589998af5b40398632242bd08))
11+
* sorbet types for enums, and make tapioca detection ignore `tapioca dsl` ([457b3f7](https://github.com/OneBusAway/ruby-sdk/commit/457b3f74152c42720d9daa4d2050a3a93bd8a6ce))
12+
13+
14+
### Chores
15+
16+
* **docs:** grammar improvements ([fb664c1](https://github.com/OneBusAway/ruby-sdk/commit/fb664c14ed7536ceb8f8e0a3981466572b9924b3))
17+
* force utf-8 locale via `RUBYOPT` when formatting ([40072fa](https://github.com/OneBusAway/ruby-sdk/commit/40072fa08f936bb71c630cbab264def3d5f68fca))
18+
* **internal:** version bump ([736a6f9](https://github.com/OneBusAway/ruby-sdk/commit/736a6f9a6f1536797d992536102ec93ff1c80984))
19+
* refine Yard and Sorbet types and ensure linting is turned on for examples ([4491574](https://github.com/OneBusAway/ruby-sdk/commit/44915748e1ed515f15805d3f7a2f5e73d9d4e8f7))
20+
* use fully qualified names for yard annotations and rbs aliases ([836f0a6](https://github.com/OneBusAway/ruby-sdk/commit/836f0a68ded83ff27a8dcf0c28e07bd1f29f8cba))
21+
* whitespaces ([6588d9a](https://github.com/OneBusAway/ruby-sdk/commit/6588d9a87f890cdedbe288172f074332e34a48ff))
22+
323
## 1.0.2 (2025-05-20)
424

525
Full Changelog: [v1.0.1...v1.0.2](https://github.com/OneBusAway/ruby-sdk/compare/v1.0.1...v1.0.2)

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
onebusaway-sdk (1.0.1)
14+
onebusaway-sdk (1.0.2)
1515
connection_pool
1616

1717
GEM

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
1717
<!-- x-release-please-start-version -->
1818

1919
```ruby
20-
gem "onebusaway-sdk", "~> 1.0.2"
20+
gem "onebusaway-sdk", "~> 1.0.3"
2121
```
2222

2323
<!-- x-release-please-end -->
@@ -144,7 +144,7 @@ puts(current_time[:my_undocumented_property])
144144

145145
#### Undocumented request params
146146

147-
If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request as seen in examples above.
147+
If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.
148148

149149
#### Undocumented endpoints
150150

@@ -162,7 +162,7 @@ response = client.request(
162162

163163
### Concurrency & connection pooling
164164

165-
The `OnebusawaySDK::Client` instances are threadsafe, but only are fork-safe when there are no in-flight HTTP requests.
165+
The `OnebusawaySDK::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
166166

167167
Each instance of `OnebusawaySDK::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.
168168

@@ -212,7 +212,7 @@ onebusaway_sdk.report_problem_with_stop.retrieve(
212212
#
213213
)
214214

215-
# Literal values is also permissible:
215+
# Literal values are also permissible:
216216
onebusaway_sdk.report_problem_with_stop.retrieve(
217217
code: :stop_name_wrong,
218218
#

Rakefile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ require "rake/clean"
99
require "rubocop/rake_task"
1010

1111
tapioca = "sorbet/tapioca"
12+
examples = "examples"
1213
ignore_file = ".ignore"
1314

1415
CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/ doc/], *FileList["*.gem"], ignore_file)
@@ -35,11 +36,11 @@ multitask(:test) do
3536
end
3637

3738
xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --]
38-
locale = {"LC_ALL" => "C.UTF-8"}
39+
ruby_opt = {"RUBYOPT" => [ENV["RUBYOPT"], "--encoding=UTF-8"].compact.join(" ")}
3940

4041
desc("Lint `*.rb(i)`")
4142
multitask(:"lint:rubocop") do
42-
find = %w[find ./lib ./test ./rbi -type f -and ( -name *.rb -or -name *.rbi ) -print0]
43+
find = %w[find ./lib ./test ./rbi ./examples -type f -and ( -name *.rb -or -name *.rbi ) -print0]
4344

4445
rubocop = %w[rubocop]
4546
rubocop += %w[--format github] if ENV.key?("CI")
@@ -54,7 +55,7 @@ end
5455
desc("Format `*.rb`")
5556
multitask(:"format:rb") do
5657
# while `syntax_tree` is much faster than `rubocop`, `rubocop` is the only formatter with full syntax support
57-
find = %w[find ./lib ./test -type f -and -name *.rb -print0]
58+
find = %w[find ./lib ./test ./examples -type f -and -name *.rb -print0]
5859
fmt = xargs + %w[rubocop --fail-level F --autocorrect --format simple --]
5960
sh("#{find.shelljoin} | #{fmt.shelljoin}")
6061
end
@@ -63,7 +64,7 @@ desc("Format `*.rbi`")
6364
multitask(:"format:rbi") do
6465
find = %w[find ./rbi -type f -and -name *.rbi -print0]
6566
fmt = xargs + %w[stree write --]
66-
sh(locale, "#{find.shelljoin} | #{fmt.shelljoin}")
67+
sh(ruby_opt, "#{find.shelljoin} | #{fmt.shelljoin}")
6768
end
6869

6970
desc("Format `*.rbs`")
@@ -99,7 +100,7 @@ multitask(:"format:rbs") do
99100
# transform class aliases to type aliases, which syntax tree has no trouble with
100101
sh("#{find.shelljoin} | #{pre.shelljoin}")
101102
# run syntax tree to format `*.rbs` files
102-
sh(locale, "#{find.shelljoin} | #{fmt.shelljoin}") do
103+
sh(ruby_opt, "#{find.shelljoin} | #{fmt.shelljoin}") do
103104
success = _1
104105
end
105106
# transform type aliases back to class aliases
@@ -117,12 +118,14 @@ multitask(:"typecheck:steep") do
117118
sh(*%w[steep check])
118119
end
119120

121+
directory(examples)
122+
120123
desc("Typecheck `*.rbi`")
121-
multitask(:"typecheck:sorbet") do
122-
sh(*%w[srb typecheck])
124+
multitask("typecheck:sorbet": examples) do
125+
sh(*%w[srb typecheck --dir], examples)
123126
end
124127

125-
file(tapioca) do
128+
directory(tapioca) do
126129
sh(*%w[tapioca init])
127130
end
128131

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Onebusaway SDK please follow the respective company's security reporting guidelines.
19+
or products provided by Onebusaway SDK, please follow the respective company's security reporting guidelines.
2020

2121
### Onebusaway SDK Terms and Policies
2222

23-
Please contact [email protected] for any questions or concerns regarding security of our services.
23+
Please contact [email protected] for any questions or concerns regarding the security of our services.
2424

2525
---
2626

Steepfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ target(:lib) do
77

88
signature("sig")
99

10-
YAML.safe_load_file("./manifest.yaml", symbolize_names: true) => { dependencies: }
10+
YAML.safe_load_file("./manifest.yaml", symbolize_names: true) => {dependencies:}
1111
# currently these libraries lack the `*.rbs` annotations required by `steep`
1212
stdlibs = dependencies - %w[English etc net/http rbconfig set stringio]
1313

lib/onebusaway_sdk.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020

2121
# We already ship the preferred sorbet manifests in the package itself.
2222
# `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
23-
if Object.const_defined?(:Tapioca) && caller.chain([$PROGRAM_NAME]).chain(ARGV).grep(/tapioca/)
23+
if Object.const_defined?(:Tapioca) &&
24+
caller.chain([$PROGRAM_NAME]).chain(ARGV).any?(/tapioca/) &&
25+
ARGV.none?(/dsl/)
2426
return
2527
end
2628

lib/onebusaway_sdk/internal.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ module Internal
1313
define_sorbet_constant!(:AnyHash) do
1414
T.type_alias { T::Hash[Symbol, T.anything] }
1515
end
16+
define_sorbet_constant!(:FileInput) do
17+
T.type_alias { T.any(Pathname, StringIO, IO, String, OnebusawaySDK::FilePart) }
18+
end
1619
end
1720
end

lib/onebusaway_sdk/internal/type/array_of.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module Type
1212
# Array of items of a given type.
1313
class ArrayOf
1414
include OnebusawaySDK::Internal::Type::Converter
15+
include OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
1516

1617
private_class_method :new
1718

@@ -110,6 +111,13 @@ def dump(value, state:)
110111
end
111112
end
112113

114+
# @api private
115+
#
116+
# @return [Object]
117+
def to_sorbet_type
118+
T::Array[OnebusawaySDK::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)]
119+
end
120+
113121
# @api private
114122
#
115123
# @return [generic<Elem>]

0 commit comments

Comments
 (0)