diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa5d164b..26e6e002 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,48 +15,10 @@ on: - 'stl-preview-base/**' jobs: - build: - timeout-minutes: 10 - name: build - permissions: - contents: read - id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/imagekit-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: |- - github.repository == 'stainless-sdks/imagekit-ruby' && - (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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Set up Ruby - uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 - with: - bundler-cache: false - - run: |- - bundle install - - - name: Get GitHub OIDC Token - if: |- - github.repository == 'stainless-sdks/imagekit-ruby' && - !startsWith(github.ref, 'refs/heads/stl/') - id: github-oidc - uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 - with: - script: core.setOutput('github_token', await core.getIDToken()); - - - name: Build and upload gem artifacts - if: |- - github.repository == 'stainless-sdks/imagekit-ruby' && - !startsWith(github.ref, 'refs/heads/stl/') - env: - URL: https://pkg.stainless.com/s - AUTH: ${{ steps.github-oidc.outputs.github_token }} - SHA: ${{ github.sha }} - PACKAGE_NAME: imagekitio - run: ./scripts/utils/upload-artifact.sh lint: timeout-minutes: 10 name: lint - runs-on: ${{ github.repository == 'stainless-sdks/imagekit-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ubuntu-latest if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: @@ -70,19 +32,3 @@ jobs: - name: Run lints run: ./scripts/lint - test: - timeout-minutes: 10 - name: test - runs-on: ${{ github.repository == 'stainless-sdks/imagekit-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Set up Ruby - uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0 - with: - bundler-cache: false - - run: |- - bundle install - - - name: Run tests - run: ./scripts/test diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index bd2fe0ef..4cbe3745 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -18,5 +18,6 @@ jobs: run: | bash ./bin/check-release-environment env: + RELEASE_PLEASE_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }} RUBYGEMS_HOST: ${{ secrets.IMAGE_KIT_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }} GEM_HOST_API_KEY: ${{ secrets.IMAGE_KIT_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }} diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 00000000..e16260f9 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,20 @@ +name: Release Please +on: + push: + branches: + - master + +permissions: + contents: write + pull-requests: write + +jobs: + release-please: + if: github.repository == 'imagekit-developer/imagekit-ruby' + runs-on: ubuntu-latest + + steps: + - uses: googleapis/release-please-action@5c625bfb5d1ff62eadeeb3772007f7f66fdcf071 # v4.4.1 + id: release + with: + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} diff --git a/.github/workflows/stlc-promote.yml b/.github/workflows/stlc-promote.yml new file mode 100644 index 00000000..3ff16d5b --- /dev/null +++ b/.github/workflows/stlc-promote.yml @@ -0,0 +1,65 @@ +name: Promote SDKs + +on: + push: + branches: [main] + +permissions: + contents: read + +jobs: + promote: + runs-on: ubuntu-latest + env: + PRODUCTION_REPO: imagekit-developer/imagekit-ruby + PRODUCTION_BRANCH: master + GH_TOKEN: ${{ secrets.SDK_WRITE_TOKEN }} + steps: + - name: Check out staging + uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - name: Fetch production main + run: | + git remote add production \ + "https://x-access-token:${GH_TOKEN}@github.com/${PRODUCTION_REPO}.git" + git fetch production "${PRODUCTION_BRANCH}" + + - name: Check if production is already in sync + id: diff + run: | + STAGING_SHA=$(git rev-parse origin/main) + PRODUCTION_SHA=$(git rev-parse production/${PRODUCTION_BRANCH}) + if [ "$STAGING_SHA" = "$PRODUCTION_SHA" ]; then + echo "Production is already at $STAGING_SHA. Nothing to release." + echo "synced=true" >> "$GITHUB_OUTPUT" + else + echo "synced=false" >> "$GITHUB_OUTPUT" + fi + + - name: Push staging main to the release branch on production + if: steps.diff.outputs.synced == 'false' + run: | + git push production origin/main:refs/heads/stainless/release --force + + - name: Open or update the release PR on production + if: steps.diff.outputs.synced == 'false' + run: | + EXISTING_PR=$(gh pr list \ + --repo "${PRODUCTION_REPO}" \ + --head stainless/release \ + --state open \ + --json number \ + --jq '.[0].number') + if [ -z "${EXISTING_PR}" ]; then + gh pr create \ + --repo "${PRODUCTION_REPO}" \ + --base "${PRODUCTION_BRANCH}" \ + --head stainless/release \ + --title "Release SDK updates" \ + --body "$(git log --oneline production/${PRODUCTION_BRANCH}..origin/main)" + else + echo "Release PR #${EXISTING_PR} already exists. Force-push has updated it." + fi diff --git a/.github/workflows/sync-release-as.yml b/.github/workflows/sync-release-as.yml new file mode 100644 index 00000000..99150044 --- /dev/null +++ b/.github/workflows/sync-release-as.yml @@ -0,0 +1,63 @@ +name: Sync Release-As from release PR title + +on: + pull_request: + types: [edited] + +permissions: + contents: write + +jobs: + sync: + if: >- + github.event.pull_request.base.ref == 'master' && + startsWith(github.event.pull_request.head.ref, 'release-please--') && + github.event.changes.title != null + runs-on: ubuntu-latest + steps: + - name: Extract versions from old and new title + id: parse + env: + NEW_TITLE: ${{ github.event.pull_request.title }} + OLD_TITLE: ${{ github.event.changes.title.from }} + run: | + # Anchored on pull-request-title-pattern "release: ${version}" from release-please-config.json. + extract() { + echo "$1" | grep -oE '^release:[[:space:]]+v?[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?' \ + | sed -E 's/^release:[[:space:]]+v?//' + } + NEW_VERSION=$(extract "$NEW_TITLE") + OLD_VERSION=$(extract "$OLD_TITLE") + echo "old=$OLD_VERSION" + echo "new=$NEW_VERSION" + if [ -z "$NEW_VERSION" ]; then + echo "::notice::No semver in new title; nothing to do." + echo "skip=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + if [ "$NEW_VERSION" = "$OLD_VERSION" ]; then + echo "::notice::Version unchanged ($NEW_VERSION); not pushing." + echo "skip=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT" + + - name: Check out master + if: steps.parse.outputs.skip != 'true' + uses: actions/checkout@v6 + with: + ref: master + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} + fetch-depth: 1 + + - name: Push empty Release-As commit + if: steps.parse.outputs.skip != 'true' + env: + VERSION: ${{ steps.parse.outputs.version }} + run: | + git config user.name "release-as-bot" + git config user.email "release-as-bot@users.noreply.github.com" + git commit --allow-empty -m "chore: pin next release + + Release-As: ${VERSION}" + git push origin master diff --git a/.stats.yml b/.stats.yml index 88ec6965..006b15f4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1 @@ configured_endpoints: 47 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/imagekit-inc/imagekit-b9cc1f62fca41c286295001551cbe902d6b2f30ab775d84e549eb5affc0186ec.yml -openapi_spec_hash: f3790446521a8f846e2e7249313de100 -config_hash: c5a7aed248c5d9ad5cd42e56fdd62c12 diff --git a/Gemfile.lock b/Gemfile.lock index 045ec1f6..fdbab266 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -144,7 +144,7 @@ GEM rexml (>= 3.2.6) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) - standardwebhooks (1.1.0) + standardwebhooks (1.0.1) steep (1.10.0) activesupport (>= 5.1) concurrent-ruby (>= 1.1.10) diff --git a/bin/check-release-environment b/bin/check-release-environment index c05436e8..4ec6c753 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -2,6 +2,10 @@ errors=() +if [ -z "${RELEASE_PLEASE_TOKEN}" ]; then + errors+=("The RELEASE_PLEASE_TOKEN secret has not been set. Create a fine-grained GitHub PAT and add it as a repository secret.") +fi + if [ -z "${GEM_HOST_API_KEY}" ]; then errors+=("The GEM_HOST_API_KEY secret has not been set. Please set it in either this repository's secrets or your organization secrets") fi diff --git a/lib/imagekitio/client.rb b/lib/imagekitio/client.rb index b4bfd22a..6b3ec5ee 100644 --- a/lib/imagekitio/client.rb +++ b/lib/imagekitio/client.rb @@ -28,7 +28,7 @@ class Client < Imagekitio::Internal::Transport::BaseClient # Your ImageKit webhook secret for verifying webhook signatures (starts with # `whsec_`). You can find this in the # [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only - # required if you're using webhooks. + # required if you are using webhooks. # @return [String, nil] attr_reader :webhook_secret @@ -90,7 +90,7 @@ def base_url_overridden? = @base_url_overridden # @param webhook_secret [String, nil] Your ImageKit webhook secret for verifying webhook signatures (starts with # `whsec_`). You can find this in the # [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only - # required if you're using webhooks. Defaults to `ENV["IMAGEKIT_WEBHOOK_SECRET"]` + # required if you are using webhooks. Defaults to `ENV["IMAGEKIT_WEBHOOK_SECRET"]` # # @param base_url [String, nil] Override the default base URL for the API, e.g., # `"https://api.example.com/v2/"`. Defaults to `ENV["IMAGE_KIT_BASE_URL"]` diff --git a/lib/imagekitio/models/metadata.rb b/lib/imagekitio/models/metadata.rb index 371ebc3b..562cc518 100644 --- a/lib/imagekitio/models/metadata.rb +++ b/lib/imagekitio/models/metadata.rb @@ -174,6 +174,11 @@ class Exif < Imagekitio::Internal::Type::BaseModel # @return [Float, nil] optional :aperture_value, Float, api_name: :ApertureValue + # @!attribute brightness_value + # + # @return [Float, nil] + optional :brightness_value, Float, api_name: :BrightnessValue + # @!attribute color_space # # @return [Integer, nil] @@ -246,8 +251,13 @@ class Exif < Imagekitio::Internal::Type::BaseModel # @!attribute focal_length # + # @return [Float, nil] + optional :focal_length, Float, api_name: :FocalLength + + # @!attribute focal_length_in35mm_format + # # @return [Integer, nil] - optional :focal_length, Integer, api_name: :FocalLength + optional :focal_length_in35mm_format, Integer, api_name: :FocalLengthIn35mmFormat # @!attribute focal_plane_resolution_unit # @@ -274,6 +284,21 @@ class Exif < Imagekitio::Internal::Type::BaseModel # @return [Integer, nil] optional :iso, Integer, api_name: :ISO + # @!attribute lens_model + # + # @return [String, nil] + optional :lens_model, String, api_name: :LensModel + + # @!attribute light_source + # + # @return [Integer, nil] + optional :light_source, Integer, api_name: :LightSource + + # @!attribute max_aperture_value + # + # @return [Float, nil] + optional :max_aperture_value, Float, api_name: :MaxApertureValue + # @!attribute metering_mode # # @return [Integer, nil] @@ -284,6 +309,16 @@ class Exif < Imagekitio::Internal::Type::BaseModel # @return [Integer, nil] optional :scene_capture_type, Integer, api_name: :SceneCaptureType + # @!attribute scene_type + # + # @return [String, nil] + optional :scene_type, String, api_name: :SceneType + + # @!attribute sensing_method + # + # @return [Integer, nil] + optional :sensing_method, Integer, api_name: :SensingMethod + # @!attribute shutter_speed_value # # @return [Float, nil] @@ -294,15 +329,21 @@ class Exif < Imagekitio::Internal::Type::BaseModel # @return [String, nil] optional :sub_sec_time, String, api_name: :SubSecTime + # @!attribute user_comment + # + # @return [String, nil] + optional :user_comment, String, api_name: :UserComment + # @!attribute white_balance # # @return [Integer, nil] optional :white_balance, Integer, api_name: :WhiteBalance - # @!method initialize(aperture_value: nil, color_space: nil, create_date: nil, custom_rendered: nil, date_time_original: nil, exif_image_height: nil, exif_image_width: nil, exif_version: nil, exposure_compensation: nil, exposure_mode: nil, exposure_program: nil, exposure_time: nil, flash: nil, flashpix_version: nil, f_number: nil, focal_length: nil, focal_plane_resolution_unit: nil, focal_plane_x_resolution: nil, focal_plane_y_resolution: nil, interop_offset: nil, iso: nil, metering_mode: nil, scene_capture_type: nil, shutter_speed_value: nil, sub_sec_time: nil, white_balance: nil) + # @!method initialize(aperture_value: nil, brightness_value: nil, color_space: nil, create_date: nil, custom_rendered: nil, date_time_original: nil, exif_image_height: nil, exif_image_width: nil, exif_version: nil, exposure_compensation: nil, exposure_mode: nil, exposure_program: nil, exposure_time: nil, flash: nil, flashpix_version: nil, f_number: nil, focal_length: nil, focal_length_in35mm_format: nil, focal_plane_resolution_unit: nil, focal_plane_x_resolution: nil, focal_plane_y_resolution: nil, interop_offset: nil, iso: nil, lens_model: nil, light_source: nil, max_aperture_value: nil, metering_mode: nil, scene_capture_type: nil, scene_type: nil, sensing_method: nil, shutter_speed_value: nil, sub_sec_time: nil, user_comment: nil, white_balance: nil) # Object containing Exif details. # # @param aperture_value [Float] + # @param brightness_value [Float] # @param color_space [Integer] # @param create_date [String] # @param custom_rendered [Integer] @@ -317,34 +358,111 @@ class Exif < Imagekitio::Internal::Type::BaseModel # @param flash [Integer] # @param flashpix_version [String] # @param f_number [Float] - # @param focal_length [Integer] + # @param focal_length [Float] + # @param focal_length_in35mm_format [Integer] # @param focal_plane_resolution_unit [Integer] # @param focal_plane_x_resolution [Float] # @param focal_plane_y_resolution [Float] # @param interop_offset [Integer] # @param iso [Integer] + # @param lens_model [String] + # @param light_source [Integer] + # @param max_aperture_value [Float] # @param metering_mode [Integer] # @param scene_capture_type [Integer] + # @param scene_type [String] + # @param sensing_method [Integer] # @param shutter_speed_value [Float] # @param sub_sec_time [String] + # @param user_comment [String] # @param white_balance [Integer] end # @see Imagekitio::Models::Metadata::Exif#gps class Gps < Imagekitio::Internal::Type::BaseModel + # @!attribute gps_altitude + # + # @return [Float, nil] + optional :gps_altitude, Float, api_name: :GPSAltitude + + # @!attribute gps_altitude_ref + # + # @return [Integer, nil] + optional :gps_altitude_ref, Integer, api_name: :GPSAltitudeRef + + # @!attribute gps_date_stamp + # + # @return [String, nil] + optional :gps_date_stamp, String, api_name: :GPSDateStamp + + # @!attribute gps_img_direction + # + # @return [Float, nil] + optional :gps_img_direction, Float, api_name: :GPSImgDirection + + # @!attribute gps_img_direction_ref + # + # @return [String, nil] + optional :gps_img_direction_ref, String, api_name: :GPSImgDirectionRef + + # @!attribute gps_latitude + # + # @return [Array, nil] + optional :gps_latitude, Imagekitio::Internal::Type::ArrayOf[Float], api_name: :GPSLatitude + + # @!attribute gps_latitude_ref + # + # @return [String, nil] + optional :gps_latitude_ref, String, api_name: :GPSLatitudeRef + + # @!attribute gps_longitude + # + # @return [Array, nil] + optional :gps_longitude, Imagekitio::Internal::Type::ArrayOf[Float], api_name: :GPSLongitude + + # @!attribute gps_longitude_ref + # + # @return [String, nil] + optional :gps_longitude_ref, String, api_name: :GPSLongitudeRef + + # @!attribute gps_time_stamp + # + # @return [Array, nil] + optional :gps_time_stamp, Imagekitio::Internal::Type::ArrayOf[Float], api_name: :GPSTimeStamp + # @!attribute gps_version_id # # @return [Array, nil] optional :gps_version_id, Imagekitio::Internal::Type::ArrayOf[Integer], api_name: :GPSVersionID - # @!method initialize(gps_version_id: nil) + # @!method initialize(gps_altitude: nil, gps_altitude_ref: nil, gps_date_stamp: nil, gps_img_direction: nil, gps_img_direction_ref: nil, gps_latitude: nil, gps_latitude_ref: nil, gps_longitude: nil, gps_longitude_ref: nil, gps_time_stamp: nil, gps_version_id: nil) # Object containing GPS information. # + # @param gps_altitude [Float] + # @param gps_altitude_ref [Integer] + # @param gps_date_stamp [String] + # @param gps_img_direction [Float] + # @param gps_img_direction_ref [String] + # @param gps_latitude [Array] + # @param gps_latitude_ref [String] + # @param gps_longitude [Array] + # @param gps_longitude_ref [String] + # @param gps_time_stamp [Array] # @param gps_version_id [Array] end # @see Imagekitio::Models::Metadata::Exif#image class Image < Imagekitio::Internal::Type::BaseModel + # @!attribute artist + # + # @return [String, nil] + optional :artist, String, api_name: :Artist + + # @!attribute copyright + # + # @return [String, nil] + optional :copyright, String, api_name: :Copyright + # @!attribute exif_offset # # @return [Integer, nil] @@ -355,6 +473,11 @@ class Image < Imagekitio::Internal::Type::BaseModel # @return [Integer, nil] optional :gps_info, Integer, api_name: :GPSInfo + # @!attribute image_description + # + # @return [String, nil] + optional :image_description, String, api_name: :ImageDescription + # @!attribute make # # @return [String, nil] @@ -387,8 +510,8 @@ class Image < Imagekitio::Internal::Type::BaseModel # @!attribute x_resolution # - # @return [Integer, nil] - optional :x_resolution, Integer, api_name: :XResolution + # @return [Float, nil] + optional :x_resolution, Float, api_name: :XResolution # @!attribute y_cb_cr_positioning # @@ -397,23 +520,26 @@ class Image < Imagekitio::Internal::Type::BaseModel # @!attribute y_resolution # - # @return [Integer, nil] - optional :y_resolution, Integer, api_name: :YResolution + # @return [Float, nil] + optional :y_resolution, Float, api_name: :YResolution - # @!method initialize(exif_offset: nil, gps_info: nil, make: nil, model: nil, modify_date: nil, orientation: nil, resolution_unit: nil, software: nil, x_resolution: nil, y_cb_cr_positioning: nil, y_resolution: nil) + # @!method initialize(artist: nil, copyright: nil, exif_offset: nil, gps_info: nil, image_description: nil, make: nil, model: nil, modify_date: nil, orientation: nil, resolution_unit: nil, software: nil, x_resolution: nil, y_cb_cr_positioning: nil, y_resolution: nil) # Object containing EXIF image information. # + # @param artist [String] + # @param copyright [String] # @param exif_offset [Integer] # @param gps_info [Integer] + # @param image_description [String] # @param make [String] # @param model [String] # @param modify_date [String] # @param orientation [Integer] # @param resolution_unit [Integer] # @param software [String] - # @param x_resolution [Integer] + # @param x_resolution [Float] # @param y_cb_cr_positioning [Integer] - # @param y_resolution [Integer] + # @param y_resolution [Float] end # @see Imagekitio::Models::Metadata::Exif#interoperability @@ -459,13 +585,13 @@ class Thumbnail < Imagekitio::Internal::Type::BaseModel # @!attribute x_resolution # - # @return [Integer, nil] - optional :x_resolution, Integer, api_name: :XResolution + # @return [Float, nil] + optional :x_resolution, Float, api_name: :XResolution # @!attribute y_resolution # - # @return [Integer, nil] - optional :y_resolution, Integer, api_name: :YResolution + # @return [Float, nil] + optional :y_resolution, Float, api_name: :YResolution # @!method initialize(compression: nil, resolution_unit: nil, thumbnail_length: nil, thumbnail_offset: nil, x_resolution: nil, y_resolution: nil) # Object containing Thumbnail information. @@ -474,8 +600,8 @@ class Thumbnail < Imagekitio::Internal::Type::BaseModel # @param resolution_unit [Integer] # @param thumbnail_length [Integer] # @param thumbnail_offset [Integer] - # @param x_resolution [Integer] - # @param y_resolution [Integer] + # @param x_resolution [Float] + # @param y_resolution [Float] end end end diff --git a/rbi/imagekitio/client.rbi b/rbi/imagekitio/client.rbi index a0e151fa..90f1116e 100644 --- a/rbi/imagekitio/client.rbi +++ b/rbi/imagekitio/client.rbi @@ -23,7 +23,7 @@ module Imagekitio # Your ImageKit webhook secret for verifying webhook signatures (starts with # `whsec_`). You can find this in the # [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only - # required if you're using webhooks. + # required if you are using webhooks. sig { returns(T.nilable(String)) } attr_reader :webhook_secret @@ -92,7 +92,7 @@ module Imagekitio # Your ImageKit webhook secret for verifying webhook signatures (starts with # `whsec_`). You can find this in the # [ImageKit dashboard](https://imagekit.io/dashboard/developer/webhooks). Only - # required if you're using webhooks. Defaults to `ENV["IMAGEKIT_WEBHOOK_SECRET"]` + # required if you are using webhooks. Defaults to `ENV["IMAGEKIT_WEBHOOK_SECRET"]` webhook_secret: ENV["IMAGEKIT_WEBHOOK_SECRET"], # Override the default base URL for the API, e.g., # `"https://api.example.com/v2/"`. Defaults to `ENV["IMAGE_KIT_BASE_URL"]` diff --git a/rbi/imagekitio/models/metadata.rbi b/rbi/imagekitio/models/metadata.rbi index dea32d8f..d9ca188a 100644 --- a/rbi/imagekitio/models/metadata.rbi +++ b/rbi/imagekitio/models/metadata.rbi @@ -288,6 +288,12 @@ module Imagekitio sig { params(aperture_value: Float).void } attr_writer :aperture_value + sig { returns(T.nilable(Float)) } + attr_reader :brightness_value + + sig { params(brightness_value: Float).void } + attr_writer :brightness_value + sig { returns(T.nilable(Integer)) } attr_reader :color_space @@ -372,12 +378,18 @@ module Imagekitio sig { params(f_number: Float).void } attr_writer :f_number - sig { returns(T.nilable(Integer)) } + sig { returns(T.nilable(Float)) } attr_reader :focal_length - sig { params(focal_length: Integer).void } + sig { params(focal_length: Float).void } attr_writer :focal_length + sig { returns(T.nilable(Integer)) } + attr_reader :focal_length_in35mm_format + + sig { params(focal_length_in35mm_format: Integer).void } + attr_writer :focal_length_in35mm_format + sig { returns(T.nilable(Integer)) } attr_reader :focal_plane_resolution_unit @@ -408,6 +420,24 @@ module Imagekitio sig { params(iso: Integer).void } attr_writer :iso + sig { returns(T.nilable(String)) } + attr_reader :lens_model + + sig { params(lens_model: String).void } + attr_writer :lens_model + + sig { returns(T.nilable(Integer)) } + attr_reader :light_source + + sig { params(light_source: Integer).void } + attr_writer :light_source + + sig { returns(T.nilable(Float)) } + attr_reader :max_aperture_value + + sig { params(max_aperture_value: Float).void } + attr_writer :max_aperture_value + sig { returns(T.nilable(Integer)) } attr_reader :metering_mode @@ -420,6 +450,18 @@ module Imagekitio sig { params(scene_capture_type: Integer).void } attr_writer :scene_capture_type + sig { returns(T.nilable(String)) } + attr_reader :scene_type + + sig { params(scene_type: String).void } + attr_writer :scene_type + + sig { returns(T.nilable(Integer)) } + attr_reader :sensing_method + + sig { params(sensing_method: Integer).void } + attr_writer :sensing_method + sig { returns(T.nilable(Float)) } attr_reader :shutter_speed_value @@ -432,6 +474,12 @@ module Imagekitio sig { params(sub_sec_time: String).void } attr_writer :sub_sec_time + sig { returns(T.nilable(String)) } + attr_reader :user_comment + + sig { params(user_comment: String).void } + attr_writer :user_comment + sig { returns(T.nilable(Integer)) } attr_reader :white_balance @@ -442,6 +490,7 @@ module Imagekitio sig do params( aperture_value: Float, + brightness_value: Float, color_space: Integer, create_date: String, custom_rendered: Integer, @@ -456,21 +505,29 @@ module Imagekitio flash: Integer, flashpix_version: String, f_number: Float, - focal_length: Integer, + focal_length: Float, + focal_length_in35mm_format: Integer, focal_plane_resolution_unit: Integer, focal_plane_x_resolution: Float, focal_plane_y_resolution: Float, interop_offset: Integer, iso: Integer, + lens_model: String, + light_source: Integer, + max_aperture_value: Float, metering_mode: Integer, scene_capture_type: Integer, + scene_type: String, + sensing_method: Integer, shutter_speed_value: Float, sub_sec_time: String, + user_comment: String, white_balance: Integer ).returns(T.attached_class) end def self.new( aperture_value: nil, + brightness_value: nil, color_space: nil, create_date: nil, custom_rendered: nil, @@ -486,15 +543,22 @@ module Imagekitio flashpix_version: nil, f_number: nil, focal_length: nil, + focal_length_in35mm_format: nil, focal_plane_resolution_unit: nil, focal_plane_x_resolution: nil, focal_plane_y_resolution: nil, interop_offset: nil, iso: nil, + lens_model: nil, + light_source: nil, + max_aperture_value: nil, metering_mode: nil, scene_capture_type: nil, + scene_type: nil, + sensing_method: nil, shutter_speed_value: nil, sub_sec_time: nil, + user_comment: nil, white_balance: nil ) end @@ -503,6 +567,7 @@ module Imagekitio override.returns( { aperture_value: Float, + brightness_value: Float, color_space: Integer, create_date: String, custom_rendered: Integer, @@ -517,16 +582,23 @@ module Imagekitio flash: Integer, flashpix_version: String, f_number: Float, - focal_length: Integer, + focal_length: Float, + focal_length_in35mm_format: Integer, focal_plane_resolution_unit: Integer, focal_plane_x_resolution: Float, focal_plane_y_resolution: Float, interop_offset: Integer, iso: Integer, + lens_model: String, + light_source: Integer, + max_aperture_value: Float, metering_mode: Integer, scene_capture_type: Integer, + scene_type: String, + sensing_method: Integer, shutter_speed_value: Float, sub_sec_time: String, + user_comment: String, white_balance: Integer } ) @@ -544,6 +616,66 @@ module Imagekitio ) end + sig { returns(T.nilable(Float)) } + attr_reader :gps_altitude + + sig { params(gps_altitude: Float).void } + attr_writer :gps_altitude + + sig { returns(T.nilable(Integer)) } + attr_reader :gps_altitude_ref + + sig { params(gps_altitude_ref: Integer).void } + attr_writer :gps_altitude_ref + + sig { returns(T.nilable(String)) } + attr_reader :gps_date_stamp + + sig { params(gps_date_stamp: String).void } + attr_writer :gps_date_stamp + + sig { returns(T.nilable(Float)) } + attr_reader :gps_img_direction + + sig { params(gps_img_direction: Float).void } + attr_writer :gps_img_direction + + sig { returns(T.nilable(String)) } + attr_reader :gps_img_direction_ref + + sig { params(gps_img_direction_ref: String).void } + attr_writer :gps_img_direction_ref + + sig { returns(T.nilable(T::Array[Float])) } + attr_reader :gps_latitude + + sig { params(gps_latitude: T::Array[Float]).void } + attr_writer :gps_latitude + + sig { returns(T.nilable(String)) } + attr_reader :gps_latitude_ref + + sig { params(gps_latitude_ref: String).void } + attr_writer :gps_latitude_ref + + sig { returns(T.nilable(T::Array[Float])) } + attr_reader :gps_longitude + + sig { params(gps_longitude: T::Array[Float]).void } + attr_writer :gps_longitude + + sig { returns(T.nilable(String)) } + attr_reader :gps_longitude_ref + + sig { params(gps_longitude_ref: String).void } + attr_writer :gps_longitude_ref + + sig { returns(T.nilable(T::Array[Float])) } + attr_reader :gps_time_stamp + + sig { params(gps_time_stamp: T::Array[Float]).void } + attr_writer :gps_time_stamp + sig { returns(T.nilable(T::Array[Integer])) } attr_reader :gps_version_id @@ -552,12 +684,52 @@ module Imagekitio # Object containing GPS information. sig do - params(gps_version_id: T::Array[Integer]).returns(T.attached_class) + params( + gps_altitude: Float, + gps_altitude_ref: Integer, + gps_date_stamp: String, + gps_img_direction: Float, + gps_img_direction_ref: String, + gps_latitude: T::Array[Float], + gps_latitude_ref: String, + gps_longitude: T::Array[Float], + gps_longitude_ref: String, + gps_time_stamp: T::Array[Float], + gps_version_id: T::Array[Integer] + ).returns(T.attached_class) end - def self.new(gps_version_id: nil) + def self.new( + gps_altitude: nil, + gps_altitude_ref: nil, + gps_date_stamp: nil, + gps_img_direction: nil, + gps_img_direction_ref: nil, + gps_latitude: nil, + gps_latitude_ref: nil, + gps_longitude: nil, + gps_longitude_ref: nil, + gps_time_stamp: nil, + gps_version_id: nil + ) end - sig { override.returns({ gps_version_id: T::Array[Integer] }) } + sig do + override.returns( + { + gps_altitude: Float, + gps_altitude_ref: Integer, + gps_date_stamp: String, + gps_img_direction: Float, + gps_img_direction_ref: String, + gps_latitude: T::Array[Float], + gps_latitude_ref: String, + gps_longitude: T::Array[Float], + gps_longitude_ref: String, + gps_time_stamp: T::Array[Float], + gps_version_id: T::Array[Integer] + } + ) + end def to_hash end end @@ -571,6 +743,18 @@ module Imagekitio ) end + sig { returns(T.nilable(String)) } + attr_reader :artist + + sig { params(artist: String).void } + attr_writer :artist + + sig { returns(T.nilable(String)) } + attr_reader :copyright + + sig { params(copyright: String).void } + attr_writer :copyright + sig { returns(T.nilable(Integer)) } attr_reader :exif_offset @@ -583,6 +767,12 @@ module Imagekitio sig { params(gps_info: Integer).void } attr_writer :gps_info + sig { returns(T.nilable(String)) } + attr_reader :image_description + + sig { params(image_description: String).void } + attr_writer :image_description + sig { returns(T.nilable(String)) } attr_reader :make @@ -619,10 +809,10 @@ module Imagekitio sig { params(software: String).void } attr_writer :software - sig { returns(T.nilable(Integer)) } + sig { returns(T.nilable(Float)) } attr_reader :x_resolution - sig { params(x_resolution: Integer).void } + sig { params(x_resolution: Float).void } attr_writer :x_resolution sig { returns(T.nilable(Integer)) } @@ -631,31 +821,37 @@ module Imagekitio sig { params(y_cb_cr_positioning: Integer).void } attr_writer :y_cb_cr_positioning - sig { returns(T.nilable(Integer)) } + sig { returns(T.nilable(Float)) } attr_reader :y_resolution - sig { params(y_resolution: Integer).void } + sig { params(y_resolution: Float).void } attr_writer :y_resolution # Object containing EXIF image information. sig do params( + artist: String, + copyright: String, exif_offset: Integer, gps_info: Integer, + image_description: String, make: String, model: String, modify_date: String, orientation: Integer, resolution_unit: Integer, software: String, - x_resolution: Integer, + x_resolution: Float, y_cb_cr_positioning: Integer, - y_resolution: Integer + y_resolution: Float ).returns(T.attached_class) end def self.new( + artist: nil, + copyright: nil, exif_offset: nil, gps_info: nil, + image_description: nil, make: nil, model: nil, modify_date: nil, @@ -671,17 +867,20 @@ module Imagekitio sig do override.returns( { + artist: String, + copyright: String, exif_offset: Integer, gps_info: Integer, + image_description: String, make: String, model: String, modify_date: String, orientation: Integer, resolution_unit: Integer, software: String, - x_resolution: Integer, + x_resolution: Float, y_cb_cr_positioning: Integer, - y_resolution: Integer + y_resolution: Float } ) end @@ -759,16 +958,16 @@ module Imagekitio sig { params(thumbnail_offset: Integer).void } attr_writer :thumbnail_offset - sig { returns(T.nilable(Integer)) } + sig { returns(T.nilable(Float)) } attr_reader :x_resolution - sig { params(x_resolution: Integer).void } + sig { params(x_resolution: Float).void } attr_writer :x_resolution - sig { returns(T.nilable(Integer)) } + sig { returns(T.nilable(Float)) } attr_reader :y_resolution - sig { params(y_resolution: Integer).void } + sig { params(y_resolution: Float).void } attr_writer :y_resolution # Object containing Thumbnail information. @@ -778,8 +977,8 @@ module Imagekitio resolution_unit: Integer, thumbnail_length: Integer, thumbnail_offset: Integer, - x_resolution: Integer, - y_resolution: Integer + x_resolution: Float, + y_resolution: Float ).returns(T.attached_class) end def self.new( @@ -799,8 +998,8 @@ module Imagekitio resolution_unit: Integer, thumbnail_length: Integer, thumbnail_offset: Integer, - x_resolution: Integer, - y_resolution: Integer + x_resolution: Float, + y_resolution: Float } ) end diff --git a/release-please-config.json b/release-please-config.json index 70a47571..a708bb63 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -2,11 +2,11 @@ "packages": { ".": {} }, - "$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", "include-v-in-tag": true, "include-component-in-tag": false, "versioning": "prerelease", - "prerelease": true, + "prerelease": false, "bump-minor-pre-major": true, "bump-patch-for-minor-pre-major": false, "pull-request-header": "Automated Release PR", @@ -62,9 +62,6 @@ "release-type": "ruby", "version-file": "lib/imagekitio/version.rb", "extra-files": [ - { - "type": "ruby-readme", - "path": "README.md" - } + "README.md" ] } \ No newline at end of file diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index b2e36e9f..3a3b1f13 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -110,4 +110,4 @@ walk_tree "$DIST_DIR" echo "::endgroup::" echo -e "${GREEN}Gem artifacts uploaded to Stainless storage.${NC}" -echo -e "\033[32mInstallation: bundle remove imagekitio && bundle add imagekitio --source 'https://pkg.stainless.com/s/imagekit-ruby/$SHA'\033[0m" +echo -e "\033[32mInstallation: bundle remove imagekitio && bundle add imagekitio --source 'https://pkg.stainless.com/s/imagekit-ruby-staging/$SHA'\033[0m" diff --git a/sig/imagekitio/models/metadata.rbs b/sig/imagekitio/models/metadata.rbs index 082ac3ac..b3a2d1d1 100644 --- a/sig/imagekitio/models/metadata.rbs +++ b/sig/imagekitio/models/metadata.rbs @@ -175,6 +175,7 @@ module Imagekitio type exif = { aperture_value: Float, + brightness_value: Float, color_space: Integer, create_date: String, custom_rendered: Integer, @@ -189,16 +190,23 @@ module Imagekitio flash: Integer, flashpix_version: String, f_number: Float, - focal_length: Integer, + focal_length: Float, + :focal_length_in35mm_format => Integer, focal_plane_resolution_unit: Integer, focal_plane_x_resolution: Float, focal_plane_y_resolution: Float, interop_offset: Integer, iso: Integer, + lens_model: String, + light_source: Integer, + max_aperture_value: Float, metering_mode: Integer, scene_capture_type: Integer, + scene_type: String, + sensing_method: Integer, shutter_speed_value: Float, sub_sec_time: String, + user_comment: String, white_balance: Integer } @@ -207,6 +215,10 @@ module Imagekitio def aperture_value=: (Float) -> Float + attr_reader brightness_value: Float? + + def brightness_value=: (Float) -> Float + attr_reader color_space: Integer? def color_space=: (Integer) -> Integer @@ -263,9 +275,13 @@ module Imagekitio def f_number=: (Float) -> Float - attr_reader focal_length: Integer? + attr_reader focal_length: Float? + + def focal_length=: (Float) -> Float - def focal_length=: (Integer) -> Integer + attr_reader focal_length_in35mm_format: Integer? + + def focal_length_in35mm_format=: (Integer) -> Integer attr_reader focal_plane_resolution_unit: Integer? @@ -287,6 +303,18 @@ module Imagekitio def iso=: (Integer) -> Integer + attr_reader lens_model: String? + + def lens_model=: (String) -> String + + attr_reader light_source: Integer? + + def light_source=: (Integer) -> Integer + + attr_reader max_aperture_value: Float? + + def max_aperture_value=: (Float) -> Float + attr_reader metering_mode: Integer? def metering_mode=: (Integer) -> Integer @@ -295,6 +323,14 @@ module Imagekitio def scene_capture_type=: (Integer) -> Integer + attr_reader scene_type: String? + + def scene_type=: (String) -> String + + attr_reader sensing_method: Integer? + + def sensing_method=: (Integer) -> Integer + attr_reader shutter_speed_value: Float? def shutter_speed_value=: (Float) -> Float @@ -303,12 +339,17 @@ module Imagekitio def sub_sec_time=: (String) -> String + attr_reader user_comment: String? + + def user_comment=: (String) -> String + attr_reader white_balance: Integer? def white_balance=: (Integer) -> Integer def initialize: ( ?aperture_value: Float, + ?brightness_value: Float, ?color_space: Integer, ?create_date: String, ?custom_rendered: Integer, @@ -323,21 +364,29 @@ module Imagekitio ?flash: Integer, ?flashpix_version: String, ?f_number: Float, - ?focal_length: Integer, + ?focal_length: Float, + ?focal_length_in35mm_format: Integer, ?focal_plane_resolution_unit: Integer, ?focal_plane_x_resolution: Float, ?focal_plane_y_resolution: Float, ?interop_offset: Integer, ?iso: Integer, + ?lens_model: String, + ?light_source: Integer, + ?max_aperture_value: Float, ?metering_mode: Integer, ?scene_capture_type: Integer, + ?scene_type: String, + ?sensing_method: Integer, ?shutter_speed_value: Float, ?sub_sec_time: String, + ?user_comment: String, ?white_balance: Integer ) -> void def to_hash: -> { aperture_value: Float, + brightness_value: Float, color_space: Integer, create_date: String, custom_rendered: Integer, @@ -352,48 +401,143 @@ module Imagekitio flash: Integer, flashpix_version: String, f_number: Float, - focal_length: Integer, + focal_length: Float, + :focal_length_in35mm_format => Integer, focal_plane_resolution_unit: Integer, focal_plane_x_resolution: Float, focal_plane_y_resolution: Float, interop_offset: Integer, iso: Integer, + lens_model: String, + light_source: Integer, + max_aperture_value: Float, metering_mode: Integer, scene_capture_type: Integer, + scene_type: String, + sensing_method: Integer, shutter_speed_value: Float, sub_sec_time: String, + user_comment: String, white_balance: Integer } end - type gps = { gps_version_id: ::Array[Integer] } + type gps = + { + gps_altitude: Float, + gps_altitude_ref: Integer, + gps_date_stamp: String, + gps_img_direction: Float, + gps_img_direction_ref: String, + gps_latitude: ::Array[Float], + gps_latitude_ref: String, + gps_longitude: ::Array[Float], + gps_longitude_ref: String, + gps_time_stamp: ::Array[Float], + gps_version_id: ::Array[Integer] + } class Gps < Imagekitio::Internal::Type::BaseModel + attr_reader gps_altitude: Float? + + def gps_altitude=: (Float) -> Float + + attr_reader gps_altitude_ref: Integer? + + def gps_altitude_ref=: (Integer) -> Integer + + attr_reader gps_date_stamp: String? + + def gps_date_stamp=: (String) -> String + + attr_reader gps_img_direction: Float? + + def gps_img_direction=: (Float) -> Float + + attr_reader gps_img_direction_ref: String? + + def gps_img_direction_ref=: (String) -> String + + attr_reader gps_latitude: ::Array[Float]? + + def gps_latitude=: (::Array[Float]) -> ::Array[Float] + + attr_reader gps_latitude_ref: String? + + def gps_latitude_ref=: (String) -> String + + attr_reader gps_longitude: ::Array[Float]? + + def gps_longitude=: (::Array[Float]) -> ::Array[Float] + + attr_reader gps_longitude_ref: String? + + def gps_longitude_ref=: (String) -> String + + attr_reader gps_time_stamp: ::Array[Float]? + + def gps_time_stamp=: (::Array[Float]) -> ::Array[Float] + attr_reader gps_version_id: ::Array[Integer]? def gps_version_id=: (::Array[Integer]) -> ::Array[Integer] - def initialize: (?gps_version_id: ::Array[Integer]) -> void + def initialize: ( + ?gps_altitude: Float, + ?gps_altitude_ref: Integer, + ?gps_date_stamp: String, + ?gps_img_direction: Float, + ?gps_img_direction_ref: String, + ?gps_latitude: ::Array[Float], + ?gps_latitude_ref: String, + ?gps_longitude: ::Array[Float], + ?gps_longitude_ref: String, + ?gps_time_stamp: ::Array[Float], + ?gps_version_id: ::Array[Integer] + ) -> void - def to_hash: -> { gps_version_id: ::Array[Integer] } + def to_hash: -> { + gps_altitude: Float, + gps_altitude_ref: Integer, + gps_date_stamp: String, + gps_img_direction: Float, + gps_img_direction_ref: String, + gps_latitude: ::Array[Float], + gps_latitude_ref: String, + gps_longitude: ::Array[Float], + gps_longitude_ref: String, + gps_time_stamp: ::Array[Float], + gps_version_id: ::Array[Integer] + } end type image = { + artist: String, + copyright: String, exif_offset: Integer, gps_info: Integer, + image_description: String, make: String, model: String, modify_date: String, orientation: Integer, resolution_unit: Integer, software: String, - x_resolution: Integer, + x_resolution: Float, y_cb_cr_positioning: Integer, - y_resolution: Integer + y_resolution: Float } class Image < Imagekitio::Internal::Type::BaseModel + attr_reader artist: String? + + def artist=: (String) -> String + + attr_reader copyright: String? + + def copyright=: (String) -> String + attr_reader exif_offset: Integer? def exif_offset=: (Integer) -> Integer @@ -402,6 +546,10 @@ module Imagekitio def gps_info=: (Integer) -> Integer + attr_reader image_description: String? + + def image_description=: (String) -> String + attr_reader make: String? def make=: (String) -> String @@ -426,44 +574,50 @@ module Imagekitio def software=: (String) -> String - attr_reader x_resolution: Integer? + attr_reader x_resolution: Float? - def x_resolution=: (Integer) -> Integer + def x_resolution=: (Float) -> Float attr_reader y_cb_cr_positioning: Integer? def y_cb_cr_positioning=: (Integer) -> Integer - attr_reader y_resolution: Integer? + attr_reader y_resolution: Float? - def y_resolution=: (Integer) -> Integer + def y_resolution=: (Float) -> Float def initialize: ( + ?artist: String, + ?copyright: String, ?exif_offset: Integer, ?gps_info: Integer, + ?image_description: String, ?make: String, ?model: String, ?modify_date: String, ?orientation: Integer, ?resolution_unit: Integer, ?software: String, - ?x_resolution: Integer, + ?x_resolution: Float, ?y_cb_cr_positioning: Integer, - ?y_resolution: Integer + ?y_resolution: Float ) -> void def to_hash: -> { + artist: String, + copyright: String, exif_offset: Integer, gps_info: Integer, + image_description: String, make: String, model: String, modify_date: String, orientation: Integer, resolution_unit: Integer, software: String, - x_resolution: Integer, + x_resolution: Float, y_cb_cr_positioning: Integer, - y_resolution: Integer + y_resolution: Float } end @@ -493,8 +647,8 @@ module Imagekitio resolution_unit: Integer, thumbnail_length: Integer, thumbnail_offset: Integer, - x_resolution: Integer, - y_resolution: Integer + x_resolution: Float, + y_resolution: Float } class Thumbnail < Imagekitio::Internal::Type::BaseModel @@ -514,21 +668,21 @@ module Imagekitio def thumbnail_offset=: (Integer) -> Integer - attr_reader x_resolution: Integer? + attr_reader x_resolution: Float? - def x_resolution=: (Integer) -> Integer + def x_resolution=: (Float) -> Float - attr_reader y_resolution: Integer? + attr_reader y_resolution: Float? - def y_resolution=: (Integer) -> Integer + def y_resolution=: (Float) -> Float def initialize: ( ?compression: Integer, ?resolution_unit: Integer, ?thumbnail_length: Integer, ?thumbnail_offset: Integer, - ?x_resolution: Integer, - ?y_resolution: Integer + ?x_resolution: Float, + ?y_resolution: Float ) -> void def to_hash: -> { @@ -536,8 +690,8 @@ module Imagekitio resolution_unit: Integer, thumbnail_length: Integer, thumbnail_offset: Integer, - x_resolution: Integer, - y_resolution: Integer + x_resolution: Float, + y_resolution: Float } end end