Skip to content

Commit

Permalink
Merge pull request #5148 from galaxyproject/yamlloadfix
Browse files Browse the repository at this point in the history
[GitHub Actions] fix yaml loading for ruby 3.1+
  • Loading branch information
hexylena authored Jul 9, 2024
2 parents 88f732a + 873d836 commit adc86b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bin/google-form-event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require 'net/http'
require 'csv'
require 'date'
require './_plugins/util'

# Fetch data from a google sheet
url = 'https://docs.google.com/spreadsheets/d/1LTShstcORXf_zB06naOfPzisAoOcik-xJvgK5LQCGP8/export?format=tsv'
Expand Down Expand Up @@ -33,7 +34,7 @@

# Don't overwrite existing posts
if File.exist?(filename)
other_file = YAML.load_file(filename)
other_file = safe_load_yaml(filename)
if other_file['google_form_id'] == post_date.to_time.to_i
STDERR.puts "Skipping #{filename} as it already exists"
next
Expand Down
3 changes: 2 additions & 1 deletion bin/google-form-faq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require 'net/http'
require 'csv'
require 'date'
require './_plugins/util'

# Fetch data from a google sheet
url = 'https://docs.google.com/spreadsheets/d/1RFF3G9_bP8EpfACBk8lnF-Ib43ZGGAMm3ewPwW7eFT0/export?format=tsv'
Expand All @@ -27,7 +28,7 @@

# Don't overwrite existing posts
if File.exist?(filename)
other_file = YAML.load_file(filename)
other_file = safe_load_yaml(filename)
if other_file['google_form_id'] == post_date.to_time.to_i
STDERR.puts "Skipping #{filename} as it already exists"
next
Expand Down
3 changes: 2 additions & 1 deletion bin/google-form-recordings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
require 'net/http'
require 'csv'
require 'date'
require './_plugins/util'

# Fetch data from a google sheet
url = 'https://docs.google.com/spreadsheets/d/1iXjLlMEH5QMAMyUMHi1c_Lb7OiJhL_9hgJrtAsBoZ-Y/export?format=tsv'
Expand Down Expand Up @@ -61,7 +62,7 @@
"bot-timestamp" => bot_timestamp }

# append metadata into GTN material
material_metadata = YAML.load_file(material_file)
material_metadata = safe_load_yaml(material_file)

if material_metadata["recordings"]
# check the "bot_timestamp"
Expand Down

0 comments on commit adc86b9

Please sign in to comment.