Skip to content

Commit

Permalink
Merge branch 'master' into VI-850_mpi_flag_checks
Browse files Browse the repository at this point in the history
  • Loading branch information
bramleyjl authored Dec 17, 2024
2 parents d09f83a + ef3c028 commit 0aca0d4
Show file tree
Hide file tree
Showing 233 changed files with 25,949 additions and 22,179 deletions.
25 changes: 16 additions & 9 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/workflows/build_atlas_codeowners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ jobs:
destination_repo: 'department-of-veterans-affairs/platform-atlas'
destination_folder: '/lib/codeowners/vets-api'
destination_branch: 'master'
user_email: 'devops@va.gov'
user_email: '70344339+va-vsp-bot@users.noreply.github.com'
user_name: 'va-vsp-bot'
commit_message: 'Auto update Atlas with Vets-API CODEOWNERS'
2 changes: 1 addition & 1 deletion .github/workflows/deploy-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,5 @@ jobs:
add: "*"
cwd: vsp-infra-application-manifests/apps
author_name: va-vsp-bot
author_email: devops@va.gov
author_email: 70344339+va-vsp-bot@users.noreply.github.com
message: "Release ${{ needs.prepare-values.outputs.environments }} for ${{inputs.ecr_repository}} : ${{ inputs.commit_sha }}."
1 change: 1 addition & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ Lint/MissingSuper:
- 'modules/va_notify/lib/va_notify/service.rb'
- 'modules/vaos/app/services/vaos/session_service.rb'
- 'modules/veteran/app/models/veteran/user.rb'
- 'lib/vye/dgib/service.rb'

# Offense count: 5
Lint/NoReturnInBeginEndBlocks:
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ gem 'aws-sdk-s3', '~> 1'
gem 'aws-sdk-sns', '~> 1'
gem 'betamocks', git: 'https://github.com/department-of-veterans-affairs/betamocks', branch: 'master'
gem 'bgs_ext', git: 'https://github.com/department-of-veterans-affairs/bgs-ext.git', require: 'bgs', ref: '350e45ae69'
gem 'blind_index'
gem 'blueprinter'
gem 'bootsnap', require: false
gem 'breakers'
Expand Down Expand Up @@ -206,6 +207,7 @@ group :development, :test do
gem 'byebug', platforms: :ruby # Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'danger'
gem 'database_cleaner'
gem 'debug'
gem 'factory_bot_rails'
gem 'faker'
# CAUTION: faraday_curl may not provide all headers used in the actual faraday request. Be cautious if using this to
Expand Down
35 changes: 24 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,18 @@ GIT

GIT
remote: https://github.com/department-of-veterans-affairs/vets-json-schema
revision: 3a6965b5d60abdb99dc2d21fcd15784c52a51927
revision: a84abd360072a0d4aaa8b1984cee2c33e1844335
branch: master
specs:
vets_json_schema (24.6.1)
vets_json_schema (24.7.0)
multi_json (~> 1.0)
script_utils (= 0.0.4)

