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

Version Path
stepmod-utils-0.3.24 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.23 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.22 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.21 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.20 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.19 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.18 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.17 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.16 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.15 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.14 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.13 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.12 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.11 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.10 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.9 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.8 exe/stepmod-build-resource-docs-cache
stepmod-utils-0.3.7 exe/stepmod-build-resource-docs-cache