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