Browse Source

update to rails 3.0.2

master
Ben Harris 5 months ago
parent
commit
229d79fce9
  1. 2
      .ruby-version
  2. 18
      Gemfile
  3. 157
      Gemfile.lock
  4. 16
      babel.config.js
  5. 5
      bin/rails
  6. 5
      bin/rake
  7. 8
      bin/setup
  8. 14
      bin/spring
  9. 12
      bin/yarn
  10. 3
      config.ru
  11. 15
      config/application.rb
  12. 4
      config/boot.rb
  13. 2
      config/credentials.yml.enc
  14. 2
      config/environment.rb
  15. 20
      config/environments/development.rb
  16. 13
      config/environments/test.rb
  17. 7
      config/initializers/backtrace_silencers.rb
  18. 4
      config/initializers/filter_parameter_logging.rb
  19. 67
      config/initializers/new_framework_defaults_6_1.rb
  20. 11
      config/initializers/permissions_policy.rb
  21. 7
      config/puma.rb
  22. 6
      config/webpacker.yml
  23. 8
      db/schema.rb
  24. 20
      db/seeds.rb
  25. 6
      package.json
  26. 1226
      yarn.lock

2
.ruby-version

@ -1 +1 @@
ruby-2.7.4
3.0.2

18
Gemfile

@ -1,22 +1,22 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.7.4'
ruby '~> 3.0.2'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.3', '>= 6.0.3.7'
gem 'rails', '~> 6.1.4', '>= 6.0.3.7'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 4.1'
gem 'puma', '~> 5.4'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
gem 'webpacker', '~> 5.4'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
gem 'jbuilder', '~> 2.11'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
@ -26,7 +26,7 @@ gem 'jbuilder', '~> 2.7'
# gem 'image_processing', '~> 1.2'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false
gem 'bootsnap', '>= 1.7', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
@ -35,8 +35,8 @@ end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.2'
gem 'web-console', '>= 4.1.0'
gem 'listen', '~> 3.7'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
@ -44,7 +44,7 @@ end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'capybara', '>= 3.35'
gem 'selenium-webdriver'
end

157
Gemfile.lock

