#!/usr/bin/env ruby $LOAD_PATH << File.expand_path('../../lib', __FILE__) require 'industrial_girl' single = false force = false ARGV.each do |arg| single = true if arg == 'single' force = true if arg == 'force' end if (ARGV.first == 'generate' or ARGV.first == 'g') Root.new(single, force) else puts 'USAGE:' puts 'industrial_girl g' puts ' creates all factories within spec/factories' puts 'industrial_girl g single' puts ' creates single file with all factories in spec/factories.rb' puts 'industrial_girl g force' puts ' overwrites any factories already generated' end