From d0f8f7b5f2117604244a46195a393e05c3fe6d98 Mon Sep 17 00:00:00 2001 From: "Ben Sheldon [he/him]" Date: Tue, 20 Jul 2021 10:20:22 -0500 Subject: [PATCH] Rename development and test databases to be good_job (#300) --- .github/workflows/test.yml | 8 ++++---- spec/support/example_app_helper.rb | 1 + spec/test_app/config/database.yml | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c5f2a4c45..186063b77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,20 +41,20 @@ jobs: pg: 10.8 env: PGHOST: localhost - PGUSER: test_app + PGUSER: good_job RAILS_ENV: test BUNDLE_JOBS: 4 BUNDLE_RETRY: 3 BUNDLE_PATH: vendor/bundle - BUNDLE_WITHOUT: "lint" + BUNDLE_WITHOUT: lint DISABLE_SPRING: 1 RAILS_LOG_TO_STDOUT: false services: postgres: image: postgres:${{ matrix.pg }} env: - POSTGRES_USER: test_app - POSTGRES_DB: test_app_test + POSTGRES_USER: good_job + POSTGRES_DB: good_job_test POSTGRES_PASSWORD: "" POSTGRES_HOST_AUTH_METHOD: trust ports: ["5432:5432"] diff --git a/spec/support/example_app_helper.rb b/spec/support/example_app_helper.rb index 86c0d509a..aa670f8d9 100644 --- a/spec/support/example_app_helper.rb +++ b/spec/support/example_app_helper.rb @@ -8,6 +8,7 @@ def setup_example_app FileUtils.cd(root_path) do system("rails new #{app_name} -d postgresql --no-assets --skip-action-text --skip-action-mailer --skip-action-mailbox --skip-action-cable --skip-git --skip-sprockets --skip-listen --skip-javascript --skip-turbolinks --skip-system-test --skip-test-unit --skip-bootsnap --skip-spring --skip-active-storage") end + FileUtils.cp(::Rails.root.join('config', 'database.yml'), "#{example_app_path}/config/database.yml") File.open("#{example_app_path}/Gemfile", 'a') do |f| f.puts "gem 'good_job'" diff --git a/spec/test_app/config/database.yml b/spec/test_app/config/database.yml index 982679423..f52918b13 100644 --- a/spec/test_app/config/database.yml +++ b/spec/test_app/config/database.yml @@ -24,13 +24,13 @@ default: &default development: <<: *default - database: <%= ENV["CI"] ? "test_app_test" : "test_app_development" %> + database: <%= ENV["CI"] ? "good_job_test" : "good_job_development" %> # The specified database role being used to connect to postgres. # To create additional roles in postgres see `$ createuser --help`. # When left blank, postgres will use the default role. This is # the same name as the operating system user that initialized the database. - #username: test_app + #username: good_job # The password associated with the postgres role (username). #password: @@ -58,7 +58,7 @@ development: # Do not set this db to the same as development or production. test: <<: *default - database: test_app_test + database: good_job_test # As with config/credentials.yml, you never want to store sensitive information, # like your database password, in your source code. If your source code is @@ -81,4 +81,4 @@ test: # production: <<: *default - database: <%= ENV["CI"] ? "test_app_test" : "test_app_development" %> + database: <%= ENV["CI"] ? "good_job_test" : "good_job_development" %>