Skip to content

Commit a648d16

Browse files
committed
Remove explicit { }.
1 parent 5b34635 commit a648d16

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/github_advisory_sync.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -340,20 +340,22 @@ def update(package)
340340
def create(package)
341341
filename_to_write = package.filename
342342

343-
new_data = package.merge_data({
343+
new_data = package.merge_data(
344344
"cvss_v3" => ("<FILL IN IF AVAILABLE>" unless cvss),
345345
"patched_versions" => [ "<FILL IN SEE BELOW>" ],
346346
"unaffected_versions" => [ "<OPTIONAL: FILL IN SEE BELOW>" ]
347-
})
347+
)
348348

349349
dir_to_write = File.dirname(filename_to_write)
350350
Dir.mkdir dir_to_write unless Dir.exist?(dir_to_write)
351351
File.open(filename_to_write, "w") do |file|
352352
# create an automatically generated advisory yaml file
353353
file.write new_data.merge(
354-
{ "patched_versions" => vulnerabilities,
355-
"related" => { "url" => advisory["references"] }
356-
} ).to_yaml
354+
"patched_versions" => vulnerabilities,
355+
"related" => {
356+
"url" => advisory["references"]
357+
}
358+
).to_yaml
357359

358360
# The data we just wrote is incomplete,
359361
# and therefore should not be committed as is
@@ -373,7 +375,7 @@ def create(package)
373375
# Still it should be removed before the data goes into rubysec
374376
file.write "\n\n# GitHub advisory data below - **Remove this data before committing**\n"
375377
file.write "# Use this data to write patched_versions (and potentially unaffected_versions) above\n"
376-
file.write advisory.merge({ "vulnerabilities" => vulnerabilities }).to_yaml
378+
file.write advisory.merge("vulnerabilities" => vulnerabilities).to_yaml
377379
end
378380
puts "Wrote: #{filename_to_write}"
379381
filename_to_write

0 commit comments

Comments
 (0)