-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from rails-on-services/development
Prepare Release - 2.8.0 - Resolves #98 - Trying to generate an automatic changelog - #99 - Resolves #86 - Fixes seeding errors - #87 - Resolves #66 - Uses a transaction to create a tenant - #69 - Resolves #121 - Relaxes dependencies to allow rails 6.1 - #122 - Resolves #123 - When tests run in a transaction, new tenants in tests fail to create - #124 - Reverted unsafe initializer - #118
- Loading branch information
Showing
13 changed files
with
111 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,23 +33,31 @@ jobs: | |
git config --local user.name "$ACTION_USERNAME" | ||
git add CHANGELOG.md && git commit -m 'Updated CHANGELOG.md' && echo ::set-env name=push::1 || echo "No changes to CHANGELOG.md" | ||
- name: Push changelog to master | ||
if: env.push == 1 | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.CHANGELOG_GITHUB_TOKEN }} | ||
branch: master | ||
|
||
- name: Cherry-pick changelog to development | ||
- name: Push changes | ||
if: env.push == 1 | ||
env: | ||
ACTION_EMAIL: [email protected] | ||
ACTION_USERNAME: GitHub Action | ||
# CI_USER: ${{ secrets.YOUR_GITHUB_USER }} | ||
CI_TOKEN: ${{ secrets.CHANGELOG_GITHUB_TOKEN }} | ||
run: | | ||
git config --local user.email "$ACTION_EMAIL" | ||
git config --local user.name "$ACTION_USERNAME" | ||
commit_hash=`git show HEAD | egrep commit\ .+$ | cut -d' ' -f2` | ||
git checkout development | ||
git pull | ||
git cherry-pick $commit_hash | ||
git push | ||
git push "https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git" HEAD:master | ||
# - name: Push changelog to master | ||
# if: env.push == 1 | ||
# uses: ad-m/github-push-action@master | ||
# with: | ||
# github_token: ${{ secrets.CHANGELOG_GITHUB_TOKEN }} | ||
# branch: master | ||
|
||
# - name: Cherry-pick changelog to development | ||
# if: env.push == 1 | ||
# env: | ||
# ACTION_EMAIL: [email protected] | ||
# ACTION_USERNAME: GitHub Action | ||
# run: | | ||
# git config --local user.email "$ACTION_EMAIL" | ||
# git config --local user.name "$ACTION_USERNAME" | ||
# commit_hash=`git show HEAD | egrep commit\ .+$ | cut -d' ' -f2` | ||
# git checkout development | ||
# git pull | ||
# git cherry-pick $commit_hash | ||
# git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# frozen_string_literal: true | ||
|
||
module Apartment | ||
class LogSubscriber < ActiveRecord::LogSubscriber | ||
def sql(event) | ||
super(event) | ||
end | ||
|
||
private | ||
|
||
def debug(progname = nil, &block) | ||
progname = " #{apartment_log}#{progname}" unless progname.nil? | ||
|
||
super(progname, &block) | ||
end | ||
|
||
def apartment_log | ||
database = color("[#{Apartment.connection.current_database}] ", ActiveSupport::LogSubscriber::MAGENTA, true) | ||
schema = nil | ||
unless Apartment.connection.schema_search_path.nil? | ||
schema = color("[#{Apartment.connection.schema_search_path.tr('"', '')}] ", | ||
ActiveSupport::LogSubscriber::YELLOW, true) | ||
end | ||
"#{database}#{schema}" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module Apartment | ||
VERSION = '2.7.2' | ||
VERSION = '2.8.0' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters