Skip to content

Commit

Permalink
[Automated] Merged master into target k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
va-vsp-bot authored Apr 25, 2024
2 parents f23f39c + beb6c78 commit b30395e
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 281 deletions.
5 changes: 4 additions & 1 deletion modules/vye/app/models/vye/user_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class Vye::UserInfo < ApplicationRecord
enum indicator: { chapter1606: 'A', chapter1607: 'E', chapter30: 'B', D: 'D' }

delegate :icn, to: :user_profile, allow_nil: true
delegate :ssn, to: :mpi_profile, allow_nil: true
delegate :pending_documents, to: :user_profile
delegate :verifications, to: :user_profile

Expand All @@ -46,6 +45,10 @@ def verification_required
verifications.empty?
end

def ssn
mpi_profile&.ssn
end

private

def mpi_profile
Expand Down
58 changes: 0 additions & 58 deletions modules/vye/lib/tasks/vye.rake
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
# frozen_string_literal: true

namespace :vye do
namespace :feature do
desc 'Enables request_allowed feature flag'
task request_allowed: :environment do |_cmd, _args|
current_state = Flipper.enabled?(:vye_request_allowed)
puts format('Current state vye_request_allowed is: %<current_state>s', current_state:)
Flipper.enable :vye_request_allowed
end
end

namespace :install do
desc 'Installs config into config/settings.local.yml'
task config: :environment do |_cmd, _args|
Expand All @@ -22,53 +13,4 @@ namespace :vye do
local_path.write(engine_dev_path.read, mode: 'a')
end
end

namespace :data do
desc 'Clear VYE data from the database'
task clear: :environment do |_cmd, _args|
Vye::AddressChange.destroy_all
Vye::DirectDepositChange.destroy_all
Vye::Verification.destroy_all
Vye::Award.destroy_all
Vye::UserInfo.destroy_all

Vye::PendingDocument.destroy_all

Vye::UserProfile.destroy_all
end

desc 'Build YAML files to load for development from team sensitive data'
task build: :environment do |_cmd, _args|
source = Pathname('/projects/va.gov-team-sensitive')
target = Rails.root / 'tmp'
handles = nil

build = Vye::StagingData::Build.new(target:) do |paths|
handles =
paths
.transform_values do |value|
(source / value).open
end
end

build.dump
handles.each_value(&:close)
end

desc 'Load development YAML files into the database'
task :load, [:path] => :environment do |_cmd, args|
raise 'load path is required' if args[:path].nil?

root = Pathname(args[:path])
files = root.glob('**/*.yaml')
raise "No files found in #{root}" if files.empty?

files.each do |file|
source = :team_sensitive
data = YAML.safe_load(file.read, permitted_classes: [Date, DateTime, Symbol, Time])
records = data.slice(:profile, :info, :address, :awards, :pending_documents)
Vye::LoadData.new(source:, records:)
end
end
end
end
154 changes: 0 additions & 154 deletions modules/vye/lib/vye/staging_data/build.rb

This file was deleted.

9 changes: 0 additions & 9 deletions modules/vye/spec/factories/vye/address_changes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,4 @@
zip_code { Faker::Address.zip_code }
origin { Vye::AddressChange.origins['frontend'] }
end

factory :vye_address_backend, class: 'Vye::AddressChange' do
veteran_name { Faker::Name.name }
address1 { Faker::Address.street_address }
city { Faker::Address.city }
state { Faker::Address.state_abbr }
zip_code { Faker::Address.zip_code }
origin { Vye::AddressChange.origins['backend'] }
end
end
44 changes: 0 additions & 44 deletions modules/vye/spec/lib/vye/staging_data/build_spec.rb

This file was deleted.

15 changes: 0 additions & 15 deletions modules/vye/spec/serializers/verification_serializer_spec.rb

This file was deleted.

0 comments on commit b30395e

Please sign in to comment.