diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 1916f59..5da55dd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,7 +7,6 @@ on: jobs: build: - name: Build + Publish runs-on: ubuntu-latest permissions: contents: read @@ -23,17 +22,17 @@ jobs: with: ruby-version: 3.1.2 - - name: Publish to GPR - run: | - mkdir -p $HOME/.gem - touch $HOME/.gem/credentials - chmod 0600 $HOME/.gem/credentials - printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials - gem build *.gemspec - gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem - env: - GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}" - OWNER: ${{ github.repository_owner }} + # - name: Publish to GPR + # run: | + # mkdir -p $HOME/.gem + # touch $HOME/.gem/credentials + # chmod 0600 $HOME/.gem/credentials + # printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + # gem build *.gemspec + # gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem + # env: + # GEM_HOST_API_KEY: "Bearer ${{secrets.GIT_TOKEN}}" + # OWNER: ${{ github.repository_owner }} - name: Publish to RubyGems run: | diff --git a/fortress.gemspec b/fortress.gemspec index ea21963..c4f9f3b 100644 --- a/fortress.gemspec +++ b/fortress.gemspec @@ -3,7 +3,7 @@ require_relative 'lib/fortress/version' Gem::Specification.new do |spec| - spec.name = 'fortress' + spec.name = 'fortress-sdk-ruby' spec.version = Fortress::VERSION spec.authors = ['Fortress'] spec.email = ['founder@fortress.build'] @@ -13,7 +13,7 @@ Gem::Specification.new do |spec| spec.homepage = 'https://fortress.build' spec.required_ruby_version = '>= 3.0.0' - spec.metadata['allowed_push_host'] = 'https://rubygems.pkg.github.com/fortress-build' + spec.metadata['allowed_push_host'] = 'https://rubygems.org' spec.metadata['homepage_uri'] = spec.homepage spec.metadata['source_code_uri'] = 'https://github.com/fortress-build/sdk-ruby' diff --git a/lib/fortress.rb b/lib/fortress.rb index f4955df..3eebf9f 100644 --- a/lib/fortress.rb +++ b/lib/fortress.rb @@ -87,6 +87,9 @@ def delete_tenant(id) _ = make_request(:delete, endpoint) end + # Connect to a database. + # @param id [String] The database ID. + # @return [PG::Connection] The connection to the database. def connect_database(id) connection_details = get_connection_uri(id, 'database') PG::Connection.new(dbname: connection_details.database, user: connection_details.username, diff --git a/lib/fortress/version.rb b/lib/fortress/version.rb index 40c6bc4..7de03f9 100644 --- a/lib/fortress/version.rb +++ b/lib/fortress/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Fortress - VERSION = "0.1.0" + VERSION = '0.1.1' end