Skip to content

Commit

Permalink
(CAT-2155) Remove parser swap to JSON::Pure
Browse files Browse the repository at this point in the history
`JSON::Pure` no longer exists within the `json` gem as of `2.8.0` and as such this swap has to be removed.
  • Loading branch information
david22swan committed Nov 8, 2024
1 parent 5efd5e9 commit e4aa771
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
9 changes: 0 additions & 9 deletions lib/pdk/validate/metadata/metadata_syntax_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ def invoke(report)
JSON.parser = JSON::Ext::Parser if defined?(JSON::Ext::Parser)
end

def before_validation
# The pure ruby JSON parser gives much nicer parse error messages than
# the C extension at the cost of slightly slower parsing. We require it
# here and restore the C extension at the end of the method (if it was
# being used).
require 'json/pure'
JSON.parser = JSON::Pure::Parser
end

def validate_target(report, target)
unless PDK::Util::Filesystem.readable?(target)
report.add_event(
Expand Down
1 change: 0 additions & 1 deletion pdk.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Gem::Specification.new do |spec|
# Other deps
spec.add_runtime_dependency 'deep_merge', '~> 1.2.2'
spec.add_runtime_dependency 'diff-lcs', '>= 1.5.0'
spec.add_runtime_dependency 'json', '< 2.8.0'
spec.add_runtime_dependency 'pathspec', '~> 1.1'
spec.add_runtime_dependency 'puppet_forge', '~> 5.0'

Expand Down

0 comments on commit e4aa771

Please sign in to comment.