diff --git a/.github/workflows/publish-gem.yml b/.github/workflows/publish-gem.yml new file mode 100644 index 0000000..95c967e --- /dev/null +++ b/.github/workflows/publish-gem.yml @@ -0,0 +1,31 @@ +# This workflow is triggered when a GitHub release is created. +# It can also be run manually to re-publish to rubygems.org in case it failed for some reason. +# You can run this workflow by navigating to https://www.github.com/Hexlet/cloudpayments-ruby/actions/workflows/publish-gem.yml +name: Publish Gem +on: + workflow_dispatch: + + release: + types: [published] + +jobs: + publish: + name: publish + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: false + - run: |- + bundle install + + - name: Publish to RubyGems.org + run: | + bash ./bin/publish-gem + env: + # `RUBYGEMS_HOST` is only required for private gem repositories, not https://rubygems.org + RUBYGEMS_HOST: ${{ secrets.CLOUDPAYMENTS_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }} + GEM_HOST_API_KEY: ${{ secrets.CLOUDPAYMENTS_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }} diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml new file mode 100644 index 0000000..96786ea --- /dev/null +++ b/.github/workflows/release-doctor.yml @@ -0,0 +1,22 @@ +name: Release Doctor +on: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + release_doctor: + name: release doctor + runs-on: ubuntu-latest + if: github.repository == 'Hexlet/cloudpayments-ruby' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + + steps: + - uses: actions/checkout@v6 + + - name: Check release environment + run: | + bash ./bin/check-release-environment + env: + RUBYGEMS_HOST: ${{ secrets.CLOUDPAYMENTS_RUBYGEMS_HOST || secrets.RUBYGEMS_HOST }} + GEM_HOST_API_KEY: ${{ secrets.CLOUDPAYMENTS_GEM_HOST_API_KEY || secrets.GEM_HOST_API_KEY }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..c7159c1 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.0.2" +} \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index e484934..860b97d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 19 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/hexlet%2Fcloudpayments-21652c2d2e6a5aab678ca435ba09ef698ff34270021f349660b84d5d98bf3923.yml openapi_spec_hash: 356a7298b2abac3fdf72ad5ee046b952 -config_hash: eb228f617f44709affd47d4e9f992e81 +config_hash: 039ea7c50406040341fca19f6c331be6 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f0a1bb2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## 0.0.2 (2026-02-09) + +Full Changelog: [v0.0.1...v0.0.2](https://github.com/Hexlet/cloudpayments-ruby/compare/v0.0.1...v0.0.2) + +### Chores + +* configure new SDK language ([15e2d70](https://github.com/Hexlet/cloudpayments-ruby/commit/15e2d704e64295aa4ead9f2994c2ca8d1519d23a)) +* update SDK settings ([707c833](https://github.com/Hexlet/cloudpayments-ruby/commit/707c83332032a87d3cc56074db8b86c95d0bdb52)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00adffc..caeb22b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,13 +43,13 @@ If you’d like to use the repository from source, you can either install from g To install via git in your `Gemfile`: ```ruby -gem "cloudpayments", git: "https://github.com/stainless-sdks/cloudpayments-ruby" +gem "cloudpayments", git: "https://github.com/Hexlet/cloudpayments-ruby" ``` Alternatively, reference local copy of the repo: ```bash -$ git clone -- 'https://github.com/stainless-sdks/cloudpayments-ruby' '' +$ git clone -- 'https://github.com/Hexlet/cloudpayments-ruby' '' ``` ```ruby diff --git a/Gemfile.lock b/Gemfile.lock index 2deff07..7930e40 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - cloudpayments (0.0.1) + cloudpayments (0.0.2) cgi connection_pool diff --git a/README.md b/README.md index 6e69c0d..1478d1e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cloudpayments Ruby API library -The Cloudpayments Ruby library provides convenient access to the Cloudpayments REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/stainless-sdks/cloudpayments-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem. +The Cloudpayments Ruby library provides convenient access to the Cloudpayments REST API from any Ruby 3.2.0+ application. It ships with comprehensive types & docstrings in Yard, RBS, and RBI – [see below](https://github.com/Hexlet/cloudpayments-ruby#Sorbet) for usage with Sorbet. The standard library's `net/http` is used as the HTTP transport, with connection pooling via the `connection_pool` gem. It is generated with [Stainless](https://www.stainless.com/). @@ -12,10 +12,14 @@ Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs To use this gem, install via Bundler by adding the following to your application's `Gemfile`: + + ```ruby -gem "cloudpayments", "~> 0.0.1" +gem "cloudpayments", "~> 0.0.2" ``` + + ## Usage ```ruby @@ -225,4 +229,4 @@ Ruby 3.2.0 or higher. ## Contributing -See [the contributing documentation](https://github.com/stainless-sdks/cloudpayments-ruby/tree/main/CONTRIBUTING.md). +See [the contributing documentation](https://github.com/Hexlet/cloudpayments-ruby/tree/main/CONTRIBUTING.md). diff --git a/bin/check-release-environment b/bin/check-release-environment new file mode 100644 index 0000000..c05436e --- /dev/null +++ b/bin/check-release-environment @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +errors=() + +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 + +lenErrors=${#errors[@]} + +if [[ lenErrors -gt 0 ]]; then + echo -e "Found the following errors in the release environment:\n" + + for error in "${errors[@]}"; do + echo -e "- $error\n" + done + + exit 1 +fi + +echo "The environment is ready to push releases!" diff --git a/cloudpayments.gemspec b/cloudpayments.gemspec index 869f4f0..e93c99e 100644 --- a/cloudpayments.gemspec +++ b/cloudpayments.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |s| s.email = "" s.homepage = "https://gemdocs.org/gems/cloudpayments" s.metadata["homepage_uri"] = s.homepage - s.metadata["source_code_uri"] = "https://github.com/stainless-sdks/cloudpayments-ruby" + s.metadata["source_code_uri"] = "https://github.com/Hexlet/cloudpayments-ruby" s.metadata["rubygems_mfa_required"] = false.to_s s.required_ruby_version = ">= 3.2.0" diff --git a/lib/cloudpayments/version.rb b/lib/cloudpayments/version.rb index d6391e8..285ad13 100644 --- a/lib/cloudpayments/version.rb +++ b/lib/cloudpayments/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Cloudpayments - VERSION = "0.0.1" + VERSION = "0.0.2" end diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..bd49d39 --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,70 @@ +{ + "packages": { + ".": {} + }, + "$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json", + "include-v-in-tag": true, + "include-component-in-tag": false, + "versioning": "prerelease", + "prerelease": true, + "bump-minor-pre-major": true, + "bump-patch-for-minor-pre-major": false, + "pull-request-header": "Automated Release PR", + "pull-request-title-pattern": "release: ${version}", + "changelog-sections": [ + { + "type": "feat", + "section": "Features" + }, + { + "type": "fix", + "section": "Bug Fixes" + }, + { + "type": "perf", + "section": "Performance Improvements" + }, + { + "type": "revert", + "section": "Reverts" + }, + { + "type": "chore", + "section": "Chores" + }, + { + "type": "docs", + "section": "Documentation" + }, + { + "type": "style", + "section": "Styles" + }, + { + "type": "refactor", + "section": "Refactors" + }, + { + "type": "test", + "section": "Tests", + "hidden": true + }, + { + "type": "build", + "section": "Build System" + }, + { + "type": "ci", + "section": "Continuous Integration", + "hidden": true + } + ], + "release-type": "ruby", + "version-file": "lib/cloudpayments/version.rb", + "extra-files": [ + { + "type": "ruby-readme", + "path": "README.md" + } + ] +} \ No newline at end of file