@ -1,61 +1,65 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.4.1)
actionpack (= 6.0.4.1)
actioncable (6.1.4.1)
actionpack (= 6.1.4.1)
activesupport (= 6.1.4.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.4.1)
actionpack (= 6.0.4.1)
activejob (= 6.0.4.1)
activerecord (= 6.0.4.1)
activestorage (= 6.0.4.1)
activesupport (= 6.0.4.1)
actionmailbox (6.1.4.1)
actionpack (= 6.1.4.1)
activejob (= 6.1.4.1)
activerecord (= 6.1.4.1)
activestorage (= 6.1.4.1)
activesupport (= 6.1.4.1)
mail (>= 2.7.1)
actionmailer (6.0.4.1)
actionpack (= 6.0.4.1)
actionview (= 6.0.4.1)
activejob (= 6.0.4.1)
actionmailer (6.1.4.1)
actionpack (= 6.1.4.1)
actionview (= 6.1.4.1)
activejob (= 6.1.4.1)
activesupport (= 6.1.4.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.4.1)
actionview (= 6.0.4.1)
activesupport (= 6.0.4.1)
rack (~> 2.0, >= 2.0.8)
actionpack (6.1.4.1)
actionview (= 6.1.4.1)
activesupport (= 6.1.4.1)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.4.1)
actionpack (= 6.0.4.1)
activerecord (= 6.0.4.1)
activestorage (= 6.0.4.1)
activesupport (= 6.0.4.1)
actiontext (6.1.4.1)
actionpack (= 6.1.4.1)
activerecord (= 6.1.4.1)
activestorage (= 6.1.4.1)
activesupport (= 6.1.4.1)
nokogiri (>= 1.8.5)
actionview (6.0.4.1)
activesupport (= 6.0.4.1)
actionview (6.1.4.1)
activesupport (= 6.1.4.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.4.1)
activesupport (= 6.0.4.1)
activejob (6.1.4.1)
activesupport (= 6.1.4.1)
globalid (>= 0.3.6)
activemodel (6.0.4.1)
activesupport (= 6.0.4.1)
activerecord (6.0.4.1)
activemodel (= 6.0.4.1)
activesupport (= 6.0.4.1)
activestorage (6.0.4.1)
actionpack (= 6.0.4.1)
activejob (= 6.0.4.1)
activerecord (= 6.0.4.1)
activemodel (6.1.4.1)
activesupport (= 6.1.4.1)
activerecord (6.1.4.1)
activemodel (= 6.1.4.1)
activesupport (= 6.1.4.1)
activestorage (6.1.4.1)
actionpack (= 6.1.4.1)
activejob (= 6.1.4.1)
activerecord (= 6.1.4.1)
activesupport (= 6.1.4.1)
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)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
bindex (0.8.1)
@ -92,14 +96,14 @@ GEM
mini_mime (>= 0.1.1)
marcel (1.0.1)
method_source (1.0.0)
mini_mime (1.1.0)
mini_mime (1.1.1)
minitest (5.14.4)
msgpack (1.4.2)
nio4r (2.5.8)
nokogiri (1.12.3-x86_64-linux)
racc (~> 1.4)
public_suffix (4.0.6)
puma (4.3.8)
puma (5.4.0)
nio4r (~> 2.0)
racc (1.5.2)
rack (2.2.3)
@ -107,32 +111,32 @@ GEM
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.4.1)
actioncable (= 6.0.4.1)
actionmailbox (= 6.0.4.1)
actionmailer (= 6.0.4.1)
actionpack (= 6.0.4.1)
actiontext (= 6.0.4.1)
actionview (= 6.0.4.1)
activejob (= 6.0.4.1)
activemodel (= 6.0.4.1)
activerecord (= 6.0.4.1)
activestorage (= 6.0.4.1)
activesupport (= 6.0.4.1)
bundler (>= 1.3.0)
railties (= 6.0.4.1)
rails (6.1.4.1)
actioncable (= 6.1.4.1)
actionmailbox (= 6.1.4.1)
actionmailer (= 6.1.4.1)
actionpack (= 6.1.4.1)
actiontext (= 6.1.4.1)
actionview (= 6.1.4.1)
activejob (= 6.1.4.1)
activemodel (= 6.1.4.1)
activerecord (= 6.1.4.1)
activestorage (= 6.1.4.1)
activesupport (= 6.1.4.1)
bundler (>= 1.15.0)
railties (= 6.1.4.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.1)
loofah (~> 2.3)
railties (6.0.4.1)
actionpack (= 6.0.4.1)
activesupport (= 6.0.4.1)
railties (6.1.4.1)
actionpack (= 6.1.4.1)
activesupport (= 6.1.4.1)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (>= 0.13)
thor (~> 1.0)
rake (13.0.6)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
@ -152,6 +156,7 @@ GEM
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
@ -165,22 +170,22 @@ GEM
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
web-console (4.1.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webpacker (4.3.0)
activesupport (>= 4.2)
webpacker (5.4.2)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 4.2)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
@ -192,13 +197,13 @@ PLATFORMS
x86_64-linux
DEPENDENCIES
bootsnap (>= 1.4.2)
bootsnap (>= 1.7)
byebug
capybara (>= 2.15)
jbuilder (~> 2.7)
listen (~> 3.2)
puma (~> 4.1)
rails (~> 6.0.3, >= 6.0.3.7)
capybara (>= 3.35)
jbuilder (~> 2.11)
listen (~> 3.7)
puma (~> 5.4)
rails (~> 6.1.4, >= 6.0.3.7)
sass-rails (>= 6)
selenium-webdriver
spring
@ -206,11 +211,11 @@ DEPENDENCIES
sqlite3 (~> 1.4)
turbolinks (~> 5)
tzinfo-data
web-console (>= 3.3.0)
webpacker (~> 4.0)
web-console (>= 4.1.0)
webpacker (~> 5.4)
RUBY VERSION
ruby 2.7.4p191
ruby 3.0.2p107
BUNDLED WITH
2.2.5
2.2.22

16
babel.config.js

