From 4d0a6d3d852c93cd884533b6ce6f60f687f1968e Mon Sep 17 00:00:00 2001 From: Jason Gessner Date: Fri, 18 Feb 2022 22:13:36 -0600 Subject: [PATCH 1/5] set less specific ruby version --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index d23931e8..96a5d401 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "3.1.0" +ruby "3.1" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.0.1" From 8df8e0a68a066b8f3e11a9fc1fcb1b005db7e95e Mon Sep 17 00:00:00 2001 From: Jason Gessner Date: Fri, 18 Feb 2022 22:30:49 -0600 Subject: [PATCH 2/5] Fix ruby version take 2 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 96a5d401..5fd7530d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "3.1" +ruby "~> 3.1" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.0.1" From 8af78b0b04d170dcfbfd947992d2ca0420c24efc Mon Sep 17 00:00:00 2001 From: Jason Gessner Date: Fri, 18 Feb 2022 22:35:49 -0600 Subject: [PATCH 3/5] Skip secrets file and add a ci database config. --- .github/workflows/ci.yml | 1 - config/database.ci.yml | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 config/database.ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2955edf6..d0bb9f46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,6 @@ jobs: - name: Set up Rails run: | - cp config/secrets.example.yml config/secrets.yml cp config/database.ci.yml config/database.yml - name: Set up database schema diff --git a/config/database.ci.yml b/config/database.ci.yml new file mode 100644 index 00000000..72ab8779 --- /dev/null +++ b/config/database.ci.yml @@ -0,0 +1,6 @@ +test: + adapter: postgresql + encoding: unicode + database: <%= ENV["POSTGRES_DB"]%> + password: <%= ENV.fetch("POSTGRES_PASSWORD") %> + username: <%= ENV['POSTGRES_USER'] %> From 30029a88830ff5c418e4b5c50602bb20d6331c70 Mon Sep 17 00:00:00 2001 From: Jason Gessner Date: Fri, 18 Feb 2022 22:39:09 -0600 Subject: [PATCH 4/5] Add bundler-audit dep --- Gemfile | 5 +++-- Gemfile.lock | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 5fd7530d..f6a058c9 100644 --- a/Gemfile +++ b/Gemfile @@ -42,11 +42,12 @@ gem "activerecord-import" gem 'jsonapi-resources' group :development, :test do + gem "bundler-audit", "~> 0.9.0" # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem "debug", platforms: %i[ mri mingw x64_mingw ] - gem 'rspec-rails' - gem 'faker' gem 'factory_bot_rails' + gem 'faker' + gem 'rspec-rails' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 14931cdf..d1ad4538 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -71,6 +71,9 @@ GEM bootsnap (1.10.3) msgpack (~> 1.2) builder (3.2.4) + bundler-audit (0.9.0.1) + bundler (>= 1.2.0, < 3) + thor (~> 1.0) concurrent-ruby (1.1.9) crass (1.0.6) debug (1.4.0) @@ -195,6 +198,7 @@ PLATFORMS DEPENDENCIES activerecord-import bootsnap + bundler-audit (~> 0.9.0) debug factory_bot_rails faker From 952d110bbf55cadee5ad38f8bccdc160e9432d84 Mon Sep 17 00:00:00 2001 From: Jason Gessner Date: Fri, 18 Feb 2022 22:42:27 -0600 Subject: [PATCH 5/5] Add brakeman dep --- Gemfile | 1 + Gemfile.lock | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Gemfile b/Gemfile index f6a058c9..576c0697 100644 --- a/Gemfile +++ b/Gemfile @@ -42,6 +42,7 @@ gem "activerecord-import" gem 'jsonapi-resources' group :development, :test do + gem "brakeman", "~> 5.2" gem "bundler-audit", "~> 0.9.0" # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem "debug", platforms: %i[ mri mingw x64_mingw ] diff --git a/Gemfile.lock b/Gemfile.lock index d1ad4538..a4afe1d7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -70,6 +70,7 @@ GEM tzinfo (~> 2.0) bootsnap (1.10.3) msgpack (~> 1.2) + brakeman (5.2.1) builder (3.2.4) bundler-audit (0.9.0.1) bundler (>= 1.2.0, < 3) @@ -198,6 +199,7 @@ PLATFORMS DEPENDENCIES activerecord-import bootsnap + brakeman (~> 5.2) bundler-audit (~> 0.9.0) debug factory_bot_rails