Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: v0.0.1.dev
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (22 sloc) 0.552 kB
require 'bundler'
Bundler::GemHelper.install_tasks
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
desc 'Regenerate the schema files'
task :schema do
require "json"
out = File.expand_path("../lib/har/schemas", __FILE__)
schema = JSON.parse(File.read("schema.json"))
# cleanup
Dir[File.join(out, "*.json")].each { |f|
rm f
}
# generate
schema.each do |type, schema|
path = File.join(out, type)
puts path
File.open(path, "w") { |file|
file << JSON.pretty_generate(schema)
}
end
end
Jump to Line
Something went wrong with that request. Please try again.