@ -53,12 +53,22 @@ module.exports = function(api) {
useBuiltIns: true
}
],
[
'@babel/plugin-proposal-private-methods',
{
loose: true
}
],
[
'@babel/plugin-proposal-private-property-in-object',
{
loose: true
}
],
[
'@babel/plugin-transform-runtime',
{
helpers: false,
regenerator: true,
corejs: false
helpers: false
}
],
[

5
bin/rails

@ -1,4 +1,5 @@
#!/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'
require_relative "../config/boot"
require "rails/commands"

5
bin/rake

@ -1,4 +1,5 @@
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
load File.expand_path("spring", __dir__)
require_relative "../config/boot"
require "rake"
Rake.application.run

8
bin/setup

@ -1,5 +1,5 @@
#!/usr/bin/env ruby
require 'fileutils'
require "fileutils"
# path to your application root.
APP_ROOT = File.expand_path('..', __dir__)
@ -9,8 +9,8 @@ def system!(*args)
end
FileUtils.chdir APP_ROOT do
# 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.
# This script is a way to set up or update your development environment automatically.
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
# Add necessary setup steps to this file.
puts '== Installing dependencies =='
@ -18,7 +18,7 @@ FileUtils.chdir APP_ROOT do
system('bundle check') || system!('bundle install')
# Install JavaScript dependencies
# system('bin/yarnpkg')
system! 'bin/yarn'
# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')

14
bin/spring

@ -0,0 +1,14 @@
#!/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

12
bin/yarn

@ -1,9 +1,15 @@
#!/usr/bin/env ruby
APP_ROOT = File.expand_path('..', __dir__)
Dir.chdir(APP_ROOT) do
begin
exec "yarnpkg", *ARGV
rescue Errno::ENOENT
yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
select { |dir| File.expand_path(dir) != __dir__ }.
product(["yarn", "yarn.cmd", "yarn.ps1"]).
map { |dir, file| File.expand_path(file, dir) }.
find { |file| File.executable?(file) }
if yarn
exec yarn, *ARGV
else
$stderr.puts "Yarn executable was not detected in the system."
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
exit 1

3
config.ru

@ -1,5 +1,6 @@
# This file is used by Rack-based servers to start the application.
require_relative 'config/environment'
require_relative "config/environment"
run Rails.application
Rails.application.load_server

15
config/application.rb

@ -1,6 +1,6 @@
require_relative 'boot'
require_relative "boot"
require 'rails/all'
require "rails/all"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
@ -11,9 +11,12 @@ module Pinrails
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 6.0
# Settings in config/environments/* take precedence over those specified here.
# Application configuration can go into files in config/initializers
# -- all .rb files in that directory are automatically loaded after loading
# the framework and any gems in your application.
# Configuration for the application, engines, and railties goes here.
#
# These settings can be overridden in specific environments using the files
# in config/environments, which are processed later.
#
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")
end
end

4
config/boot.rb

@ -1,4 +1,4 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
require "bundler/setup" # Set up gems listed in the Gemfile.
require "bootsnap/setup" # Speed up boot time by caching expensive operations.

2
config/credentials.yml.enc

@ -1 +1 @@
UDf/qUsq3VYW5ca7YeRXNKpMNmyAhqRucPq3b2tSvAMztLLNZEuUKvZjYSUFotOyYGFjzSN2AFK+eIM1O5rdhu+yN7TUHf+UIgXgkErkFoTFr5wOwQ7OlSYLv3kN4LYw0BnSoR4437zP0Bq02liPYZ0REw66NyBgEiCkTDw4ARlNsnPdVny98Q2KsFqcfCOjZC6C2Z7JqawWNY/M2U/xv5dlMIePbpcijNW5ebCqxZwKRZHZU+sZ09hHyvAsRKmO15ugOSjpL1Kd9jYq7m4BfgmqAcndEhgX7s8WKQeHPIzVQWawUPenaZ/OdH+Vrp8Fnj/VqkARGfE8J/4wswkzxe3HiNrkK5A6aFv04PAjeZMLpjLnVDlu54g4zVc8Pned4l7IeBEogiob0SvgujqIvdfqfBuMUOrTHX5R--/zMwOtaGJGukjQ8m--h0R4q5srwtT3dwtIUBq8zg==
xSvr35mvO70B1SLz0lNgZKP+yZVDyAqLT3H/3bndSk69rgePadj7JF6we3Rm9tmqOUeVZb9Dhksq9PTuuSd7LzTz8Ovy18d/YEX1UKKGfjA3GwXvthW3sSng9zXUWUUu0hrvzGSR6pioZZyZ2fxITsKpVSo6TitBYz7Qazp39K8DK1HfDdbW14FbwbpeDqPWpv9aGi8SrvRO86ab9+FRldh5SCa5UZrnaIM3k81U+NoTCDRuS5VQcRjHqpk0z7B4sBJlD3KR13c7xC4RPZnbXQUHO50/4Y/s/7QViOJGkMzjB6jWL7YDcSB2jeuPdTPAroUo8fcVCnHcHZ4BFJY3bsEhIh/z53wHj7uxG0Fdb4cP8OLqIZUVESNON5y68XAh3GfgrWF+MaCifKIAgaPJt66Lrcy6lPcUxKC9--Bmh49bGZP51Kj3Q5--PKZ2uAjb4AcrJ6s2vjXE3A==

2
config/environment.rb

@ -1,5 +1,5 @@
# Load the Rails application.
require_relative 'application'
require_relative "application"
# Initialize the Rails application.
Rails.application.initialize!

20
config/environments/development.rb

@ -1,10 +1,12 @@
require "active_support/core_ext/integer/time"
Rails.application.configure do
config.hosts << "odin"
config.web_console.permissions = '192.168.1.1/24'
# Settings specified here will take precedence over those in config/application.rb.
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# In the development environment your application's code is reloaded any time
# it changes. This slows down response time but is perfect for development
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
@ -41,6 +43,12 @@ Rails.application.configure do
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log
# Raise exceptions for disallowed deprecations.
config.active_support.disallowed_deprecation = :raise
# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load
@ -56,9 +64,15 @@ Rails.application.configure do
config.assets.quiet = true
# Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
# config.i18n.raise_on_missing_translations = true
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true
end

13
config/environments/test.rb

@ -1,3 +1,5 @@
require "active_support/core_ext/integer/time"
# 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
@ -44,6 +46,15 @@ Rails.application.configure do
# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
# Raise exceptions for disallowed deprecations.
config.active_support.disallowed_deprecation = :raise
# Tell Active Support which deprecation messages to disallow.
config.active_support.disallowed_deprecation_warnings = []
# Raises error for missing translations.
# config.action_view.raise_on_missing_translations = true
# config.i18n.raise_on_missing_translations = true
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = true
end

7
config/initializers/backtrace_silencers.rb

@ -1,7 +1,8 @@
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]

