From e585277333df4bb178ea53c1f1bd2ffb834efd4a Mon Sep 17 00:00:00 2001 From: Aaron de Mello Date: Mon, 26 Oct 2026 09:53:37 -0400 Subject: [PATCH 1/2] chore(release): prepare Ruby SDK v6.9.0 --- .github/workflows/rspec.yml | 3 +++ .github/workflows/sdk-reference.yaml | 4 +++- CHANGELOG.md | 6 +++++- Contributing.md | 4 ++-- bin/test | 15 ++------------- gem_config.rb | 8 +++++--- lib/nylas/resources/auth.rb | 2 +- lib/nylas/resources/drafts.rb | 4 ++-- lib/nylas/resources/messages.rb | 2 +- lib/nylas/version.rb | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index 6a08e913..a5b69d29 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -46,6 +46,9 @@ jobs: - name: Run tests run: bundle exec rspec spec + - name: Build gem + run: gem build nylas.gemspec + - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: diff --git a/.github/workflows/sdk-reference.yaml b/.github/workflows/sdk-reference.yaml index 97dd8a35..da83f44c 100644 --- a/.github/workflows/sdk-reference.yaml +++ b/.github/workflows/sdk-reference.yaml @@ -27,7 +27,9 @@ jobs: ruby-version: '3.0' bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Generate documentation - run: bundle exec yard + run: | + bundle exec yard + test -s doc/index.html - name: Set env BRANCH run: echo "BRANCH=$(echo $GITHUB_REF | cut -d'/' -f 3)" >> $GITHUB_ENV - name: Set env CLOUDFLARE_BRANCH diff --git a/CHANGELOG.md b/CHANGELOG.md index 8910c0c9..bcdbe5ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,13 @@ # Changelog -### Unreleased +### [6.9.0] / 2026-10-26 * Treat 207 Multi-Status responses as successful, so a response that carries partial results is returned instead of raising an error * Documented `tracking_options.domain_name` hash support for custom link and open tracking hostnames. See the [message tracking documentation](https://developer.nylas.com/docs/v3/email/message-tracking/) * Documented Contact `metadata` and `metadata_pair` hashes, and added `contact.updated` and `contact.deleted` webhook trigger constants +* Updated CI runner images and SDK reference documentation deployment, and added gem builds to the Ruby test matrix +* Corrected gem metadata and SDK reference links, and included the changelog, README, and license in the gem package +* Updated the local test command to match the supported Ruby 3.0+ test suite +* Declared the RDoc development dependency so SDK reference documentation also builds on Ruby 4.0, and verified documentation output in CI ### [6.8.1] * Documented `tentative_as_busy` support in the `Calendars#get_free_busy` request body, consistent with other Nylas SDKs diff --git a/Contributing.md b/Contributing.md index 019c09c3..be91bf2e 100644 --- a/Contributing.md +++ b/Contributing.md @@ -19,11 +19,11 @@ Pull requests are welcome for bug fixes. If you want to implement something new, While writing your code contribution, make sure you follow the testing conventions found in the [spec](https://github.com/nylas/nylas-ruby/tree/master/spec/nylas) [directory](https://github.com/nylas/nylas-ruby/tree/master/spec/nylas) for any components that you add. - Pull requests may be submitted before they are feature complete to get feedback and thoughts from the core team. - - Pull requests should pass tests across the supported versions of Ruby, as defined in .travis.yml. To do so, run bin/test. + - Pull requests should pass tests across the supported versions of Ruby, as defined in `.github/workflows/rspec.yml`. Run `bin/test` to test your current Ruby version; GitHub Actions runs the full version matrix. - Pull requests should add new tests to cover the functionality that is added or a bug that is fixed. ## Creating a Pull Request Before you submit any code, we need you to sign our [Contributor License Agreement](https://docs.google.com/forms/d/e/1FAIpQLSdCnXWsaTkw5jhJ8DMtMu5TUI9Q-El_rCuGzkdBvnNJr8oDWQ/viewform); this ensures we can continue to protect your contributions under an open source license well into the future. -Please follow [best practices](https://github.com/trein/dev-best-practices/wiki/Git-Commit-Best-Practices) for creating git commits. When your code is ready to be submitted, you can [submit a pull request](https://help.github.com/articles/creating-a-pull-request/) to begin the code review process. \ No newline at end of file +Please follow [best practices](https://github.com/trein/dev-best-practices/wiki/Git-Commit-Best-Practices) for creating git commits. When your code is ready to be submitted, you can [submit a pull request](https://help.github.com/articles/creating-a-pull-request/) to begin the code review process. diff --git a/bin/test b/bin/test index 9189e383..17470415 100755 --- a/bin/test +++ b/bin/test @@ -1,16 +1,5 @@ -#!/usr/bin/env bash +#!/bin/sh set -e -supported_versions=(2.3.5 2.4.5 2.5.4 2.6.2) -for version in "${supported_versions[@]}" ; do - RBENV_VERSION=$version ruby --version - for gemfile in $(ls gemfiles/Gemfile.rails* | grep -v lock); do - echo $version $gemfile - BUNDLE_GEMFILE=$gemfile RBENV_VERSION=$version bundle exec rspec spec - done - for gemfile in $(ls gemfiles/Gemfile.rest-client* | grep -v lock); do - echo $version $gemfile - BUNDLE_GEMFILE=$gemfile RBENV_VERSION=$version bundle exec rspec spec - done -done +bundle exec rspec spec diff --git a/gem_config.rb b/gem_config.rb index 4e34cbd6..5c6f6c98 100644 --- a/gem_config.rb +++ b/gem_config.rb @@ -6,8 +6,9 @@ module GemConfig def self.apply(gem) gem.description = %(Gem for interacting with the Nylas API.) - gem.files = Dir.glob("lib/{nylas.rb,nylas/**/*.rb}") + gem.files = Dir.glob("lib/{nylas.rb,nylas/**/*.rb}") + %w[CHANGELOG.md LICENSE.txt README.md] gem.license = "MIT" + gem.homepage = "https://www.nylas.com" gem.version = Nylas::VERSION gem.platform = "ruby" gem.required_ruby_version = ">= 3.0" @@ -26,8 +27,8 @@ def self.add_author_info(gem) def self.metadata { "bug_tracker_uri" => "https://github.com/nylas/nylas-ruby/issues", - "changelog_uri" => "https://github.com/nylas/nylas-ruby/blob/master/CHANGELOG.md", - "documentation_uri" => "https://developer.nylas.com/docs/sdks/ruby/", + "changelog_uri" => "https://github.com/nylas/nylas-ruby/blob/main/CHANGELOG.md", + "documentation_uri" => "https://developer.nylas.com/docs/v3/sdks/ruby/", "homepage_uri" => "https://www.nylas.com", "source_code_uri" => "https://github.com/nylas/nylas-ruby", "github_repo" => "https://github.com/nylas/nylas-ruby" @@ -36,6 +37,7 @@ def self.metadata def self.dev_dependencies [["bundler", ">= 1.3.0"], + ["rdoc", ">= 6.3", "< 8.0"], ["yard", "~> 0.9.34"], ["rubocop", "~> 1.51"], ["rubocop-rspec", "~> 3.5"], diff --git a/lib/nylas/resources/auth.rb b/lib/nylas/resources/auth.rb index 3dea5f26..0881537c 100644 --- a/lib/nylas/resources/auth.rb +++ b/lib/nylas/resources/auth.rb @@ -19,7 +19,7 @@ class Auth < Resource # Get info about a specific token based on the identifier you include. # Use either the ID Token or Access Token. # - # @param ID of the request. + # @param query_params [Hash, nil] Query parameters containing the token to inspect. # @return [Hash] Token Info. def access_token_info(query_params: nil) get( diff --git a/lib/nylas/resources/drafts.rb b/lib/nylas/resources/drafts.rb index df555d2b..288b7cba 100644 --- a/lib/nylas/resources/drafts.rb +++ b/lib/nylas/resources/drafts.rb @@ -44,7 +44,7 @@ def find(identifier:, draft_id:) # by your organization. # If you're attaching files, you must pass an array of [File] objects, or # you can pass in base64 encoded strings if the total attachment size is less than 3mb. - # You can also use {FileUtils::attach_file_request_builder} to build each object attach. + # You can also use {Nylas::FileUtils.attach_file_request_builder} to build each attachment. # @return [Array(Hash, String)] The created draft and API Request ID. def create(identifier:, request_body:) payload, opened_files = FileUtils.handle_message_payload(request_body) @@ -69,7 +69,7 @@ def create(identifier:, request_body:) # existing tracking settings. # If you're attaching files, you must pass an array of [File] objects, or # you can pass in base64 encoded strings if the total attachment size is less than 3mb. - # You can also use {FileUtils::attach_file_request_builder} to build each object attach. + # You can also use {Nylas::FileUtils.attach_file_request_builder} to build each attachment. # @return [Array(Hash, String)] The updated draft and API Request ID. def update(identifier:, draft_id:, request_body:) payload, opened_files = FileUtils.handle_message_payload(request_body) diff --git a/lib/nylas/resources/messages.rb b/lib/nylas/resources/messages.rb index b6f63842..74037d9c 100644 --- a/lib/nylas/resources/messages.rb +++ b/lib/nylas/resources/messages.rb @@ -121,7 +121,7 @@ def clean_messages(identifier:, request_body:) # validated when the send is scheduled and revalidated before delivery. # If you're attaching files, you must pass an array of [File] objects, or # you can pass in base64 encoded strings if the total attachment size is less than 3mb. - # You can also use {FileUtils::attach_file_request_builder} to build each object attach. + # You can also use {Nylas::FileUtils.attach_file_request_builder} to build each attachment. # @return [Array(Hash, String)] The sent message and the API Request ID. def send(identifier:, request_body:) payload, opened_files = FileUtils.handle_message_payload(request_body) diff --git a/lib/nylas/version.rb b/lib/nylas/version.rb index 6b6bc1de..fd7679cf 100644 --- a/lib/nylas/version.rb +++ b/lib/nylas/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Nylas - VERSION = "6.8.1" + VERSION = "6.9.0" end From 323203726081713282ad854bd6fb8ea2f31a6f35 Mon Sep 17 00:00:00 2001 From: Aaron de Mello Date: Mon, 26 Oct 2026 09:59:41 -0400 Subject: [PATCH 2/2] fix(release): require patched dependencies and validate Ruby matrix --- .github/workflows/rspec.yml | 14 +++++++++----- CHANGELOG.md | 5 ++++- gem_config.rb | 4 ++-- nylas.gemspec | 2 +- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index a5b69d29..69c8c855 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -24,11 +24,15 @@ jobs: fail-fast: false matrix: include: - - ruby: 3.0 - - ruby: 3.1 - - ruby: 3.2 - - name: Ruby ${{ matrix.ruby }} + # Keep the existing required check names while passing explicit Ruby versions. + - ruby: '3.0' + check_name: Ruby 3 + - ruby: '3.1' + check_name: Ruby 3.1 + - ruby: '3.2' + check_name: Ruby 3.2 + + name: ${{ matrix.check_name }} steps: - uses: actions/checkout@v2 diff --git a/CHANGELOG.md b/CHANGELOG.md index bcdbe5ca..86571aa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,16 @@ # Changelog ### [6.9.0] / 2026-10-26 +* Required HTTParty 0.24.0 or later to exclude versions affected by CVE-2025-68696 (potential SSRF and API key leakage) * Treat 207 Multi-Status responses as successful, so a response that carries partial results is returned instead of raising an error * Documented `tracking_options.domain_name` hash support for custom link and open tracking hostnames. See the [message tracking documentation](https://developer.nylas.com/docs/v3/email/message-tracking/) * Documented Contact `metadata` and `metadata_pair` hashes, and added `contact.updated` and `contact.deleted` webhook trigger constants -* Updated CI runner images and SDK reference documentation deployment, and added gem builds to the Ruby test matrix +* Updated CI runner images and SDK reference documentation deployment, made Ruby 3.0/3.1/3.2 versions explicit, and added gem builds to the Ruby test matrix * Corrected gem metadata and SDK reference links, and included the changelog, README, and license in the gem package * Updated the local test command to match the supported Ruby 3.0+ test suite * Declared the RDoc development dependency so SDK reference documentation also builds on Ruby 4.0, and verified documentation output in CI +* Required YARD 0.9.44 or later for development to exclude known documentation server path traversal vulnerabilities +* Updated the coverage formatter for compatibility with current REXML releases ### [6.8.1] * Documented `tentative_as_busy` support in the `Calendars#get_free_busy` request body, consistent with other Nylas SDKs diff --git a/gem_config.rb b/gem_config.rb index 5c6f6c98..c098e344 100644 --- a/gem_config.rb +++ b/gem_config.rb @@ -38,7 +38,7 @@ def self.metadata def self.dev_dependencies [["bundler", ">= 1.3.0"], ["rdoc", ">= 6.3", "< 8.0"], - ["yard", "~> 0.9.34"], + ["yard", "~> 0.9.44"], ["rubocop", "~> 1.51"], ["rubocop-rspec", "~> 3.5"], ["rubocop-capybara", "~> 2.20"]] + testing_and_debugging_dependencies @@ -49,7 +49,7 @@ def self.testing_and_debugging_dependencies ["rspec-json_matcher", "~> 0.2.0"], ["webmock", "~> 3.18", ">= 3.18.1"], ["simplecov", "~> 0.22.0"], - ["simplecov-cobertura", "~> 2.1.0"], + ["simplecov-cobertura", "~> 3.2"], ["webrick", "~> 1.8", ">= 1.8.1"]] end end diff --git a/nylas.gemspec b/nylas.gemspec index 6ad5a984..0017fa41 100644 --- a/nylas.gemspec +++ b/nylas.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |gem| # Runtime dependencies gem.add_runtime_dependency "base64" - gem.add_runtime_dependency "httparty", "~> 0.21" + gem.add_runtime_dependency "httparty", "~> 0.24" gem.add_runtime_dependency "mime-types", "~> 3.5", ">= 3.5.1" gem.add_runtime_dependency "multipart-post", "~> 2.0" gem.add_runtime_dependency "ostruct", "~> 0.6"