Sha256: 29b9dd59fca185905fc41c078fea64a8ab039417b34dc9617542f18ce8e1668e

Contents?: true

Size: 758 Bytes

Versions: 17

Compression:

Stored size: 758 Bytes

Contents

# frozen_string_literal: true

# 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::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

17 entries across 17 versions & 1 rubygems

Version Path
octocatalog-diff-2.0.0 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.6.0 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.5.4 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.5.3 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.5.2 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.5.1 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.5.0 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.4.1 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.4.0 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.3.0 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.2.0 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.1.0 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.0.4 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.0.3 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.0.2 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.0.1 lib/octocatalog-diff/cli/options/compare_file_text.rb
octocatalog-diff-1.0.0 lib/octocatalog-diff/cli/options/compare_file_text.rb