Skip to content

Commit

Permalink
Upgrade to Rails 7
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Jan 13, 2022
1 parent 477e7b5 commit 69a7095
Show file tree
Hide file tree
Showing 14 changed files with 328 additions and 179 deletions.
5 changes: 3 additions & 2 deletions Gemfile
Expand Up @@ -62,16 +62,17 @@ gem 'jsbundling-rails', '~> 0.1.9'
gem 'lograge', '~> 0.11.2'
gem 'okcomputer'
gem 'pg'
gem 'rails', '~> 6.1'
gem 'rails', '~> 7.0.1'
gem 'redis', '~> 4.0'
# pinned because 2.6.0 broke the build: [Reform] Your :populator did not return a Reform::Form instance for `authors`.
gem 'reform', '~> 2.5.0'
gem 'reform-rails', '~> 0.2.0'
gem 'sdr-client', '~> 0.63'
gem 'sidekiq', '~> 6.1'
gem 'sneakers', '~> 2.11' # rabbitMQ background processing
gem 'sprockets-rails'
gem 'state_machines-activerecord'
gem 'turbo-rails', '~> 0.8.2'
gem 'view_component', '~> 2.18'
gem 'whenever'
gem 'zipline', '~> 1.3'
gem 'zipline', github: 'fringd/zipline' # awaiting 1.4
167 changes: 99 additions & 68 deletions Gemfile.lock
@@ -1,67 +1,81 @@
GIT
remote: https://github.com/fringd/zipline.git
revision: 90ceca20210914ed859b289b6b6c5921f6e3e6af
specs:
zipline (1.3.1)
actionpack (>= 3.2.1, < 8.0)
zip_tricks (>= 4.2.1, < 6.0)

GEM
remote: https://rubygems.org/
specs:
action_policy (0.5.7)
ruby-next-core (>= 0.11.0)
actioncable (6.1.4.4)
actionpack (= 6.1.4.4)
activesupport (= 6.1.4.4)
actioncable (7.0.1)
actionpack (= 7.0.1)
activesupport (= 7.0.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.4.4)
actionpack (= 6.1.4.4)
activejob (= 6.1.4.4)
activerecord (= 6.1.4.4)
activestorage (= 6.1.4.4)
activesupport (= 6.1.4.4)
actionmailbox (7.0.1)
actionpack (= 7.0.1)
activejob (= 7.0.1)
activerecord (= 7.0.1)
activestorage (= 7.0.1)
activesupport (= 7.0.1)
mail (>= 2.7.1)
actionmailer (6.1.4.4)
actionpack (= 6.1.4.4)
actionview (= 6.1.4.4)
activejob (= 6.1.4.4)
activesupport (= 6.1.4.4)
net-imap
net-pop
net-smtp
actionmailer (7.0.1)
actionpack (= 7.0.1)
actionview (= 7.0.1)
activejob (= 7.0.1)
activesupport (= 7.0.1)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (6.1.4.4)
actionview (= 6.1.4.4)
activesupport (= 6.1.4.4)
rack (~> 2.0, >= 2.0.9)
actionpack (7.0.1)
actionview (= 7.0.1)
activesupport (= 7.0.1)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.4.4)
actionpack (= 6.1.4.4)
activerecord (= 6.1.4.4)
activestorage (= 6.1.4.4)
activesupport (= 6.1.4.4)
actiontext (7.0.1)
actionpack (= 7.0.1)
activerecord (= 7.0.1)
activestorage (= 7.0.1)
activesupport (= 7.0.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (6.1.4.4)
activesupport (= 6.1.4.4)
actionview (7.0.1)
activesupport (= 7.0.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.4.4)
activesupport (= 6.1.4.4)
activejob (7.0.1)
activesupport (= 7.0.1)
globalid (>= 0.3.6)
activemodel (6.1.4.4)
activesupport (= 6.1.4.4)
activerecord (6.1.4.4)
activemodel (= 6.1.4.4)
activesupport (= 6.1.4.4)
activestorage (6.1.4.4)
actionpack (= 6.1.4.4)
activejob (= 6.1.4.4)
activerecord (= 6.1.4.4)
activesupport (= 6.1.4.4)
marcel (~> 1.0.0)
activemodel (7.0.1)
activesupport (= 7.0.1)
activerecord (7.0.1)
activemodel (= 7.0.1)
activesupport (= 7.0.1)
activestorage (7.0.1)
actionpack (= 7.0.1)
activejob (= 7.0.1)
activerecord (= 7.0.1)
activesupport (= 7.0.1)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.4.4)
activesupport (7.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.4.0)
Expand All @@ -71,7 +85,7 @@ GEM
attr_extras (6.2.5)
bcrypt (3.1.16)
bindex (0.8.1)
bootsnap (1.9.3)
bootsnap (1.9.4)
msgpack (~> 1.0)
builder (3.2.4)
bundler-audit (0.9.0.1)
Expand Down Expand Up @@ -114,7 +128,7 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
capybara-screenshot (1.0.25)
capybara-screenshot (1.0.26)
capybara (>= 1.0, < 4)
launchy
chronic (0.10.2)
Expand Down Expand Up @@ -157,6 +171,7 @@ GEM
devise-remote-user (1.1.0)
devise
diff-lcs (1.5.0)
digest (3.1.0)
disposable (0.4.7)
declarative (>= 0.0.9, < 1.0.0)
declarative-builder (< 0.2.0)
Expand Down Expand Up @@ -210,7 +225,7 @@ GEM
dry-core (~> 0.5, >= 0.5)
dry-initializer (~> 3.0)
dry-schema (~> 1.8, >= 1.8.0)
edtf (3.0.7)
edtf (3.0.8)
activesupport (>= 3.0, < 8.0)
erubi (1.10.0)
factory_bot (6.2.0)
Expand Down Expand Up @@ -250,14 +265,15 @@ GEM
cliver (~> 0.3)
concurrent-ruby (~> 1.1)
websocket-driver (>= 0.6, < 0.8)
ffi (1.15.4)
ffi (1.15.5)
globalid (1.0.0)
activesupport (>= 5.0)
hashdiff (1.0.1)
honeybadger (4.9.0)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
io-wait (0.2.1)
jbuilder (2.11.5)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
Expand Down Expand Up @@ -287,8 +303,23 @@ GEM
msgpack (1.4.2)
multi_json (1.15.0)
multipart-post (2.1.1)
net-imap (0.2.3)
digest
net-protocol
strscan
net-pop (0.1.1)
digest
net-protocol
timeout
net-protocol (0.1.2)
io-wait
timeout
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-smtp (0.3.1)
digest
net-protocol
timeout
net-ssh (6.1.0)
nio4r (2.5.8)
nokogiri (1.13.0)
Expand Down Expand Up @@ -319,33 +350,33 @@ GEM
rack (2.2.3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.1.4.4)
actioncable (= 6.1.4.4)
actionmailbox (= 6.1.4.4)
actionmailer (= 6.1.4.4)
actionpack (= 6.1.4.4)
actiontext (= 6.1.4.4)
actionview (= 6.1.4.4)
activejob (= 6.1.4.4)
activemodel (= 6.1.4.4)
activerecord (= 6.1.4.4)
activestorage (= 6.1.4.4)
activesupport (= 6.1.4.4)
rails (7.0.1)
actioncable (= 7.0.1)
actionmailbox (= 7.0.1)
actionmailer (= 7.0.1)
actionpack (= 7.0.1)
actiontext (= 7.0.1)
actionview (= 7.0.1)
activejob (= 7.0.1)
activemodel (= 7.0.1)
activerecord (= 7.0.1)
activestorage (= 7.0.1)
activesupport (= 7.0.1)
bundler (>= 1.15.0)
railties (= 6.1.4.4)
sprockets-rails (>= 2.0.0)
railties (= 7.0.1)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (6.1.4.4)
actionpack (= 6.1.4.4)
activesupport (= 6.1.4.4)
railties (7.0.1)
actionpack (= 7.0.1)
activesupport (= 7.0.1)
method_source
rake (>= 0.13)
rake (>= 12.2)
thor (~> 1.0)
rainbow (3.0.0)
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (12.3.3)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
Expand Down Expand Up @@ -470,11 +501,13 @@ GEM
state_machines-graphviz (0.0.2)
ruby-graphviz
state_machines
strscan (3.0.1)
super_diff (0.8.0)
attr_extras (>= 6.2.4)
diff-lcs
patience_diff
thor (1.2.1)
timeout (0.2.0)
turbo-rails (0.8.3)
rails (>= 6.0.0)
tzinfo (2.0.4)
Expand Down Expand Up @@ -504,9 +537,6 @@ GEM
nokogiri (~> 1.8)
zeitwerk (2.5.3)
zip_tricks (5.6.0)
zipline (1.3.1)
actionpack (>= 3.2.1, < 7.0)
zip_tricks (>= 4.2.1, < 6.0)

