Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Commit ed323d4

Browse files
committed
Upgrade to Rails 6.1
1 parent b819397 commit ed323d4

24 files changed

+428
-301
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
44
ruby '2.5.8'
55

66
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
7-
gem 'rails', '~> 6.0.3', '>= 6.0.3.4'
7+
gem 'rails', '~> 6.1.0', '>= 6.1.0.0'
88
# Use sqlite3 as the database for Active Record
99
gem 'sqlite3', '~> 1.4'
1010
# Use Puma as the app server

Gemfile.lock

+67-64
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,65 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (6.0.3.4)
5-
actionpack (= 6.0.3.4)
4+
actioncable (6.1.0)
5+
actionpack (= 6.1.0)
6+
activesupport (= 6.1.0)
67
nio4r (~> 2.0)
78
websocket-driver (>= 0.6.1)
8-
actionmailbox (6.0.3.4)
9-
actionpack (= 6.0.3.4)
10-
activejob (= 6.0.3.4)
11-
activerecord (= 6.0.3.4)
12-
activestorage (= 6.0.3.4)
13-
activesupport (= 6.0.3.4)
9+
actionmailbox (6.1.0)
10+
actionpack (= 6.1.0)
11+
activejob (= 6.1.0)
12+
activerecord (= 6.1.0)
13+
activestorage (= 6.1.0)
14+
activesupport (= 6.1.0)
1415
mail (>= 2.7.1)
15-
actionmailer (6.0.3.4)
16-
actionpack (= 6.0.3.4)
17-
actionview (= 6.0.3.4)
18-
activejob (= 6.0.3.4)
16+
actionmailer (6.1.0)
17+
actionpack (= 6.1.0)
18+
actionview (= 6.1.0)
19+
activejob (= 6.1.0)
20+
activesupport (= 6.1.0)
1921
mail (~> 2.5, >= 2.5.4)
2022
rails-dom-testing (~> 2.0)
21-
actionpack (6.0.3.4)
22-
actionview (= 6.0.3.4)
23-
activesupport (= 6.0.3.4)
24-
rack (~> 2.0, >= 2.0.8)
23+
actionpack (6.1.0)
24+
actionview (= 6.1.0)
25+
activesupport (= 6.1.0)
26+
rack (~> 2.0, >= 2.0.9)
2527
rack-test (>= 0.6.3)
2628
rails-dom-testing (~> 2.0)
2729
rails-html-sanitizer (~> 1.0, >= 1.2.0)
28-
actiontext (6.0.3.4)
29-
actionpack (= 6.0.3.4)
30-
activerecord (= 6.0.3.4)
31-
activestorage (= 6.0.3.4)
32-
activesupport (= 6.0.3.4)
30+
actiontext (6.1.0)
31+
actionpack (= 6.1.0)
32+
activerecord (= 6.1.0)
33+
activestorage (= 6.1.0)
34+
activesupport (= 6.1.0)
3335
nokogiri (>= 1.8.5)
34-
actionview (6.0.3.4)
35-
activesupport (= 6.0.3.4)
36+
actionview (6.1.0)
37+
activesupport (= 6.1.0)
3638
builder (~> 3.1)
3739
erubi (~> 1.4)
3840
rails-dom-testing (~> 2.0)
3941
rails-html-sanitizer (~> 1.1, >= 1.2.0)
40-
activejob (6.0.3.4)
41-
activesupport (= 6.0.3.4)
42+
activejob (6.1.0)
43+
activesupport (= 6.1.0)
4244
globalid (>= 0.3.6)
43-
activemodel (6.0.3.4)
44-
activesupport (= 6.0.3.4)
45-
activerecord (6.0.3.4)
46-
activemodel (= 6.0.3.4)
47-
activesupport (= 6.0.3.4)
48-
activestorage (6.0.3.4)
49-
actionpack (= 6.0.3.4)
50-
activejob (= 6.0.3.4)
51-
activerecord (= 6.0.3.4)
45+
activemodel (6.1.0)
46+
activesupport (= 6.1.0)
47+
activerecord (6.1.0)
48+
activemodel (= 6.1.0)
49+
activesupport (= 6.1.0)
50+
activestorage (6.1.0)
51+
actionpack (= 6.1.0)
52+
activejob (= 6.1.0)
53+
activerecord (= 6.1.0)
54+
activesupport (= 6.1.0)
5255
marcel (~> 0.3.1)
53-
activesupport (6.0.3.4)
56+
mimemagic (~> 0.3.2)
57+
activesupport (6.1.0)
5458
concurrent-ruby (~> 1.0, >= 1.0.2)
55-
i18n (>= 0.7, < 2)
56-
minitest (~> 5.1)
57-
tzinfo (~> 1.1)
58-
zeitwerk (~> 2.2, >= 2.2.2)
59+
i18n (>= 1.6, < 2)
60+
minitest (>= 5.1)
61+
tzinfo (~> 2.0)
62+
zeitwerk (~> 2.3)
5963
addressable (2.7.0)
6064
public_suffix (>= 2.0.2, < 5.0)
6165
bcrypt (3.1.16)
@@ -64,7 +68,7 @@ GEM
6468
rails (>= 5.0)
6569
builder (3.2.4)
6670
byebug (11.1.3)
67-
cancancan (3.1.0)
71+
cancancan (3.2.0)
6872
capybara (3.33.0)
6973
addressable
7074
mini_mime (>= 0.1.3)
@@ -85,7 +89,7 @@ GEM
8589
listen (3.3.1)
8690
rb-fsevent (~> 0.10, >= 0.10.3)
8791
rb-inotify (~> 0.9, >= 0.9.10)
88-
loofah (2.7.0)
92+
loofah (2.8.0)
8993
crass (~> 1.0.2)
9094
nokogiri (>= 1.5.9)
9195
mail (2.7.1)
@@ -108,32 +112,32 @@ GEM
108112
rack
109113
rack-test (1.1.0)
110114
rack (>= 1.0, < 3)
111-
rails (6.0.3.4)
112-
actioncable (= 6.0.3.4)
113-
actionmailbox (= 6.0.3.4)
114-
actionmailer (= 6.0.3.4)
115-
actionpack (= 6.0.3.4)
116-
actiontext (= 6.0.3.4)
117-
actionview (= 6.0.3.4)
118-
activejob (= 6.0.3.4)
119-
activemodel (= 6.0.3.4)
120-
activerecord (= 6.0.3.4)
121-
activestorage (= 6.0.3.4)
122-
activesupport (= 6.0.3.4)
123-
bundler (>= 1.3.0)
124-
railties (= 6.0.3.4)
115+
rails (6.1.0)
116+
actioncable (= 6.1.0)
117+
actionmailbox (= 6.1.0)
118+
actionmailer (= 6.1.0)
119+
actionpack (= 6.1.0)
120+
actiontext (= 6.1.0)
121+
actionview (= 6.1.0)
122+
activejob (= 6.1.0)
123+
activemodel (= 6.1.0)
124+
activerecord (= 6.1.0)
125+
activestorage (= 6.1.0)
126+
activesupport (= 6.1.0)
127+
bundler (>= 1.15.0)
128+
railties (= 6.1.0)
125129
sprockets-rails (>= 2.0.0)
126130
rails-dom-testing (2.0.3)
127131
activesupport (>= 4.2.0)
128132
nokogiri (>= 1.6)
129133
rails-html-sanitizer (1.3.0)
130134
loofah (~> 2.3)
131-
railties (6.0.3.4)
132-
actionpack (= 6.0.3.4)
133-
activesupport (= 6.0.3.4)
135+
railties (6.1.0)
136+
actionpack (= 6.1.0)
137+
activesupport (= 6.1.0)
134138
method_source
135139
rake (>= 0.8.7)
136-
thor (>= 0.20.3, < 2.0)
140+
thor (~> 1.0)
137141
rake (13.0.1)
138142
rb-fsevent (0.10.4)
139143
rb-inotify (0.10.1)
@@ -162,13 +166,12 @@ GEM
162166
sprockets (>= 3.0.0)
163167
sqlite3 (1.4.2)
164168
thor (1.0.1)
165-
thread_safe (0.3.6)
166169
tilt (2.0.10)
167170
turbolinks (5.2.1)
168171
turbolinks-source (~> 5.2)
169172
turbolinks-source (5.2.0)
170-
tzinfo (1.2.8)
171-
thread_safe (~> 0.1)
173+
tzinfo (2.0.3)
174+
concurrent-ruby (~> 1.0)
172175
web-console (4.1.0)
173176
actionview (>= 6.0.0)
174177
activemodel (>= 6.0.0)
@@ -187,7 +190,7 @@ GEM
187190
websocket-extensions (0.1.5)
188191
xpath (3.2.0)
189192
nokogiri (~> 1.8)
190-
zeitwerk (2.4.1)
193+
zeitwerk (2.4.2)
191194

