Skip to content

Commit 67631e7

Browse files
committed
Upgrade to latest rails 6.1
1 parent 743d628 commit 67631e7

20 files changed

+243
-112
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
gem 'rails', '~> 6.0.4'
3+
gem 'rails', '~> 6.1.0'
44
gem 'sqlite3'
55
gem 'puma', '~> 3.12'
66

Gemfile.lock

Lines changed: 66 additions & 63 deletions
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.4)
5-
actionpack (= 6.0.4)
4+
actioncable (6.1.4)
5+
actionpack (= 6.1.4)
6+
activesupport (= 6.1.4)
67
nio4r (~> 2.0)
78
websocket-driver (>= 0.6.1)
8-
actionmailbox (6.0.4)
9-
actionpack (= 6.0.4)
10-
activejob (= 6.0.4)
11-
activerecord (= 6.0.4)
12-
activestorage (= 6.0.4)
13-
activesupport (= 6.0.4)
9+
actionmailbox (6.1.4)
10+
actionpack (= 6.1.4)
11+
activejob (= 6.1.4)
12+
activerecord (= 6.1.4)
13+
activestorage (= 6.1.4)
14+
activesupport (= 6.1.4)
1415
mail (>= 2.7.1)
15-
actionmailer (6.0.4)
16-
actionpack (= 6.0.4)
17-
actionview (= 6.0.4)
18-
activejob (= 6.0.4)
16+
actionmailer (6.1.4)
17+
actionpack (= 6.1.4)
18+
actionview (= 6.1.4)
19+
activejob (= 6.1.4)
20+
activesupport (= 6.1.4)
1921
mail (~> 2.5, >= 2.5.4)
2022
rails-dom-testing (~> 2.0)
21-
actionpack (6.0.4)
22-
actionview (= 6.0.4)
23-
activesupport (= 6.0.4)
24-
rack (~> 2.0, >= 2.0.8)
23+
actionpack (6.1.4)
24+
actionview (= 6.1.4)
25+
activesupport (= 6.1.4)
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.4)
29-
actionpack (= 6.0.4)
30-
activerecord (= 6.0.4)
31-
activestorage (= 6.0.4)
32-
activesupport (= 6.0.4)
30+
actiontext (6.1.4)
31+
actionpack (= 6.1.4)
32+
activerecord (= 6.1.4)
33+
activestorage (= 6.1.4)
34+
activesupport (= 6.1.4)
3335
nokogiri (>= 1.8.5)
34-
actionview (6.0.4)
35-
activesupport (= 6.0.4)
36+
actionview (6.1.4)
37+
activesupport (= 6.1.4)
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.4)
41-
activesupport (= 6.0.4)
42+
activejob (6.1.4)
43+
activesupport (= 6.1.4)
4244
globalid (>= 0.3.6)
43-
activemodel (6.0.4)
44-
activesupport (= 6.0.4)
45-
activerecord (6.0.4)
46-
activemodel (= 6.0.4)
47-
activesupport (= 6.0.4)
48-
activestorage (6.0.4)
49-
actionpack (= 6.0.4)
50-
activejob (= 6.0.4)
51-
activerecord (= 6.0.4)
45+
activemodel (6.1.4)
46+
activesupport (= 6.1.4)
47+
activerecord (6.1.4)
48+
activemodel (= 6.1.4)
49+
activesupport (= 6.1.4)
50+
activestorage (6.1.4)
51+
actionpack (= 6.1.4)
52+
activejob (= 6.1.4)
53+
activerecord (= 6.1.4)
54+
activesupport (= 6.1.4)
5255
marcel (~> 1.0.0)
53-
activesupport (6.0.4)
56+
mini_mime (>= 1.1.0)
57+
activesupport (6.1.4)
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.8.0)
6064
public_suffix (>= 2.0.2, < 5.0)
6165
bindex (0.8.1)
@@ -109,32 +113,32 @@ GEM
109113
rack (2.2.3)
110114
rack-test (1.1.0)
111115
rack (>= 1.0, < 3)
112-
rails (6.0.4)
113-
actioncable (= 6.0.4)
114-
actionmailbox (= 6.0.4)
115-
actionmailer (= 6.0.4)
116-
actionpack (= 6.0.4)
117-
actiontext (= 6.0.4)
118-
actionview (= 6.0.4)
119-
activejob (= 6.0.4)
120-
activemodel (= 6.0.4)
121-
activerecord (= 6.0.4)
122-
activestorage (= 6.0.4)
123-
activesupport (= 6.0.4)
124-
bundler (>= 1.3.0)
125-
railties (= 6.0.4)
116+
rails (6.1.4)
117+
actioncable (= 6.1.4)
118+
actionmailbox (= 6.1.4)
119+
actionmailer (= 6.1.4)
120+
actionpack (= 6.1.4)
121+
actiontext (= 6.1.4)
122+
actionview (= 6.1.4)
123+
activejob (= 6.1.4)
124+
activemodel (= 6.1.4)
125+
activerecord (= 6.1.4)
126+
activestorage (= 6.1.4)
127+
activesupport (= 6.1.4)
128+
bundler (>= 1.15.0)
129+
railties (= 6.1.4)
126130
sprockets-rails (>= 2.0.0)
127131
rails-dom-testing (2.0.3)
128132
activesupport (>= 4.2.0)
129133
nokogiri (>= 1.6)
130134
rails-html-sanitizer (1.3.0)
131135
loofah (~> 2.3)
132-
railties (6.0.4)
133-
actionpack (= 6.0.4)
134-
activesupport (= 6.0.4)
136+
railties (6.1.4)
137+
actionpack (= 6.1.4)
138+
activesupport (= 6.1.4)
135139
method_source
136-
rake (>= 0.8.7)
137-
thor (>= 0.20.3, < 2.0)
140+
rake (>= 0.13)
141+
thor (~> 1.0)
138142
rake (13.0.6)
139143
rb-fsevent (0.11.0)
140144
rb-inotify (0.10.1)
@@ -148,7 +152,7 @@ GEM
148152
spring-watcher-listen (2.0.1)
149153
listen (>= 2.7, < 4.0)
150154
spring (>= 1.2, < 3.0)
151-
sprockets (3.7.2)
155+
sprockets (4.0.2)
152156
concurrent-ruby (~> 1.0)
153157
rack (> 1, < 3)
154158
sprockets-rails (3.2.2)
@@ -157,9 +161,8 @@ GEM
157161
sprockets (>= 3.0.0)
158162
sqlite3 (1.4.2)
159163
thor (1.1.0)
160-
thread_safe (0.3.6)
161-
tzinfo (1.2.9)
162-
thread_safe (~> 0.1)
164+
tzinfo (2.0.4)
165+
concurrent-ruby (~> 1.0)
163166
web-console (4.1.0)
164167
actionview (>= 6.0.0)
165168
activemodel (>= 6.0.0)
@@ -183,7 +186,7 @@ DEPENDENCIES
183186
flipper-cloud (~> 0.22.0)
184187
listen (>= 3.0.5, < 3.2)
185188
puma (~> 3.12)
186-
rails (~> 6.0.4)
189+
rails (~> 6.1.0)
187190
selenium-webdriver
188191
spring
189192
spring-watcher-listen (~> 2.0.0)