PLATFORMS
ruby
Expand Down Expand Up @@ -548,7 +578,7 @@ DEPENDENCIES
okcomputer
pg
puma (~> 5.5)
rails (~> 6.1)
rails (~> 7.0.1)
redis (~> 4.0)
reform (~> 2.5.0)
reform-rails (~> 0.2.0)
Expand All @@ -565,6 +595,7 @@ DEPENDENCIES
sneakers (~> 2.11)
spring
spring-watcher-listen (~> 2.0.0)
sprockets-rails
state_machines-activerecord
state_machines-graphviz
super_diff
Expand All @@ -573,7 +604,7 @@ DEPENDENCIES
web-console (>= 3.3.0)
webmock
whenever
zipline (~> 1.3)
zipline!

BUNDLED WITH
2.3.4
3 changes: 1 addition & 2 deletions bin/rails
@@ -1,5 +1,4 @@
#!/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 "rails/commands"
1 change: 0 additions & 1 deletion bin/rake
@@ -1,5 +1,4 @@
#!/usr/bin/env ruby
load File.expand_path("spring", __dir__)
require_relative "../config/boot"
require "rake"
Rake.application.run
21 changes: 9 additions & 12 deletions bin/setup
Expand Up @@ -2,7 +2,7 @@
require "fileutils"

# path to your application root.
APP_ROOT = File.expand_path('..', __dir__)
APP_ROOT = File.expand_path("..", __dir__)

def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
Expand All @@ -13,24 +13,21 @@ FileUtils.chdir APP_ROOT do
# 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.

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

# Install JavaScript dependencies
system! 'bin/yarn'
puts "== Installing dependencies =="
system! "gem install bundler --conservative"
system("bundle check") || system!("bundle install")

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

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

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

puts "\n== Restarting application server =="
system! 'bin/rails restart'
system! "bin/rails restart"
end

0 comments on commit 69a7095

Please sign in to comment.