diff --git a/Gemfile b/Gemfile index 87edb5cbb..561e06cce 100644 --- a/Gemfile +++ b/Gemfile @@ -145,8 +145,6 @@ group :development, :test do gem "rubocop-rails", "~> 2.13", require: false # Automatic Rails code style checking tool gem "rubocop-rspec", "~> 2.9", require: false # Code style checking for RSpec files gem "sassc-rails", "~> 2.1.2" # Integrate SassC-Ruby into Rails - gem "spring", "~> 4.0" # Preloads your application so things like console, rake and tests run faster - gem "spring-commands-rspec", "~> 1.0" # rspec command for spring end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index fd1003556..3b3454b41 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -793,9 +793,6 @@ GEM thor (~> 1.0) tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) - spring (4.0.0) - spring-commands-rspec (1.0.4) - spring (>= 0.9.1) sprockets (4.0.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -1021,8 +1018,6 @@ DEPENDENCIES simplecov (~> 0.21.2) slack-notifier (~> 2.4) solargraph (~> 0.44) - spring (~> 4.0) - spring-commands-rspec (~> 1.0) sprockets (~> 4.0) staccato (~> 0.5) stackprof (~> 0.2) diff --git a/Guardfile b/Guardfile index e8d5ccaf3..01303d05c 100644 --- a/Guardfile +++ b/Guardfile @@ -19,23 +19,13 @@ # rspec may be run, below are examples of the most common uses. # * bundler: 'bundle exec rspec' # * bundler binstubs: 'bin/rspec' -# * spring: 'bin/rspec' (This will use spring if running and you have -# installed the spring binstubs per the docs) -# * zeus: 'zeus rspec' (requires the server to be started separately) # * 'just' rspec: 'rspec' ignore([%r{^bin/*}, %r{^config/*}, %r{^db/*}, %r{^lib/*}, %r{^log/*}, %r{^public/*}, %r{^tmp/*}, %r{^node_modules/*}]) rspec_options = { results_file: File.expand_path("tmp/guard_rspec_results.txt"), - ############################# - # BECAUSE spring doesn't seem to work well with simplecov, choose - # between the following two. - # slow but good coverage - # cmd: "bin/rspec -p", - # fast but no coverage - cmd: "bin/spring rspec -p", - ############################# + cmd: "bin/rspec -p", failed_mode: :focus, bundler_env: :clean_env } diff --git a/bin/e2e b/bin/e2e index 5346fc181..add9c1f1b 100755 --- a/bin/e2e +++ b/bin/e2e @@ -21,8 +21,7 @@ read -t 10 -p "Choose yes to setup a test database or if you're running the scri if [[ $REPLY =~ ^[Yy]$ ]]; then printf "\n\nSetting up the E2E database before running E2E tests...\n\n" - # Spring is disabled only for E2E tests run locally. Otherwise, there are all kinds of errors. - DISABLE_SPRING=1 RAILS_ENV=test E2E=true bin/e2e-setup + RAILS_ENV=test E2E=true bin/e2e-setup else printf "\n\nSkipping database setup...\n\n" fi diff --git a/bin/rails b/bin/rails index 21d3e02d8..6fb4e4051 100755 --- a/bin/rails +++ b/bin/rails @@ -1,5 +1,4 @@ #!/usr/bin/env ruby -load File.expand_path("spring", __dir__) APP_PATH = File.expand_path('../config/application', __dir__) require_relative "../config/boot" require "rails/commands" diff --git a/bin/rake b/bin/rake index 7327f471e..4fbf10b96 100755 --- a/bin/rake +++ b/bin/rake @@ -1,5 +1,4 @@ #!/usr/bin/env ruby -load File.expand_path("spring", __dir__) require_relative "../config/boot" require "rake" Rake.application.run diff --git a/bin/spring b/bin/spring deleted file mode 100755 index b4147e843..000000000 --- a/bin/spring +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env ruby -if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"]) - gem "bundler" - require "bundler" - - # Load Spring without loading other gems in the Gemfile, for speed. - Bundler.locked_gems&.specs&.find { |spec| spec.name == "spring" }&.tap do |spring| - Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path - gem "spring", spring.version - require "spring/binstub" - rescue Gem::LoadError - # Ignore when Spring is not installed. - end -end diff --git a/config/boot.rb b/config/boot.rb index d22fd2f3b..988a5ddc4 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,14 +1,4 @@ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) -# NOTE: We need to ignore this warning early during app startup. -# 1. `parser` is a transitive dependency (`erb_lint` -> `better_html` -> `parser`) -# 2. The warnings are generated while reading the class body, so we need to ignore -# them *before* the gem's code is read. -# 3. The warning is intentional, it will always occur when the used point release -# isn't the most recent. Since our update schedule is somewhat influenced by -# Fedora release cycles right now, this can occur frequently. -require "warning" -Warning.ignore(%r{parser/current}) - require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/config/environments/test.rb b/config/environments/test.rb index 2d99316ed..da4ac9685 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -11,9 +11,8 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # cache_classes should be false when Spring is enabled, and true when it's disabled # https://guides.rubyonrails.org/configuring.html#config-cache-classes - config.cache_classes = ActiveModel::Type::Boolean.new.cast(ENV["DISABLE_SPRING"]) + config.cache_classes = true # See https://github.com/rails/rails/issues/40613#issuecomment-727283155 config.action_view.cache_template_loading = true diff --git a/config/spring.rb b/config/spring.rb deleted file mode 100644 index 643868a10..000000000 --- a/config/spring.rb +++ /dev/null @@ -1,6 +0,0 @@ -Spring.watch( - ".ruby-version", - ".rbenv-vars", - "tmp/restart.txt", - "tmp/caching-dev.txt", -) diff --git a/vendor/cache/spring-4.0.0.gem b/vendor/cache/spring-4.0.0.gem deleted file mode 100644 index aa98242ec..000000000 Binary files a/vendor/cache/spring-4.0.0.gem and /dev/null differ diff --git a/vendor/cache/spring-commands-rspec-1.0.4.gem b/vendor/cache/spring-commands-rspec-1.0.4.gem deleted file mode 100644 index 46e2fc300..000000000 Binary files a/vendor/cache/spring-commands-rspec-1.0.4.gem and /dev/null differ