bin/rails

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2+
load File.expand_path("spring", __dir__)
23
APP_PATH = File.expand_path('../config/application', __dir__)
3-
require_relative '../config/boot'
4-
require 'rails/commands'
4+
require_relative "../config/boot"
5+
require "rails/commands"

bin/rake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env ruby
2-
require_relative '../config/boot'
3-
require 'rake'
2+
load File.expand_path("spring", __dir__)
3+
require_relative "../config/boot"
4+
require "rake"
45
Rake.application.run

bin/setup

Lines changed: 4 additions & 4 deletions
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/spring

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
#!/usr/bin/env ruby
2+
if !defined?(Spring) && [nil, "development", "test"].include?(ENV["RAILS_ENV"])
3+
gem "bundler"
4+
require "bundler"
25

3-
# This file loads spring without using Bundler, in order to be fast.
4-
# It gets overwritten when you run the `spring binstub` command.
5-
6-
unless defined?(Spring)
7-
require 'rubygems'
8-
require 'bundler'
9-
10-
lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11-
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
12-
if spring
6+
# Load Spring without loading other gems in the Gemfile, for speed.
7+
Bundler.locked_gems&.specs&.find { |spec| spec.name == "spring" }&.tap do |spring|
138
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
14-
gem 'spring', spring.version
15-
require 'spring/binstub'
9+
gem "spring", spring.version
10+
require "spring/binstub"
11+
rescue Gem::LoadError
12+
# Ignore when Spring is not installed.
1613
end
1714
end

bin/yarn

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#!/usr/bin/env ruby
22
APP_ROOT = File.expand_path('..', __dir__)
33
Dir.chdir(APP_ROOT) do
4-
begin
5-
exec "yarnpkg", *ARGV
6-
rescue Errno::ENOENT
4+
yarn = ENV["PATH"].split(File::PATH_SEPARATOR).
5+
select { |dir| File.expand_path(dir) != __dir__ }.
6+
product(["yarn", "yarn.cmd", "yarn.ps1"]).
7+
map { |dir, file| File.expand_path(file, dir) }.
8+
find { |file| File.executable?(file) }
9+
10+
if yarn
11+
exec yarn, *ARGV
12+
else
713
$stderr.puts "Yarn executable was not detected in the system."
814
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
915
exit 1

config.ru

Lines changed: 2 additions & 1 deletion
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

Lines changed: 9 additions & 6 deletions
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,9 +11,12 @@ class Application < Rails::Application
1111
# Initialize configuration defaults for originally generated Rails version.
1212
config.load_defaults 5.1
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.
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")
1821
end
1922
end

config/boot.rb

Lines changed: 1 addition & 1 deletion
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.

0 commit comments

Comments
 (0)