brand.dev 1.0.0 → 1.2.0
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 +33 -0
- data/README.md +1 -1
- data/lib/brand_dev/internal/util.rb +19 -6
- data/lib/brand_dev/models/brand_styleguide_params.rb +1 -26
- data/lib/brand_dev/models/brand_styleguide_response.rb +495 -246
- data/lib/brand_dev/models/brand_web_scrape_images_response.rb +4 -0
- data/lib/brand_dev/models/brand_web_scrape_md_params.rb +10 -1
- data/lib/brand_dev/resources/brand.rb +6 -5
- data/lib/brand_dev/version.rb +1 -1
- data/rbi/brand_dev/internal/util.rbi +8 -0
- data/rbi/brand_dev/models/brand_styleguide_params.rbi +0 -58
- data/rbi/brand_dev/models/brand_styleguide_response.rbi +471 -531
- data/rbi/brand_dev/models/brand_web_scrape_images_response.rbi +20 -0
- data/rbi/brand_dev/models/brand_web_scrape_md_params.rbi +13 -0
- data/rbi/brand_dev/resources/brand.rbi +4 -6
- data/sig/brand_dev/internal/util.rbs +4 -0
- data/sig/brand_dev/models/brand_styleguide_params.rbs +1 -25
- data/sig/brand_dev/models/brand_styleguide_response.rbs +285 -337
- data/sig/brand_dev/models/brand_web_scrape_images_response.rbs +14 -1
- data/sig/brand_dev/models/brand_web_scrape_md_params.rbs +8 -1
- data/sig/brand_dev/resources/brand.rbs +1 -1
- 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: da14d160e2138b016418f2d5ae01c99d858e777c521d5b68b0b343f9b5dd398d
|
|
4
|
+
data.tar.gz: 17789fdbe86926d85a4ad165f6df3e1ffec73a6d71a76e0e5839c28cc1dab05e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9962899a3ffb3c13785628de7a28bc9e5bffdd1b87d4c1996c6e713f4c9906fe3fbb24cd1ecec5d2ac55a45b03dba22fb9dd1948e44c11132c03d9ee499aaaa5
|
|
7
|
+
data.tar.gz: 8516186b2f44da273a04a42464e369ac2931e52743792d38f60e2e43c1cabe819818438ac63ed42ea201774e02005ded7b570ac80948e93e3163f7cecf759045
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.0 (2026-04-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.1.0...v1.2.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v1.1.0...v1.2.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([31fce97](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/31fce97412ff85c3c00d97941c75c7abcb52ac3f))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* align path encoding with RFC 3986 section 3.3 ([d7380ea](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/d7380ea2e73abf9d87f40dad634fb8d542dc7e52))
|
|
15
|
+
* variable name typo ([83f277c](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/83f277c8837aff78ec010a77040a33dc42771bca))
|
|
16
|
+
|
|
17
|
+
## 1.1.0 (2026-03-28)
|
|
18
|
+
|
|
19
|
+
Full Changelog: [v1.0.0...v1.1.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v1.0.0...v1.1.0)
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* **api:** api update ([03558d9](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/03558d9514387f8e11a927a53a78d97bf38d966a))
|
|
24
|
+
* **api:** api update ([f1e52c1](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/f1e52c1ea2bcc9535493849a5ac5243313e1541b))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* **internal:** correct multipart form field name encoding ([6455f42](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/6455f428805bd7af12d6d18a54ff64c54cabfbb3))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Chores
|
|
33
|
+
|
|
34
|
+
* **ci:** support opting out of skipping builds on metadata-only commits ([efb0a18](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/efb0a181cf5eef3650a352c3c97b32eb888bdc81))
|
|
35
|
+
|
|
3
36
|
## 1.0.0 (2026-03-25)
|
|
4
37
|
|
|
5
38
|
Full Changelog: [v0.32.0...v1.0.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v0.32.0...v1.0.0)
|
data/README.md
CHANGED
|
@@ -157,7 +157,7 @@ module BrandDev
|
|
|
157
157
|
in Hash | nil => coerced
|
|
158
158
|
coerced
|
|
159
159
|
else
|
|
160
|
-
message = "Expected a #{Hash} or #{BrandDev::Internal::Type::BaseModel}, got #{
|
|
160
|
+
message = "Expected a #{Hash} or #{BrandDev::Internal::Type::BaseModel}, got #{input.inspect}"
|
|
161
161
|
raise ArgumentError.new(message)
|
|
162
162
|
end
|
|
163
163
|
end
|
|
@@ -237,6 +237,11 @@ module BrandDev
|
|
|
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 BrandDev
|
|
|
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(BrandDev::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 BrandDev
|
|
|
259
273
|
in []
|
|
260
274
|
""
|
|
261
275
|
in [String => p, *interpolations]
|
|
262
|
-
encoded = interpolations.map {
|
|
276
|
+
encoded = interpolations.map { encode_path(_1) }
|
|
263
277
|
format(p, *encoded)
|
|
264
278
|
end
|
|
265
279
|
end
|
|
@@ -571,16 +585,15 @@ module BrandDev
|
|
|
571
585
|
y << "Content-Disposition: form-data"
|
|
572
586
|
|
|
573
587
|
unless key.nil?
|
|
574
|
-
|
|
575
|
-
y << "; name=\"#{name}\""
|
|
588
|
+
y << "; name=\"#{key}\""
|
|
576
589
|
end
|
|
577
590
|
|
|
578
591
|
case val
|
|
579
592
|
in BrandDev::FilePart unless val.filename.nil?
|
|
580
|
-
filename =
|
|
593
|
+
filename = encode_path(val.filename)
|
|
581
594
|
y << "; filename=\"#{filename}\""
|
|
582
595
|
in Pathname | IO
|
|
583
|
-
filename =
|
|
596
|
+
filename = encode_path(::File.basename(val.to_path))
|
|
584
597
|
y << "; filename=\"#{filename}\""
|
|
585
598
|
else
|
|
586
599
|
end
|
|
@@ -21,15 +21,6 @@ module BrandDev
|
|
|
21
21
|
# @return [String, nil]
|
|
22
22
|
optional :domain, String
|
|
23
23
|
|
|
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, BrandDev::Models::BrandStyleguideParams::Prioritize, nil]
|
|
31
|
-
optional :prioritize, enum: -> { BrandDev::BrandStyleguideParams::Prioritize }
|
|
32
|
-
|
|
33
24
|
# @!attribute timeout_ms
|
|
34
25
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
35
26
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
@@ -38,7 +29,7 @@ module BrandDev
|
|
|
38
29
|
# @return [Integer, nil]
|
|
39
30
|
optional :timeout_ms, Integer
|
|
40
31
|
|
|
41
|
-
# @!method initialize(direct_url: nil, domain: nil,
|
|
32
|
+
# @!method initialize(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {})
|
|
42
33
|
# Some parameter documentations has been truncated, see
|
|
43
34
|
# {BrandDev::Models::BrandStyleguideParams} for more details.
|
|
44
35
|
#
|
|
@@ -46,25 +37,9 @@ module BrandDev
|
|
|
46
37
|
#
|
|
47
38
|
# @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
|
48
39
|
#
|
|
49
|
-
# @param prioritize [Symbol, BrandDev::Models::BrandStyleguideParams::Prioritize] Optional parameter to prioritize screenshot capture for styleguide extraction. I
|
|
50
|
-
#
|
|
51
40
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
52
41
|
#
|
|
53
42
|
# @param request_options [BrandDev::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 BrandDev::Internal::Type::Enum
|
|
61
|
-
|
|
62
|
-
SPEED = :speed
|
|
63
|
-
QUALITY = :quality
|
|
64
|
-
|
|
65
|
-
# @!method self.values
|
|
66
|
-
# @return [Array<Symbol>]
|
|
67
|
-
end
|
|
68
43
|
end
|
|
69
44
|
end
|
|
70
45
|
end
|