Skip to content

Commit

Permalink
Merge pull request #107 from CDRH/rails6
Browse files Browse the repository at this point in the history
Rails6
  • Loading branch information
wkdewey authored May 18, 2022
2 parents f43a847 + 0194f67 commit 9b9e5b6
Show file tree
Hide file tree
Showing 12 changed files with 200 additions and 112 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ end


# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.0'
gem 'rails', '~> 6.0.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use Puma as the app server
Expand Down
150 changes: 83 additions & 67 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,119 +1,134 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.6)
actionpack (= 5.2.6)
actioncable (6.0.5)
actionpack (= 6.0.5)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.6)
actionpack (= 5.2.6)
actionview (= 5.2.6)
activejob (= 5.2.6)
actionmailbox (6.0.5)
actionpack (= 6.0.5)
activejob (= 6.0.5)
activerecord (= 6.0.5)
activestorage (= 6.0.5)
activesupport (= 6.0.5)
mail (>= 2.7.1)
actionmailer (6.0.5)
actionpack (= 6.0.5)
actionview (= 6.0.5)
activejob (= 6.0.5)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.6)
actionview (= 5.2.6)
activesupport (= 5.2.6)
actionpack (6.0.5)
actionview (= 6.0.5)
activesupport (= 6.0.5)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.6)
activesupport (= 5.2.6)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.5)
actionpack (= 6.0.5)
activerecord (= 6.0.5)
activestorage (= 6.0.5)
activesupport (= 6.0.5)
nokogiri (>= 1.8.5)
actionview (6.0.5)
activesupport (= 6.0.5)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.6)
activesupport (= 5.2.6)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.5)
activesupport (= 6.0.5)
globalid (>= 0.3.6)
activemodel (5.2.6)
activesupport (= 5.2.6)
activerecord (5.2.6)
activemodel (= 5.2.6)
activesupport (= 5.2.6)
arel (>= 9.0)
activestorage (5.2.6)
actionpack (= 5.2.6)
activerecord (= 5.2.6)
marcel (~> 1.0.0)
activesupport (5.2.6)
activemodel (6.0.5)
activesupport (= 6.0.5)
activerecord (6.0.5)
activemodel (= 6.0.5)
activesupport (= 6.0.5)
activestorage (6.0.5)
actionpack (= 6.0.5)
activejob (= 6.0.5)
activerecord (= 6.0.5)
marcel (~> 1.0)
activesupport (6.0.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (9.0.0)
bootsnap (1.8.1)
msgpack (~> 1.0)
zeitwerk (~> 2.2, >= 2.2.2)
bootsnap (1.11.1)
msgpack (~> 1.2)
builder (3.2.4)
byebug (11.1.3)
concurrent-ruby (1.1.9)
concurrent-ruby (1.1.10)
crass (1.0.6)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
erubi (1.10.0)
ffi (1.15.3)
globalid (0.5.2)
ffi (1.15.5)
globalid (1.0.0)
activesupport (>= 5.0)
http-accept (1.7.0)
http-cookie (1.0.4)
domain_name (~> 0.5)
i18n (1.8.10)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.12.0)
loofah (2.18.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.1)
marcel (1.0.2)
method_source (1.0.0)
mime-types (3.3.1)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2021.0704)
mini_mime (1.1.1)
mini_portile2 (2.6.1)
minitest (5.14.4)
msgpack (1.4.2)
mime-types-data (3.2022.0105)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
minitest (5.15.0)
msgpack (1.5.1)
netrc (0.11.0)
nio4r (2.5.8)
nokogiri (1.12.4)
mini_portile2 (~> 2.6.1)
nokogiri (1.13.6)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
puma (3.12.6)
racc (1.5.2)
racc (1.6.0)
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.6)
actioncable (= 5.2.6)
actionmailer (= 5.2.6)
actionpack (= 5.2.6)
actionview (= 5.2.6)
activejob (= 5.2.6)
activemodel (= 5.2.6)
activerecord (= 5.2.6)
activestorage (= 5.2.6)
activesupport (= 5.2.6)
rails (6.0.5)
actioncable (= 6.0.5)
actionmailbox (= 6.0.5)
actionmailer (= 6.0.5)
actionpack (= 6.0.5)
actiontext (= 6.0.5)
actionview (= 6.0.5)
activejob (= 6.0.5)
activemodel (= 6.0.5)
activerecord (= 6.0.5)
activestorage (= 6.0.5)
activesupport (= 6.0.5)
bundler (>= 1.3.0)
railties (= 5.2.6)
railties (= 6.0.5)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (5.2.6)
actionpack (= 5.2.6)
activesupport (= 5.2.6)
railties (6.0.5)
actionpack (= 6.0.5)
activesupport (= 6.0.5)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
thor (>= 0.20.3, < 2.0)
rake (13.0.6)
rb-fsevent (0.11.0)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
rest-client (2.1.0)
Expand All @@ -126,24 +141,25 @@ GEM
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.2)
sprockets (4.0.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
thor (1.1.0)
thor (1.2.1)
thread_safe (0.3.6)
tzinfo (1.2.9)
thread_safe (~> 0.1)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unf_ext (0.0.8.1)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.5.4)

PLATFORMS
ruby
Expand All @@ -153,7 +169,7 @@ DEPENDENCIES
byebug
listen (>= 3.0.5, < 3.2)
puma (~> 3.7)
rails (~> 5.2.0)
rails (~> 6.0.2)
rest-client (>= 2.1.0.rc1, < 2.2)
spring
spring-watcher-listen (~> 2.0.0)
Expand Down
10 changes: 5 additions & 5 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env ruby
require 'fileutils'
include FileUtils

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

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

puts '== Installing dependencies =='
Expand All @@ -19,11 +19,11 @@ chdir APP_ROOT do

# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml'
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
# end

puts "\n== Preparing database =="
system! 'bin/rails db:setup'
system! 'bin/rails db:prepare'

puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'
Expand Down
6 changes: 2 additions & 4 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
require "active_storage/engine"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_mailbox/engine"
require "action_text/engine"
require "action_view/railtie"
require "action_cable/engine"
# require "sprockets/railtie"
Expand All @@ -19,7 +21,6 @@

module Api
class Application < Rails::Application

# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 5.0

Expand All @@ -32,8 +33,5 @@ class Application < Rails::Application
# Middleware like session, flash, cookies can be added back manually.
# Skip views, helpers and assets when generating a new resource.
config.api_only = true

# sets to avoid deprecation warning in terminal
Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
end
end
2 changes: 1 addition & 1 deletion config/cable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ development:
adapter: async

test:
adapter: async
adapter: test

production:
adapter: redis
Expand Down
13 changes: 6 additions & 7 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join('tmp', 'caching-dev.txt').exist?
config.action_controller.perform_caching = true

config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.to_i}"
Expand All @@ -27,7 +25,7 @@
config.cache_store = :null_store
end

# Store uploaded files on the local file system (see config/storage.yml for options)
# Store uploaded files on the local file system (see config/storage.yml for options).
config.active_storage.service = :local

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


# Raises error for missing translations
# Raises error for missing translations.
# config.action_view.raise_on_missing_translations = 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



# LOCAL
# Custom dev env logger to empty log more frequently
config.logger = ActiveSupport::TaggedLogging.new(
Expand All @@ -62,4 +57,8 @@
1, 32 * 1024 * 1024
)
)

# CDRH CONFIGURATION

config.hosts << "cdrhdev1.unl.edu"
end
Loading

0 comments on commit 9b9e5b6

Please sign in to comment.