4
config/initializers/filter_parameter_logging.rb

@ -1,4 +1,6 @@
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
Rails.application.config.filter_parameters += [:password]
Rails.application.config.filter_parameters += [
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
]

67
config/initializers/new_framework_defaults_6_1.rb

@ -0,0 +1,67 @@
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 6.1 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.
# Support for inversing belongs_to -> has_many Active Record associations.
# Rails.application.config.active_record.has_many_inversing = true
# Track Active Storage variants in the database.
# Rails.application.config.active_storage.track_variants = true
# Apply random variation to the delay when retrying failed jobs.
# Rails.application.config.active_job.retry_jitter = 0.15
# Stop executing `after_enqueue`/`after_perform` callbacks if
# `before_enqueue`/`before_perform` respectively halts with `throw :abort`.
# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true
# Specify cookies SameSite protection level: either :none, :lax, or :strict.
#
# This change is not backwards compatible with earlier Rails versions.
# It's best enabled when your entire app is migrated and stable on 6.1.
# Rails.application.config.action_dispatch.cookies_same_site_protection = :lax
# Generate CSRF tokens that are encoded in URL-safe Base64.
#
# This change is not backwards compatible with earlier Rails versions.
# It's best enabled when your entire app is migrated and stable on 6.1.
# Rails.application.config.action_controller.urlsafe_csrf_tokens = true
# Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an
# UTC offset or a UTC time.
# ActiveSupport.utc_to_local_returns_utc_offset_times = true
# Change the default HTTP status code to `308` when redirecting non-GET/HEAD
# requests to HTTPS in `ActionDispatch::SSL` middleware.
# Rails.application.config.action_dispatch.ssl_default_redirect_status = 308
# Use new connection handling API. For most applications this won't have any
# effect. For applications using multiple databases, this new API provides
# support for granular connection swapping.
# Rails.application.config.active_record.legacy_connection_handling = false
# Make `form_with` generate non-remote forms by default.
# Rails.application.config.action_view.form_with_generates_remote_forms = false
# Set the default queue name for the analysis job to the queue adapter default.
# Rails.application.config.active_storage.queues.analysis = nil
# Set the default queue name for the purge job to the queue adapter default.
# Rails.application.config.active_storage.queues.purge = nil
# Set the default queue name for the incineration job to the queue adapter default.
# Rails.application.config.action_mailbox.queues.incineration = nil
# Set the default queue name for the routing job to the queue adapter default.
# Rails.application.config.action_mailbox.queues.routing = nil
# Set the default queue name for the mail deliver job to the queue adapter default.
# Rails.application.config.action_mailer.deliver_later_queue_name = nil
# Generate a `Link` header that gives a hint to modern browsers about
# preloading assets when using `javascript_include_tag` and `stylesheet_link_tag`.
# Rails.application.config.action_view.preload_links_header = true

