Skip to content

Commit

Permalink
Merge pull request #1147 from binford2k/psych
Browse files Browse the repository at this point in the history
Account for Psych API changes
  • Loading branch information
da-ar authored Oct 20, 2021
2 parents fe8bdd5 + a7b45bc commit 0b29013
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pdk/config/yaml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ def parse_file(filename)

require 'yaml'

data = ::YAML.safe_load(data, [Symbol], [], true)
data = if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0.pre1')
::YAML.safe_load(data, permitted_classes: [Symbol], permitted_symbols: [], aliases: true)
else
::YAML.safe_load(data, [Symbol], [], true)
end
return if data.nil?

data.each { |k, v| yield k, PDK::Config::Setting.new(k, self, v) }
Expand Down
1 change: 1 addition & 0 deletions spec/unit/pdk/analytics/client/google_analytics_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'spec_helper'
require 'securerandom'
require 'httpclient'
require 'concurrent/configuration'
require 'concurrent/future'
Expand Down

0 comments on commit 0b29013

Please sign in to comment.