Skip to content

Commit

Permalink
Update to rails 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Jan 18, 2022
1 parent 38613c0 commit 24032b6
Show file tree
Hide file tree
Showing 13 changed files with 254 additions and 168 deletions.
10 changes: 5 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "https://rubygems.org"

# Require rails
gem "rails", "6.1.4.4"
gem "rails", "7.0.0"

# Require json for multi_json
gem "json"
Expand Down Expand Up @@ -43,15 +43,15 @@ gem "active_record_union"
gem "bootstrap", "~> 4.5.0"
gem "bootstrap_form", "~> 4.0"
gem "cancancan"
gem "composite_primary_keys", "~> 13.0.0"
gem "composite_primary_keys", "~> 14.0.0"
gem "config"
gem "delayed_job_active_record"
gem "http_accept_language", "~> 2.1.1"
gem "i18n-js", ">= 3.0.0"
gem "oauth-plugin", ">= 0.5.1"
gem "openstreetmap-deadlock_retry", ">= 1.3.1", :require => "deadlock_retry"
gem "rack-cors"
gem "rails-i18n", "~> 6.0.0"
gem "rails-i18n", "~> 7.0.0"
gem "rinku", ">= 2.0.6", :require => "rails_rinku"
gem "strong_migrations"
gem "validates_email_format_of", ">= 1.5.1"
Expand Down Expand Up @@ -129,7 +129,7 @@ gem "image_processing"

