lib/zapata.rb in zapata-0.1.1 vs lib/zapata.rb in zapata-0.1.2

- old
+ new

@@ -1,15 +1,14 @@ require 'parser/current' require 'unparser' -require 'pry' -require 'pry-stack_explorer' require 'rails' require 'require_all' require 'file/temp' require 'open3' require 'rspec' require 'memoist' +require 'slop' require_rel 'zapata/core' require_rel 'zapata/predictor' require_rel 'zapata/primitive' require_rel 'zapata/rzpec' @@ -21,9 +20,15 @@ module Zapata class Revolutionist class << self attr_accessor :analysis, :analysis_as_array + + def generate_with_friendly_output(file, opts) + spec_filename = Zapata::Revolutionist.generate(file, + single: opts.single?) + puts "Its done, comrades. File #{spec_filename} was generated." + end def generate(filename, single: false) dirs = single ? [] : %w(app/models) file_list = Core::Collector.expand_dirs_to_files(dirs) new(file_list).generate_rspec_for(filename, spec_filename(filename))