#!/usr/bin/env ruby require 'rubygems' require 'commander/import' require_relative '../lib/FormGenerator' input = nil program :version, '0.0.1' program :description, 'Validates Swift Style Guide' command :gen do |c| c.syntax = 'dftsg gen directory/with/Swift/files' c.summary = '' c.description = '' c.example 'description', 'dftsg input ' c.option '--output STRING', 'Optional output directory' c.action do |args, options| if args.count == 0 puts puts "You must provide the directory of Swift files to analyze:" puts puts "\t dftsg gen directory/with/Swift/files" puts else input = args.first output = options.output formGenerator = FormGenerator.new(input, output) formGenerator.generateForm end end end