Sha256: 6c6680985c361be94d3cc332e7801677d85292775a337eddb685a53f2d580029

Contents?: true

Size: 767 Bytes

Versions: 23

Compression:

Stored size: 767 Bytes

Contents


class PreprocessinatorFileHandler
  
  constructor :preprocessinator_extractor, :configurator, :tool_executor, :file_path_utils, :file_wrapper

  
  def preprocess_file(filepath, includes)
    preprocessed_filepath = @file_path_utils.form_preprocessed_file_filepath(filepath)
        
    command = @tool_executor.build_command_line(@configurator.tools_test_file_preprocessor, filepath, preprocessed_filepath)
    @tool_executor.exec(command[:line], command[:options])
    
    contents = @preprocessinator_extractor.extract_base_file_from_preprocessed_expansion(preprocessed_filepath)

    includes.each{|include| contents.unshift("#include \"#{include}\"")}

    @file_wrapper.write(preprocessed_filepath, contents.join("\n"))    
  end

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ceedling-0.13.0 lib/preprocessinator_file_handler.rb
ceedling-0.13.0.rc1 lib/preprocessinator_file_handler.rb
ceedling-0.12.2 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.12.1 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.12.0 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.11.2 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.11.1 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.11.0 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.10.0 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.9.4 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.9.2 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.9.0 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.0.18 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.0.17 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.0.16 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.0.15 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.0.14 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.0.13 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.0.12 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb
ceedling-0.0.8 new_project_template/vendor/ceedling/lib/preprocessinator_file_handler.rb