Skip to content

Commit 08ee95a

Browse files
authored
Merge pull request #8 from context-dot-dev/release-please--branches--main--changes--next
release: 1.2.0
2 parents 723500c + b6839f9 commit 08ee95a

18 files changed

Lines changed: 1304 additions & 1249 deletions

‎.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.1.0"
2+
".": "1.2.0"
33
}

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 20
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-2ddb6d73ec8831eee4cb4352b85843a1f6f444e48d8be837cfcd118eddd2a63e.yml
3-
openapi_spec_hash: 1163122fba27e56fa5879bc98d32ee14
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-56a21db16ac3a797f86daca01a2ea115a0365db4b2f9d8accdec4f4d3ee2eb83.yml
3+
openapi_spec_hash: bfcef090896da96023c4485a3d69e350
44
config_hash: 38268bb88fc4dcbb8f2f94dd138b5910

‎CHANGELOG.md‎

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

3+
## 1.2.0 (2026-04-03)
4+
5+
Full Changelog: [v1.1.0...v1.2.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.1.0...v1.2.0)
6+
7+
### Features
8+
9+
* **api:** api update ([5f00bc0](https://github.com/context-dot-dev/context-ruby-sdk/commit/5f00bc076f0081065bc274ce9f28cd26a7daa944))
10+
11+
12+
### Bug Fixes
13+
14+
* align path encoding with RFC 3986 section 3.3 ([2c4072d](https://github.com/context-dot-dev/context-ruby-sdk/commit/2c4072df7df531933f5352c611183b1d152e3ec2))
15+
* variable name typo ([10e1853](https://github.com/context-dot-dev/context-ruby-sdk/commit/10e185365b3196732fc5e0649975ab696f80e893))
16+
317
## 1.1.0 (2026-03-28)
418

519
Full Changelog: [v1.0.0...v1.1.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.0.0...v1.1.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-
context.dev (1.1.0)
14+
context.dev (1.2.0)
1515
cgi
1616
connection_pool
1717

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
2626
<!-- x-release-please-start-version -->
2727

2828
```ruby
29-
gem "context.dev", "~> 1.1.0"
29+
gem "context.dev", "~> 1.2.0"
3030
```
3131

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

‎lib/context_dev/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 #{ContextDev::Internal::Type::BaseModel}, got #{data.inspect}"
160+
message = "Expected a #{Hash} or #{ContextDev::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(ContextDev::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 ContextDev::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/context_dev/models/style_extract_styleguide_params.rb‎

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,6 @@ class StyleExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
2121
# @return [String, nil]
2222
optional :domain, String
2323

24-
# @!attribute prioritize
25-
# Optional parameter to prioritize screenshot capture for styleguide extraction.
26-
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
27-
# optimizes for higher quality with longer wait times. Defaults to 'quality' if
28-
# not provided.
29-
#
30-
# @return [Symbol, ContextDev::Models::StyleExtractStyleguideParams::Prioritize, nil]
31-
optional :prioritize, enum: -> { ContextDev::StyleExtractStyleguideParams::Prioritize }
32-
3324
# @!attribute timeout_ms
3425
# Optional timeout in milliseconds for the request. If the request takes longer
3526
# than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -38,33 +29,17 @@ class StyleExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
3829
# @return [Integer, nil]
3930
optional :timeout_ms, Integer
4031

41-
# @!method initialize(direct_url: nil, domain: nil, prioritize: nil, timeout_ms: nil, request_options: {})
32+
# @!method initialize(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {})
4233
# Some parameter documentations has been truncated, see
4334
# {ContextDev::Models::StyleExtractStyleguideParams} for more details.
4435
#
4536
# @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio
4637
#
4738
# @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
4839
#
49-
# @param prioritize [Symbol, ContextDev::Models::StyleExtractStyleguideParams::Prioritize] Optional parameter to prioritize screenshot capture for styleguide extraction. I
50-
#
5140
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
5241
#
5342
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
54-
55-
# Optional parameter to prioritize screenshot capture for styleguide extraction.
56-
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
57-
# optimizes for higher quality with longer wait times. Defaults to 'quality' if
58-
# not provided.
59-
module Prioritize
60-
extend ContextDev::Internal::Type::Enum
61-
62-
SPEED = :speed
63-
QUALITY = :quality
64-
65-
# @!method self.values
66-
# @return [Array<Symbol>]
67-
end
6843
end
6944
end
7045
end

0 commit comments

Comments
 (0)