Skip to content

Commit f620fec

Browse files
Merge pull request #613 from OneBusAway/release-please--branches--main--changes--next
release: 1.6.1
2 parents 1601145 + a1840b9 commit f620fec

10 files changed

Lines changed: 53 additions & 12 deletions

File tree

.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.6.0"
2+
".": "1.6.1"
33
}

CHANGELOG.md

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

3+
## 1.6.1 (2026-04-01)
4+
5+
Full Changelog: [v1.6.0...v1.6.1](https://github.com/OneBusAway/ruby-sdk/compare/v1.6.0...v1.6.1)
6+
7+
### Bug Fixes
8+
9+
* align path encoding with RFC 3986 section 3.3 ([73f0f2d](https://github.com/OneBusAway/ruby-sdk/commit/73f0f2dde7c4d13aab4cf681aa68ecc022dca33b))
10+
* variable name typo ([0bb2581](https://github.com/OneBusAway/ruby-sdk/commit/0bb2581f24d20b6ffff39e630aea058bebb6e668))
11+
12+
13+
### Chores
14+
15+
* **tests:** bump steady to v0.20.1 ([c40fb01](https://github.com/OneBusAway/ruby-sdk/commit/c40fb01c82c735d6ed0a97ea9e9521a83e820199))
16+
* **tests:** bump steady to v0.20.2 ([5e538f6](https://github.com/OneBusAway/ruby-sdk/commit/5e538f6d606d5d01f11e3c1cdec4402b81b02034))
17+
318
## 1.6.0 (2026-03-29)
419

520
Full Changelog: [v1.5.6...v1.6.0](https://github.com/OneBusAway/ruby-sdk/compare/v1.5.6...v1.6.0)

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.6.0)
14+
onebusaway-sdk (1.6.1)
1515
cgi
1616
connection_pool
1717

README.md

Lines changed: 1 addition & 1 deletion
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.6.0"
20+
gem "onebusaway-sdk", "~> 1.6.1"
2121
```
2222

2323
<!-- x-release-please-end -->

lib/onebusaway_sdk/internal/util.rb

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def coerce_hash!(input)
157157
in Hash | nil => coerced
158158
coerced
159159
else
160-
message = "Expected a #{Hash} or #{OnebusawaySDK::Internal::Type::BaseModel}, got #{data.inspect}"
160+
message = "Expected a #{Hash} or #{OnebusawaySDK::Internal::Type::BaseModel}, got #{input.inspect}"
161161
raise ArgumentError.new(message)
162162
end
163163
end
@@ -237,6 +237,11 @@ def dig(data, pick, &blk)
237237
end
238238
end
239239

240+
# @type [Regexp]
241+
#
242+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
243+
RFC_3986_NOT_PCHARS = /[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/
244+
240245
class << self
241246
# @api private
242247
#
@@ -247,6 +252,15 @@ def uri_origin(uri)
247252
"#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
248253
end
249254

255+
# @api private
256+
#
257+
# @param path [String, Integer]
258+
#
259+
# @return [String]
260+
def encode_path(path)
261+
path.to_s.gsub(OnebusawaySDK::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
262+
end
263+
250264
# @api private
251265
#
252266
# @param path [String, Array<String>]
@@ -259,7 +273,7 @@ def interpolate_path(path)
259273
in []
260274
""
261275
in [String => p, *interpolations]
262-
encoded = interpolations.map { ERB::Util.url_encode(_1) }
276+
encoded = interpolations.map { encode_path(_1) }
263277
format(p, *encoded)
264278
end
265279
end
@@ -576,10 +590,10 @@ def encode_query_params(query)
576590

577591
case val
578592
in OnebusawaySDK::FilePart unless val.filename.nil?
579-
filename = ERB::Util.url_encode(val.filename)
593+
filename = encode_path(val.filename)
580594
y << "; filename=\"#{filename}\""
581595
in Pathname | IO
582-
filename = ERB::Util.url_encode(::File.basename(val.to_path))
596+
filename = encode_path(::File.basename(val.to_path))
583597
y << "; filename=\"#{filename}\""
584598
else
585599
end

lib/onebusaway_sdk/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module OnebusawaySDK
4-
VERSION = "1.6.0"
4+
VERSION = "1.6.1"
55
end

rbi/onebusaway_sdk/internal/util.rbi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,20 @@ module OnebusawaySDK
148148
end
149149
end
150150

151+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
152+
RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp)
153+
151154
class << self
152155
# @api private
153156
sig { params(uri: URI::Generic).returns(String) }
154157
def uri_origin(uri)
155158
end
156159

160+
# @api private
161+
sig { params(path: T.any(String, Integer)).returns(String) }
162+
def encode_path(path)
163+
end
164+
157165
# @api private
158166
sig { params(path: T.any(String, T::Array[String])).returns(String) }
159167
def interpolate_path(path)

scripts/mock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}"
2222
# Run steady mock on the given spec
2323
if [ "$1" == "--daemon" ]; then
2424
# Pre-install the package so the download doesn't eat into the startup timeout
25-
npm exec --package=@stdy/cli@0.19.7 -- steady --version
25+
npm exec --package=@stdy/cli@0.20.2 -- steady --version
2626

27-
npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
27+
npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL" &> .stdy.log &
2828

2929
# Wait for server to come online via health endpoint (max 30s)
3030
echo -n "Waiting for server"
@@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then
4848

4949
echo
5050
else
51-
npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
51+
npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets "$URL"
5252
fi

scripts/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ elif ! steady_is_running ; then
4343
echo -e "To run the server, pass in the path or url of your OpenAPI"
4444
echo -e "spec to the steady command:"
4545
echo
46-
echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
46+
echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=repeat --validator-form-array-format=repeat --validator-query-object-format=brackets --validator-form-object-format=brackets${NC}"
4747
echo
4848

4949
exit 1

sig/onebusaway_sdk/internal/util.rbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ module OnebusawaySDK
4545
-> top?
4646
} -> top?
4747

48+
RFC_3986_NOT_PCHARS: Regexp
49+
4850
def self?.uri_origin: (URI::Generic uri) -> String
4951

52+
def self?.encode_path: (String | Integer path) -> String
53+
5054
def self?.interpolate_path: (String | ::Array[String] path) -> String
5155

5256
def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]

0 commit comments

Comments
 (0)