11
config/initializers/permissions_policy.rb

@ -0,0 +1,11 @@
# Define an application-wide HTTP permissions policy. For further
# information see https://developers.google.com/web/updates/2018/06/feature-policy
#
# Rails.application.config.permissions_policy do |f|
# f.camera :none
# f.gyroscope :none
# f.microphone :none
# f.usb :none
# f.fullscreen :self
# f.payment :self, "https://secure.example.com"
# end

7
config/puma.rb

@ -8,9 +8,14 @@ max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
threads min_threads_count, max_threads_count
# Specifies the `worker_timeout` threshold that Puma will use to wait before
# terminating a worker in development environments.
#
worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development"
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
port ENV.fetch("PORT") { 3000 }
port ENV.fetch("PORT") { 3000 }
# Specifies the `environment` that Puma will run in.
#

6
config/webpacker.yml

@ -6,12 +6,11 @@ default: &default
public_root_path: public
public_output_path: packs
cache_path: tmp/cache/webpacker
check_yarn_integrity: false
webpack_compile_output: true
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: []
additional_paths: []
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
@ -52,9 +51,6 @@ development:
<<: *default
compile: true
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
check_yarn_integrity: true
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: false

8
db/schema.rb

@ -2,15 +2,15 @@
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `rails
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_08_21_230356) do
ActiveRecord::Schema.define(version: 2021_08_23_030916) do
create_table "machines", force: :cascade do |t|
t.string "name"
@ -21,7 +21,7 @@ ActiveRecord::Schema.define(version: 2021_08_21_230356) do
create_table "players", force: :cascade do |t|
t.string "name"
t.integer "strikes"
t.integer "strikes", default: 0
t.boolean "paid"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false

20
db/seeds.rb

@ -5,3 +5,23 @@
#
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
# Character.create(name: 'Luke', movie: movies.first)
machines = [
["Avengers", "Pro"],
["Deadpool", "Pro"],
["Family Guy", "Pro"],
["Guardians of the Galaxy", "Pro"],
["Jurassic Park", "Pro"],
["Monster Bash", "Pro"],
["Rick & Morty", "Pro"],
["Simpsons", "Pro"],
["Star Trek", "Pro"],
["Star Wars", "Pro"],
["Teenage Mutant Ninja Turtles", "Pro"],
["The Mandalorian", "Pro"],
["Walking Dead", "Pro"]
]
machines.each do |name, edition|
Machine.create(name: name, edition: edition)
end

6
package.json

@ -5,8 +5,10 @@
"@rails/actioncable": "^6.0.0",
"@rails/activestorage": "^6.0.0",
"@rails/ujs": "^6.0.0",
"@rails/webpacker": "4.3.0",
"turbolinks": "^5.2.0"
"@rails/webpacker": "5.4.2",
"turbolinks": "^5.2.0",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12"
},
"version": "0.1.0",
"devDependencies": {

1226
yarn.lock

File diff suppressed because it is too large
Loading…
Cancel
Save