From f3b9cf4a6b8081f1635af41e1b290b0468bcdee7 Mon Sep 17 00:00:00 2001 From: Noelle Hemphill Date: Mon, 9 Oct 2023 17:50:22 -0600 Subject: [PATCH] setup: set up the gems needed for testing and development --- .gitignore | 2 ++ Gemfile | 2 ++ Gemfile.lock | 16 ++++++++++++++++ bin/rails | 5 +++++ spec/rails_helper.rb | 2 ++ 5 files changed, 27 insertions(+) create mode 100644 spec/rails_helper.rb diff --git a/.gitignore b/.gitignore index e16dc71d2..4017e6cd4 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,5 @@ # Ignore master key for decrypting credentials and more. /config/master.key + +echo coverage >> .gitignore diff --git a/Gemfile b/Gemfile index 0c7f77cab..397aa24de 100644 --- a/Gemfile +++ b/Gemfile @@ -53,6 +53,8 @@ gem 'bootsnap', require: false group :development, :test do # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem gem 'pry' + gem 'faraday' + gem 'webmock' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index c69c4a53a..2ba731590 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -69,6 +69,7 @@ GEM addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) + base64 (0.1.1) bindex (0.8.1) bootsnap (1.16.0) msgpack (~> 1.2) @@ -84,13 +85,21 @@ GEM xpath (~> 3.2) coderay (1.1.3) concurrent-ruby (1.2.2) + crack (0.4.5) + rexml crass (1.0.6) date (3.3.3) diff-lcs (1.5.0) docile (1.4.0) erubi (1.12.0) + faraday (2.7.11) + base64 + faraday-net_http (>= 2.0, < 3.1) + ruby2_keywords (>= 0.0.4) + faraday-net_http (3.0.2) globalid (1.1.0) activesupport (>= 5.0) + hashdiff (1.0.1) i18n (1.14.1) concurrent-ruby (~> 1.0) importmap-rails (1.2.1) @@ -213,6 +222,7 @@ GEM rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) ruby-progressbar (1.13.0) + ruby2_keywords (0.0.5) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) @@ -242,6 +252,10 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) + webmock (3.19.1) + addressable (>= 2.8.0) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -257,6 +271,7 @@ PLATFORMS DEPENDENCIES bootsnap capybara + faraday importmap-rails jbuilder launchy @@ -272,6 +287,7 @@ DEPENDENCIES turbo-rails tzinfo-data web-console + webmock RUBY VERSION ruby 3.2.2p53 diff --git a/bin/rails b/bin/rails index a31728ab9..5eebef39a 100755 --- a/bin/rails +++ b/bin/rails @@ -3,4 +3,9 @@ APP_PATH = File.expand_path('../config/application', __dir__) require_relative '../config/boot' +if ENV['RAILS_ENV'] == 'test' + require 'simplecov' + SimpleCov.start 'rails' + puts "required simplecov" +end require 'rails/commands' diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb new file mode 100644 index 000000000..76e1b4e76 --- /dev/null +++ b/spec/rails_helper.rb @@ -0,0 +1,2 @@ +require 'simplecov' +SimpleCov.start \ No newline at end of file