192195
PLATFORMS
193196
ruby
@@ -200,7 +203,7 @@ DEPENDENCIES
200203
capybara (>= 2.15)
201204
listen (~> 3.2)
202205
puma (~> 4.1)
203-
rails (~> 6.0.3, >= 6.0.3.4)
206+
rails (~> 6.1.0, >= 6.1.0.0)
204207
sass-rails (>= 6)
205208
selenium-webdriver
206209
sqlite3 (~> 1.4)

bin/rails

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env ruby
22
APP_PATH = File.expand_path('../config/application', __dir__)
3-
require_relative '../config/boot'
4-
require 'rails/commands'
3+
require_relative "../config/boot"
4+
require "rails/commands"

bin/rake

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env ruby
2-
require_relative '../config/boot'
3-
require 'rake'
2+
require_relative "../config/boot"
3+
require "rake"
44
Rake.application.run

bin/setup

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env ruby
2-
require 'fileutils'
2+
require "fileutils"
33

44
# path to your application root.
55
APP_ROOT = File.expand_path('..', __dir__)
@@ -9,16 +9,16 @@ def system!(*args)
99
end
1010

1111
FileUtils.chdir APP_ROOT do
12-
# This script is a way to setup or update your development environment automatically.
13-
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
12+
# This script is a way to set up or update your development environment automatically.
13+
# This script is idempotent, so that you can run it at any time and get an expectable outcome.
1414
# Add necessary setup steps to this file.
1515

