onebusaway-sdk 1.0.1 → 1.0.3
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 +28 -0
- data/README.md +4 -4
- data/SECURITY.md +2 -2
- data/lib/onebusaway_sdk/internal/type/array_of.rb +8 -0
- data/lib/onebusaway_sdk/internal/type/base_model.rb +7 -0
- data/lib/onebusaway_sdk/internal/type/boolean.rb +8 -0
- data/lib/onebusaway_sdk/internal/type/enum.rb +12 -0
- data/lib/onebusaway_sdk/internal/type/file_input.rb +7 -0
- data/lib/onebusaway_sdk/internal/type/hash_of.rb +8 -0
- data/lib/onebusaway_sdk/internal/type/union.rb +12 -0
- data/lib/onebusaway_sdk/internal/type/unknown.rb +8 -0
- data/lib/onebusaway_sdk/internal/util.rb +54 -1
- data/lib/onebusaway_sdk/internal.rb +3 -0
- data/lib/onebusaway_sdk/models/agencies_with_coverage_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/agency_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/arrival_and_departure_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/arrival_and_departure_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/block_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/config_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/current_time_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/references.rb +38 -38
- data/lib/onebusaway_sdk/models/report_problem_with_stop_retrieve_params.rb +2 -2
- data/lib/onebusaway_sdk/models/report_problem_with_trip_retrieve_params.rb +2 -2
- data/lib/onebusaway_sdk/models/route_ids_for_agency_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/route_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/routes_for_agency_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/routes_for_location_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/schedule_for_stop_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/search_for_route_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/search_for_stop_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/shape_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/stop_ids_for_agency_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/stop_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/stops_for_agency_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/stops_for_location_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/stops_for_route_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/trip_detail_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/trip_for_vehicle_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/trip_retrieve_response.rb +2 -2
- data/lib/onebusaway_sdk/models/trips_for_location_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/trips_for_route_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models/vehicles_for_agency_list_response.rb +2 -2
- data/lib/onebusaway_sdk/models.rb +30 -19
- data/lib/onebusaway_sdk/resources/report_problem_with_stop.rb +2 -2
- data/lib/onebusaway_sdk/resources/report_problem_with_trip.rb +2 -2
- data/lib/onebusaway_sdk/version.rb +1 -1
- data/lib/onebusaway_sdk.rb +3 -1
- data/rbi/onebusaway_sdk/internal/type/array_of.rbi +6 -0
- data/rbi/onebusaway_sdk/internal/type/base_model.rbi +5 -0
- data/rbi/onebusaway_sdk/internal/type/boolean.rbi +6 -0
- data/rbi/onebusaway_sdk/internal/type/enum.rbi +5 -0
- data/rbi/onebusaway_sdk/internal/type/file_input.rbi +5 -0
- data/rbi/onebusaway_sdk/internal/type/hash_of.rbi +6 -0
- data/rbi/onebusaway_sdk/internal/type/union.rbi +5 -0
- data/rbi/onebusaway_sdk/internal/type/unknown.rbi +6 -0
- data/rbi/onebusaway_sdk/internal/util.rbi +34 -0
- data/rbi/onebusaway_sdk/internal.rbi +5 -0
- data/sig/onebusaway_sdk/internal/type/array_of.rbs +3 -0
- data/sig/onebusaway_sdk/internal/type/base_model.rbs +2 -0
- data/sig/onebusaway_sdk/internal/type/boolean.rbs +3 -0
- data/sig/onebusaway_sdk/internal/type/enum.rbs +2 -0
- data/sig/onebusaway_sdk/internal/type/file_input.rbs +2 -0
- data/sig/onebusaway_sdk/internal/type/hash_of.rbs +3 -0
- data/sig/onebusaway_sdk/internal/type/union.rbs +2 -0
- data/sig/onebusaway_sdk/internal/type/unknown.rbs +3 -0
- data/sig/onebusaway_sdk/internal/util.rbs +12 -0
- data/sig/onebusaway_sdk/internal.rbs +3 -0
- data/sig/onebusaway_sdk/models/agencies_with_coverage_list_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/agencies_with_coverage_list_response.rbs +18 -0
- data/sig/onebusaway_sdk/models/agency_retrieve_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/agency_retrieve_response.rbs +23 -0
- data/sig/onebusaway_sdk/models/arrival_and_departure_list_params.rbs +7 -0
- data/sig/onebusaway_sdk/models/arrival_and_departure_list_response.rbs +84 -0
- data/sig/onebusaway_sdk/models/arrival_and_departure_retrieve_params.rbs +9 -0
- data/sig/onebusaway_sdk/models/arrival_and_departure_retrieve_response.rbs +80 -0
- data/sig/onebusaway_sdk/models/block_retrieve_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/block_retrieve_response.rbs +42 -0
- data/sig/onebusaway_sdk/models/config_retrieve_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/config_retrieve_response.rbs +40 -0
- data/sig/onebusaway_sdk/models/current_time_retrieve_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/current_time_retrieve_response.rbs +11 -0
- data/sig/onebusaway_sdk/models/references.rbs +128 -6
- data/sig/onebusaway_sdk/models/report_problem_with_stop_retrieve_params.rbs +9 -0
- data/sig/onebusaway_sdk/models/report_problem_with_trip_retrieve_params.rbs +14 -0
- data/sig/onebusaway_sdk/models/response_wrapper.rbs +7 -0
- data/sig/onebusaway_sdk/models/route_ids_for_agency_list_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/route_ids_for_agency_list_response.rbs +10 -0
- data/sig/onebusaway_sdk/models/route_retrieve_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/route_retrieve_response.rbs +22 -0
- data/sig/onebusaway_sdk/models/routes_for_agency_list_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/routes_for_agency_list_response.rbs +23 -0
- data/sig/onebusaway_sdk/models/routes_for_location_list_params.rbs +10 -0
- data/sig/onebusaway_sdk/models/routes_for_location_list_response.rbs +24 -0
- data/sig/onebusaway_sdk/models/schedule_for_route_retrieve_params.rbs +5 -0
- data/sig/onebusaway_sdk/models/schedule_for_route_retrieve_response.rbs +69 -0
- data/sig/onebusaway_sdk/models/schedule_for_stop_retrieve_params.rbs +5 -0
- data/sig/onebusaway_sdk/models/schedule_for_stop_retrieve_response.rbs +45 -0
- data/sig/onebusaway_sdk/models/search_for_route_list_params.rbs +6 -0
- data/sig/onebusaway_sdk/models/search_for_route_list_response.rbs +24 -0
- data/sig/onebusaway_sdk/models/search_for_stop_list_params.rbs +6 -0
- data/sig/onebusaway_sdk/models/search_for_stop_list_response.rbs +25 -0
- data/sig/onebusaway_sdk/models/shape_retrieve_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/shape_retrieve_response.rbs +11 -0
- data/sig/onebusaway_sdk/models/stop_ids_for_agency_list_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/stop_ids_for_agency_list_response.rbs +10 -0
- data/sig/onebusaway_sdk/models/stop_retrieve_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/stop_retrieve_response.rbs +23 -0
- data/sig/onebusaway_sdk/models/stops_for_agency_list_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/stops_for_agency_list_response.rbs +21 -0
- data/sig/onebusaway_sdk/models/stops_for_location_list_params.rbs +10 -0
- data/sig/onebusaway_sdk/models/stops_for_location_list_response.rbs +25 -0
- data/sig/onebusaway_sdk/models/stops_for_route_list_params.rbs +6 -0
- data/sig/onebusaway_sdk/models/stops_for_route_list_response.rbs +37 -0
- data/sig/onebusaway_sdk/models/trip_detail_retrieve_params.rbs +9 -0
- data/sig/onebusaway_sdk/models/trip_detail_retrieve_response.rbs +69 -0
- data/sig/onebusaway_sdk/models/trip_for_vehicle_retrieve_params.rbs +8 -0
- data/sig/onebusaway_sdk/models/trip_for_vehicle_retrieve_response.rbs +69 -0
- data/sig/onebusaway_sdk/models/trip_retrieve_params.rbs +2 -0
- data/sig/onebusaway_sdk/models/trip_retrieve_response.rbs +23 -0
- data/sig/onebusaway_sdk/models/trips_for_location_list_params.rbs +11 -0
- data/sig/onebusaway_sdk/models/trips_for_location_list_response.rbs +71 -0
- data/sig/onebusaway_sdk/models/trips_for_route_list_params.rbs +7 -0
- data/sig/onebusaway_sdk/models/trips_for_route_list_response.rbs +70 -0
- data/sig/onebusaway_sdk/models/vehicles_for_agency_list_params.rbs +5 -0
- data/sig/onebusaway_sdk/models/vehicles_for_agency_list_response.rbs +60 -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: 774a62ce95d40bc273371794f6ad2bd15ee81408c68cfe8982090b197c57fe1a
|
4
|
+
data.tar.gz: c1f16accdf042a20ad534cf27a5a99ca49a1ee1d014f21f655d704cbee586cac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c3a21bb95898bc7e909497f4768be5e7bc641982e19427656433d3e08df0aa7250cd3491eba7d12b8812ac8ecc3b5972e6a278a7309b8dbfce58ca6b9c1d4e3
|
7
|
+
data.tar.gz: 40c5c2ee398039cb03e138d9c73dc7fe08a487e0273e915047805a5cd666eca1b5eee97c3bef8a1d32e03839d88143067963d1dfd0008676d0248f1b5d37de28
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,33 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
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
|
+
|
23
|
+
## 1.0.2 (2025-05-20)
|
24
|
+
|
25
|
+
Full Changelog: [v1.0.1...v1.0.2](https://github.com/OneBusAway/ruby-sdk/compare/v1.0.1...v1.0.2)
|
26
|
+
|
27
|
+
### Chores
|
28
|
+
|
29
|
+
* **internal:** version bump ([dcdc73d](https://github.com/OneBusAway/ruby-sdk/commit/dcdc73d4ef0c34ae369c7a74e70d3f0d6b162b96))
|
30
|
+
|
3
31
|
## 1.0.1 (2025-05-17)
|
4
32
|
|
5
33
|
Full Changelog: [v1.0.0...v1.0.1](https://github.com/OneBusAway/ruby-sdk/compare/v1.0.0...v1.0.1)
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
17
17
|
<!-- x-release-please-start-version -->
|
18
18
|
|
19
19
|
```ruby
|
20
|
-
gem "onebusaway-sdk", "~> 1.0.
|
20
|
+
gem "onebusaway-sdk", "~> 1.0.3"
|
21
21
|
```
|
22
22
|
|
23
23
|
<!-- x-release-please-end -->
|
@@ -144,7 +144,7 @@ puts(current_time[:my_undocumented_property])
|
|
144
144
|
|
145
145
|
#### Undocumented request params
|
146
146
|
|
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.
|
148
148
|
|
149
149
|
#### Undocumented endpoints
|
150
150
|
|
@@ -162,7 +162,7 @@ response = client.request(
|
|
162
162
|
|
163
163
|
### Concurrency & connection pooling
|
164
164
|
|
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.
|
166
166
|
|
167
167
|
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.
|
168
168
|
|
@@ -212,7 +212,7 @@ onebusaway_sdk.report_problem_with_stop.retrieve(
|
|
212
212
|
# …
|
213
213
|
)
|
214
214
|
|
215
|
-
# Literal values
|
215
|
+
# Literal values are also permissible:
|
216
216
|
onebusaway_sdk.report_problem_with_stop.retrieve(
|
217
217
|
code: :stop_name_wrong,
|
218
218
|
# …
|
data/SECURITY.md
CHANGED
@@ -16,11 +16,11 @@ before making any information public.
|
|
16
16
|
## Reporting Non-SDK Related Security Issues
|
17
17
|
|
18
18
|
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.
|
20
20
|
|
21
21
|
### Onebusaway SDK Terms and Policies
|
22
22
|
|
23
|
-
Please contact info@onebusaway.org for any questions or concerns regarding security of our services.
|
23
|
+
Please contact info@onebusaway.org for any questions or concerns regarding the security of our services.
|
24
24
|
|
25
25
|
---
|
26
26
|
|
@@ -12,6 +12,7 @@ module OnebusawaySDK
|
|
12
12
|
# Array of items of a given type.
|
13
13
|
class ArrayOf
|
14
14
|
include OnebusawaySDK::Internal::Type::Converter
|
15
|
+
include OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
|
15
16
|
|
16
17
|
private_class_method :new
|
17
18
|
|
@@ -110,6 +111,13 @@ module OnebusawaySDK
|
|
110
111
|
end
|
111
112
|
end
|
112
113
|
|
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
|
+
|
113
121
|
# @api private
|
114
122
|
#
|
115
123
|
# @return [generic<Elem>]
|
@@ -10,6 +10,7 @@ module OnebusawaySDK
|
|
10
10
|
# Ruby has no Boolean class; this is something for models to refer to.
|
11
11
|
class Boolean
|
12
12
|
extend OnebusawaySDK::Internal::Type::Converter
|
13
|
+
extend OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
|
13
14
|
|
14
15
|
private_class_method :new
|
15
16
|
|
@@ -56,6 +57,13 @@ module OnebusawaySDK
|
|
56
57
|
# @option state [Boolean] :can_retry
|
57
58
|
#
|
58
59
|
# @return [Boolean, Object]
|
60
|
+
|
61
|
+
# @api private
|
62
|
+
#
|
63
|
+
# @return [Object]
|
64
|
+
def to_sorbet_type
|
65
|
+
T::Boolean
|
66
|
+
end
|
59
67
|
end
|
60
68
|
end
|
61
69
|
end
|
@@ -87,6 +87,18 @@ module OnebusawaySDK
|
|
87
87
|
#
|
88
88
|
# @return [Symbol, Object]
|
89
89
|
|
90
|
+
# @api private
|
91
|
+
#
|
92
|
+
# @return [Object]
|
93
|
+
def to_sorbet_type
|
94
|
+
case values
|
95
|
+
in []
|
96
|
+
T.noreturn
|
97
|
+
in [value, *_]
|
98
|
+
T.all(OnebusawaySDK::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
90
102
|
# @api private
|
91
103
|
#
|
92
104
|
# @param depth [Integer]
|
@@ -12,6 +12,7 @@ module OnebusawaySDK
|
|
12
12
|
# Hash of items of a given type.
|
13
13
|
class HashOf
|
14
14
|
include OnebusawaySDK::Internal::Type::Converter
|
15
|
+
include OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
|
15
16
|
|
16
17
|
private_class_method :new
|
17
18
|
|
@@ -130,6 +131,13 @@ module OnebusawaySDK
|
|
130
131
|
end
|
131
132
|
end
|
132
133
|
|
134
|
+
# @api private
|
135
|
+
#
|
136
|
+
# @return [Object]
|
137
|
+
def to_sorbet_type
|
138
|
+
T::Hash[OnebusawaySDK::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)]
|
139
|
+
end
|
140
|
+
|
133
141
|
# @api private
|
134
142
|
#
|
135
143
|
# @return [generic<Elem>]
|
@@ -197,6 +197,18 @@ module OnebusawaySDK
|
|
197
197
|
super
|
198
198
|
end
|
199
199
|
|
200
|
+
# @api private
|
201
|
+
#
|
202
|
+
# @return [Object]
|
203
|
+
def to_sorbet_type
|
204
|
+
case (v = variants)
|
205
|
+
in []
|
206
|
+
T.noreturn
|
207
|
+
else
|
208
|
+
T.any(*v.map { OnebusawaySDK::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) })
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
200
212
|
# rubocop:enable Style/CaseEquality
|
201
213
|
# rubocop:enable Style/HashEachMethods
|
202
214
|
|
@@ -10,6 +10,7 @@ module OnebusawaySDK
|
|
10
10
|
# When we don't know what to expect for the value.
|
11
11
|
class Unknown
|
12
12
|
extend OnebusawaySDK::Internal::Type::Converter
|
13
|
+
extend OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
|
13
14
|
|
14
15
|
# rubocop:disable Lint/UnusedMethodArgument
|
15
16
|
|
@@ -58,6 +59,13 @@ module OnebusawaySDK
|
|
58
59
|
# @option state [Boolean] :can_retry
|
59
60
|
#
|
60
61
|
# @return [Object]
|
62
|
+
|
63
|
+
# @api private
|
64
|
+
#
|
65
|
+
# @return [Object]
|
66
|
+
def to_sorbet_type
|
67
|
+
T.anything
|
68
|
+
end
|
61
69
|
end
|
62
70
|
|
63
71
|
# rubocop:enable Lint/UnusedMethodArgument
|
@@ -9,6 +9,23 @@ module OnebusawaySDK
|
|
9
9
|
# @return [Float]
|
10
10
|
def self.monotonic_secs = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
11
11
|
|
12
|
+
# @api private
|
13
|
+
#
|
14
|
+
# @param ns [Module, Class]
|
15
|
+
#
|
16
|
+
# @return [Enumerable<Module, Class>]
|
17
|
+
def self.walk_namespaces(ns)
|
18
|
+
ns.constants(false).lazy.flat_map do
|
19
|
+
case (c = ns.const_get(_1, false))
|
20
|
+
in Module | Class
|
21
|
+
walk_namespaces(c)
|
22
|
+
else
|
23
|
+
[]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
.chain([ns])
|
27
|
+
end
|
28
|
+
|
12
29
|
class << self
|
13
30
|
# @api private
|
14
31
|
#
|
@@ -583,11 +600,13 @@ module OnebusawaySDK
|
|
583
600
|
#
|
584
601
|
# @return [Object]
|
585
602
|
def encode_content(headers, body)
|
603
|
+
# rubocop:disable Style/CaseEquality
|
604
|
+
# rubocop:disable Layout/LineLength
|
586
605
|
content_type = headers["content-type"]
|
587
606
|
case [content_type, body]
|
588
607
|
in [OnebusawaySDK::Internal::Util::JSON_CONTENT, Hash | Array | -> { primitive?(_1) }]
|
589
608
|
[headers, JSON.generate(body)]
|
590
|
-
in [OnebusawaySDK::Internal::Util::JSONL_CONTENT, Enumerable] unless
|
609
|
+
in [OnebusawaySDK::Internal::Util::JSONL_CONTENT, Enumerable] unless OnebusawaySDK::Internal::Type::FileInput === body
|
591
610
|
[headers, body.lazy.map { JSON.generate(_1) }]
|
592
611
|
in [%r{^multipart/form-data}, Hash | OnebusawaySDK::Internal::Type::FileInput]
|
593
612
|
boundary, strio = encode_multipart_streaming(body)
|
@@ -602,6 +621,8 @@ module OnebusawaySDK
|
|
602
621
|
else
|
603
622
|
[headers, body]
|
604
623
|
end
|
624
|
+
# rubocop:enable Layout/LineLength
|
625
|
+
# rubocop:enable Style/CaseEquality
|
605
626
|
end
|
606
627
|
|
607
628
|
# @api private
|
@@ -826,11 +847,43 @@ module OnebusawaySDK
|
|
826
847
|
sorbet_runtime_constants.fetch(name).call
|
827
848
|
end
|
828
849
|
|
850
|
+
# @api private
|
851
|
+
#
|
852
|
+
# @param name [Symbol]
|
853
|
+
#
|
854
|
+
# @return [Boolean]
|
855
|
+
def sorbet_constant_defined?(name) = sorbet_runtime_constants.key?(name)
|
856
|
+
|
829
857
|
# @api private
|
830
858
|
#
|
831
859
|
# @param name [Symbol]
|
832
860
|
# @param blk [Proc]
|
833
861
|
def define_sorbet_constant!(name, &blk) = sorbet_runtime_constants.store(name, blk)
|
862
|
+
|
863
|
+
# @api private
|
864
|
+
#
|
865
|
+
# @return [Object]
|
866
|
+
def to_sorbet_type = raise NotImplementedError
|
867
|
+
|
868
|
+
class << self
|
869
|
+
# @api private
|
870
|
+
#
|
871
|
+
# @param type [OnebusawaySDK::Internal::Util::SorbetRuntimeSupport, Object]
|
872
|
+
#
|
873
|
+
# @return [Object]
|
874
|
+
def to_sorbet_type(type)
|
875
|
+
case type
|
876
|
+
in OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
|
877
|
+
type.to_sorbet_type
|
878
|
+
in Class | Module
|
879
|
+
type
|
880
|
+
in true | false
|
881
|
+
T::Boolean
|
882
|
+
else
|
883
|
+
type.class
|
884
|
+
end
|
885
|
+
end
|
886
|
+
end
|
834
887
|
end
|
835
888
|
|
836
889
|
extend OnebusawaySDK::Internal::Util::SorbetRuntimeSupport
|
@@ -13,5 +13,8 @@ module OnebusawaySDK
|
|
13
13
|
define_sorbet_constant!(:AnyHash) do
|
14
14
|
T.type_alias { T::Hash[Symbol, T.anything] }
|
15
15
|
end
|
16
|
+
define_sorbet_constant!(:FileInput) do
|
17
|
+
T.type_alias { T.any(Pathname, StringIO, IO, String, OnebusawaySDK::FilePart) }
|
18
|
+
end
|
16
19
|
end
|
17
20
|
end
|
@@ -26,13 +26,13 @@ module OnebusawaySDK
|
|
26
26
|
|
27
27
|
# @!attribute references
|
28
28
|
#
|
29
|
-
# @return [OnebusawaySDK::References]
|
29
|
+
# @return [OnebusawaySDK::Models::References]
|
30
30
|
required :references, -> { OnebusawaySDK::References }
|
31
31
|
|
32
32
|
# @!method initialize(limit_exceeded:, list:, references:)
|
33
33
|
# @param limit_exceeded [Boolean]
|
34
34
|
# @param list [Array<OnebusawaySDK::Models::AgenciesWithCoverageListResponse::Data::List>]
|
35
|
-
# @param references [OnebusawaySDK::References]
|
35
|
+
# @param references [OnebusawaySDK::Models::References]
|
36
36
|
|
37
37
|
class List < OnebusawaySDK::Internal::Type::BaseModel
|
38
38
|
# @!attribute agency_id
|
@@ -25,13 +25,13 @@ module OnebusawaySDK
|
|
25
25
|
|
26
26
|
# @!attribute references
|
27
27
|
#
|
28
|
-
# @return [OnebusawaySDK::References]
|
28
|
+
# @return [OnebusawaySDK::Models::References]
|
29
29
|
required :references, -> { OnebusawaySDK::References }
|
30
30
|
|
31
31
|
# @!method initialize(entry:, limit_exceeded:, references:)
|
32
32
|
# @param entry [OnebusawaySDK::Models::AgencyRetrieveResponse::Data::Entry]
|
33
33
|
# @param limit_exceeded [Boolean]
|
34
|
-
# @param references [OnebusawaySDK::References]
|
34
|
+
# @param references [OnebusawaySDK::Models::References]
|
35
35
|
|
36
36
|
# @see OnebusawaySDK::Models::AgencyRetrieveResponse::Data#entry
|
37
37
|
class Entry < OnebusawaySDK::Internal::Type::BaseModel
|
@@ -20,12 +20,12 @@ module OnebusawaySDK
|
|
20
20
|
|
21
21
|
# @!attribute references
|
22
22
|
#
|
23
|
-
# @return [OnebusawaySDK::References]
|
23
|
+
# @return [OnebusawaySDK::Models::References]
|
24
24
|
required :references, -> { OnebusawaySDK::References }
|
25
25
|
|
26
26
|
# @!method initialize(entry:, references:)
|
27
27
|
# @param entry [OnebusawaySDK::Models::ArrivalAndDepartureListResponse::Data::Entry]
|
28
|
-
# @param references [OnebusawaySDK::References]
|
28
|
+
# @param references [OnebusawaySDK::Models::References]
|
29
29
|
|
30
30
|
# @see OnebusawaySDK::Models::ArrivalAndDepartureListResponse::Data#entry
|
31
31
|
class Entry < OnebusawaySDK::Internal::Type::BaseModel
|
@@ -20,12 +20,12 @@ module OnebusawaySDK
|
|
20
20
|
|
21
21
|
# @!attribute references
|
22
22
|
#
|
23
|
-
# @return [OnebusawaySDK::References]
|
23
|
+
# @return [OnebusawaySDK::Models::References]
|
24
24
|
required :references, -> { OnebusawaySDK::References }
|
25
25
|
|
26
26
|
# @!method initialize(entry:, references:)
|
27
27
|
# @param entry [OnebusawaySDK::Models::ArrivalAndDepartureRetrieveResponse::Data::Entry]
|
28
|
-
# @param references [OnebusawaySDK::References]
|
28
|
+
# @param references [OnebusawaySDK::Models::References]
|
29
29
|
|
30
30
|
# @see OnebusawaySDK::Models::ArrivalAndDepartureRetrieveResponse::Data#entry
|
31
31
|
class Entry < OnebusawaySDK::Internal::Type::BaseModel
|
@@ -20,12 +20,12 @@ module OnebusawaySDK
|
|
20
20
|
|
21
21
|
# @!attribute references
|
22
22
|
#
|
23
|
-
# @return [OnebusawaySDK::References]
|
23
|
+
# @return [OnebusawaySDK::Models::References]
|
24
24
|
required :references, -> { OnebusawaySDK::References }
|
25
25
|
|
26
26
|
# @!method initialize(entry:, references:)
|
27
27
|
# @param entry [OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry]
|
28
|
-
# @param references [OnebusawaySDK::References]
|
28
|
+
# @param references [OnebusawaySDK::Models::References]
|
29
29
|
|
30
30
|
# @see OnebusawaySDK::Models::BlockRetrieveResponse::Data#entry
|
31
31
|
class Entry < OnebusawaySDK::Internal::Type::BaseModel
|
@@ -20,12 +20,12 @@ module OnebusawaySDK
|
|
20
20
|
|
21
21
|
# @!attribute references
|
22
22
|
#
|
23
|
-
# @return [OnebusawaySDK::References]
|
23
|
+
# @return [OnebusawaySDK::Models::References]
|
24
24
|
required :references, -> { OnebusawaySDK::References }
|
25
25
|
|
26
26
|
# @!method initialize(entry:, references:)
|
27
27
|
# @param entry [OnebusawaySDK::Models::ConfigRetrieveResponse::Data::Entry]
|
28
|
-
# @param references [OnebusawaySDK::References]
|
28
|
+
# @param references [OnebusawaySDK::Models::References]
|
29
29
|
|
30
30
|
# @see OnebusawaySDK::Models::ConfigRetrieveResponse::Data#entry
|
31
31
|
class Entry < OnebusawaySDK::Internal::Type::BaseModel
|
@@ -20,12 +20,12 @@ module OnebusawaySDK
|
|
20
20
|
|
21
21
|
# @!attribute references
|
22
22
|
#
|
23
|
-
# @return [OnebusawaySDK::References]
|
23
|
+
# @return [OnebusawaySDK::Models::References]
|
24
24
|
required :references, -> { OnebusawaySDK::References }
|
25
25
|
|
26
26
|
# @!method initialize(entry:, references:)
|
27
27
|
# @param entry [OnebusawaySDK::Models::CurrentTimeRetrieveResponse::Data::Entry]
|
28
|
-
# @param references [OnebusawaySDK::References]
|
28
|
+
# @param references [OnebusawaySDK::Models::References]
|
29
29
|
|
30
30
|
# @see OnebusawaySDK::Models::CurrentTimeRetrieveResponse::Data#entry
|
31
31
|
class Entry < OnebusawaySDK::Internal::Type::BaseModel
|