Sha256: cef54d34a3259e2638f178288b958dcf4d1bcc96999e3cd8c8e02029cb1bc1c6
Contents?: true
Size: 538 Bytes
Versions: 2
Compression:
Stored size: 538 Bytes
Contents
namespace :schema do desc "create JSON schema files in json-schema/*.json" task :build do |t,args| if defined?(Rails) && Rails.respond_to?(:application) Rails.application.initialize! else puts "== Hiccup ==\n" puts "Sorry cannot find a Rails 3.+ app.\n You can still write a schema by hand .. it's not that difficult.\n Btw. you should move to Rails 3 anyway!" next end builder = SchemaBuilder::Writer.new builder.routes = Rails.application.routes.routes.routes builder.write end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
json_schema_builder-0.1.0 | lib/schema_builder/tasks.rb |
json_schema_builder-0.0.6 | lib/schema_builder/tasks.rb |