Skip to content

Commit 9b9e5b6

Browse files
authored
Merge pull request #107 from CDRH/rails6
Rails6
2 parents f43a847 + 0194f67 commit 9b9e5b6

File tree

12 files changed

+200
-112
lines changed

12 files changed

+200
-112
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ end
77

88

99
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10-
gem 'rails', '~> 5.2.0'
10+
gem 'rails', '~> 6.0.2'
1111
# Use sqlite3 as the database for Active Record
1212
gem 'sqlite3'
1313
# Use Puma as the app server

Gemfile.lock

Lines changed: 83 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,119 +1,134 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (5.2.6)
5-
actionpack (= 5.2.6)
4+
actioncable (6.0.5)
5+
actionpack (= 6.0.5)
66
nio4r (~> 2.0)
77
websocket-driver (>= 0.6.1)
8-
actionmailer (5.2.6)
9-
actionpack (= 5.2.6)
10-
actionview (= 5.2.6)
11-
activejob (= 5.2.6)
8+
actionmailbox (6.0.5)
9+
actionpack (= 6.0.5)
10+
activejob (= 6.0.5)
11+
activerecord (= 6.0.5)
12+
activestorage (= 6.0.5)
13+
activesupport (= 6.0.5)
14+
mail (>= 2.7.1)
15+
actionmailer (6.0.5)
16+
actionpack (= 6.0.5)
17+
actionview (= 6.0.5)
18+
activejob (= 6.0.5)
1219
mail (~> 2.5, >= 2.5.4)
1320
rails-dom-testing (~> 2.0)
14-
actionpack (5.2.6)
15-
actionview (= 5.2.6)
16-
activesupport (= 5.2.6)
21+
actionpack (6.0.5)
22+
actionview (= 6.0.5)
23+
activesupport (= 6.0.5)
1724
rack (~> 2.0, >= 2.0.8)
1825
rack-test (>= 0.6.3)
1926
rails-dom-testing (~> 2.0)
20-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
21-
actionview (5.2.6)
22-
activesupport (= 5.2.6)
27+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
28+
actiontext (6.0.5)
29+
actionpack (= 6.0.5)
30+
activerecord (= 6.0.5)
31+
activestorage (= 6.0.5)
32+
activesupport (= 6.0.5)
33+
nokogiri (>= 1.8.5)
34+
actionview (6.0.5)
35+
activesupport (= 6.0.5)
2336
builder (~> 3.1)
2437
erubi (~> 1.4)
2538
rails-dom-testing (~> 2.0)
26-
rails-html-sanitizer (~> 1.0, >= 1.0.3)
27-
activejob (5.2.6)
28-
activesupport (= 5.2.6)
39+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
40+
activejob (6.0.5)
41+
activesupport (= 6.0.5)
2942
globalid (>= 0.3.6)
30-
activemodel (5.2.6)
31-
activesupport (= 5.2.6)
32-
activerecord (5.2.6)
33-
activemodel (= 5.2.6)
34-
activesupport (= 5.2.6)
35-
arel (>= 9.0)
36-
activestorage (5.2.6)
37-
actionpack (= 5.2.6)
38-
activerecord (= 5.2.6)
39-
marcel (~> 1.0.0)
40-
activesupport (5.2.6)
43+
activemodel (6.0.5)
44+
activesupport (= 6.0.5)
45+
activerecord (6.0.5)
46+
activemodel (= 6.0.5)
47+
activesupport (= 6.0.5)
48+
activestorage (6.0.5)
49+
actionpack (= 6.0.5)
50+
activejob (= 6.0.5)
51+
activerecord (= 6.0.5)
52+
marcel (~> 1.0)
53+
activesupport (6.0.5)
4154
concurrent-ruby (~> 1.0, >= 1.0.2)
4255
i18n (>= 0.7, < 2)
4356
minitest (~> 5.1)
4457
tzinfo (~> 1.1)
45-
arel (9.0.0)
46-
bootsnap (1.8.1)
47-
msgpack (~> 1.0)
58+
zeitwerk (~> 2.2, >= 2.2.2)
59+
bootsnap (1.11.1)
60+
msgpack (~> 1.2)
4861
builder (3.2.4)
4962
byebug (11.1.3)
50-
concurrent-ruby (1.1.9)
63+
concurrent-ruby (1.1.10)
5164
crass (1.0.6)
5265
domain_name (0.5.20190701)
5366
unf (>= 0.0.5, < 1.0.0)
5467
erubi (1.10.0)
55-
ffi (1.15.3)
56-
globalid (0.5.2)
68+
ffi (1.15.5)
69+
globalid (1.0.0)
5770
activesupport (>= 5.0)
5871
http-accept (1.7.0)
5972
http-cookie (1.0.4)
6073
domain_name (~> 0.5)
61-
i18n (1.8.10)
74+
i18n (1.10.0)
6275
concurrent-ruby (~> 1.0)
6376
listen (3.1.5)
6477
rb-fsevent (~> 0.9, >= 0.9.4)
6578
rb-inotify (~> 0.9, >= 0.9.7)
6679
ruby_dep (~> 1.2)
67-
loofah (2.12.0)
80+
loofah (2.18.0)
6881
crass (~> 1.0.2)
6982
nokogiri (>= 1.5.9)
7083
mail (2.7.1)
7184
mini_mime (>= 0.1.1)
72-
marcel (1.0.1)
85+
marcel (1.0.2)
7386
method_source (1.0.0)
74-
mime-types (3.3.1)
87+
mime-types (3.4.1)
7588
mime-types-data (~> 3.2015)
76-
mime-types-data (3.2021.0704)
77-
mini_mime (1.1.1)
78-
mini_portile2 (2.6.1)
79-
minitest (5.14.4)
80-
msgpack (1.4.2)
89+
mime-types-data (3.2022.0105)
90+
mini_mime (1.1.2)
91+
mini_portile2 (2.8.0)
92+
minitest (5.15.0)
93+
msgpack (1.5.1)
8194
netrc (0.11.0)
8295
nio4r (2.5.8)
83-
nokogiri (1.12.4)
84-
mini_portile2 (~> 2.6.1)
96+
nokogiri (1.13.6)
97+
mini_portile2 (~> 2.8.0)
8598
racc (~> 1.4)
8699
puma (3.12.6)
87-
racc (1.5.2)
100+
racc (1.6.0)
88101
rack (2.2.3)
89102
rack-test (1.1.0)
90103
rack (>= 1.0, < 3)
91-
rails (5.2.6)
92-
actioncable (= 5.2.6)
93-
actionmailer (= 5.2.6)
94-
actionpack (= 5.2.6)
95-
actionview (= 5.2.6)
96-
activejob (= 5.2.6)
97-
activemodel (= 5.2.6)
98-
activerecord (= 5.2.6)
99-
activestorage (= 5.2.6)
100-
activesupport (= 5.2.6)
104+
rails (6.0.5)
105+
actioncable (= 6.0.5)
106+
actionmailbox (= 6.0.5)
107+
actionmailer (= 6.0.5)
108+
actionpack (= 6.0.5)
109+
actiontext (= 6.0.5)
110+
actionview (= 6.0.5)
111+
activejob (= 6.0.5)
112+
activemodel (= 6.0.5)
113+
activerecord (= 6.0.5)
114+
activestorage (= 6.0.5)
115+
activesupport (= 6.0.5)
101116
bundler (>= 1.3.0)
102-
railties (= 5.2.6)
117+
railties (= 6.0.5)
103118
sprockets-rails (>= 2.0.0)
104119
rails-dom-testing (2.0.3)
105120
activesupport (>= 4.2.0)
106121
nokogiri (>= 1.6)
107122
rails-html-sanitizer (1.4.2)
108123
loofah (~> 2.3)
109-
railties (5.2.6)
110-
actionpack (= 5.2.6)
111-
activesupport (= 5.2.6)
124+
railties (6.0.5)
125+
actionpack (= 6.0.5)
126+
activesupport (= 6.0.5)
112127
method_source
113128
rake (>= 0.8.7)
114-
thor (>= 0.19.0, < 2.0)
129+
thor (>= 0.20.3, < 2.0)
115130
rake (13.0.6)
116-
rb-fsevent (0.11.0)
131+
rb-fsevent (0.11.1)
117132
rb-inotify (0.10.1)
118133
ffi (~> 1.0)
119134
rest-client (2.1.0)
@@ -126,24 +141,25 @@ GEM
126141
spring-watcher-listen (2.0.1)
127142
listen (>= 2.7, < 4.0)
128143
spring (>= 1.2, < 3.0)
129-
sprockets (4.0.2)
144+
sprockets (4.0.3)
130145
concurrent-ruby (~> 1.0)
131146
rack (> 1, < 3)
132-
sprockets-rails (3.2.2)
133-
actionpack (>= 4.0)
134-
activesupport (>= 4.0)
147+
sprockets-rails (3.4.2)
148+
actionpack (>= 5.2)
149+
activesupport (>= 5.2)
135150
sprockets (>= 3.0.0)
136151
sqlite3 (1.4.2)
137-
thor (1.1.0)
152+
thor (1.2.1)
138153
thread_safe (0.3.6)
139154
tzinfo (1.2.9)
140155
thread_safe (~> 0.1)
141156
unf (0.1.4)
142157
unf_ext
143-
unf_ext (0.0.7.7)
158+
unf_ext (0.0.8.1)
144159
websocket-driver (0.7.5)
145160
websocket-extensions (>= 0.1.0)
146161
websocket-extensions (0.1.5)
162+
zeitwerk (2.5.4)
147163