PATH
remote: modules
specs:
accredited_representative_portal (0.1.0)
blind_index
appeals_api (0.0.1)
jsonapi-serializer (>= 2.2.0)
sidekiq
Expand Down Expand Up @@ -240,11 +241,12 @@ GEM
base64
gyoku (>= 0.4.0)
nokogiri
argon2-kdf (0.2.0)
ast (2.4.2)
attr_extras (7.1.0)
awesome_print (1.9.2)
aws-eventstream (1.3.0)
aws-partitions (1.1019.0)
aws-partitions (1.1022.0)
aws-sdk-core (3.214.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
Expand All @@ -253,7 +255,7 @@ GEM
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.173.0)
aws-sdk-s3 (1.176.1)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand All @@ -273,6 +275,9 @@ GEM
bigdecimal (3.1.8)
bigdecimal (3.1.8-java)
bindex (0.8.1)
blind_index (2.6.1)
activesupport (>= 7)
argon2-kdf (>= 0.2)
blueprinter (1.1.2)
bootsnap (1.18.4)
msgpack (~> 1.2)
Expand Down Expand Up @@ -308,7 +313,7 @@ GEM
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
colored2 (3.1.2)
combine_pdf (1.0.26)
combine_pdf (1.0.29)
matrix
ruby-rc4 (>= 0.1.5)
committee (5.4.0)
Expand Down Expand Up @@ -370,6 +375,9 @@ GEM
libddwaf (~> 1.14.0.0.0)
msgpack
debase-ruby_core_source (3.3.1)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
declarative (0.0.20)
deep_merge (1.2.2)
descendants_tracker (0.0.4)
Expand Down Expand Up @@ -526,6 +534,7 @@ GEM
thor (>= 0.20, < 2.a)
google-cloud-env (2.2.1)
faraday (>= 1.0, < 3.a)
google-logging-utils (0.1.0)
google-protobuf (4.28.3)
bigdecimal
rake (>= 13)
Expand All @@ -534,9 +543,10 @@ GEM
ffi (~> 1)
ffi-compiler (~> 1)
rake (>= 13)
googleauth (1.11.2)
googleauth (1.12.0)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.1)
google-cloud-env (~> 2.2)
google-logging-utils (~> 0.1)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
Expand Down Expand Up @@ -667,7 +677,8 @@ GEM
mini_mime (1.1.5)
mini_portile2 (2.8.8)
minitest (5.25.4)
mock_redis (0.46.0)
mock_redis (0.49.0)
redis (~> 5)
msgpack (1.7.2)
msgpack (1.7.2-java)
multi_json (1.15.0)
Expand All @@ -676,7 +687,7 @@ GEM
mutex_m (0.3.0)
nap (1.1.0)
nenv (0.3.0)
net-http (0.4.1)
net-http (0.6.0)
uri
net-imap (0.5.1)
date
Expand Down Expand Up @@ -961,7 +972,7 @@ GEM
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (3.2.0)
rubocop-rspec (3.3.0)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
Expand Down Expand Up @@ -1068,7 +1079,7 @@ GEM
tzinfo (>= 1.0.0)
uber (0.1.0)
unicode-display_width (2.6.0)
uri (0.13.1)
uri (1.0.2)
useragent (0.16.11)
utf8-cleaner (1.0.0)
activesupport
Expand Down Expand Up @@ -1147,6 +1158,7 @@ DEPENDENCIES
banners!
betamocks!
bgs_ext!
blind_index
blueprinter
bootsnap
brakeman
Expand All @@ -1172,6 +1184,7 @@ DEPENDENCIES
date_validator
ddtrace
debts_api!
debug
decision_reviews!
dhp_connected_devices!
dogstatsd-ruby (= 5.6.3)
Expand Down
11 changes: 1 addition & 10 deletions app/controllers/v0/burial_claims_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def show
def create
PensionBurial::TagSentry.tag_sentry

claim = create_claim
claim = claim_class.new(form: filtered_params[:form])
monitor.track_create_attempt(claim, current_user)

in_progress_form = current_user ? InProgressForm.form_for_user(claim.form_id, current_user) : nil
Expand Down Expand Up @@ -61,15 +61,6 @@ def claim_class
SavedClaim::Burial
end

def create_claim
if Flipper.enabled?(:va_burial_v2)
form = filtered_params[:form]
claim_class.new(form:, formV2: form.present? ? JSON.parse(form)['formV2'] : nil)
else
claim_class.new(form: filtered_params[:form])
end
end

def process_and_upload_to_lighthouse(in_progress_form, claim)
claim.process_attachments!

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/v0/claim_documents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def create

