From 14b02a4f3007334c0cdb7728117529a8ef7f6002 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:38:08 +0000 Subject: [PATCH 1/3] chore: allow fast-format to use bsd sed as well --- Rakefile | 26 ++++++++++++++++++-------- scripts/fast-format | 5 +---- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Rakefile b/Rakefile index 6e42ad6e..9a643524 100644 --- a/Rakefile +++ b/Rakefile @@ -40,6 +40,14 @@ end xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --] ruby_opt = {"RUBYOPT" => [ENV["RUBYOPT"], "--encoding=UTF-8"].compact.join(" ")} +filtered = ->(ext, dirs) do + if ENV.key?(FILES_ENV) + %w[sed -E -n -e] << "/\\.#{ext}$/p" << "--" << ENV.fetch(FILES_ENV) + else + (%w[find] + dirs + %w[-type f -and -name]) << "*.#{ext}" << "-print0" + end +end + desc("Lint `*.rb(i)`") multitask(:"lint:rubocop") do find = %w[find ./lib ./test ./rbi ./examples -type f -and ( -name *.rb -or -name *.rbi ) -print0] @@ -54,24 +62,26 @@ multitask(:"lint:rubocop") do sh("#{find.shelljoin} | #{lint.shelljoin}") end +norm_lines = %w[tr -- \n \0].shelljoin + desc("Format `*.rb`") multitask(:"format:rb") do # while `syntax_tree` is much faster than `rubocop`, `rubocop` is the only formatter with full syntax support - files = ENV.key?(FILES_ENV) ? %w[sed -E -z -n -e /\.rb$/p --] << ENV.fetch(FILES_ENV) : %w[find ./lib ./test ./examples -type f -and -name *.rb -print0] + files = filtered["rb", %w[./lib ./test ./examples]] fmt = xargs + %w[rubocop --fail-level F --autocorrect --format simple --] - sh("#{files.shelljoin} | #{fmt.shelljoin}") + sh("#{files.shelljoin} | #{norm_lines} | #{fmt.shelljoin}") end desc("Format `*.rbi`") multitask(:"format:rbi") do - files = ENV.key?(FILES_ENV) ? %w[sed -E -z -n -e /\.rbi$/p --] << ENV.fetch(FILES_ENV) : %w[find ./rbi -type f -and -name *.rbi -print0] + files = filtered["rbi", %w[./rbi]] fmt = xargs + %w[stree write --] - sh(ruby_opt, "#{files.shelljoin} | #{fmt.shelljoin}") + sh(ruby_opt, "#{files.shelljoin} | #{norm_lines} | #{fmt.shelljoin}") end desc("Format `*.rbs`") multitask(:"format:rbs") do - files = ENV.key?(FILES_ENV) ? %w[sed -E -z -n -e /\.rbs$/p --] << ENV.fetch(FILES_ENV) : %w[find ./sig -type f -name *.rbs -print0] + files = filtered["rbs", %w[./sig]] inplace = /darwin|bsd/ =~ RUBY_PLATFORM ? ["-i", ""] : %w[-i] uuid = SecureRandom.uuid @@ -100,13 +110,13 @@ multitask(:"format:rbs") do success = false # transform class aliases to type aliases, which syntax tree has no trouble with - sh("#{files.shelljoin} | #{pre.shelljoin}") + sh("#{files.shelljoin} | #{norm_lines} | #{pre.shelljoin}") # run syntax tree to format `*.rbs` files - sh(ruby_opt, "#{files.shelljoin} | #{fmt.shelljoin}") do + sh(ruby_opt, "#{files.shelljoin} | #{norm_lines} | #{fmt.shelljoin}") do success = _1 end # transform type aliases back to class aliases - sh("#{files.shelljoin} | #{pst.shelljoin}") + sh("#{files.shelljoin} | #{norm_lines} | #{pst.shelljoin}") # always run post-processing to remove comment marker fail unless success diff --git a/scripts/fast-format b/scripts/fast-format index 8df0aa26..6d5973fb 100755 --- a/scripts/fast-format +++ b/scripts/fast-format @@ -15,7 +15,4 @@ if [ $# -eq 0 ]; then exit 1 fi -FILE="$(mktemp)" -tr -- '\n' '\0' < "$1" > "$FILE" - -exec -- bundle exec rake format FORMAT_FILE="$FILE" +exec -- bundle exec rake format FORMAT_FILE="$1" From a760b8ca14265f2cd6c924f674b39257e79ce065 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:41:25 +0000 Subject: [PATCH 2/3] feat(api): api update --- .stats.yml | 4 ++-- lib/increase/models/physical_card.rb | 8 ++++---- rbi/increase/models/physical_card.rbi | 10 +++++----- sig/increase/models/physical_card.rbs | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.stats.yml b/.stats.yml index d034046d..7badc572 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c51555226fd66ed304eb1e9c759a6485c071eb2cb9ca9ee86f5b5cd88552ee4a.yml -openapi_spec_hash: c5b09ec531c068cb675f8cd3729733c6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-911c3719c8d84e1119e71e0cf93ae1f2c52f42529e56671731f07273feb5ac88.yml +openapi_spec_hash: 462c4c10440c2f87e0624d8c25a89b75 config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/lib/increase/models/physical_card.rb b/lib/increase/models/physical_card.rb index 32d7e761..08d0b4f8 100644 --- a/lib/increase/models/physical_card.rb +++ b/lib/increase/models/physical_card.rb @@ -313,10 +313,10 @@ module Status # @see Increase::Models::PhysicalCard::Shipment#tracking class Tracking < Increase::Internal::Type::BaseModel # @!attribute number - # The tracking number. + # The tracking number. Not available for USPS shipments. # - # @return [String] - required :number, String + # @return [String, nil] + required :number, String, nil?: true # @!attribute return_number # For returned shipments, the tracking number of the return shipment. @@ -351,7 +351,7 @@ class Tracking < Increase::Internal::Type::BaseModel # # Tracking details for the shipment. # - # @param number [String] The tracking number. + # @param number [String, nil] The tracking number. Not available for USPS shipments. # # @param return_number [String, nil] For returned shipments, the tracking number of the return shipment. # diff --git a/rbi/increase/models/physical_card.rbi b/rbi/increase/models/physical_card.rbi index 0235e8b0..65f25d9c 100644 --- a/rbi/increase/models/physical_card.rbi +++ b/rbi/increase/models/physical_card.rbi @@ -502,8 +502,8 @@ module Increase ) end - # The tracking number. - sig { returns(String) } + # The tracking number. Not available for USPS shipments. + sig { returns(T.nilable(String)) } attr_accessor :number # For returned shipments, the tracking number of the return shipment. @@ -531,7 +531,7 @@ module Increase # Tracking details for the shipment. sig do params( - number: String, + number: T.nilable(String), return_number: T.nilable(String), return_reason: T.nilable(String), shipped_at: Time, @@ -542,7 +542,7 @@ module Increase ).returns(T.attached_class) end def self.new( - # The tracking number. + # The tracking number. Not available for USPS shipments. number:, # For returned shipments, the tracking number of the return shipment. return_number:, @@ -560,7 +560,7 @@ module Increase sig do override.returns( { - number: String, + number: T.nilable(String), return_number: T.nilable(String), return_reason: T.nilable(String), shipped_at: Time, diff --git a/sig/increase/models/physical_card.rbs b/sig/increase/models/physical_card.rbs index 4695271f..f6733140 100644 --- a/sig/increase/models/physical_card.rbs +++ b/sig/increase/models/physical_card.rbs @@ -236,7 +236,7 @@ module Increase type tracking = { - number: String, + number: String?, return_number: String?, return_reason: String?, shipped_at: Time, @@ -244,7 +244,7 @@ module Increase } class Tracking < Increase::Internal::Type::BaseModel - attr_accessor number: String + attr_accessor number: String? attr_accessor return_number: String? @@ -255,7 +255,7 @@ module Increase attr_accessor updates: ::Array[Increase::PhysicalCard::Shipment::Tracking::Update] def initialize: ( - number: String, + number: String?, return_number: String?, return_reason: String?, shipped_at: Time, @@ -263,7 +263,7 @@ module Increase ) -> void def to_hash: -> { - number: String, + number: String?, return_number: String?, return_reason: String?, shipped_at: Time, From 80fb94e2765851520f0bde801abcaf5a1c6c294f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:41:47 +0000 Subject: [PATCH 3/3] release: 1.93.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/increase/version.rb | 2 +- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2a2ee2b8..3ceb8e2f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.92.0" + ".": "1.93.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 06fcbfc1..2ff7bbc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 1.93.0 (2025-09-26) + +Full Changelog: [v1.92.0...v1.93.0](https://github.com/Increase/increase-ruby/compare/v1.92.0...v1.93.0) + +### Features + +* **api:** api update ([a760b8c](https://github.com/Increase/increase-ruby/commit/a760b8ca14265f2cd6c924f674b39257e79ce065)) + + +### Chores + +* allow fast-format to use bsd sed as well ([14b02a4](https://github.com/Increase/increase-ruby/commit/14b02a4f3007334c0cdb7728117529a8ef7f6002)) + ## 1.92.0 (2025-09-26) Full Changelog: [v1.91.1...v1.92.0](https://github.com/Increase/increase-ruby/compare/v1.91.1...v1.92.0) diff --git a/Gemfile.lock b/Gemfile.lock index a5bf7c4b..7fd27ec3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - increase (1.92.0) + increase (1.93.0) connection_pool GEM diff --git a/README.md b/README.md index 12eb5b82..412a1735 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "increase", "~> 1.92.0" +gem "increase", "~> 1.93.0" ``` diff --git a/lib/increase/version.rb b/lib/increase/version.rb index 7b666056..6976f93a 100644 --- a/lib/increase/version.rb +++ b/lib/increase/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Increase - VERSION = "1.92.0" + VERSION = "1.93.0" end