update to rails 3.0.2
This commit is contained in:
parent
0d1be8d46a
commit
229d79fce9
|
@ -1 +1 @@
|
||||||
ruby-2.7.4
|
3.0.2
|
||||||
|
|
18
Gemfile
18
Gemfile
|
@ -1,22 +1,22 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
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'
|
# 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
|
# Use sqlite3 as the database for Active Record
|
||||||
gem 'sqlite3', '~> 1.4'
|
gem 'sqlite3', '~> 1.4'
|
||||||
# Use Puma as the app server
|
# Use Puma as the app server
|
||||||
gem 'puma', '~> 4.1'
|
gem 'puma', '~> 5.4'
|
||||||
# Use SCSS for stylesheets
|
# Use SCSS for stylesheets
|
||||||
gem 'sass-rails', '>= 6'
|
gem 'sass-rails', '>= 6'
|
||||||
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
|
# 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
|
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
||||||
gem 'turbolinks', '~> 5'
|
gem 'turbolinks', '~> 5'
|
||||||
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
|
# 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
|
# Use Redis adapter to run Action Cable in production
|
||||||
# gem 'redis', '~> 4.0'
|
# gem 'redis', '~> 4.0'
|
||||||
# Use Active Model has_secure_password
|
# Use Active Model has_secure_password
|
||||||
|
@ -26,7 +26,7 @@ gem 'jbuilder', '~> 2.7'
|
||||||
# gem 'image_processing', '~> 1.2'
|
# gem 'image_processing', '~> 1.2'
|
||||||
|
|
||||||
# Reduces boot times through caching; required in config/boot.rb
|
# 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
|
group :development, :test do
|
||||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||||
|
@ -35,8 +35,8 @@ end
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
|
||||||
gem 'web-console', '>= 3.3.0'
|
gem 'web-console', '>= 4.1.0'
|
||||||
gem 'listen', '~> 3.2'
|
gem 'listen', '~> 3.7'
|
||||||
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
||||||
gem 'spring'
|
gem 'spring'
|
||||||
gem 'spring-watcher-listen', '~> 2.0.0'
|
gem 'spring-watcher-listen', '~> 2.0.0'
|
||||||
|
@ -44,7 +44,7 @@ end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
# Adds support for Capybara system testing and selenium driver
|
# Adds support for Capybara system testing and selenium driver
|
||||||
gem 'capybara', '>= 2.15'
|
gem 'capybara', '>= 3.35'
|
||||||
gem 'selenium-webdriver'
|
gem 'selenium-webdriver'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
157
Gemfile.lock
157
Gemfile.lock
|
@ -1,61 +1,65 @@
|
||||||
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)
|
||||||
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)
|
||||||
bindex (0.8.1)
|
bindex (0.8.1)
|
||||||
|
@ -92,14 +96,14 @@ GEM
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
marcel (1.0.1)
|
marcel (1.0.1)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mini_mime (1.1.0)
|
mini_mime (1.1.1)
|
||||||
minitest (5.14.4)
|
minitest (5.14.4)
|
||||||
msgpack (1.4.2)
|
msgpack (1.4.2)
|
||||||
nio4r (2.5.8)
|
nio4r (2.5.8)
|
||||||
nokogiri (1.12.3-x86_64-linux)
|
nokogiri (1.12.3-x86_64-linux)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
public_suffix (4.0.6)
|
public_suffix (4.0.6)
|
||||||
puma (4.3.8)
|
puma (5.4.0)
|
||||||
nio4r (~> 2.0)
|
nio4r (~> 2.0)
|
||||||
racc (1.5.2)
|
racc (1.5.2)
|
||||||
rack (2.2.3)
|
rack (2.2.3)
|
||||||
|
@ -107,32 +111,32 @@ 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-dom-testing (2.0.3)
|
rails-dom-testing (2.0.3)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
nokogiri (>= 1.6)
|
nokogiri (>= 1.6)
|
||||||
rails-html-sanitizer (1.4.1)
|
rails-html-sanitizer (1.4.1)
|
||||||
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)
|
||||||
|
@ -152,6 +156,7 @@ GEM
|
||||||
selenium-webdriver (3.142.7)
|
selenium-webdriver (3.142.7)
|
||||||
childprocess (>= 0.5, < 4.0)
|
childprocess (>= 0.5, < 4.0)
|
||||||
rubyzip (>= 1.2.2)
|
rubyzip (>= 1.2.2)
|
||||||
|
semantic_range (3.0.0)
|
||||||
spring (2.1.1)
|
spring (2.1.1)
|
||||||
spring-watcher-listen (2.0.1)
|
spring-watcher-listen (2.0.1)
|
||||||
listen (>= 2.7, < 4.0)
|
listen (>= 2.7, < 4.0)
|
||||||
|
@ -165,22 +170,22 @@ GEM
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.4.2)
|
sqlite3 (1.4.2)
|
||||||
thor (1.1.0)
|
thor (1.1.0)
|
||||||
thread_safe (0.3.6)
|
|
||||||
tilt (2.0.10)
|
tilt (2.0.10)
|
||||||
turbolinks (5.2.1)
|
turbolinks (5.2.1)
|
||||||
turbolinks-source (~> 5.2)
|
turbolinks-source (~> 5.2)
|
||||||
turbolinks-source (5.2.0)
|
turbolinks-source (5.2.0)
|
||||||
tzinfo (1.2.9)
|
tzinfo (2.0.4)
|
||||||
thread_safe (~> 0.1)
|
concurrent-ruby (~> 1.0)
|
||||||
web-console (4.1.0)
|
web-console (4.1.0)
|
||||||
actionview (>= 6.0.0)
|
actionview (>= 6.0.0)
|
||||||
activemodel (>= 6.0.0)
|
activemodel (>= 6.0.0)
|
||||||
bindex (>= 0.4.0)
|
bindex (>= 0.4.0)
|
||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
webpacker (4.3.0)
|
webpacker (5.4.2)
|
||||||
activesupport (>= 4.2)
|
activesupport (>= 5.2)
|
||||||
rack-proxy (>= 0.6.1)
|
rack-proxy (>= 0.6.1)
|
||||||
railties (>= 4.2)
|
railties (>= 5.2)
|
||||||
|
semantic_range (>= 2.3.0)
|
||||||
websocket-driver (0.7.5)
|
websocket-driver (0.7.5)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.5)
|
websocket-extensions (0.1.5)
|
||||||
|
@ -192,13 +197,13 @@ PLATFORMS
|
||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
bootsnap (>= 1.4.2)
|
bootsnap (>= 1.7)
|
||||||
byebug
|
byebug
|
||||||
capybara (>= 2.15)
|
capybara (>= 3.35)
|
||||||
jbuilder (~> 2.7)
|
jbuilder (~> 2.11)
|
||||||
listen (~> 3.2)
|
listen (~> 3.7)
|
||||||
puma (~> 4.1)
|
puma (~> 5.4)
|
||||||
rails (~> 6.0.3, >= 6.0.3.7)
|
rails (~> 6.1.4, >= 6.0.3.7)
|
||||||
sass-rails (>= 6)
|
sass-rails (>= 6)
|
||||||
selenium-webdriver
|
selenium-webdriver
|
||||||
spring
|
spring
|
||||||
|
@ -206,11 +211,11 @@ DEPENDENCIES
|
||||||
sqlite3 (~> 1.4)
|
sqlite3 (~> 1.4)
|
||||||
turbolinks (~> 5)
|
turbolinks (~> 5)
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
web-console (>= 3.3.0)
|
web-console (>= 4.1.0)
|
||||||
webpacker (~> 4.0)
|
webpacker (~> 5.4)
|
||||||
|
|
||||||
RUBY VERSION
|
RUBY VERSION
|
||||||
ruby 2.7.4p191
|
ruby 3.0.2p107
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.2.5
|
2.2.22
|
||||||
|
|
|
@ -53,12 +53,22 @@ module.exports = function(api) {
|
||||||
useBuiltIns: true
|
useBuiltIns: true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'@babel/plugin-proposal-private-methods',
|
||||||
|
{
|
||||||
|
loose: true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'@babel/plugin-proposal-private-property-in-object',
|
||||||
|
{
|
||||||
|
loose: true
|
||||||
|
}
|
||||||
|
],
|
||||||
[
|
[
|
||||||
'@babel/plugin-transform-runtime',
|
'@babel/plugin-transform-runtime',
|
||||||
{
|
{
|
||||||
helpers: false,
|
helpers: false
|
||||||
regenerator: true,
|
|
||||||
corejs: false
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
|
load File.expand_path("spring", __dir__)
|
||||||
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,4 +1,5 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require_relative '../config/boot'
|
load File.expand_path("spring", __dir__)
|
||||||
require 'rake'
|
require_relative "../config/boot"
|
||||||
|
require "rake"
|
||||||
Rake.application.run
|
Rake.application.run
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
require 'fileutils'
|
require "fileutils"
|
||||||
|
|
||||||
# path to your application root.
|
# path to your application root.
|
||||||
APP_ROOT = File.expand_path('..', __dir__)
|
APP_ROOT = File.expand_path('..', __dir__)
|
||||||
|
@ -9,8 +9,8 @@ def system!(*args)
|
||||||
end
|
end
|
||||||
|
|
||||||
FileUtils.chdir APP_ROOT do
|
FileUtils.chdir APP_ROOT do
|
||||||
# This script is a way to setup or update your development environment automatically.
|
# 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 anytime and get an expectable outcome.
|
# 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.
|
# Add necessary setup steps to this file.
|
||||||
|
|
||||||
puts '== Installing dependencies =='
|
puts '== Installing dependencies =='
|
||||||
|
@ -18,7 +18,7 @@ FileUtils.chdir APP_ROOT do
|
||||||
system('bundle check') || system!('bundle install')
|
system('bundle check') || system!('bundle install')
|
||||||
|
|
||||||
# Install JavaScript dependencies
|
# Install JavaScript dependencies
|
||||||
# system('bin/yarnpkg')
|
system! 'bin/yarn'
|
||||||
|
|
||||||
# puts "\n== Copying sample files =="
|
# puts "\n== Copying sample files =="
|
||||||
# unless File.exist?('config/database.yml')
|
# unless File.exist?('config/database.yml')
|
||||||
|
|
|
@ -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
12
bin/yarn
|
@ -1,9 +1,15 @@
|
||||||
#!/usr/bin/env ruby
|
#!/usr/bin/env ruby
|
||||||
APP_ROOT = File.expand_path('..', __dir__)
|
APP_ROOT = File.expand_path('..', __dir__)
|
||||||
Dir.chdir(APP_ROOT) do
|
Dir.chdir(APP_ROOT) do
|
||||||
begin
|
yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
|
||||||
exec "yarnpkg", *ARGV
|
select { |dir| File.expand_path(dir) != __dir__ }.
|
||||||
rescue Errno::ENOENT
|
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 "Yarn executable was not detected in the system."
|
||||||
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# This file is used by Rack-based servers to start the application.
|
# This file is used by Rack-based servers to start the application.
|
||||||
|
|
||||||
require_relative 'config/environment'
|
require_relative "config/environment"
|
||||||
|
|
||||||
run Rails.application
|
run Rails.application
|
||||||
|
Rails.application.load_server
|
||||||
|
|
|
@ -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
|
# Require the gems listed in Gemfile, including any gems
|
||||||
# you've limited to :test, :development, or :production.
|
# you've limited to :test, :development, or :production.
|
||||||
|
@ -11,9 +11,12 @@ module Pinrails
|
||||||
# Initialize configuration defaults for originally generated Rails version.
|
# Initialize configuration defaults for originally generated Rails version.
|
||||||
config.load_defaults 6.0
|
config.load_defaults 6.0
|
||||||
|
|
||||||
# Settings in config/environments/* take precedence over those specified here.
|
# Configuration for the application, engines, and railties goes here.
|
||||||
# Application configuration can go into files in config/initializers
|
#
|
||||||
# -- all .rb files in that directory are automatically loaded after loading
|
# These settings can be overridden in specific environments using the files
|
||||||
# the framework and any gems in your application.
|
# in config/environments, which are processed later.
|
||||||
|
#
|
||||||
|
# config.time_zone = "Central Time (US & Canada)"
|
||||||
|
# config.eager_load_paths << Rails.root.join("extras")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
||||||
|
|
||||||
require 'bundler/setup' # Set up gems listed in the Gemfile.
|
require "bundler/setup" # Set up gems listed in the Gemfile.
|
||||||
require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
|
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
|
||||||
|
|
|
@ -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==
|
|
@ -1,5 +1,5 @@
|
||||||
# Load the Rails application.
|
# Load the Rails application.
|
||||||
require_relative 'application'
|
require_relative "application"
|
||||||
|
|
||||||
# Initialize the Rails application.
|
# Initialize the Rails application.
|
||||||
Rails.application.initialize!
|
Rails.application.initialize!
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
require "active_support/core_ext/integer/time"
|
||||||
|
|
||||||
Rails.application.configure do
|
Rails.application.configure do
|
||||||
config.hosts << "odin"
|
config.hosts << "odin"
|
||||||
config.web_console.permissions = '192.168.1.1/24'
|
config.web_console.permissions = '192.168.1.1/24'
|
||||||
# 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 any time
|
||||||
# every request. This slows down response time but is perfect for development
|
# 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.
|
# since you don't have to restart the web server when you make code changes.
|
||||||
config.cache_classes = false
|
config.cache_classes = false
|
||||||
|
|
||||||
|
@ -41,6 +43,12 @@ Rails.application.configure do
|
||||||
# Print deprecation notices to the Rails logger.
|
# Print deprecation notices to the Rails logger.
|
||||||
config.active_support.deprecation = :log
|
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.
|
# 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
|
||||||
|
|
||||||
|
@ -56,9 +64,15 @@ Rails.application.configure do
|
||||||
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.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,
|
# 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
|
||||||
|
|
||||||
|
# Uncomment if you wish to allow Action Cable access from any origin.
|
||||||
|
# config.action_cable.disable_request_forgery_protection = true
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
require "active_support/core_ext/integer/time"
|
||||||
|
|
||||||
# The test environment is used exclusively to run your application's
|
# The test environment is used exclusively to run your application's
|
||||||
# test suite. You never need to work with it otherwise. Remember that
|
# 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
|
# 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.
|
# Print deprecation notices to the stderr.
|
||||||
config.active_support.deprecation = :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.
|
# 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
|
end
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# 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.
|
# 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.
|
# 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!
|
# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
|
||||||
|
Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Configure sensitive parameters which will be filtered from the log 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
|
||||||
|
]
|
||||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -8,9 +8,14 @@ max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
||||||
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
|
||||||
threads min_threads_count, 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.
|
# 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.
|
# Specifies the `environment` that Puma will run in.
|
||||||
#
|
#
|
||||||
|
|
|
@ -6,12 +6,11 @@ default: &default
|
||||||
public_root_path: public
|
public_root_path: public
|
||||||
public_output_path: packs
|
public_output_path: packs
|
||||||
cache_path: tmp/cache/webpacker
|
cache_path: tmp/cache/webpacker
|
||||||
check_yarn_integrity: false
|
|
||||||
webpack_compile_output: true
|
webpack_compile_output: true
|
||||||
|
|
||||||
# Additional paths webpack should lookup modules
|
# Additional paths webpack should lookup modules
|
||||||
# ['app/assets', 'engine/foo/app/assets']
|
# ['app/assets', 'engine/foo/app/assets']
|
||||||
resolved_paths: []
|
additional_paths: []
|
||||||
|
|
||||||
# Reload manifest.json on all requests so we reload latest compiled packs
|
# Reload manifest.json on all requests so we reload latest compiled packs
|
||||||
cache_manifest: false
|
cache_manifest: false
|
||||||
|
@ -52,9 +51,6 @@ development:
|
||||||
<<: *default
|
<<: *default
|
||||||
compile: true
|
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/
|
# Reference: https://webpack.js.org/configuration/dev-server/
|
||||||
dev_server:
|
dev_server:
|
||||||
https: false
|
https: false
|
||||||
|
|
|
@ -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.
|
||||||
#
|
#
|
||||||
# This file is the source Rails uses to define your schema when running `rails
|
# This file is the source Rails uses to define your schema when running `bin/rails
|
||||||
# db:schema:load`. When creating a new database, `rails db:schema:load` tends to
|
# 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
|
# 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 from scratch. Old migrations may fail to apply correctly if those
|
||||||
# migrations use external dependencies or application code.
|
# 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: 2021_08_21_230356) do
|
ActiveRecord::Schema.define(version: 2021_08_23_030916) do
|
||||||
|
|
||||||
create_table "machines", force: :cascade do |t|
|
create_table "machines", force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
|
@ -21,7 +21,7 @@ ActiveRecord::Schema.define(version: 2021_08_21_230356) do
|
||||||
|
|
||||||
create_table "players", force: :cascade do |t|
|
create_table "players", force: :cascade do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.integer "strikes"
|
t.integer "strikes", default: 0
|
||||||
t.boolean "paid"
|
t.boolean "paid"
|
||||||
t.datetime "created_at", precision: 6, null: false
|
t.datetime "created_at", precision: 6, null: false
|
||||||
t.datetime "updated_at", precision: 6, null: false
|
t.datetime "updated_at", precision: 6, null: false
|
||||||
|
|
20
db/seeds.rb
20
db/seeds.rb
|
@ -5,3 +5,23 @@
|
||||||
#
|
#
|
||||||
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
|
||||||
# Character.create(name: 'Luke', movie: movies.first)
|
# 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
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
"@rails/actioncable": "^6.0.0",
|
"@rails/actioncable": "^6.0.0",
|
||||||
"@rails/activestorage": "^6.0.0",
|
"@rails/activestorage": "^6.0.0",
|
||||||
"@rails/ujs": "^6.0.0",
|
"@rails/ujs": "^6.0.0",
|
||||||
"@rails/webpacker": "4.3.0",
|
"@rails/webpacker": "5.4.2",
|
||||||
"turbolinks": "^5.2.0"
|
"turbolinks": "^5.2.0",
|
||||||
|
"webpack": "^4.46.0",
|
||||||
|
"webpack-cli": "^3.3.12"
|
||||||
},
|
},
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
Loading…
Reference in New Issue