Method: Transpec::CLI#process

Defined in:
lib/transpec/cli.rb

#process(paths) ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/transpec/cli.rb', line 46

def process(paths)
  runtime_data = nil

  unless @configuration.skip_dynamic_analysis?
    puts 'Copying the project for dynamic analysis...'
    DynamicAnalyzer.new(rspec_command: @configuration.rspec_command) do |analyzer|
      puts "Running dynamic analysis with command #{analyzer.rspec_command.inspect}..."
      runtime_data = analyzer.analyze(paths)
    end
    puts
  end

  FileFinder.find(paths).each do |file_path|
    convert_file(file_path, runtime_data)
  end
end