diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e39abd..7f2d985 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,8 +24,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: |- github.repository == 'stainless-sdks/brand.dev-ruby' && - (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && - (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') + (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 - name: Set up Ruby diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fea3454..2601677 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.0.0" + ".": "1.1.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 9f87d60..2c5f954 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 20 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-fb4ca438793aa469ccc6d74266351ce4ad23b90521c62690755940dc7758225b.yml -openapi_spec_hash: caaf8fcba98e886cef121c2845ecbc57 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-c91b0567307b069c250d073074b7c861b64e632a8380b24925e15d981846bb43.yml +openapi_spec_hash: e479aa097b1283c2acf19d6360787449 config_hash: 91cf2dcefb99c39eb9cd3e98e15d6011 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9532353..22e34bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## 1.1.0 (2026-03-28) + +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) + +### Features + +* **api:** api update ([03558d9](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/03558d9514387f8e11a927a53a78d97bf38d966a)) +* **api:** api update ([f1e52c1](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/f1e52c1ea2bcc9535493849a5ac5243313e1541b)) + + +### Bug Fixes + +* **internal:** correct multipart form field name encoding ([6455f42](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/6455f428805bd7af12d6d18a54ff64c54cabfbb3)) + + +### Chores + +* **ci:** support opting out of skipping builds on metadata-only commits ([efb0a18](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/efb0a181cf5eef3650a352c3c97b32eb888bdc81)) + ## 1.0.0 (2026-03-25) 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) diff --git a/Gemfile.lock b/Gemfile.lock index 43e9e78..dd5c3dd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - brand.dev (1.0.0) + brand.dev (1.1.0) cgi connection_pool diff --git a/README.md b/README.md index 29369d3..1757c66 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "brand.dev", "~> 1.0.0" +gem "brand.dev", "~> 1.1.0" ``` diff --git a/lib/brand_dev/internal/util.rb b/lib/brand_dev/internal/util.rb index 41b2f3a..e86023e 100644 --- a/lib/brand_dev/internal/util.rb +++ b/lib/brand_dev/internal/util.rb @@ -571,8 +571,7 @@ def encode_query_params(query) y << "Content-Disposition: form-data" unless key.nil? - name = ERB::Util.url_encode(key.to_s) - y << "; name=\"#{name}\"" + y << "; name=\"#{key}\"" end case val diff --git a/lib/brand_dev/models/brand_web_scrape_images_response.rb b/lib/brand_dev/models/brand_web_scrape_images_response.rb index 5306b8c..01852b5 100644 --- a/lib/brand_dev/models/brand_web_scrape_images_response.rb +++ b/lib/brand_dev/models/brand_web_scrape_images_response.rb @@ -75,6 +75,10 @@ module Element LINK = :link SOURCE = :source VIDEO = :video + CSS = :css + OBJECT = :object + META = :meta + BACKGROUND = :background # @!method self.values # @return [Array] diff --git a/lib/brand_dev/models/brand_web_scrape_md_params.rb b/lib/brand_dev/models/brand_web_scrape_md_params.rb index edc1437..1159be5 100644 --- a/lib/brand_dev/models/brand_web_scrape_md_params.rb +++ b/lib/brand_dev/models/brand_web_scrape_md_params.rb @@ -32,7 +32,14 @@ class BrandWebScrapeMdParams < BrandDev::Internal::Type::BaseModel # @return [Boolean, nil] optional :shorten_base64_images, BrandDev::Internal::Type::Boolean - # @!method initialize(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, request_options: {}) + # @!attribute use_main_content_only + # Extract only the main content of the page, excluding headers, footers, sidebars, + # and navigation + # + # @return [Boolean, nil] + optional :use_main_content_only, BrandDev::Internal::Type::Boolean + + # @!method initialize(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {}) # Some parameter documentations has been truncated, see # {BrandDev::Models::BrandWebScrapeMdParams} for more details. # @@ -44,6 +51,8 @@ class BrandWebScrapeMdParams < BrandDev::Internal::Type::BaseModel # # @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output # + # @param use_main_content_only [Boolean] Extract only the main content of the page, excluding headers, footers, sidebars, + # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}] end end diff --git a/lib/brand_dev/resources/brand.rb b/lib/brand_dev/resources/brand.rb index 2c31eb9..d6803fe 100644 --- a/lib/brand_dev/resources/brand.rb +++ b/lib/brand_dev/resources/brand.rb @@ -584,7 +584,7 @@ def web_scrape_images(params) # Scrapes the given URL, converts the HTML content to Markdown, and returns the # result. # - # @overload web_scrape_md(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, request_options: {}) + # @overload web_scrape_md(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {}) # # @param url [String] Full URL to scrape and convert to markdown (must include http:// or https:// pro # @@ -594,6 +594,8 @@ def web_scrape_images(params) # # @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output # + # @param use_main_content_only [Boolean] Extract only the main content of the page, excluding headers, footers, sidebars, + # # @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [BrandDev::Models::BrandWebScrapeMdResponse] @@ -608,7 +610,8 @@ def web_scrape_md(params) query: query.transform_keys( include_images: "includeImages", include_links: "includeLinks", - shorten_base64_images: "shortenBase64Images" + shorten_base64_images: "shortenBase64Images", + use_main_content_only: "useMainContentOnly" ), model: BrandDev::Models::BrandWebScrapeMdResponse, options: options diff --git a/lib/brand_dev/version.rb b/lib/brand_dev/version.rb index 4289bd7..558c82f 100644 --- a/lib/brand_dev/version.rb +++ b/lib/brand_dev/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module BrandDev - VERSION = "1.0.0" + VERSION = "1.1.0" end diff --git a/rbi/brand_dev/models/brand_web_scrape_images_response.rbi b/rbi/brand_dev/models/brand_web_scrape_images_response.rbi index fed2ccf..6700b0a 100644 --- a/rbi/brand_dev/models/brand_web_scrape_images_response.rbi +++ b/rbi/brand_dev/models/brand_web_scrape_images_response.rbi @@ -172,6 +172,26 @@ module BrandDev :video, BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol ) + CSS = + T.let( + :css, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol + ) + OBJECT = + T.let( + :object, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol + ) + META = + T.let( + :meta, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol + ) + BACKGROUND = + T.let( + :background, + BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol + ) sig do override.returns( diff --git a/rbi/brand_dev/models/brand_web_scrape_md_params.rbi b/rbi/brand_dev/models/brand_web_scrape_md_params.rbi index 9ef5f49..8f945d2 100644 --- a/rbi/brand_dev/models/brand_web_scrape_md_params.rbi +++ b/rbi/brand_dev/models/brand_web_scrape_md_params.rbi @@ -37,12 +37,21 @@ module BrandDev sig { params(shorten_base64_images: T::Boolean).void } attr_writer :shorten_base64_images + # Extract only the main content of the page, excluding headers, footers, sidebars, + # and navigation + sig { returns(T.nilable(T::Boolean)) } + attr_reader :use_main_content_only + + sig { params(use_main_content_only: T::Boolean).void } + attr_writer :use_main_content_only + sig do params( url: String, include_images: T::Boolean, include_links: T::Boolean, shorten_base64_images: T::Boolean, + use_main_content_only: T::Boolean, request_options: BrandDev::RequestOptions::OrHash ).returns(T.attached_class) end @@ -56,6 +65,9 @@ module BrandDev include_links: nil, # Shorten base64-encoded image data in the Markdown output shorten_base64_images: nil, + # Extract only the main content of the page, excluding headers, footers, sidebars, + # and navigation + use_main_content_only: nil, request_options: {} ) end @@ -67,6 +79,7 @@ module BrandDev include_images: T::Boolean, include_links: T::Boolean, shorten_base64_images: T::Boolean, + use_main_content_only: T::Boolean, request_options: BrandDev::RequestOptions } ) diff --git a/rbi/brand_dev/resources/brand.rbi b/rbi/brand_dev/resources/brand.rbi index d857e6c..7a8cfd3 100644 --- a/rbi/brand_dev/resources/brand.rbi +++ b/rbi/brand_dev/resources/brand.rbi @@ -504,6 +504,7 @@ module BrandDev include_images: T::Boolean, include_links: T::Boolean, shorten_base64_images: T::Boolean, + use_main_content_only: T::Boolean, request_options: BrandDev::RequestOptions::OrHash ).returns(BrandDev::Models::BrandWebScrapeMdResponse) end @@ -517,6 +518,9 @@ module BrandDev include_links: nil, # Shorten base64-encoded image data in the Markdown output shorten_base64_images: nil, + # Extract only the main content of the page, excluding headers, footers, sidebars, + # and navigation + use_main_content_only: nil, request_options: {} ) end diff --git a/sig/brand_dev/models/brand_web_scrape_images_response.rbs b/sig/brand_dev/models/brand_web_scrape_images_response.rbs index 07d4fee..5c4390f 100644 --- a/sig/brand_dev/models/brand_web_scrape_images_response.rbs +++ b/sig/brand_dev/models/brand_web_scrape_images_response.rbs @@ -57,7 +57,16 @@ module BrandDev type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::type_ } - type element = :img | :svg | :link | :source | :video + type element = + :img + | :svg + | :link + | :source + | :video + | :css + | :object + | :meta + | :background module Element extend BrandDev::Internal::Type::Enum @@ -67,6 +76,10 @@ module BrandDev LINK: :link SOURCE: :source VIDEO: :video + CSS: :css + OBJECT: :object + META: :meta + BACKGROUND: :background def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image::element] end diff --git a/sig/brand_dev/models/brand_web_scrape_md_params.rbs b/sig/brand_dev/models/brand_web_scrape_md_params.rbs index ec38e5c..9db0c0c 100644 --- a/sig/brand_dev/models/brand_web_scrape_md_params.rbs +++ b/sig/brand_dev/models/brand_web_scrape_md_params.rbs @@ -5,7 +5,8 @@ module BrandDev url: String, include_images: bool, include_links: bool, - :shorten_base64_images => bool + :shorten_base64_images => bool, + use_main_content_only: bool } & BrandDev::Internal::Type::request_parameters @@ -27,11 +28,16 @@ module BrandDev def shorten_base64_images=: (bool) -> bool + attr_reader use_main_content_only: bool? + + def use_main_content_only=: (bool) -> bool + def initialize: ( url: String, ?include_images: bool, ?include_links: bool, ?shorten_base64_images: bool, + ?use_main_content_only: bool, ?request_options: BrandDev::request_opts ) -> void @@ -40,6 +46,7 @@ module BrandDev include_images: bool, include_links: bool, :shorten_base64_images => bool, + use_main_content_only: bool, request_options: BrandDev::RequestOptions } end diff --git a/sig/brand_dev/resources/brand.rbs b/sig/brand_dev/resources/brand.rbs index f451807..a7ea916 100644 --- a/sig/brand_dev/resources/brand.rbs +++ b/sig/brand_dev/resources/brand.rbs @@ -138,6 +138,7 @@ module BrandDev ?include_images: bool, ?include_links: bool, ?shorten_base64_images: bool, + ?use_main_content_only: bool, ?request_options: BrandDev::request_opts ) -> BrandDev::Models::BrandWebScrapeMdResponse