onebusaway-sdk 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +1 -1
- data/lib/onebusaway_sdk/internal/type/enum.rb +6 -3
- data/lib/onebusaway_sdk/internal/type/union.rb +5 -2
- data/lib/onebusaway_sdk/internal/util.rb +8 -9
- data/lib/onebusaway_sdk/models.rb +4 -4
- data/lib/onebusaway_sdk/version.rb +1 -1
- data/rbi/onebusaway_sdk/internal/util.rbi +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 495e65d65411cfb5624b2b910d9424f2166047e1f2b302ebd43ceda6ccfea0c4
|
4
|
+
data.tar.gz: '09028f167f64c4851b6d8386154f2ece063cfe47683a0d2331ac6276b9b777e6'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f59845ce1a57e9e9ce954df5f922f45010a29ffebe44c7fe53ce55c09e695af5ba35c65af1ff7b827cad5977a810d80eb157644d01f9865c34b0ad4280f2d7f8
|
7
|
+
data.tar.gz: 47c256414ddb95face79c9d5e2d10c10b8ffb244de4c67820882c4f0699078704acf8d9d23d78ea1c2e7281870ad36bf18c02c258d958f122d31df7756e6a1d8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.0.4 (2025-06-05)
|
4
|
+
|
5
|
+
Full Changelog: [v1.0.3...v1.0.4](https://github.com/OneBusAway/ruby-sdk/compare/v1.0.3...v1.0.4)
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
* `to_sorbet_type` should not return branded types ([62260a5](https://github.com/OneBusAway/ruby-sdk/commit/62260a5beb28f955e636a8d8ae5054e81f0ddd1c))
|
10
|
+
* default content-type for text in multi-part formdata uploads should be text/plain ([642d274](https://github.com/OneBusAway/ruby-sdk/commit/642d274c1f710e6ec592ee5aab241f322c8d1d4a))
|
11
|
+
|
12
|
+
|
13
|
+
### Chores
|
14
|
+
|
15
|
+
* **internal:** version bump ([993b8ac](https://github.com/OneBusAway/ruby-sdk/commit/993b8ac7c60193de4157b5773da48ad76249564f))
|
16
|
+
|
3
17
|
## 1.0.3 (2025-05-28)
|
4
18
|
|
5
19
|
Full Changelog: [v1.0.2...v1.0.3](https://github.com/OneBusAway/ruby-sdk/compare/v1.0.2...v1.0.3)
|
data/README.md
CHANGED
@@ -91,11 +91,14 @@ module OnebusawaySDK
|
|
91
91
|
#
|
92
92
|
# @return [Object]
|
93
93
|
def to_sorbet_type
|
94
|
-
|
94
|
+
types = values.map { OnebusawaySDK::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
|
95
|
+
case types
|
95
96
|
in []
|
96
97
|
T.noreturn
|
97
|
-
in [
|
98
|
-
|
98
|
+
in [type]
|
99
|
+
type
|
100
|
+
else
|
101
|
+
T.any(*types)
|
99
102
|
end
|
100
103
|
end
|
101
104
|
|
@@ -201,11 +201,14 @@ module OnebusawaySDK
|
|
201
201
|
#
|
202
202
|
# @return [Object]
|
203
203
|
def to_sorbet_type
|
204
|
-
|
204
|
+
types = variants.map { OnebusawaySDK::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
|
205
|
+
case types
|
205
206
|
in []
|
206
207
|
T.noreturn
|
208
|
+
in [type]
|
209
|
+
type
|
207
210
|
else
|
208
|
-
T.any(*
|
211
|
+
T.any(*types)
|
209
212
|
end
|
210
213
|
end
|
211
214
|
|
@@ -497,7 +497,7 @@ module OnebusawaySDK
|
|
497
497
|
# @param closing [Array<Proc>]
|
498
498
|
# @param content_type [String, nil]
|
499
499
|
private def write_multipart_content(y, val:, closing:, content_type: nil)
|
500
|
-
|
500
|
+
content_line = "Content-Type: %s\r\n\r\n"
|
501
501
|
|
502
502
|
case val
|
503
503
|
in OnebusawaySDK::FilePart
|
@@ -508,24 +508,21 @@ module OnebusawaySDK
|
|
508
508
|
content_type: val.content_type
|
509
509
|
)
|
510
510
|
in Pathname
|
511
|
-
y <<
|
511
|
+
y << format(content_line, content_type || "application/octet-stream")
|
512
512
|
io = val.open(binmode: true)
|
513
513
|
closing << io.method(:close)
|
514
514
|
IO.copy_stream(io, y)
|
515
515
|
in IO
|
516
|
-
y <<
|
516
|
+
y << format(content_line, content_type || "application/octet-stream")
|
517
517
|
IO.copy_stream(val, y)
|
518
518
|
in StringIO
|
519
|
-
y <<
|
519
|
+
y << format(content_line, content_type || "application/octet-stream")
|
520
520
|
y << val.string
|
521
|
-
in String
|
522
|
-
y << "Content-Type: #{content_type}\r\n\r\n"
|
523
|
-
y << val.to_s
|
524
521
|
in -> { primitive?(_1) }
|
525
|
-
y << "
|
522
|
+
y << format(content_line, content_type || "text/plain")
|
526
523
|
y << val.to_s
|
527
524
|
else
|
528
|
-
y << "
|
525
|
+
y << format(content_line, content_type || "application/json")
|
529
526
|
y << JSON.generate(val)
|
530
527
|
end
|
531
528
|
y << "\r\n"
|
@@ -563,6 +560,8 @@ module OnebusawaySDK
|
|
563
560
|
|
564
561
|
# @api private
|
565
562
|
#
|
563
|
+
# https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content
|
564
|
+
#
|
566
565
|
# @param body [Object]
|
567
566
|
#
|
568
567
|
# @return [Array(String, Enumerable<String>)]
|
@@ -14,16 +14,16 @@ module OnebusawaySDK
|
|
14
14
|
mod.constants.each do |name|
|
15
15
|
case mod.const_get(name)
|
16
16
|
in true | false
|
17
|
-
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T
|
17
|
+
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
|
18
18
|
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
|
19
19
|
in Integer
|
20
|
-
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias {
|
20
|
+
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
|
21
21
|
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
|
22
22
|
in Float
|
23
|
-
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias {
|
23
|
+
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
|
24
24
|
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
|
25
25
|
in Symbol
|
26
|
-
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias {
|
26
|
+
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
|
27
27
|
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
|
28
28
|
else
|
29
29
|
end
|
@@ -332,6 +332,8 @@ module OnebusawaySDK
|
|
332
332
|
end
|
333
333
|
|
334
334
|
# @api private
|
335
|
+
#
|
336
|
+
# https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#special-considerations-for-multipart-content
|
335
337
|
sig do
|
336
338
|
params(body: T.anything).returns([String, T::Enumerable[String]])
|
337
339
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onebusaway-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Onebusaway SDK
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-06-
|
11
|
+
date: 2025-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|