148164
PLATFORMS
149165
ruby
@@ -153,7 +169,7 @@ DEPENDENCIES
153169
byebug
154170
listen (>= 3.0.5, < 3.2)
155171
puma (~> 3.7)
156-
rails (~> 5.2.0)
172+
rails (~> 6.0.2)
157173
rest-client (>= 2.1.0.rc1, < 2.2)
158174
spring
159175
spring-watcher-listen (~> 2.0.0)

bin/setup

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env ruby
22
require 'fileutils'
3-
include FileUtils
43

54
# path to your application root.
65
APP_ROOT = File.expand_path('..', __dir__)
@@ -9,8 +8,9 @@ def system!(*args)
98
system(*args) || abort("\n== Command #{args} failed ==")
109
end
1110

12-
chdir APP_ROOT do
13-
# This script is a starting point to setup your application.
11+
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.
1414
# Add necessary setup steps to this file.
1515

1616
puts '== Installing dependencies =='
@@ -19,11 +19,11 @@ chdir APP_ROOT do
1919

2020
# puts "\n== Copying sample files =="
2121
# unless File.exist?('config/database.yml')
22-
# cp 'config/database.yml.sample', 'config/database.yml'
22+
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
2323
# end
2424

2525
puts "\n== Preparing database =="
26-
system! 'bin/rails db:setup'
26+
system! 'bin/rails db:prepare'
2727