def klass
case form_id
when '21P-527EZ', '21P-530', '21P-530V2'
when '21P-527EZ', '21P-530EZ'
PensionBurial::TagSentry.tag_sentry
PersistentAttachments::PensionBurial
when '21-686C', '686C-674'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ def separation_locations
:all_users,
:get_separation_locations
) do
provider = Flipper.enabled?(:disability_compensation_staging_lighthouse_brd) ? :lighthouse_staging : nil
api_provider = ApiProviderFactory.call(
type: ApiProviderFactory::FACTORIES[:brd],
provider: nil,
provider:,
options: {},
current_user: @current_user,
feature_toggle: ApiProviderFactory::FEATURE_TOGGLE_BRD
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ class VetVerificationStatusesController < ApplicationController
before_action { authorize :lighthouse, :access? }

def show
access_token = settings.access_token
response = service.get_vet_verification_status(@current_user.icn, access_token.client_id, access_token.rsa_key)
response = service.get_vet_verification_status(@current_user.icn)
response['data']['id'] = ''

render json: response
Expand All @@ -19,10 +18,6 @@ def show
def service
@service ||= VeteranVerification::Service.new
end

def settings
Settings.lighthouse.veteran_verification['status']
end
end
end
end
5 changes: 2 additions & 3 deletions app/models/form_profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class FormProfile
22-5495 22-0993 22-0994 FEEDBACK-TOOL 22-10203 22-1990S 22-1990EZ],
evss: ['21-526EZ'],
hca: %w[1010ez 10-10EZR],
pension_burial: %w[21P-530 21P-527EZ 21P-530V2],
pension_burial: %w[21P-530EZ 21P-527EZ],
dependents: ['686C-674'],
decision_review: %w[20-0995 20-0996 10182],
mdot: ['MDOT'],
Expand Down Expand Up @@ -126,8 +126,7 @@ class FormProfile
'22-5490' => ::FormProfiles::VA5490,
'22-5490E' => ::FormProfiles::VA5490e,
'22-5495' => ::FormProfiles::VA5495,
'21P-530' => ::FormProfiles::VA21p530,
'21P-530V2' => ::FormProfiles::VA21p530v2,
'21P-530EZ' => ::FormProfiles::VA21p530ez,
'21-686C' => ::FormProfiles::VA21686c,
'686C-674' => ::FormProfiles::VA686c674,
'40-10007' => ::FormProfiles::VA4010007,
Expand Down
33 changes: 0 additions & 33 deletions app/models/form_profiles/va_21p530.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'iso_country_codes'

class FormProfiles::VA21p530v2 < FormProfile
class FormProfiles::VA21p530ez < FormProfile
def metadata
{
version: 0,
Expand Down
2 changes: 1 addition & 1 deletion app/models/in_progress_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def days_till_expires

def default_expires_after
case form_id
when '21-526EZ', '21P-527EZ', '21P-530V2'
when '21-526EZ', '21P-527EZ', '21P-530EZ'
1.year
else
60.days
Expand Down
1 change: 1 addition & 0 deletions app/models/prescription_details.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class PrescriptionDetails < Prescription
attribute :color, String
attribute :back_imprint, String
attribute :front_imprint, String
attribute :grouped_medications, Array[String]

def sorted_dispensed_date
has_refills = try(:rx_rf_records).present?
Expand Down
2 changes: 1 addition & 1 deletion app/models/saved_claim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class SavedClaim < ApplicationRecord
# create a uuid for this second (used in the confirmation number) and store
# the form type based on the constant found in the subclass.
after_initialize do
self.form_id = self.class::FORM.upcase unless instance_of?(::SavedClaim::Burial)
self.form_id = self.class::FORM.upcase
end

def self.add_form_and_validation(form_id)
Expand Down
13 changes: 1 addition & 12 deletions app/models/saved_claim/burial.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,7 @@
require 'pension_burial/processing_office'

class SavedClaim::Burial < SavedClaim
FORM = '21P-530'

# attribute name is passed from the FE as a flag, maintaining camel case
attr_accessor :formV2 # rubocop:disable Naming/MethodName

after_initialize do
self.form_id = if Flipper.enabled?(:va_burial_v2)
formV2 || form_id == '21P-530V2' ? '21P-530V2' : self.class::FORM.upcase
else
self.class::FORM.upcase
end
end
FORM = '21P-530EZ'

def process_attachments!
refs = attachment_keys.map { |key| Array(open_struct_form.send(key)) }.flatten
Expand Down
7 changes: 7 additions & 0 deletions app/policies/vye_policy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

VyePolicy = Struct.new(:user, :user_info) do
def access?
user.present?
end
end
2 changes: 1 addition & 1 deletion app/sidekiq/benefits_intake_status_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def monitor_failure(form_id, saved_claim_id, bi_uuid)
}
call_location = caller_locations.first

if %w[21P-530V2 21P-530].include?(form_id)
if %w[21P-530EZ].include?(form_id)
claim = SavedClaim::Burial.find(saved_claim_id)
if claim
Burials::NotificationEmail.new(claim.id).deliver(:error)
Expand Down
Loading

0 comments on commit 0aca0d4

Please sign in to comment.