Sha256: d965b0395608db9eb1f144bedc79e8bf9c2d8ec73922dd3d2e1887c4ccfaf0a8

Contents?: true

Size: 740 Bytes

Versions: 4

Compression:

Stored size: 740 Bytes

Contents

# When a file is specified with `source => 'puppet:///modules/something/foo.txt'`, remove
# the 'source' attribute and populate the 'content' attribute with the text of the file.
# This allows for a diff of the content, rather than a diff of the location, which is
# what is most often desired.
# @param parser [OptionParser object] The OptionParser argument
# @param options [Hash] Options hash being constructed; this is modified in this method.
OctocatalogDiff::CatalogDiff::Cli::Options::Option.newoption(:compare_file_text) do
  has_weight 210

  def parse(parser, options)
    parser.on('--[no-]compare-file-text', 'Compare text, not source location, of file resources') do |x|
      options[:compare_file_text] = x
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
octocatalog-diff-0.5.6 lib/octocatalog-diff/catalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-0.5.4 lib/octocatalog-diff/catalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-0.5.3 lib/octocatalog-diff/catalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-0.5.1 lib/octocatalog-diff/catalog-diff/cli/options/compare_file_text.rb