Module: CIAT::Differs::HtmlDiffer
- Included in:
- Processors::BasicProcessing, Processors::Parrot
- Defined in:
- lib/ciat/differs/html_differ.rb
Overview
Module for implementing the diff between two files. The output is in HTML table rows with the expected output on the left and the generated on the right.
Instance Method Summary collapse
Instance Method Details
#diff_options ⇒ Object
11 12 13 14 15 16 |
# File 'lib/ciat/differs/html_differ.rb', line 11 def "--old-group-format='<tr><td>%df</td><td class=\"red\"><pre>%<</pre></td><td></td><td></td></tr>' " + "--new-group-format='<tr><td></td><td></td><td>%dF</td><td class=\"red\"><pre>%></pre><td></tr>' " + "--changed-group-format='<tr class=\"yellow\"><td>%df</td><td><pre>%<</pre></td><td>%dF</td><td><pre>%></pre></td></tr>' " + "--unchanged-group-format='<tr class=\"green\"><td>%df</td><td><pre>%=</pre></td><td>%dF</td><td><pre>%=</pre></td></tr>'" end |
#html_diff(expected_file, generated_file, diff_file) ⇒ Object
7 8 9 |
# File 'lib/ciat/differs/html_differ.rb', line 7 def html_diff(expected_file, generated_file, diff_file) system("diff #{} '#{expected_file}' '#{generated_file}' > '#{diff_file}'") end |