Skip to content

Commit

Permalink
Merge pull request #24 from stevemelamedshopify/rubyUpgrade
Browse files Browse the repository at this point in the history
Ruby upgrade
  • Loading branch information
jusleg authored Mar 11, 2022
2 parents 5155260 + 21d7236 commit b0804a8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/slackify/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ def generate_handlers
def read_handlers_yaml
raise 'config/handlers.yml does not exist' unless File.exist?("#{Rails.root}/config/handlers.yml")

YAML.load_file("#{Rails.root}/config/handlers.yml") || []
if YAML.respond_to?(:unsafe_load_file)
YAML.unsafe_load_file(Rails.root.join("config/handlers.yml")) || []
else
YAML.load_file("#{Rails.root}/config/handlers.yml") || []
end
end
end
end

0 comments on commit b0804a8

Please sign in to comment.