Skip to content

Commit

Permalink
Revert "Rails 6.1 upgrade (#6979)" (#7259)
Browse files Browse the repository at this point in the history
This reverts commit 3075be4.
  • Loading branch information
LindseySaari authored Jun 17, 2021
1 parent 8c8c140 commit 765e2ed
Show file tree
Hide file tree
Showing 57 changed files with 433 additions and 365 deletions.
7 changes: 0 additions & 7 deletions .gitattributes

This file was deleted.

53 changes: 34 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,21 @@
/.bundle
.envrc

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep
/logfile
/tmp
/coverage
/reports

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep

# And byebug's history file
.byebug_history

# Ignore precompiled assets
public/assets/**

# Ignore master key for decrypting credentials and more.
/config/master.key

# *Uploader.store_dir for local development and test
public/disability_compensation_supporting_form/**
public/hca_attachments/**
Expand All @@ -43,6 +32,20 @@ spec/support/uploads/
# Ignore local config
config/application.yml

# Ignore rvm stuff
# Ignore rbenv
.ruby-gemset
.rbenv-gemsets

.idea/
.vscode/

# And byebug's history file
.byebug_history

# Ignore .DS_Store
.DS_Store

# Ignore the docker runtime folders
tmp/
data/
Expand All @@ -52,17 +55,29 @@ log/*
.env
.local

# Ignore local setttings changes
config/settings.local.yml
config/settings/*.local.yml
config/environments/*.local.yml

rspec.xml

# Ignore certificates directory
config/certs
config/ca-trust
!config/ca-trust/README.md

# Ignore docker_debugging and .env
dump.rdb
/.project
.generators
.rakeTasks

# Ignore IDE files
*.iml

#ignore storage files
/storage/*

#ignore docker_debugging and .env
docker_debugging
.env

Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ AllCops:
- '**/*.rake'
- '**/*.rb'
Exclude:
- 'bin/*'
- db/schema.rb
- db/seeds.rb
- db/migrate/*.rb
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ gem 'sass-rails', '>= 6'
# Anchored versions, do not change
gem 'puma', '~> 5.3.2'
gem 'puma-plugin-statsd', '~> 1.2.1'
gem 'rails', '~> 6.1.3'
gem 'rails', '~> 6.0.3'

# Gems with special version/repo needs
gem 'active_model_serializers', git: 'https://github.com/department-of-veterans-affairs/active_model_serializers', branch: 'master'
gem 'sidekiq-scheduler', '~> 3.1' # TODO: explanation

gem 'aasm'
gem 'activerecord-import'
gem 'activerecord-postgis-adapter'
gem 'activerecord-postgis-adapter', '~> 6.0.0'
gem 'addressable'
gem 'attr_encrypted', '3.1.0'
gem 'aws-sdk-s3', '~> 1'
Expand Down
146 changes: 71 additions & 75 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ PATH
check_in (0.1.0)
claims_api (0.0.1)
covid_research (0.1.0)
rails (~> 6.1.3.2)
rails (~> 6.0.3, >= 6.0.3.2)
sidekiq
covid_vaccine (0.1.0)
sidekiq
Expand All @@ -94,7 +94,7 @@ PATH
dry-validation
openid_auth (0.0.1)
test_user_dashboard (0.1.0)
rails (~> 6.1.3.2)
rails (~> 6.0.3, >= 6.0.3.2)
va_forms (0.0.1)
faraday
nokogiri
Expand All @@ -116,70 +116,66 @@ GEM
Ascii85 (1.1.0)
aasm (5.2.0)
concurrent-ruby (~> 1.0)
actioncable (6.1.3.2)
actionpack (= 6.1.3.2)
activesupport (= 6.1.3.2)
actioncable (6.0.3.7)
actionpack (= 6.0.3.7)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.3.2)
actionpack (= 6.1.3.2)
activejob (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
actionmailbox (6.0.3.7)
actionpack (= 6.0.3.7)
activejob (= 6.0.3.7)
activerecord (= 6.0.3.7)
activestorage (= 6.0.3.7)
activesupport (= 6.0.3.7)
mail (>= 2.7.1)
actionmailer (6.1.3.2)
actionpack (= 6.1.3.2)
actionview (= 6.1.3.2)
activejob (= 6.1.3.2)
activesupport (= 6.1.3.2)
actionmailer (6.0.3.7)
actionpack (= 6.0.3.7)
actionview (= 6.0.3.7)
activejob (= 6.0.3.7)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.3.2)
actionview (= 6.1.3.2)
activesupport (= 6.1.3.2)
rack (~> 2.0, >= 2.0.9)
actionpack (6.0.3.7)
actionview (= 6.0.3.7)
activesupport (= 6.0.3.7)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.3.2)
actionpack (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
actiontext (6.0.3.7)
actionpack (= 6.0.3.7)
activerecord (= 6.0.3.7)
activestorage (= 6.0.3.7)
activesupport (= 6.0.3.7)
nokogiri (>= 1.8.5)
actionview (6.1.3.2)
activesupport (= 6.1.3.2)
actionview (6.0.3.7)
activesupport (= 6.0.3.7)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.3.2)
activesupport (= 6.1.3.2)
activejob (6.0.3.7)
activesupport (= 6.0.3.7)
globalid (>= 0.3.6)
activemodel (6.1.3.2)
activesupport (= 6.1.3.2)
activerecord (6.1.3.2)
activemodel (= 6.1.3.2)
activesupport (= 6.1.3.2)
activerecord-import (1.0.8)
activemodel (6.0.3.7)
activesupport (= 6.0.3.7)
activerecord (6.0.3.7)
activemodel (= 6.0.3.7)
activesupport (= 6.0.3.7)
activerecord-import (1.1.0)
activerecord (>= 3.2)
activerecord-postgis-adapter (7.1.0)
activerecord (~> 6.1)
rgeo-activerecord (~> 7.0.0)
activestorage (6.1.3.2)
actionpack (= 6.1.3.2)
activejob (= 6.1.3.2)
activerecord (= 6.1.3.2)
activesupport (= 6.1.3.2)
activerecord-postgis-adapter (6.0.2)
activerecord (~> 6.0.0)
rgeo-activerecord (~> 6.0)
activestorage (6.0.3.7)
actionpack (= 6.0.3.7)
activejob (= 6.0.3.7)
activerecord (= 6.0.3.7)
marcel (~> 1.0.0)
mini_mime (~> 1.0.2)
activesupport (6.1.3.2)
activesupport (6.0.3.7)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
adler32 (0.0.2)
Expand Down Expand Up @@ -527,7 +523,7 @@ GEM
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.10.0)
loofah (2.9.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.4)
Expand All @@ -543,7 +539,7 @@ GEM
nokogiri (~> 1)
rake
mini_magick (4.11.0)
mini_mime (1.0.3)
mini_mime (1.1.0)
mini_portile2 (2.5.3)
minitest (5.14.4)
msgpack (1.3.3)
Expand Down Expand Up @@ -674,20 +670,20 @@ GEM
rack (>= 1.0, < 3)
rack-vcr (0.1.6)
vcr (>= 2.9)
rails (6.1.3.2)
actioncable (= 6.1.3.2)
actionmailbox (= 6.1.3.2)
actionmailer (= 6.1.3.2)
actionpack (= 6.1.3.2)
actiontext (= 6.1.3.2)
actionview (= 6.1.3.2)
activejob (= 6.1.3.2)
activemodel (= 6.1.3.2)
activerecord (= 6.1.3.2)
activestorage (= 6.1.3.2)
activesupport (= 6.1.3.2)
bundler (>= 1.15.0)
railties (= 6.1.3.2)
rails (6.0.3.7)
actioncable (= 6.0.3.7)
actionmailbox (= 6.0.3.7)
actionmailer (= 6.0.3.7)
actionpack (= 6.0.3.7)
actiontext (= 6.0.3.7)
actionview (= 6.0.3.7)
activejob (= 6.0.3.7)
activemodel (= 6.0.3.7)
activerecord (= 6.0.3.7)
activestorage (= 6.0.3.7)
activesupport (= 6.0.3.7)
bundler (>= 1.3.0)
railties (= 6.0.3.7)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
Expand All @@ -700,12 +696,12 @@ GEM
rack
railties (>= 3.2)
semantic_logger (~> 4.4)
railties (6.1.3.2)
actionpack (= 6.1.3.2)
activesupport (= 6.1.3.2)
railties (6.0.3.7)
actionpack (= 6.0.3.7)
activesupport (= 6.0.3.7)
method_source
rake (>= 0.8.7)
thor (~> 1.0)
thor (>= 0.20.3, < 2.0)
rainbow (3.0.0)
rake (13.0.3)
randexp (0.1.7)
Expand Down Expand Up @@ -736,7 +732,7 @@ GEM
retriable (3.1.2)
rexml (3.2.5)
rgeo (2.0.1)
rgeo-activerecord (7.0.1)
rgeo-activerecord (6.2.2)
activerecord (>= 5.0)
rgeo (>= 1.0.0)
rgeo-geojson (2.1.1)
Expand Down Expand Up @@ -919,8 +915,8 @@ GEM
ttfunk (1.7.0)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
uber (0.1.0)
unf (0.1.4)
unf_ext
Expand Down Expand Up @@ -948,7 +944,7 @@ GEM
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.7.0)
websocket-driver (0.7.4)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
will_paginate (3.3.0)
Expand All @@ -973,7 +969,7 @@ DEPENDENCIES
aasm
active_model_serializers!
activerecord-import
activerecord-postgis-adapter
activerecord-postgis-adapter (~> 6.0.0)
addressable
apivore!
appeals_api!
Expand Down Expand Up @@ -1082,7 +1078,7 @@ DEPENDENCIES
rack-cors
rack-test
rack-vcr
rails (~> 6.1.3)
rails (~> 6.0.3)
rails-session_cookie
rails_semantic_logger (~> 4.5)
rainbow
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/concerns/exception_handling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def report_original_exception(exception)
end

def report_mapped_exception(exception, va_exception)
extra = exception.respond_to?(:errors) ? { errors: exception.errors.map(&:to_h) } : {}
extra = exception.respond_to?(:errors) ? { errors: exception.errors.map(&:to_hash) } : {}
# Add additional user specific context to the logs
if exception.is_a?(Common::Exceptions::BackendServiceException) && current_user.present?
extra[:icn] = current_user.icn
Expand Down
4 changes: 1 addition & 3 deletions app/models/concerns/redis_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ def save

def form_matches_schema
if form.present?
JSON::Validator.fully_validate(VetsJsonSchema::SCHEMAS[self.class::FORM_ID], parsed_form).each do |v|
errors.add(:form, v.to_s)
end
errors[:form].concat(JSON::Validator.fully_validate(VetsJsonSchema::SCHEMAS[self.class::FORM_ID], parsed_form))
end
end
end
Loading

0 comments on commit 765e2ed

Please sign in to comment.