Skip to content

Commit

Permalink
Drops (deprecated) 'File.exists?'
Browse files Browse the repository at this point in the history
  • Loading branch information
brgix committed May 22, 2024
1 parent 186385d commit 32fed6f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions lib/measures/tbd/measure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<schema_version>3.1</schema_version>
<name>tbd_measure</name>
<uid>8890787b-8c25-4dc8-8641-b6be1b6c2357</uid>
<version_id>dbf2106f-62ce-48a9-8164-ec0db4737f52</version_id>
<version_modified>2024-05-22T13:52:38Z</version_modified>
<version_id>3ebf3217-230b-4420-b679-4bdf8cc51519</version_id>
<version_modified>2024-05-22T14:33:33Z</version_modified>
<xml_checksum>99772807</xml_checksum>
<class_name>TBDMeasure</class_name>
<display_name>Thermal Bridging and Derating - TBD</display_name>
Expand Down Expand Up @@ -523,7 +523,7 @@
<filename>psi.rb</filename>
<filetype>rb</filetype>
<usage_type>resource</usage_type>
<checksum>5ABDEC60</checksum>
<checksum>5ABDA733</checksum>
</file>
<file>
<filename>tbd.rb</filename>
Expand Down
4 changes: 2 additions & 2 deletions lib/measures/tbd/resources/psi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3308,9 +3308,9 @@ def exit(runner = nil, argh = {})
match2 = /files/.match(file_paths[1].to_s.strip)
match = match1 || match2

if file_paths.size >= 2 && File.exists?(file_paths[1].to_s.strip) && match
if file_paths.size >= 2 && File.exist?(file_paths[1].to_s.strip) && match
out_dir = file_paths[1].to_s.strip
elsif !file_paths.empty? && File.exists?(file_paths.first.to_s.strip)
elsif !file_paths.empty? && File.exist?(file_paths.first.to_s.strip)
out_dir = file_paths.first.to_s.strip
end

Expand Down
4 changes: 2 additions & 2 deletions lib/tbd/psi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3308,9 +3308,9 @@ def exit(runner = nil, argh = {})
match2 = /files/.match(file_paths[1].to_s.strip)
match = match1 || match2

if file_paths.size >= 2 && File.exists?(file_paths[1].to_s.strip) && match
if file_paths.size >= 2 && File.exist?(file_paths[1].to_s.strip) && match
out_dir = file_paths[1].to_s.strip
elsif !file_paths.empty? && File.exists?(file_paths.first.to_s.strip)
elsif !file_paths.empty? && File.exist?(file_paths.first.to_s.strip)
out_dir = file_paths.first.to_s.strip
end

Expand Down

0 comments on commit 32fed6f

Please sign in to comment.