# Gems useful for development
group :development do
gem "annotate"
# gem "annotate"
gem "better_errors"
gem "binding_of_caller"
gem "debug_inspector"
Expand All @@ -151,7 +151,7 @@ group :test do
gem "rubocop-performance"
gem "rubocop-rails"
gem "rubocop-rake"
gem "selenium-webdriver", "~> 3.142.7"
gem "selenium-webdriver"
gem "simplecov", :require => false
gem "simplecov-lcov", :require => false
gem "webmock"
Expand Down
143 changes: 70 additions & 73 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,76 +3,73 @@ GEM
specs:
aasm (5.2.0)
concurrent-ruby (~> 1.0)
actioncable (6.1.4.4)
actionpack (= 6.1.4.4)
activesupport (= 6.1.4.4)
actioncable (7.0.0)
actionpack (= 7.0.0)
activesupport (= 7.0.0)
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.0)
actionpack (= 7.0.0)
activejob (= 7.0.0)
activerecord (= 7.0.0)
activestorage (= 7.0.0)
activesupport (= 7.0.0)
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)
actionmailer (7.0.0)
actionpack (= 7.0.0)
actionview (= 7.0.0)
activejob (= 7.0.0)
activesupport (= 7.0.0)
mail (~> 2.5, >= 2.5.4)
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.0)
actionview (= 7.0.0)
activesupport (= 7.0.0)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionpack-page_caching (1.2.4)
actionpack (>= 4.0.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.0)
actionpack (= 7.0.0)
activerecord (= 7.0.0)
activestorage (= 7.0.0)
activesupport (= 7.0.0)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (6.1.4.4)
activesupport (= 6.1.4.4)
actionview (7.0.0)
activesupport (= 7.0.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_record_union (1.3.0)
activerecord (>= 4.0)
activejob (6.1.4.4)
activesupport (= 6.1.4.4)
activejob (7.0.0)
activesupport (= 7.0.0)
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)
activemodel (7.0.0)
activesupport (= 7.0.0)
activerecord (7.0.0)
activemodel (= 7.0.0)
activesupport (= 7.0.0)
activerecord-import (1.3.0)
activerecord (>= 4.2)
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)
activestorage (7.0.0)
actionpack (= 7.0.0)
activejob (= 7.0.0)
activerecord (= 7.0.0)
activesupport (= 7.0.0)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.4.4)
activesupport (7.0.0)
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)
annotate (3.1.1)
activerecord (>= 3.2, < 7.0)
rake (>= 10.4, < 14.0)
argon2 (2.1.1)
ffi (~> 1.14)
ffi-compiler (~> 1.0)
Expand Down Expand Up @@ -135,10 +132,10 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
childprocess (3.0.0)
childprocess (4.1.0)
coderay (1.1.3)
composite_primary_keys (13.0.3)
activerecord (~> 6.1.0)
composite_primary_keys (14.0.3)
activerecord (~> 7.0.0)
concurrent-ruby (1.1.9)
config (3.1.1)
deep_merge (~> 1.2, >= 1.2.1)
Expand Down Expand Up @@ -375,21 +372,20 @@ GEM
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-uri_sanitizer (0.0.2)
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.0)
actioncable (= 7.0.0)
actionmailbox (= 7.0.0)
actionmailer (= 7.0.0)
actionpack (= 7.0.0)
actiontext (= 7.0.0)
actionview (= 7.0.0)
activejob (= 7.0.0)
activemodel (= 7.0.0)
activerecord (= 7.0.0)
activestorage (= 7.0.0)
activesupport (= 7.0.0)
bundler (>= 1.15.0)
railties (= 6.1.4.4)
sprockets-rails (>= 2.0.0)
railties (= 7.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
Expand All @@ -399,15 +395,16 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
rails-i18n (6.0.0)
rails-i18n (7.0.1)
i18n (>= 0.7, < 2)
railties (>= 6.0.0, < 7)
railties (6.1.4.4)
actionpack (= 6.1.4.4)
activesupport (= 6.1.4.4)
railties (>= 6.0.0, < 8)
railties (7.0.0)
actionpack (= 7.0.0)
activesupport (= 7.0.0)
method_source
rake (>= 0.13)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6)
rb-fsevent (0.11.0)
Expand Down Expand Up @@ -459,8 +456,9 @@ GEM
sprockets-rails
tilt
secure_headers (6.3.3)
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
selenium-webdriver (4.1.0)
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
simplecov (0.21.2)
docile (~> 1.1)
Expand Down Expand Up @@ -508,7 +506,6 @@ DEPENDENCIES
actionpack-page_caching (>= 1.2.0)
active_record_union
activerecord-import
annotate
argon2
autoprefixer-rails
aws-sdk-s3
Expand All @@ -523,7 +520,7 @@ DEPENDENCIES
cancancan
canonical-rails
capybara (>= 2.15)
composite_primary_keys (~> 13.0.0)
composite_primary_keys (~> 14.0.0)
config
connection_pool
dalli
Expand Down Expand Up @@ -568,9 +565,9 @@ DEPENDENCIES
r2 (~> 0.2.7)
rack-cors
rack-uri_sanitizer
rails (= 6.1.4.4)
rails (= 7.0.0)
rails-controller-testing
rails-i18n (~> 6.0.0)
rails-i18n (~> 7.0.0)
rinku (>= 2.0.6)
rotp
rubocop
Expand All @@ -581,7 +578,7 @@ DEPENDENCIES
sanitize
sassc-rails
secure_headers
selenium-webdriver (~> 3.142.7)
selenium-webdriver
simplecov
simplecov-lcov
strong_migrations
Expand Down
7 changes: 2 additions & 5 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,9 @@ FileUtils.chdir APP_ROOT do
system! "gem install bundler --conservative"
system("bundle check") || system!("bundle install")

# Install JavaScript dependencies
system! "bin/yarn"

# 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 =="
Expand Down
12 changes: 3 additions & 9 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
# Show full error reports.
config.consider_all_requests_local = true

# Enable server timing
config.server_timing = true

# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
if Rails.root.join("tmp/caching-dev.txt").exist?
Expand Down Expand Up @@ -53,11 +56,6 @@
# Highlight code that triggered database queries in logs.
config.active_record.verbose_query_logs = true unless Settings.status == "database_offline"

# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true

# Suppress logger output for asset requests.
config.assets.quiet = true

Expand All @@ -70,10 +68,6 @@
# Annotate rendered view with file names.
# config.action_view.annotate_rendered_view_with_filenames = 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

# Uncomment if you wish to allow Action Cable access from any origin.
# config.action_cable.disable_request_forgery_protection = true

Expand Down
Loading

0 comments on commit 24032b6

Please sign in to comment.