Sha256: 7e82c7a050c8eac7f2f05f8bfc9cd6e67266dc915898ea234bdafc20bda2e648
Contents?: true
Size: 554 Bytes
Versions: 18
Compression:
Stored size: 554 Bytes
Contents
#!/usr/bin/env ruby require "nokogiri" require "json" stepmod_dir = ARGV.first || Dir.pwd schemas = {} Dir.glob(File.join(stepmod_dir, "data/resource_docs/*/resource.xml")).each do |resource_docs_file| match = resource_docs_file.match("data/resource_docs/([^/]+)/resource.xml") resource_docs_dir = match.captures[0] resource_docs = Nokogiri::XML(File.read(resource_docs_file)).root resource_docs.xpath("schema").each do |schema| schemas[schema["name"]] = resource_docs_dir end end puts JSON.pretty_generate(schemas)
Version data entries
18 entries across 18 versions & 1 rubygems