openlayer 0.11.1 → 0.11.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da7479f1b4806e1f408b5f23df379faff05be86cbe2cb0a47452901503451cbd
4
- data.tar.gz: cd78757f4ba90bda28c4d56378870891deadb397c17457ae6e79791995a34bda
3
+ metadata.gz: d475908d0a1f51b7480b1d9094aced4d62421f32dbe90118eddfcdddb8806192
4
+ data.tar.gz: 459acbfe236cd6e52fde0381c517500f27df9085d8501b850cba0b649342acaa
5
5
  SHA512:
6
- metadata.gz: d0044e30049558273ebad96952ea9fc7ad2de5f9e07626d1bc341824a95fa6b757508ac92745ddbb1b76c8164176482fc7641033e00eb379a6f34426e0d42f4c
7
- data.tar.gz: 3df1e20f753a2c34452c1da56e5a749a44a64e514284d51bbc7bd7addfa27f56641726aa36d7db61dcdaa6036a60c719f93039663288660df332834b6d387cdf
6
+ metadata.gz: 1a8433105072a5235da9f92fd81e753ae539d1fb3fb18198872b3b6ea548a87eb7f83afa6761bd2ed53b0db05a7cbbdb9e32ccc9254a87361ad3f39adc90af35
7
+ data.tar.gz: a3f7eb91d3cbafd5b2191830bc7c13bce6336a10fe4cd68d6d7d4030f0584e16b457d1e94c6b2412424dc53235b7d2cd25f9b13260c74a64d37161e68c73fde0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.2 (2026-04-01)
4
+
5
+ Full Changelog: [v0.11.1...v0.11.2](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.11.1...v0.11.2)
6
+
7
+ ### Bug Fixes
8
+
9
+ * align path encoding with RFC 3986 section 3.3 ([a90bfa7](https://github.com/openlayer-ai/openlayer-ruby/commit/a90bfa710bb3a147c4fd3111277b68b90c01c045))
10
+ * **internal:** correct multipart form field name encoding ([c24ad06](https://github.com/openlayer-ai/openlayer-ruby/commit/c24ad0620d508c3cfd145cf19d2d40ab901b35eb))
11
+ * variable name typo ([19d1897](https://github.com/openlayer-ai/openlayer-ruby/commit/19d189791f600b61eccf061d440082f4e382b2e7))
12
+
13
+
14
+ ### Chores
15
+
16
+ * **ci:** skip lint on metadata-only changes ([8e5f101](https://github.com/openlayer-ai/openlayer-ruby/commit/8e5f1015976b3ba55d72f9e5cb39325f2811f344))
17
+ * **ci:** support opting out of skipping builds on metadata-only commits ([13a5bb1](https://github.com/openlayer-ai/openlayer-ruby/commit/13a5bb13c5a0a2c3faf30f8411275f3738270084))
18
+ * **internal:** tweak CI branches ([b95bc79](https://github.com/openlayer-ai/openlayer-ruby/commit/b95bc79023ccd19d272e07135656e0aa07d6fecb))
19
+ * **internal:** update gitignore ([505f7b6](https://github.com/openlayer-ai/openlayer-ruby/commit/505f7b6bd6324aec3272ce3b03926211d9e8f1bf))
20
+ * **tests:** bump steady to v0.19.4 ([1768e99](https://github.com/openlayer-ai/openlayer-ruby/commit/1768e99b6ae5cfd9fd4c9629c075e0a1f9cbf5b8))
21
+ * **tests:** bump steady to v0.19.5 ([95ea180](https://github.com/openlayer-ai/openlayer-ruby/commit/95ea180eb1948e3825c33762ad3f9a056d613868))
22
+ * **tests:** bump steady to v0.19.6 ([0223b02](https://github.com/openlayer-ai/openlayer-ruby/commit/0223b0225c2fb18f91d84dca822e43481157dd3a))
23
+ * **tests:** bump steady to v0.19.7 ([f4894d6](https://github.com/openlayer-ai/openlayer-ruby/commit/f4894d67465dd4630515906b439420b7dd435c22))
24
+ * **tests:** bump steady to v0.20.1 ([825869e](https://github.com/openlayer-ai/openlayer-ruby/commit/825869e4c7e722a3ae8460289498c59e584702f3))
25
+ * **tests:** bump steady to v0.20.2 ([e576f39](https://github.com/openlayer-ai/openlayer-ruby/commit/e576f39c822911696172907d72ece4033534529d))
26
+
27
+
28
+ ### Refactors
29
+
30
+ * **tests:** switch from prism to steady ([80fd726](https://github.com/openlayer-ai/openlayer-ruby/commit/80fd7262b08c8b30a1e639ccfc9e53a3534542c7))
31
+
3
32
  ## 0.11.1 (2026-03-08)
4
33
 
5
34
  Full Changelog: [v0.11.0...v0.11.1](https://github.com/openlayer-ai/openlayer-ruby/compare/v0.11.0...v0.11.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 "openlayer", "~> 0.11.1"
20
+ gem "openlayer", "~> 0.11.2"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -157,7 +157,7 @@ module Openlayer
157
157
  in Hash | nil => coerced
158
158
  coerced
159
159
  else
160
- message = "Expected a #{Hash} or #{Openlayer::Internal::Type::BaseModel}, got #{data.inspect}"
160
+ message = "Expected a #{Hash} or #{Openlayer::Internal::Type::BaseModel}, got #{input.inspect}"
161
161
  raise ArgumentError.new(message)
162
162
  end
163
163
  end
@@ -237,6 +237,11 @@ module Openlayer
237
237
  end
238
238
  end
239
239
 
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
+
240
245
  class << self
241
246
  # @api private
242
247
  #
@@ -247,6 +252,15 @@ module Openlayer
247
252
  "#{uri.scheme}://#{uri.host}#{":#{uri.port}" unless uri.port == uri.default_port}"
248
253
  end
249
254
 
255
+ # @api private
256
+ #
257
+ # @param path [String, Integer]
258
+ #
259
+ # @return [String]
260
+ def encode_path(path)
261
+ path.to_s.gsub(Openlayer::Internal::Util::RFC_3986_NOT_PCHARS) { ERB::Util.url_encode(_1) }
262
+ end
263
+
250
264
  # @api private
251
265
  #
252
266
  # @param path [String, Array<String>]
@@ -259,7 +273,7 @@ module Openlayer
259
273
  in []
260
274
  ""
261
275
  in [String => p, *interpolations]
262
- encoded = interpolations.map { ERB::Util.url_encode(_1) }
276
+ encoded = interpolations.map { encode_path(_1) }
263
277
  format(p, *encoded)
264
278
  end
265
279
  end
@@ -571,16 +585,15 @@ module Openlayer
571
585
  y << "Content-Disposition: form-data"
572
586
 
573
587
  unless key.nil?
574
- name = ERB::Util.url_encode(key.to_s)
575
- y << "; name=\"#{name}\""
588
+ y << "; name=\"#{key}\""
576
589
  end
577
590
 
578
591
  case val
579
592
  in Openlayer::FilePart unless val.filename.nil?
580
- filename = ERB::Util.url_encode(val.filename)
593
+ filename = encode_path(val.filename)
581
594
  y << "; filename=\"#{filename}\""
582
595
  in Pathname | IO
583
- filename = ERB::Util.url_encode(::File.basename(val.to_path))
596
+ filename = encode_path(::File.basename(val.to_path))
584
597
  y << "; filename=\"#{filename}\""
585
598
  else
586
599
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Openlayer
4
- VERSION = "0.11.1"
4
+ VERSION = "0.11.2"
5
5
  end
@@ -148,12 +148,20 @@ module Openlayer
148
148
  end
149
149
  end
150
150
 
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
+
151
154
  class << self
152
155
  # @api private
153
156
  sig { params(uri: URI::Generic).returns(String) }
154
157
  def uri_origin(uri)
155
158
  end
156
159
 
160
+ # @api private
161
+ sig { params(path: T.any(String, Integer)).returns(String) }
162
+ def encode_path(path)
163
+ end
164
+
157
165
  # @api private
158
166
  sig { params(path: T.any(String, T::Array[String])).returns(String) }
159
167
  def interpolate_path(path)
@@ -45,8 +45,12 @@ module Openlayer
45
45
  -> top?
46
46
  } -> top?
47
47
 
48
+ RFC_3986_NOT_PCHARS: Regexp
49
+
48
50
  def self?.uri_origin: (URI::Generic uri) -> String
49
51
 
52
+ def self?.encode_path: (String | Integer path) -> String
53
+
50
54
  def self?.interpolate_path: (String | ::Array[String] path) -> String
51
55
 
52
56
  def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openlayer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Openlayer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-09 00:00:00.000000000 Z
11
+ date: 2026-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi