mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-07 13:38:18 -08:00
ran rails app:update
This commit is contained in:
parent
770ebc580e
commit
44fd077023
21 changed files with 297 additions and 158 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -23,3 +23,5 @@ config/local_env.yml
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
|
/config/master.key
|
||||||
|
|
|
||||||
2
Gemfile
2
Gemfile
|
|
@ -8,7 +8,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
||||||
gem 'rails', '~> 6.0.4.1'
|
gem 'rails', '~> 6.1.4.1'
|
||||||
|
|
||||||
gem 'pg'
|
gem 'pg'
|
||||||
|
|
||||||
|
|
|
||||||
127
Gemfile.lock
127
Gemfile.lock
|
|
@ -10,63 +10,67 @@ GIT
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
actioncable (6.0.4.1)
|
actioncable (6.1.4.1)
|
||||||
actionpack (= 6.0.4.1)
|
actionpack (= 6.1.4.1)
|
||||||
|
activesupport (= 6.1.4.1)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
websocket-driver (>= 0.6.1)
|
websocket-driver (>= 0.6.1)
|
||||||
actionmailbox (6.0.4.1)
|
actionmailbox (6.1.4.1)
|
||||||
actionpack (= 6.0.4.1)
|
actionpack (= 6.1.4.1)
|
||||||
activejob (= 6.0.4.1)
|
activejob (= 6.1.4.1)
|
||||||
activerecord (= 6.0.4.1)
|
activerecord (= 6.1.4.1)
|
||||||
activestorage (= 6.0.4.1)
|
activestorage (= 6.1.4.1)
|
||||||
activesupport (= 6.0.4.1)
|
activesupport (= 6.1.4.1)
|
||||||
mail (>= 2.7.1)
|
mail (>= 2.7.1)
|
||||||
actionmailer (6.0.4.1)
|
actionmailer (6.1.4.1)
|
||||||
actionpack (= 6.0.4.1)
|
actionpack (= 6.1.4.1)
|
||||||
actionview (= 6.0.4.1)
|
actionview (= 6.1.4.1)
|
||||||
activejob (= 6.0.4.1)
|
activejob (= 6.1.4.1)
|
||||||
|
activesupport (= 6.1.4.1)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (6.0.4.1)
|
actionpack (6.1.4.1)
|
||||||
actionview (= 6.0.4.1)
|
actionview (= 6.1.4.1)
|
||||||
activesupport (= 6.0.4.1)
|
activesupport (= 6.1.4.1)
|
||||||
rack (~> 2.0, >= 2.0.8)
|
rack (~> 2.0, >= 2.0.9)
|
||||||
rack-test (>= 0.6.3)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
||||||
actiontext (6.0.4.1)
|
actiontext (6.1.4.1)
|
||||||
actionpack (= 6.0.4.1)
|
actionpack (= 6.1.4.1)
|
||||||
activerecord (= 6.0.4.1)
|
activerecord (= 6.1.4.1)
|
||||||
activestorage (= 6.0.4.1)
|
activestorage (= 6.1.4.1)
|
||||||
activesupport (= 6.0.4.1)
|
activesupport (= 6.1.4.1)
|
||||||
nokogiri (>= 1.8.5)
|
nokogiri (>= 1.8.5)
|
||||||
actionview (6.0.4.1)
|
actionview (6.1.4.1)
|
||||||
activesupport (= 6.0.4.1)
|
activesupport (= 6.1.4.1)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubi (~> 1.4)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 2.0)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
||||||
activejob (6.0.4.1)
|
activejob (6.1.4.1)
|
||||||
activesupport (= 6.0.4.1)
|
activesupport (= 6.1.4.1)
|
||||||
globalid (>= 0.3.6)
|
globalid (>= 0.3.6)
|
||||||
activemodel (6.0.4.1)
|
activemodel (6.1.4.1)
|
||||||
activesupport (= 6.0.4.1)
|
activesupport (= 6.1.4.1)
|
||||||
activerecord (6.0.4.1)
|
activerecord (6.1.4.1)
|
||||||
activemodel (= 6.0.4.1)
|
activemodel (= 6.1.4.1)
|
||||||
activesupport (= 6.0.4.1)
|
activesupport (= 6.1.4.1)
|
||||||
activerecord-import (1.2.0)
|
activerecord-import (1.2.0)
|
||||||
activerecord (>= 3.2)
|
activerecord (>= 3.2)
|
||||||
activestorage (6.0.4.1)
|
activestorage (6.1.4.1)
|
||||||
actionpack (= 6.0.4.1)
|
actionpack (= 6.1.4.1)
|
||||||
activejob (= 6.0.4.1)
|
activejob (= 6.1.4.1)
|
||||||
activerecord (= 6.0.4.1)
|
activerecord (= 6.1.4.1)
|
||||||
|
activesupport (= 6.1.4.1)
|
||||||
marcel (~> 1.0.0)
|
marcel (~> 1.0.0)
|
||||||
activesupport (6.0.4.1)
|
mini_mime (>= 1.1.0)
|
||||||
|
activesupport (6.1.4.1)
|
||||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (>= 0.7, < 2)
|
i18n (>= 1.6, < 2)
|
||||||
minitest (~> 5.1)
|
minitest (>= 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 2.0)
|
||||||
zeitwerk (~> 2.2, >= 2.2.2)
|
zeitwerk (~> 2.3)
|
||||||
addressable (2.8.0)
|
addressable (2.8.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
autoprefixer-rails (10.3.3.0)
|
autoprefixer-rails (10.3.3.0)
|
||||||
|
|
@ -162,20 +166,20 @@ GEM
|
||||||
rack
|
rack
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rails (6.0.4.1)
|
rails (6.1.4.1)
|
||||||
actioncable (= 6.0.4.1)
|
actioncable (= 6.1.4.1)
|
||||||
actionmailbox (= 6.0.4.1)
|
actionmailbox (= 6.1.4.1)
|
||||||
actionmailer (= 6.0.4.1)
|
actionmailer (= 6.1.4.1)
|
||||||
actionpack (= 6.0.4.1)
|
actionpack (= 6.1.4.1)
|
||||||
actiontext (= 6.0.4.1)
|
actiontext (= 6.1.4.1)
|
||||||
actionview (= 6.0.4.1)
|
actionview (= 6.1.4.1)
|
||||||
activejob (= 6.0.4.1)
|
activejob (= 6.1.4.1)
|
||||||
activemodel (= 6.0.4.1)
|
activemodel (= 6.1.4.1)
|
||||||
activerecord (= 6.0.4.1)
|
activerecord (= 6.1.4.1)
|
||||||
activestorage (= 6.0.4.1)
|
activestorage (= 6.1.4.1)
|
||||||
activesupport (= 6.0.4.1)
|
activesupport (= 6.1.4.1)
|
||||||
bundler (>= 1.3.0)
|
bundler (>= 1.15.0)
|
||||||
railties (= 6.0.4.1)
|
railties (= 6.1.4.1)
|
||||||
sprockets-rails (>= 2.0.0)
|
sprockets-rails (>= 2.0.0)
|
||||||
rails-controller-testing (1.0.5)
|
rails-controller-testing (1.0.5)
|
||||||
actionpack (>= 5.0.1.rc1)
|
actionpack (>= 5.0.1.rc1)
|
||||||
|
|
@ -186,12 +190,12 @@ GEM
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.4.2)
|
rails-html-sanitizer (1.4.2)
|
||||||
loofah (~> 2.3)
|
loofah (~> 2.3)
|
||||||
railties (6.0.4.1)
|
railties (6.1.4.1)
|
||||||
actionpack (= 6.0.4.1)
|
actionpack (= 6.1.4.1)
|
||||||
activesupport (= 6.0.4.1)
|
activesupport (= 6.1.4.1)
|
||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.13)
|
||||||
thor (>= 0.20.3, < 2.0)
|
thor (~> 1.0)
|
||||||
rake (13.0.6)
|
rake (13.0.6)
|
||||||
rb-fsevent (0.11.0)
|
rb-fsevent (0.11.0)
|
||||||
rb-inotify (0.10.1)
|
rb-inotify (0.10.1)
|
||||||
|
|
@ -241,7 +245,6 @@ GEM
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
temple (0.8.2)
|
temple (0.8.2)
|
||||||
thor (1.1.0)
|
thor (1.1.0)
|
||||||
thread_safe (0.3.6)
|
|
||||||
tilt (2.0.10)
|
tilt (2.0.10)
|
||||||
timecop (0.9.4)
|
timecop (0.9.4)
|
||||||
turbolinks (5.2.1)
|
turbolinks (5.2.1)
|
||||||
|
|
@ -251,8 +254,8 @@ GEM
|
||||||
builder (>= 2.1.2)
|
builder (>= 2.1.2)
|
||||||
jwt (~> 1.0)
|
jwt (~> 1.0)
|
||||||
multi_json (>= 1.3.0)
|
multi_json (>= 1.3.0)
|
||||||
tzinfo (1.2.9)
|
tzinfo (2.0.4)
|
||||||
thread_safe (~> 0.1)
|
concurrent-ruby (~> 1.0)
|
||||||
uglifier (4.2.0)
|
uglifier (4.2.0)
|
||||||
execjs (>= 0.3.0, < 3)
|
execjs (>= 0.3.0, < 3)
|
||||||
warden (1.2.9)
|
warden (1.2.9)
|
||||||
|
|
@ -292,7 +295,7 @@ DEPENDENCIES
|
||||||
omniauth
|
omniauth
|
||||||
pg
|
pg
|
||||||
puma (~> 3.0)
|
puma (~> 3.0)
|
||||||
rails (~> 6.0.4.1)
|
rails (~> 6.1.4.1)
|
||||||
rails-controller-testing
|
rails-controller-testing
|
||||||
rspec-rails (~> 4.1.2)
|
rspec-rails (~> 4.1.2)
|
||||||
sassc-rails
|
sassc-rails
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
|
||||||
load File.expand_path('../spring', __FILE__)
|
|
||||||
rescue LoadError => e
|
|
||||||
raise unless e.message.include?('spring')
|
|
||||||
end
|
|
||||||
APP_PATH = File.expand_path('../config/application', __dir__)
|
APP_PATH = File.expand_path('../config/application', __dir__)
|
||||||
require_relative '../config/boot'
|
require_relative '../config/boot'
|
||||||
require 'rails/commands'
|
require 'rails/commands'
|
||||||
|
|
|
||||||
5
bin/rake
5
bin/rake
|
|
@ -1,9 +1,4 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
begin
|
|
||||||
load File.expand_path('../spring', __FILE__)
|
|
||||||
rescue LoadError => e
|
|
||||||
raise unless e.message.include?('spring')
|
|
||||||
end
|
|
||||||
require_relative '../config/boot'
|
require_relative '../config/boot'
|
||||||
require 'rake'
|
require 'rake'
|
||||||
Rake.application.run
|
Rake.application.run
|
||||||
|
|
|
||||||
13
bin/setup
13
bin/setup
|
|
@ -1,17 +1,16 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require 'pathname'
|
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
include FileUtils
|
|
||||||
|
|
||||||
# path to your application root.
|
# path to your application root.
|
||||||
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
APP_ROOT = File.expand_path('..', __dir__)
|
||||||
|
|
||||||
def system!(*args)
|
def system!(*args)
|
||||||
system(*args) || abort("\n== Command #{args} failed ==")
|
system(*args) || abort("\n== Command #{args} failed ==")
|
||||||
end
|
end
|
||||||
|
|
||||||
chdir APP_ROOT do
|
FileUtils.chdir APP_ROOT do
|
||||||
# This script is a starting point to setup your application.
|
# This script is a way to setup or update your development environment automatically.
|
||||||
|
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
|
||||||
# Add necessary setup steps to this file.
|
# Add necessary setup steps to this file.
|
||||||
|
|
||||||
puts '== Installing dependencies =='
|
puts '== Installing dependencies =='
|
||||||
|
|
@ -20,11 +19,11 @@ chdir APP_ROOT do
|
||||||
|
|
||||||
# puts "\n== Copying sample files =="
|
# puts "\n== Copying sample files =="
|
||||||
# unless File.exist?('config/database.yml')
|
# unless File.exist?('config/database.yml')
|
||||||
# cp 'config/database.yml.sample', 'config/database.yml'
|
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
|
||||||
# end
|
# end
|
||||||
|
|
||||||
puts "\n== Preparing database =="
|
puts "\n== Preparing database =="
|
||||||
system! 'bin/rails db:setup'
|
system! 'bin/rails db:prepare'
|
||||||
|
|
||||||
puts "\n== Removing old logs and tempfiles =="
|
puts "\n== Removing old logs and tempfiles =="
|
||||||
system! 'bin/rails log:clear tmp:clear'
|
system! 'bin/rails log:clear tmp:clear'
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,9 @@ development:
|
||||||
adapter: async
|
adapter: async
|
||||||
|
|
||||||
test:
|
test:
|
||||||
adapter: async
|
adapter: test
|
||||||
|
|
||||||
production:
|
production:
|
||||||
adapter: redis
|
adapter: redis
|
||||||
url: redis://localhost:6379/1
|
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
|
||||||
|
channel_prefix: edcontext_production
|
||||||
|
|
|
||||||
1
config/credentials.yml.enc
Normal file
1
config/credentials.yml.enc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
AgpHzFD5DudFZyQ/NWdzOMSV8Q2FTaqzO8ABiXr4r4NdifhK+WhNb6JkhqYFVePbOtR+WEJL2/sApzUuEnmTznmopBl+0a+YJ7DkLr+INytfu5Spkx6sJpWlCMf9BfXt6AT0M6wwR9dCoKQIaQp0+hu4wYlvScYy+u3pzNUHDogAJ4pChtlNgVLUWl8QPCVcstA39CAWrAJYBdZYentD9jOR0gweZvdHHb5AHc9YM4h25WePnQ1Zibvr2XbUSxa5NAzCRNhFCF1et9X/13/lVeceL4wGQbSAGKQM6RyuOcrcc7oRXGtqbTRbzy8k5c82MiHpQUDtGWeTZ2L9+7fGtVU1yZw6e/xjTQbAdYbfiQfpovYcjCBhy9GSlSpaN5d+PENh5SzvbEMecGHuXAnkRuI5vKUj9WSXByw7--h7r89e2WDQfdBG3e--7Zu9FpLUh+JVNCqII9pIzw==
|
||||||
|
|
@ -1,12 +1,4 @@
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
|
|
||||||
config.before_configuration do
|
|
||||||
env_file = File.join(Rails.root, 'config', 'local_env.yml')
|
|
||||||
YAML.load(File.open(env_file)).each do |key, value|
|
|
||||||
ENV[key.to_s] = value
|
|
||||||
end if File.exists?(env_file)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded on
|
# In the development environment your application's code is reloaded on
|
||||||
|
|
@ -21,12 +13,14 @@ Rails.application.configure do
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
|
|
||||||
# Enable/disable caching. By default caching is disabled.
|
# Enable/disable caching. By default caching is disabled.
|
||||||
if Rails.root.join('tmp/caching-dev.txt').exist?
|
# Run rails dev:cache to toggle caching.
|
||||||
|
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
|
config.action_controller.enable_fragment_cache_logging = true
|
||||||
|
|
||||||
config.cache_store = :memory_store
|
config.cache_store = :memory_store
|
||||||
config.public_file_server.headers = {
|
config.public_file_server.headers = {
|
||||||
'Cache-Control' => 'public, max-age=172800'
|
'Cache-Control' => "public, max-age=#{2.days.to_i}"
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
@ -34,6 +28,9 @@ Rails.application.configure do
|
||||||
config.cache_store = :null_store
|
config.cache_store = :null_store
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Store uploaded files on the local file system (see config/storage.yml for options).
|
||||||
|
config.active_storage.service = :local
|
||||||
|
|
||||||
# Don't care if the mailer can't send.
|
# Don't care if the mailer can't send.
|
||||||
config.action_mailer.raise_delivery_errors = false
|
config.action_mailer.raise_delivery_errors = false
|
||||||
|
|
||||||
|
|
@ -45,6 +42,9 @@ Rails.application.configure do
|
||||||
# Raise an error on page load if there are pending migrations.
|
# 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
|
||||||
|
|
||||||
# Debug mode disables concatenation and preprocessing of assets.
|
# Debug mode disables concatenation and preprocessing of assets.
|
||||||
# This option may cause significant delays in view rendering with a large
|
# This option may cause significant delays in view rendering with a large
|
||||||
# number of complex assets.
|
# number of complex assets.
|
||||||
|
|
@ -53,12 +53,10 @@ Rails.application.configure do
|
||||||
# Suppress logger output for asset requests.
|
# Suppress logger output for asset requests.
|
||||||
config.assets.quiet = true
|
config.assets.quiet = true
|
||||||
|
|
||||||
# Raises error for missing translations
|
# Raises error for missing translations.
|
||||||
# config.action_view.raise_on_missing_translations = true
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
# Use an evented file watcher to asynchronously detect changes in source code,
|
# Use an evented file watcher to asynchronously detect changes in source code,
|
||||||
# routes, locales, etc. This feature depends on the listen gem.
|
# routes, locales, etc. This feature depends on the listen gem.
|
||||||
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -14,19 +14,20 @@ Rails.application.configure do
|
||||||
config.consider_all_requests_local = false
|
config.consider_all_requests_local = false
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
|
|
||||||
|
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
||||||
|
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
||||||
|
# config.require_master_key = true
|
||||||
|
|
||||||
# Disable serving static files from the `/public` folder by default since
|
# Disable serving static files from the `/public` folder by default since
|
||||||
# Apache or NGINX already handles this.
|
# Apache or NGINX already handles this.
|
||||||
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
||||||
|
|
||||||
# Compress JavaScripts and CSS.
|
# Compress CSS using a preprocessor.
|
||||||
config.assets.js_compressor = Uglifier.new(harmony: true)
|
|
||||||
# config.assets.css_compressor = :sass
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
config.assets.compile = false
|
config.assets.compile = false
|
||||||
|
|
||||||
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
|
||||||
|
|
||||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||||
# config.action_controller.asset_host = 'http://assets.example.com'
|
# config.action_controller.asset_host = 'http://assets.example.com'
|
||||||
|
|
||||||
|
|
@ -34,7 +35,10 @@ Rails.application.configure do
|
||||||
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
||||||
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
||||||
|
|
||||||
# Mount Action Cable outside main process or domain
|
# Store uploaded files on the local file system (see config/storage.yml for options).
|
||||||
|
config.active_storage.service = :local
|
||||||
|
|
||||||
|
# Mount Action Cable outside main process or domain.
|
||||||
# config.action_cable.mount_path = nil
|
# config.action_cable.mount_path = nil
|
||||||
# config.action_cable.url = 'wss://example.com/cable'
|
# config.action_cable.url = 'wss://example.com/cable'
|
||||||
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
|
||||||
|
|
@ -52,9 +56,10 @@ Rails.application.configure do
|
||||||
# Use a different cache store in production.
|
# Use a different cache store in production.
|
||||||
# config.cache_store = :mem_cache_store
|
# config.cache_store = :mem_cache_store
|
||||||
|
|
||||||
# Use a real queuing backend for Active Job (and separate queues per environment)
|
# Use a real queuing backend for Active Job (and separate queues per environment).
|
||||||
# config.active_job.queue_adapter = :resque
|
# config.active_job.queue_adapter = :resque
|
||||||
# config.active_job.queue_name_prefix = "edcontext_#{Rails.env}"
|
# config.active_job.queue_name_prefix = "edcontext_production"
|
||||||
|
|
||||||
config.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
|
|
||||||
# Ignore bad email addresses and do not raise email delivery errors.
|
# Ignore bad email addresses and do not raise email delivery errors.
|
||||||
|
|
@ -78,12 +83,30 @@ Rails.application.configure do
|
||||||
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
||||||
logger = ActiveSupport::Logger.new(STDOUT)
|
logger = ActiveSupport::Logger.new(STDOUT)
|
||||||
logger.formatter = config.log_formatter
|
logger.formatter = config.log_formatter
|
||||||
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Do not dump schema after migrations.
|
# Do not dump schema after migrations.
|
||||||
config.active_record.dump_schema_after_migration = false
|
config.active_record.dump_schema_after_migration = false
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { host: 'edcontext.org' }
|
# Inserts middleware to perform automatic connection switching.
|
||||||
|
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
||||||
|
# middleware. The `delay` is used to determine how long to wait after a write
|
||||||
|
# to send a subsequent read to the primary.
|
||||||
|
#
|
||||||
|
# The `database_resolver` class is used by the middleware to determine which
|
||||||
|
# database is appropriate to use based on the time delay.
|
||||||
|
#
|
||||||
|
# The `database_resolver_context` class is used by the middleware to set
|
||||||
|
# timestamps for the last write to the primary. The resolver uses the context
|
||||||
|
# class timestamps to determine how long to wait before reading from the
|
||||||
|
# replica.
|
||||||
|
#
|
||||||
|
# By default Rails will store a last write timestamp in the session. The
|
||||||
|
# DatabaseSelector middleware is designed as such you can define your own
|
||||||
|
# strategy for connection switching and pass that into the middleware through
|
||||||
|
# these configuration options.
|
||||||
|
# config.active_record.database_selector = { delay: 2.seconds }
|
||||||
|
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
||||||
|
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,13 @@
|
||||||
|
# The test environment is used exclusively to run your application's
|
||||||
|
# test suite. You never need to work with it otherwise. Remember that
|
||||||
|
# your test database is "scratch space" for the test suite and is wiped
|
||||||
|
# and recreated between test runs. Don't rely on the data there!
|
||||||
|
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb.
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
|
|
||||||
# The test environment is used exclusively to run your application's
|
config.cache_classes = false
|
||||||
# test suite. You never need to work with it otherwise. Remember that
|
config.action_view.cache_template_loading = true
|
||||||
# your test database is "scratch space" for the test suite and is wiped
|
|
||||||
# and recreated between test runs. Don't rely on the data there!
|
|
||||||
config.cache_classes = true
|
|
||||||
|
|
||||||
# Do not eager load code on boot. This avoids loading your whole application
|
# Do not eager load code on boot. This avoids loading your whole application
|
||||||
# just for the purpose of running a single test. If you are using a tool that
|
# just for the purpose of running a single test. If you are using a tool that
|
||||||
|
|
@ -15,18 +17,23 @@ Rails.application.configure do
|
||||||
# Configure public file server for tests with Cache-Control for performance.
|
# Configure public file server for tests with Cache-Control for performance.
|
||||||
config.public_file_server.enabled = true
|
config.public_file_server.enabled = true
|
||||||
config.public_file_server.headers = {
|
config.public_file_server.headers = {
|
||||||
'Cache-Control' => 'public, max-age=3600'
|
'Cache-Control' => "public, max-age=#{1.hour.to_i}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Show full error reports and disable caching.
|
# Show full error reports and disable caching.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
config.cache_store = :null_store
|
||||||
|
|
||||||
# Raise exceptions instead of rendering exception templates.
|
# Raise exceptions instead of rendering exception templates.
|
||||||
config.action_dispatch.show_exceptions = false
|
config.action_dispatch.show_exceptions = false
|
||||||
|
|
||||||
# Disable request forgery protection in test environment.
|
# Disable request forgery protection in test environment.
|
||||||
config.action_controller.allow_forgery_protection = false
|
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.action_mailer.perform_caching = false
|
config.action_mailer.perform_caching = false
|
||||||
|
|
||||||
# Tell Action Mailer not to deliver emails to the real world.
|
# Tell Action Mailer not to deliver emails to the real world.
|
||||||
|
|
@ -37,12 +44,6 @@ Rails.application.configure do
|
||||||
# Print deprecation notices to the stderr.
|
# Print deprecation notices to the stderr.
|
||||||
config.active_support.deprecation = :stderr
|
config.active_support.deprecation = :stderr
|
||||||
|
|
||||||
# Raises error for missing translations
|
# Raises error for missing translations.
|
||||||
# config.action_view.raise_on_missing_translations = true
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
ENV['TWILIO_NUMBER'] = 'TWILIO_NUMBER'
|
|
||||||
ENV['TWILIO_ACCOUNT_SID'] = 'TWILIO_ACCOUNT_SID'
|
|
||||||
ENV['TWILIO_AUTH_TOKEN'] = 'TWILIO_AUTH_TOKEN'
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# ApplicationController.renderer.defaults.merge!(
|
# ActiveSupport::Reloader.to_prepare do
|
||||||
# http_host: 'example.org',
|
# ApplicationController.renderer.defaults.merge!(
|
||||||
# https: false
|
# http_host: 'example.org',
|
||||||
# )
|
# https: false
|
||||||
|
# )
|
||||||
|
# end
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,10 @@
|
||||||
# Version of your assets, change this if you want to expire all your assets.
|
# Version of your assets, change this if you want to expire all your assets.
|
||||||
Rails.application.config.assets.version = '1.0'
|
Rails.application.config.assets.version = '1.0'
|
||||||
|
|
||||||
# Add additional assets to the asset load path
|
# Add additional assets to the asset load path.
|
||||||
# Rails.application.config.assets.paths << Emoji.images_path
|
# Rails.application.config.assets.paths << Emoji.images_path
|
||||||
|
|
||||||
# Precompile additional assets.
|
# Precompile additional assets.
|
||||||
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
# application.js, application.css, and all non-JS/CSS in the app/assets
|
||||||
# Rails.application.config.assets.precompile += %w( search.js )
|
# folder are already added.
|
||||||
|
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
|
||||||
|
|
|
||||||
28
config/initializers/content_security_policy.rb
Normal file
28
config/initializers/content_security_policy.rb
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# Define an application-wide content security policy
|
||||||
|
# For further information see the following documentation
|
||||||
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
|
||||||
|
|
||||||
|
# Rails.application.config.content_security_policy do |policy|
|
||||||
|
# policy.default_src :self, :https
|
||||||
|
# policy.font_src :self, :https, :data
|
||||||
|
# policy.img_src :self, :https, :data
|
||||||
|
# policy.object_src :none
|
||||||
|
# policy.script_src :self, :https
|
||||||
|
# policy.style_src :self, :https
|
||||||
|
|
||||||
|
# # Specify URI for violation reports
|
||||||
|
# # policy.report_uri "/csp-violation-report-endpoint"
|
||||||
|
# end
|
||||||
|
|
||||||
|
# If you are using UJS then enable automatic nonce generation
|
||||||
|
# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
|
||||||
|
|
||||||
|
# Set the nonce only to specific directives
|
||||||
|
# Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
|
||||||
|
|
||||||
|
# Report CSP violations to a specified URI
|
||||||
|
# For further information see the following documentation:
|
||||||
|
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
|
||||||
|
# Rails.application.config.content_security_policy_report_only = true
|
||||||
45
config/initializers/new_framework_defaults_6_0.rb
Normal file
45
config/initializers/new_framework_defaults_6_0.rb
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
#
|
||||||
|
# This file contains migration options to ease your Rails 6.0 upgrade.
|
||||||
|
#
|
||||||
|
# Once upgraded flip defaults one by one to migrate to the new default.
|
||||||
|
#
|
||||||
|
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
|
||||||
|
|
||||||
|
# Don't force requests from old versions of IE to be UTF-8 encoded.
|
||||||
|
# Rails.application.config.action_view.default_enforce_utf8 = false
|
||||||
|
|
||||||
|
# Embed purpose and expiry metadata inside signed and encrypted
|
||||||
|
# cookies for increased security.
|
||||||
|
#
|
||||||
|
# This option is not backwards compatible with earlier Rails versions.
|
||||||
|
# It's best enabled when your entire app is migrated and stable on 6.0.
|
||||||
|
# Rails.application.config.action_dispatch.use_cookies_with_metadata = true
|
||||||
|
|
||||||
|
# Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification.
|
||||||
|
# Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false
|
||||||
|
|
||||||
|
# Return false instead of self when enqueuing is aborted from a callback.
|
||||||
|
# Rails.application.config.active_job.return_false_on_aborted_enqueue = true
|
||||||
|
|
||||||
|
# Send Active Storage analysis and purge jobs to dedicated queues.
|
||||||
|
# Rails.application.config.active_storage.queues.analysis = :active_storage_analysis
|
||||||
|
# Rails.application.config.active_storage.queues.purge = :active_storage_purge
|
||||||
|
|
||||||
|
# When assigning to a collection of attachments declared via `has_many_attached`, replace existing
|
||||||
|
# attachments instead of appending. Use #attach to add new attachments without replacing existing ones.
|
||||||
|
# Rails.application.config.active_storage.replace_on_assign_to_many = true
|
||||||
|
|
||||||
|
# Use ActionMailer::MailDeliveryJob for sending parameterized and normal mail.
|
||||||
|
#
|
||||||
|
# The default delivery jobs (ActionMailer::Parameterized::DeliveryJob, ActionMailer::DeliveryJob),
|
||||||
|
# will be removed in Rails 6.1. This setting is not backwards compatible with earlier Rails versions.
|
||||||
|
# If you send mail in the background, job workers need to have a copy of
|
||||||
|
# MailDeliveryJob to ensure all delivery jobs are processed properly.
|
||||||
|
# Make sure your entire app is migrated and stable on 6.0 before using this setting.
|
||||||
|
# Rails.application.config.action_mailer.delivery_job = "ActionMailer::MailDeliveryJob"
|
||||||
|
|
||||||
|
# Enable the same cache key to be reused when the object being cached of type
|
||||||
|
# `ActiveRecord::Relation` changes by moving the volatile information (max updated at and count)
|
||||||
|
# of the relation's cache key into the cache version to support recycling cache key.
|
||||||
|
# Rails.application.config.active_record.collection_cache_versioning = true
|
||||||
|
|
@ -16,8 +16,18 @@
|
||||||
#
|
#
|
||||||
# This would use the information in config/locales/es.yml.
|
# This would use the information in config/locales/es.yml.
|
||||||
#
|
#
|
||||||
|
# The following keys must be escaped otherwise they will not be retrieved by
|
||||||
|
# the default I18n backend:
|
||||||
|
#
|
||||||
|
# true, false, on, off, yes, no
|
||||||
|
#
|
||||||
|
# Instead, surround them with single quotes.
|
||||||
|
#
|
||||||
|
# en:
|
||||||
|
# 'true': 'foo'
|
||||||
|
#
|
||||||
# To learn more, please read the Rails Internationalization guide
|
# To learn more, please read the Rails Internationalization guide
|
||||||
# available at http://guides.rubyonrails.org/i18n.html.
|
# available at https://guides.rubyonrails.org/i18n.html.
|
||||||
|
|
||||||
en:
|
en:
|
||||||
hello: "Hello world"
|
hello: "Hello world"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
# Puma can serve each request in a thread from an internal thread pool.
|
# Puma can serve each request in a thread from an internal thread pool.
|
||||||
# The `threads` method setting takes two numbers a minimum and maximum.
|
# The `threads` method setting takes two numbers: a minimum and maximum.
|
||||||
# Any libraries that use thread pools should be configured to match
|
# Any libraries that use thread pools should be configured to match
|
||||||
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
||||||
# and maximum, this matches the default thread size of Active Record.
|
# and maximum; this matches the default thread size of Active Record.
|
||||||
#
|
#
|
||||||
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
|
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
||||||
threads threads_count, threads_count
|
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
||||||
|
threads min_threads_count, max_threads_count
|
||||||
|
|
||||||
# Specifies the `port` that Puma will listen on to receive requests, default is 3000.
|
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
||||||
#
|
#
|
||||||
port ENV.fetch("PORT") { 3000 }
|
port ENV.fetch("PORT") { 3000 }
|
||||||
|
|
||||||
|
|
@ -15,8 +16,11 @@ port ENV.fetch("PORT") { 3000 }
|
||||||
#
|
#
|
||||||
environment ENV.fetch("RAILS_ENV") { "development" }
|
environment ENV.fetch("RAILS_ENV") { "development" }
|
||||||
|
|
||||||
|
# Specifies the `pidfile` that Puma will use.
|
||||||
|
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
|
||||||
|
|
||||||
# Specifies the number of `workers` to boot in clustered mode.
|
# Specifies the number of `workers` to boot in clustered mode.
|
||||||
# Workers are forked webserver processes. If using threads and workers together
|
# Workers are forked web server processes. If using threads and workers together
|
||||||
# the concurrency of the application would be max `threads` * `workers`.
|
# the concurrency of the application would be max `threads` * `workers`.
|
||||||
# Workers do not work on JRuby or Windows (both of which do not support
|
# Workers do not work on JRuby or Windows (both of which do not support
|
||||||
# processes).
|
# processes).
|
||||||
|
|
@ -26,22 +30,9 @@ environment ENV.fetch("RAILS_ENV") { "development" }
|
||||||
# Use the `preload_app!` method when specifying a `workers` number.
|
# Use the `preload_app!` method when specifying a `workers` number.
|
||||||
# This directive tells Puma to first boot the application and load code
|
# This directive tells Puma to first boot the application and load code
|
||||||
# before forking the application. This takes advantage of Copy On Write
|
# before forking the application. This takes advantage of Copy On Write
|
||||||
# process behavior so workers use less memory. If you use this option
|
# process behavior so workers use less memory.
|
||||||
# you need to make sure to reconnect any threads in the `on_worker_boot`
|
|
||||||
# block.
|
|
||||||
#
|
#
|
||||||
# preload_app!
|
# preload_app!
|
||||||
|
|
||||||
# The code in the `on_worker_boot` will be called if you are using
|
|
||||||
# clustered mode by specifying a number of `workers`. After each worker
|
|
||||||
# process is booted this block will be run, if you are using `preload_app!`
|
|
||||||
# option you will want to use this block to reconnect to any threads
|
|
||||||
# or connections that may have been created at application boot, Ruby
|
|
||||||
# cannot share connections between processes.
|
|
||||||
#
|
|
||||||
# on_worker_boot do
|
|
||||||
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
|
||||||
# end
|
|
||||||
|
|
||||||
# Allow puma to be restarted by `rails restart` command.
|
# Allow puma to be restarted by `rails restart` command.
|
||||||
plugin :tmp_restart
|
plugin :tmp_restart
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
%w(
|
Spring.watch(
|
||||||
.ruby-version
|
".ruby-version",
|
||||||
.rbenv-vars
|
".rbenv-vars",
|
||||||
tmp/restart.txt
|
"tmp/restart.txt",
|
||||||
tmp/caching-dev.txt
|
"tmp/caching-dev.txt"
|
||||||
).each { |path| Spring.watch(path) }
|
)
|
||||||
|
|
|
||||||
34
config/storage.yml
Normal file
34
config/storage.yml
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
test:
|
||||||
|
service: Disk
|
||||||
|
root: <%= Rails.root.join("tmp/storage") %>
|
||||||
|
|
||||||
|
local:
|
||||||
|
service: Disk
|
||||||
|
root: <%= Rails.root.join("storage") %>
|
||||||
|
|
||||||
|
# Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
|
||||||
|
# amazon:
|
||||||
|
# service: S3
|
||||||
|
# access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
|
||||||
|
# secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
|
||||||
|
# region: us-east-1
|
||||||
|
# bucket: your_own_bucket
|
||||||
|
|
||||||
|
# Remember not to checkin your GCS keyfile to a repository
|
||||||
|
# google:
|
||||||
|
# service: GCS
|
||||||
|
# project: your_project
|
||||||
|
# credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
|
||||||
|
# bucket: your_own_bucket
|
||||||
|
|
||||||
|
# Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
|
||||||
|
# microsoft:
|
||||||
|
# service: AzureStorage
|
||||||
|
# storage_account_name: your_account_name
|
||||||
|
# storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
|
||||||
|
# container: your_container_name
|
||||||
|
|
||||||
|
# mirror:
|
||||||
|
# service: Mirror
|
||||||
|
# primary: local
|
||||||
|
# mirrors: [ amazon, google, microsoft ]
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
# This migration comes from active_storage (originally 20180723000244)
|
||||||
|
class AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord::Migration[6.0]
|
||||||
|
def up
|
||||||
|
return if foreign_key_exists?(:active_storage_attachments, column: :blob_id)
|
||||||
|
|
||||||
|
if table_exists?(:active_storage_blobs)
|
||||||
|
add_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
12
db/schema.rb
12
db/schema.rb
|
|
@ -2,15 +2,15 @@
|
||||||
# of editing this file, please use the migrations feature of Active Record to
|
# of editing this file, please use the migrations feature of Active Record to
|
||||||
# incrementally modify your database, and then regenerate this schema definition.
|
# incrementally modify your database, and then regenerate this schema definition.
|
||||||
#
|
#
|
||||||
# Note that this schema.rb definition is the authoritative source for your
|
# This file is the source Rails uses to define your schema when running `rails
|
||||||
# database schema. If you need to create the application database on another
|
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
|
||||||
# system, you should be using db:schema:load, not running all the migrations
|
# be faster and is potentially less error prone than running all of your
|
||||||
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
# migrations from scratch. Old migrations may fail to apply correctly if those
|
||||||
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
# migrations use external dependencies or application code.
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20211007204840) do
|
ActiveRecord::Schema.define(version: 2021_10_14_202830) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue