Skip to content

Commit

Permalink
We're not using the database so remove ActiveRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Nov 6, 2023
1 parent e864c05 commit 72f487d
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
- name: Install dependencies
run: bin/setup
- name: Run tests
run: bundle exec rake
run: bin/rake test:prepare spec
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ gem "puma", "~> 5.0" # web server for development
gem "rails", "~> 7.0.0"
gem 'recaptcha' # prevent robots spamming the feedback form
gem "sprockets-rails" # The original asset pipeline for Rails
gem "sqlite3", "~> 1.4"
gem "stimulus-rails" # Hotwire's modest JavaScript framework
gem 'tophat'
gem "turbo-rails" # Hotwire's SPA-like page accelerator
Expand Down
4 changes: 0 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,6 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.6.8)
mini_portile2 (~> 2.8.0)
sqlite3 (1.6.8-x86_64-darwin)
sshkit (1.21.5)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
Expand Down Expand Up @@ -440,7 +437,6 @@ DEPENDENCIES
selenium-webdriver (!= 3.13.0)
simplecov
sprockets-rails
sqlite3 (~> 1.4)
stimulus-rails
tophat
turbo-rails
Expand Down
4 changes: 2 additions & 2 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ FileUtils.chdir APP_ROOT do
# FileUtils.cp "config/database.yml.sample", "config/database.yml"
# end

puts "\n== Preparing database =="
system! "bin/rails db:prepare"
# puts "\n== Preparing database =="
# system! "bin/rails db:prepare"

puts "\n== Removing old logs and tempfiles =="
system! "bin/rails log:clear tmp:clear"
Expand Down
8 changes: 7 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
require_relative "boot"

require "rails/all"
require "rails"
# Jut the frameworks we're using:
require "active_model/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "rails/test_unit/railtie"

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Expand Down
22 changes: 0 additions & 22 deletions config/database.yml

This file was deleted.

6 changes: 3 additions & 3 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
end

# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
# config.active_storage.service = :local

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
Expand All @@ -51,10 +51,10 @@
config.active_support.disallowed_deprecation_warnings = []

# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
# config.active_record.migration_error = :page_load

# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true
# config.active_record.verbose_query_logs = true

# Suppress logger output for asset requests.
config.assets.quiet = true
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX

# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local
# config.active_storage.service = :local

# Mount Action Cable outside main process or domain.
# config.action_cable.mount_path = nil
Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
config.action_controller.allow_forgery_protection = false

# Store uploaded files on the local file system in a temporary directory.
config.active_storage.service = :test
# config.active_storage.service = :test

config.action_mailer.perform_caching = false

Expand Down
2 changes: 1 addition & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

# Checks for pending migrations before tests are run.
# If you are not using ActiveRecord, you can remove this line.
ActiveRecord::Migration.maintain_test_schema!
# ActiveRecord::Migration.maintain_test_schema!

RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
Expand Down

0 comments on commit 72f487d

Please sign in to comment.