2828
puts "\n== Removing old logs and tempfiles =="
2929
system! 'bin/rails log:clear tmp:clear'

config/application.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
require "active_storage/engine"
99
require "action_controller/railtie"
1010
require "action_mailer/railtie"
11+
require "action_mailbox/engine"
12+
require "action_text/engine"
1113
require "action_view/railtie"
1214
require "action_cable/engine"
1315
# require "sprockets/railtie"
@@ -19,7 +21,6 @@
1921

2022
module Api
2123
class Application < Rails::Application
22-
2324
# Initialize configuration defaults for originally generated Rails version.
2425
config.load_defaults 5.0
2526

@@ -32,8 +33,5 @@ class Application < Rails::Application
3233
# Middleware like session, flash, cookies can be added back manually.
3334
# Skip views, helpers and assets when generating a new resource.
3435
config.api_only = true
35-
36-
# sets to avoid deprecation warning in terminal
37-
Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
3836
end
3937
end

config/cable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ development:
22
adapter: async
33

44
test:
5-
adapter: async
5+
adapter: test
66

77
production:
88
adapter: redis

config/environments/development.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# Enable/disable caching. By default caching is disabled.
1616
# Run rails dev:cache to toggle caching.
1717
if Rails.root.join('tmp', 'caching-dev.txt').exist?
18-
config.action_controller.perform_caching = true
19-
2018
config.cache_store = :memory_store
2119
config.public_file_server.headers = {
2220
'Cache-Control' => "public, max-age=#{2.days.to_i}"
@@ -27,7 +25,7 @@
2725
config.cache_store = :null_store
2826
end
2927

30-
# Store uploaded files on the local file system (see config/storage.yml for options)
28+
# Store uploaded files on the local file system (see config/storage.yml for options).
3129
config.active_storage.service = :local
3230

3331
# Don't care if the mailer can't send.
@@ -45,15 +43,12 @@
4543
config.active_record.verbose_query_logs = true
4644

4745

48-
# Raises error for missing translations
46+
# Raises error for missing translations.
4947
# config.action_view.raise_on_missing_translations = true
5048

5149
# Use an evented file watcher to asynchronously detect changes in source code,
5250
# routes, locales, etc. This feature depends on the listen gem.
5351
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
54-
55-
56-
5752
# LOCAL
5853
# Custom dev env logger to empty log more frequently
5954
config.logger = ActiveSupport::TaggedLogging.new(
@@ -62,4 +57,8 @@
6257
1, 32 * 1024 * 1024
6358
)
6459
)
60+
61+
# CDRH CONFIGURATION
62+
63+
config.hosts << "cdrhdev1.unl.edu"
6564
end

0 commit comments

Comments
 (0)