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
17 changes: 12 additions & 5 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -46,6 +50,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:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/sdk-reference.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Changelog

### Unreleased
### [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, 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
Expand Down
4 changes: 2 additions & 2 deletions Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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.
15 changes: 2 additions & 13 deletions bin/test
Original file line number Diff line number Diff line change
@@ -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
12 changes: 7 additions & 5 deletions gem_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -36,7 +37,8 @@ def self.metadata

def self.dev_dependencies
[["bundler", ">= 1.3.0"],
["yard", "~> 0.9.34"],
["rdoc", ">= 6.3", "< 8.0"],
["yard", "~> 0.9.44"],
["rubocop", "~> 1.51"],
["rubocop-rspec", "~> 3.5"],
["rubocop-capybara", "~> 2.20"]] + testing_and_debugging_dependencies
Expand All @@ -47,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
2 changes: 1 addition & 1 deletion lib/nylas/resources/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions lib/nylas/resources/drafts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/nylas/resources/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/nylas/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Nylas
VERSION = "6.8.1"
VERSION = "6.9.0"
end
2 changes: 1 addition & 1 deletion nylas.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading