File tree Expand file tree Collapse file tree 3 files changed +41
-0
lines changed
lib/octocatalog-diff/cli/options
spec/octocatalog-diff/tests/cli/options Expand file tree Collapse file tree 3 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ Usage: octocatalog-diff [command line options]
59
59
--from-enc PATH Path to ENC script (for the from catalog only)
60
60
--to-enc PATH Path to ENC script (for the to catalog only)
61
61
--[no-]display-detail-add Display parameters and other details for added resources
62
+ --[no-]truncate-details Truncate details with --display-detail-add
62
63
--no-header Do not print a header
63
64
--default-header Print default header with output
64
65
--header STRING Specify header for output
@@ -1092,6 +1093,21 @@ These files must exist and be in Puppet catalog format. (<a href="../lib/octocat
1092
1093
</td>
1093
1094
</tr >
1094
1095
1096
+ <tr >
1097
+ <td valign=top>
1098
+ <pre><code>--truncate-details
1099
+ --no-truncate-details </code ></pre >
1100
+ </td >
1101
+ <td valign =top >
1102
+ Truncate details with --display-detail-add
1103
+ </td >
1104
+ <td valign =top >
1105
+ When using ` --display-detail-add ` by default the details of any field will be truncated
1106
+ at 80 characters. Specify ` --no-truncate-details ` to display the full output. This option
1107
+ has no effect when ` --display-detail-add ` is not used. (<a href =" ../lib/octocatalog-diff/cli/options/truncate_details.rb " >truncate_details.rb</a >)
1108
+ </td >
1109
+ </tr >
1110
+
1095
1111
<tr >
1096
1112
<td valign=top>
1097
1113
<pre><code>--validate-references
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ # When using `--display-detail-add` by default the details of any field will be truncated
4
+ # at 80 characters. Specify `--no-truncate-details` to display the full output. This option
5
+ # has no effect when `--display-detail-add` is not used.
6
+ # @param parser [OptionParser object] The OptionParser argument
7
+ # @param options [Hash] Options hash being constructed; this is modified in this method.
8
+ OctocatalogDiff ::Cli ::Options ::Option . newoption ( :truncate_details ) do
9
+ has_weight 251
10
+
11
+ def parse ( parser , options )
12
+ parser . on ( '--[no-]truncate-details' , 'Truncate details with --display-detail-add' ) do |x |
13
+ options [ :truncate_details ] = x
14
+ end
15
+ end
16
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../options_helper'
4
+
5
+ describe OctocatalogDiff ::Cli ::Options do
6
+ describe '#opt_truncate_details' do
7
+ include_examples 'true/false option' , 'truncate-details' , :truncate_details
8
+ end
9
+ end
You can’t perform that action at this time.
0 commit comments