Skip to content

Commit

Permalink
fix: connect_database doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
John2360 committed Aug 22, 2024
1 parent 2f6fba3 commit abe7427
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:

jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions fortress.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ['[email protected]']
Expand All @@ -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'
Expand Down
3 changes: 3 additions & 0 deletions lib/fortress.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/fortress/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Fortress
VERSION = "0.1.0"
VERSION = '0.1.1'
end

0 comments on commit abe7427

Please sign in to comment.