Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'brand-dot-dev/ruby-sdk' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Check release environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.20.0"
".": "0.21.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 15
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-863ddc13e032497459a639cf02a16349831dda7e39557cbd5ce33da34d086b02.yml
openapi_spec_hash: f972aac9618fe8df340d96344b3d0578
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-737dbedd830e2c989387e90a9bb5baa3915306ecfef2e46b09d02cb1879f043c.yml
openapi_spec_hash: 7bc21f4c6d5fd39c1a3b22626846ca87
config_hash: 6f10592c7d0c3bafefc1271472283217
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 0.21.0 (2026-02-02)

Full Changelog: [v0.20.0...v0.21.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.20.0...v0.21.0)

### Features

* **api:** api update ([a423b3c](https://github.com/brand-dot-dev/ruby-sdk/commit/a423b3c7bb3672541395e056cc611df45597d188))


### Bug Fixes

* **docs:** fix mcp installation instructions for remote servers ([a6ec5ef](https://github.com/brand-dot-dev/ruby-sdk/commit/a6ec5efbad9664835ade1580fe9433adda3b495b))


### Chores

* **internal:** update `actions/checkout` version ([06ba397](https://github.com/brand-dot-dev/ruby-sdk/commit/06ba3972227f9850264787f04bb0d49cf786ee74))
* move `cgi` into dependencies for ruby 4 ([0e2e7df](https://github.com/brand-dot-dev/ruby-sdk/commit/0e2e7df7deebaa4950ff7813f52ad00fc033b74a))


### Documentation

* prominently feature MCP server setup in root SDK readmes ([328c136](https://github.com/brand-dot-dev/ruby-sdk/commit/328c136767a0b5ae60cc7cdfd23681e50f2569b5))

## 0.20.0 (2026-01-05)

Full Changelog: [v0.19.0...v0.20.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.19.0...v0.20.0)
Expand Down
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ GIT
PATH
remote: .
specs:
brand.dev (0.20.0)
brand.dev (0.21.0)
cgi
connection_pool

GEM
Expand Down Expand Up @@ -42,6 +43,7 @@ GEM
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (3.3.1)
cgi (0.5.1)
concurrent-ruby (1.3.5)
connection_pool (2.5.4)
console (1.34.2)
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ The Brand Dev Ruby library provides convenient access to the Brand Dev REST API

It is generated with [Stainless](https://www.stainless.com/).

## MCP Server

Use the Brand Dev MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=brand.dev-mcp&config=eyJuYW1lIjoiYnJhbmQuZGV2LW1jcCIsInRyYW5zcG9ydCI6Imh0dHAiLCJ1cmwiOiJodHRwczovL2JyYW5kLWRldi5zdGxtY3AuY29tIiwiaGVhZGVycyI6eyJ4LWJyYW5kLWRldi1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)
[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22brand.dev-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fbrand-dev.stlmcp.com%22%2C%22headers%22%3A%7B%22x-brand-dev-api-key%22%3A%22My%20API%20Key%22%7D%7D)

> Note: You may need to set environment variables in your MCP client.

## Documentation

Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/brand.dev).
Expand All @@ -17,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "brand.dev", "~> 0.20.0"
gem "brand.dev", "~> 0.21.0"
```

<!-- x-release-please-end -->
Expand Down
1 change: 1 addition & 0 deletions brand_dev.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ Gem::Specification.new do |s|
".ignore"
]
s.extra_rdoc_files = ["README.md"]
s.add_dependency "cgi"
s.add_dependency "connection_pool"
end
6 changes: 3 additions & 3 deletions lib/brand_dev/models/brand_retrieve_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class BrandRetrieveParams < BrandDev::Internal::Type::BaseModel
# Domain name to retrieve brand data for (e.g., 'example.com', 'google.com').
# Cannot be used with name or ticker parameters.
#
# @return [String, nil]
optional :domain, String
# @return [String]
required :domain, String

# @!attribute force_language
# Optional parameter to force the language of the retrieved brand data. Works with
Expand All @@ -37,7 +37,7 @@ class BrandRetrieveParams < BrandDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :timeout_ms, Integer

# @!method initialize(domain: nil, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
# @!method initialize(domain:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {BrandDev::Models::BrandRetrieveParams} for more details.
#
Expand Down
4 changes: 2 additions & 2 deletions lib/brand_dev/resources/brand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Brand
# Retrieve logos, backdrops, colors, industry, description, and more from any
# domain
#
# @overload retrieve(domain: nil, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
# @overload retrieve(domain:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
#
# @param domain [String] Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). Cann
#
Expand All @@ -24,7 +24,7 @@ class Brand
# @return [BrandDev::Models::BrandRetrieveResponse]
#
# @see BrandDev::Models::BrandRetrieveParams
def retrieve(params = {})
def retrieve(params)
parsed, options = BrandDev::BrandRetrieveParams.dump_request(params)
@client.request(
method: :get,
Expand Down
2 changes: 1 addition & 1 deletion lib/brand_dev/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module BrandDev
VERSION = "0.20.0"
VERSION = "0.21.0"
end
9 changes: 3 additions & 6 deletions rbi/brand_dev/models/brand_retrieve_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ module BrandDev

# Domain name to retrieve brand data for (e.g., 'example.com', 'google.com').
# Cannot be used with name or ticker parameters.
sig { returns(T.nilable(String)) }
attr_reader :domain

sig { params(domain: String).void }
attr_writer :domain
sig { returns(String) }
attr_accessor :domain

# Optional parameter to force the language of the retrieved brand data. Works with
# all three lookup methods.
Expand Down Expand Up @@ -66,7 +63,7 @@ module BrandDev
def self.new(
# Domain name to retrieve brand data for (e.g., 'example.com', 'google.com').
# Cannot be used with name or ticker parameters.
domain: nil,
domain:,
# Optional parameter to force the language of the retrieved brand data. Works with
# all three lookup methods.
force_language: nil,
Expand Down
2 changes: 1 addition & 1 deletion rbi/brand_dev/resources/brand.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module BrandDev
def retrieve(
# Domain name to retrieve brand data for (e.g., 'example.com', 'google.com').
# Cannot be used with name or ticker parameters.
domain: nil,
domain:,
# Optional parameter to force the language of the retrieved brand data. Works with
# all three lookup methods.
force_language: nil,
Expand Down
6 changes: 2 additions & 4 deletions sig/brand_dev/models/brand_retrieve_params.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ module BrandDev
extend BrandDev::Internal::Type::RequestParameters::Converter
include BrandDev::Internal::Type::RequestParameters

attr_reader domain: String?

def domain=: (String) -> String
attr_accessor domain: String

attr_reader force_language: BrandDev::Models::BrandRetrieveParams::force_language?

Expand All @@ -32,7 +30,7 @@ module BrandDev
def timeout_ms=: (Integer) -> Integer

def initialize: (
?domain: String,
domain: String,
?force_language: BrandDev::Models::BrandRetrieveParams::force_language,
?max_speed: bool,
?timeout_ms: Integer,
Expand Down
2 changes: 1 addition & 1 deletion sig/brand_dev/resources/brand.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module BrandDev
module Resources
class Brand
def retrieve: (
?domain: String,
domain: String,
?force_language: BrandDev::Models::BrandRetrieveParams::force_language,
?max_speed: bool,
?timeout_ms: Integer,
Expand Down
42 changes: 27 additions & 15 deletions test/brand_dev/client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_client_default_request_default_retry_attempts
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key")

assert_raises(BrandDev::Errors::InternalServerError) do
brand_dev.brand.retrieve
brand_dev.brand.retrieve(domain: "domain")
end

assert_requested(:any, /./, times: 3)
Expand All @@ -52,7 +52,7 @@ def test_client_given_request_default_retry_attempts
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key", max_retries: 3)

assert_raises(BrandDev::Errors::InternalServerError) do
brand_dev.brand.retrieve
brand_dev.brand.retrieve(domain: "domain")
end

assert_requested(:any, /./, times: 4)
Expand All @@ -64,7 +64,7 @@ def test_client_default_request_given_retry_attempts
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key")

assert_raises(BrandDev::Errors::InternalServerError) do
brand_dev.brand.retrieve(request_options: {max_retries: 3})
brand_dev.brand.retrieve(domain: "domain", request_options: {max_retries: 3})
end

assert_requested(:any, /./, times: 4)
Expand All @@ -76,7 +76,7 @@ def test_client_given_request_given_retry_attempts
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key", max_retries: 3)

assert_raises(BrandDev::Errors::InternalServerError) do
brand_dev.brand.retrieve(request_options: {max_retries: 4})
brand_dev.brand.retrieve(domain: "domain", request_options: {max_retries: 4})
end

assert_requested(:any, /./, times: 5)
Expand All @@ -92,7 +92,7 @@ def test_client_retry_after_seconds
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key", max_retries: 1)

assert_raises(BrandDev::Errors::InternalServerError) do
brand_dev.brand.retrieve
brand_dev.brand.retrieve(domain: "domain")
end

assert_requested(:any, /./, times: 2)
Expand All @@ -110,7 +110,7 @@ def test_client_retry_after_date

assert_raises(BrandDev::Errors::InternalServerError) do
Thread.current.thread_variable_set(:time_now, Time.now)
brand_dev.brand.retrieve
brand_dev.brand.retrieve(domain: "domain")
Thread.current.thread_variable_set(:time_now, nil)
end

Expand All @@ -128,7 +128,7 @@ def test_client_retry_after_ms
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key", max_retries: 1)

assert_raises(BrandDev::Errors::InternalServerError) do
brand_dev.brand.retrieve
brand_dev.brand.retrieve(domain: "domain")
end

assert_requested(:any, /./, times: 2)
Expand All @@ -141,7 +141,7 @@ def test_retry_count_header
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key")

assert_raises(BrandDev::Errors::InternalServerError) do
brand_dev.brand.retrieve
brand_dev.brand.retrieve(domain: "domain")
end

3.times do
Expand All @@ -155,7 +155,10 @@ def test_omit_retry_count_header
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key")

assert_raises(BrandDev::Errors::InternalServerError) do
brand_dev.brand.retrieve(request_options: {extra_headers: {"x-stainless-retry-count" => nil}})
brand_dev.brand.retrieve(
domain: "domain",
request_options: {extra_headers: {"x-stainless-retry-count" => nil}}
)
end

assert_requested(:any, /./, times: 3) do
Expand All @@ -169,7 +172,10 @@ def test_overwrite_retry_count_header
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key")

assert_raises(BrandDev::Errors::InternalServerError) do
brand_dev.brand.retrieve(request_options: {extra_headers: {"x-stainless-retry-count" => "42"}})
brand_dev.brand.retrieve(
domain: "domain",
request_options: {extra_headers: {"x-stainless-retry-count" => "42"}}
)
end

assert_requested(:any, /./, headers: {"x-stainless-retry-count" => "42"}, times: 3)
Expand All @@ -189,7 +195,7 @@ def test_client_redirect_307
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key")

assert_raises(BrandDev::Errors::APIConnectionError) do
brand_dev.brand.retrieve(request_options: {extra_headers: {}})
brand_dev.brand.retrieve(domain: "domain", request_options: {extra_headers: {}})
end

recorded, = WebMock::RequestRegistry.instance.requested_signatures.hash.first
Expand Down Expand Up @@ -218,7 +224,7 @@ def test_client_redirect_303
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key")

assert_raises(BrandDev::Errors::APIConnectionError) do
brand_dev.brand.retrieve(request_options: {extra_headers: {}})
brand_dev.brand.retrieve(domain: "domain", request_options: {extra_headers: {}})
end

assert_requested(:get, "http://localhost/redirected", times: BrandDev::Client::MAX_REDIRECTS) do
Expand All @@ -242,7 +248,10 @@ def test_client_redirect_auth_keep_same_origin
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key")

assert_raises(BrandDev::Errors::APIConnectionError) do
brand_dev.brand.retrieve(request_options: {extra_headers: {"authorization" => "Bearer xyz"}})
brand_dev.brand.retrieve(
domain: "domain",
request_options: {extra_headers: {"authorization" => "Bearer xyz"}}
)
end

recorded, = WebMock::RequestRegistry.instance.requested_signatures.hash.first
Expand All @@ -269,7 +278,10 @@ def test_client_redirect_auth_strip_cross_origin
brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key")

assert_raises(BrandDev::Errors::APIConnectionError) do
brand_dev.brand.retrieve(request_options: {extra_headers: {"authorization" => "Bearer xyz"}})
brand_dev.brand.retrieve(
domain: "domain",
request_options: {extra_headers: {"authorization" => "Bearer xyz"}}
)
end

assert_requested(:any, "https://example.com/redirected", times: BrandDev::Client::MAX_REDIRECTS) do
Expand All @@ -283,7 +295,7 @@ def test_default_headers

brand_dev = BrandDev::Client.new(base_url: "http://localhost", api_key: "My API Key")

brand_dev.brand.retrieve
brand_dev.brand.retrieve(domain: "domain")

assert_requested(:any, /./) do |req|
headers = req.headers.transform_keys(&:downcase).fetch_values("accept", "content-type")
Expand Down
4 changes: 2 additions & 2 deletions test/brand_dev/resources/brand_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
require_relative "../test_helper"

class BrandDev::Test::Resources::BrandTest < BrandDev::Test::ResourceTest
def test_retrieve
def test_retrieve_required_params
skip("Prism tests are disabled")

response = @brand_dev.brand.retrieve
response = @brand_dev.brand.retrieve(domain: "domain")

assert_pattern do
response => BrandDev::Models::BrandRetrieveResponse
Expand Down
Loading