Skip to content

Commit

Permalink
Hotfix/APPEALS-30802 (#279)
Browse files Browse the repository at this point in the history
* Adding new java jar file that replaces the ourdated and vulnerable 1.2.14 per OKR 2 recomendations

* Removes the old file that is replaced by the updated version 2.3.2 for Java 6

* Fixing linting errors

* Fixing linting error

* Error when running tests. equivalent-xml is no longer available.

---------

Co-authored-by: Matthew Thornton <[email protected]>
  • Loading branch information
raymond-hughes and ThorntonMatthew authored Sep 27, 2023
1 parent 42a98dd commit 9807d9c
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 19 deletions.
Binary file removed java/log4j-1.2.14.jar
Binary file not shown.
Binary file added java/log4j-2.3.2.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion lib/vbms/requests/update_contention.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def soap_doc
id: special_issue[:id],
contentionId: special_issue[:contention_id]
) do
xml["cdm"].specificRating(special_issue[:specific_rating])
xml["cdm"].specificRating(special_issue[:specific_rating])
end
end

Expand Down
6 changes: 3 additions & 3 deletions lib/vbms/responses/contention.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Responses
class Contention < OpenStruct
def self.create_from_xml(xml, key: :list_of_contentions)
data = XMLHelper.convert_to_hash(xml.to_xml)[key]

new(
id: data[:@id],
text: Nokogiri::HTML.fragment(data[:@title]).text,
Expand All @@ -29,8 +29,8 @@ def self.create_from_xml(xml, key: :list_of_contentions)
)
end

def self.create_issues(*issues)
issues.compact.flatten.map{|issue| VBMS::Responses::Issue.create(issue)}
def self.create_issues(*issues)
issues.compact.flatten.map { |issue| VBMS::Responses::Issue.create(issue) }
end
end
end
Expand Down
25 changes: 12 additions & 13 deletions lib/vbms/responses/issue.rb
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# frozen_string_literal: true

module VBMS
module Responses
class Issue < OpenStruct
def self.create(data)

new(
id: data[:@id],
contention_id: data[:@contention_id],
inferred: data[:@inferred],
narrative: data[:@narrative],
code: data[:@type_cd],
specific_rating: data[:specific_rating]
)
end
module Responses
class Issue < OpenStruct
def self.create(data)
new(
id: data[:@id],
contention_id: data[:@contention_id],
inferred: data[:@inferred],
narrative: data[:@narrative],
code: data[:@type_cd],
specific_rating: data[:specific_rating]
)
end
end
end
end
2 changes: 1 addition & 1 deletion spec/requests/update_contention_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
expect(contention["id"]).to eq(contention_hash[:id])
expect(contention["claimId"]).to eq(contention_hash[:claim_id])
expect(contention["fileNumber"]).to eq(contention_hash[:file_number])

issues = contention.xpath("//cdm:issue")
expect(issues.length).to eq(contention_hash[:special_issues].length)

Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
require "vbms"
require "nokogiri"
require "rspec/matchers"
require "equivalent-xml"
# require "equivalent-xml"
require "pry"
require "httplog" if ENV["CONNECT_VBMS_HTTPLOG"] && ENV["CONNECT_VBMS_HTTPLOG"] == 1
require "byebug" if RUBY_PLATFORM != "java"
Expand Down

0 comments on commit 9807d9c

Please sign in to comment.