1616
puts '== Installing dependencies =='
1717
system! 'gem install bundler --conservative'
1818
system('bundle check') || system!('bundle install')
1919

2020
# Install JavaScript dependencies
21-
# system('bin/yarn')
21+
system! 'bin/yarn'
2222

2323
# puts "\n== Copying sample files =="
2424
# unless File.exist?('config/database.yml')

bin/yarn

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
#!/usr/bin/env ruby
2+
require 'pathname'
3+
24
APP_ROOT = File.expand_path('..', __dir__)
35
Dir.chdir(APP_ROOT) do
4-
begin
5-
exec "yarnpkg", *ARGV
6-
rescue Errno::ENOENT
6+
executable_path = ENV["PATH"].split(File::PATH_SEPARATOR).find do |path|
7+
normalized_path = File.expand_path(path)
8+
9+
normalized_path != __dir__ && File.executable?(Pathname.new(normalized_path).join('yarn'))
10+
end
11+
12+
if executable_path
13+
exec File.expand_path(Pathname.new(executable_path).join('yarn')), *ARGV
14+
else
715
$stderr.puts "Yarn executable was not detected in the system."
816
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
917
exit 1

config.ru

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This file is used by Rack-based servers to start the application.
22

3-
require_relative 'config/environment'
3+
require_relative "config/environment"
44

55
run Rails.application
6+
Rails.application.load_server

config/application.rb

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
require_relative 'boot'
1+
require_relative "boot"
22

3-
require 'rails/all'
3+
require "rails/all"
44

55
# Require the gems listed in Gemfile, including any gems
66
# you've limited to :test, :development, or :production.
@@ -11,15 +11,12 @@ class Application < Rails::Application
1111
# Initialize configuration defaults for originally generated Rails version.
1212
config.load_defaults 6.0
1313

14-
# Settings in config/environments/* take precedence over those specified here.
15-
# Application configuration can go into files in config/initializers
16-
# -- all .rb files in that directory are automatically loaded after loading
17-
# the framework and any gems in your application.
18-
19-
config.generators do |g|
20-
g.orm :active_record
21-
g.template_engine :erb
22-
g.test_framework :test_unit, fixture: true
23-
end
14+
# Configuration for the application, engines, and railties goes here.
15+
#
16+
# These settings can be overridden in specific environments using the files
17+
# in config/environments, which are processed later.
18+
#
19+
# config.time_zone = "Central Time (US & Canada)"
20+
# config.eager_load_paths << Rails.root.join("extras")
2421
end
2522
end

config/boot.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
22

3-
require 'bundler/setup' # Set up gems listed in the Gemfile.
3+
require "bundler/setup" # Set up gems listed in the Gemfile.

config/environment.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Load the Rails application.
2-
require_relative 'application'
2+
require_relative "application"
33

44
# Initialize the Rails application.
55
Rails.application.initialize!

config/environments/development.rb

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
require "active_support/core_ext/integer/time"
2+
13
Rails.application.configure do
24
# Settings specified here will take precedence over those in config/application.rb.
35

4-
# In the development environment your application's code is reloaded on
5-
# every request. This slows down response time but is perfect for development
6+
# In the development environment your application's code is reloaded any time
7+
# it changes. This slows down response time but is perfect for development
68
# since you don't have to restart the web server when you make code changes.
79
config.cache_classes = false
810

@@ -39,6 +41,12 @@
3941
# Print deprecation notices to the Rails logger.
4042
config.active_support.deprecation = :log
4143

44+
# Raise exceptions for disallowed deprecations.
45+
config.active_support.disallowed_deprecation = :raise
46+
47+
# Tell Active Support which deprecation messages to disallow.
48+
config.active_support.disallowed_deprecation_warnings = []
49+
4250
# Raise an error on page load if there are pending migrations.
4351
config.active_record.migration_error = :page_load
4452

@@ -54,12 +62,18 @@
5462
config.assets.quiet = true
5563

5664
# Raises error for missing translations.
57-
# config.action_view.raise_on_missing_translations = true
65+
# config.i18n.raise_on_missing_translations = true
66+
67+
# Annotate rendered view with file names.
68+
# config.action_view.annotate_rendered_view_with_filenames = true
5869

5970
# Use an evented file watcher to asynchronously detect changes in source code,
6071
# routes, locales, etc. This feature depends on the listen gem.
6172
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
6273

74+
# Uncomment if you wish to allow Action Cable access from any origin.
75+
# config.action_cable.disable_request_forgery_protection = true
76+
6377
# Puppet configuration
6478
PUPPET_CONF_DIR = File.join(Dir.pwd,'test','fixtures','files','puppet')
6579
end

0 commit comments

Comments
 (0)