octocatalog-diff 0.5.6 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.version +1 -1
  3. data/doc/CHANGELOG.md +23 -5
  4. data/doc/advanced-bootstrap.md +25 -0
  5. data/doc/advanced-catalog-validation.md +41 -0
  6. data/doc/advanced-environments.md +93 -0
  7. data/doc/advanced-hiera-path-stripping.md +2 -0
  8. data/doc/advanced.md +2 -0
  9. data/doc/configuration-enc.md +34 -0
  10. data/doc/dev/releasing.md +40 -2
  11. data/doc/dev/run-from-branch.md +62 -0
  12. data/doc/installation.md +6 -0
  13. data/doc/optionsref.md +84 -22
  14. data/lib/octocatalog-diff/bootstrap.rb +2 -0
  15. data/lib/octocatalog-diff/catalog-diff/cli.rb +4 -1
  16. data/lib/octocatalog-diff/catalog-diff/cli/catalogs.rb +8 -2
  17. data/lib/octocatalog-diff/catalog-diff/cli/diffs.rb +2 -0
  18. data/lib/octocatalog-diff/catalog-diff/cli/helpers/fact_override.rb +3 -2
  19. data/lib/octocatalog-diff/catalog-diff/cli/options.rb +14 -2
  20. data/lib/octocatalog-diff/catalog-diff/cli/options/basedir.rb +2 -0
  21. data/lib/octocatalog-diff/catalog-diff/cli/options/bootstrap_current.rb +2 -0
  22. data/lib/octocatalog-diff/catalog-diff/cli/options/bootstrap_environment.rb +2 -0
  23. data/lib/octocatalog-diff/catalog-diff/cli/options/bootstrap_script.rb +2 -0
  24. data/lib/octocatalog-diff/catalog-diff/cli/options/bootstrap_then_exit.rb +2 -0
  25. data/lib/octocatalog-diff/catalog-diff/cli/options/bootstrapped_dirs.rb +2 -0
  26. data/lib/octocatalog-diff/catalog-diff/cli/options/cached_master_dir.rb +2 -0
  27. data/lib/octocatalog-diff/catalog-diff/cli/options/catalog_only.rb +2 -0
  28. data/lib/octocatalog-diff/catalog-diff/cli/options/color.rb +2 -0
  29. data/lib/octocatalog-diff/catalog-diff/cli/options/command_line.rb +19 -0
  30. data/lib/octocatalog-diff/catalog-diff/cli/options/compare_file_text.rb +2 -0
  31. data/lib/octocatalog-diff/catalog-diff/cli/options/create_symlinks.rb +20 -0
  32. data/lib/octocatalog-diff/catalog-diff/cli/options/debug.rb +2 -0
  33. data/lib/octocatalog-diff/catalog-diff/cli/options/debug_bootstrap.rb +2 -0
  34. data/lib/octocatalog-diff/catalog-diff/cli/options/display_datatype_changes.rb +2 -0
  35. data/lib/octocatalog-diff/catalog-diff/cli/options/display_detail_add.rb +2 -0
  36. data/lib/octocatalog-diff/catalog-diff/cli/options/display_source_file_line.rb +2 -0
  37. data/lib/octocatalog-diff/catalog-diff/cli/options/enc.rb +2 -0
  38. data/lib/octocatalog-diff/catalog-diff/cli/options/environment.rb +19 -0
  39. data/lib/octocatalog-diff/catalog-diff/cli/options/existing_catalogs.rb +2 -0
  40. data/lib/octocatalog-diff/catalog-diff/cli/options/fact_file.rb +2 -0
  41. data/lib/octocatalog-diff/catalog-diff/cli/options/fact_override.rb +2 -0
  42. data/lib/octocatalog-diff/catalog-diff/cli/options/facts_terminus.rb +2 -0
  43. data/lib/octocatalog-diff/catalog-diff/cli/options/from_puppetdb.rb +2 -0
  44. data/lib/octocatalog-diff/catalog-diff/cli/options/header.rb +2 -0
  45. data/lib/octocatalog-diff/catalog-diff/cli/options/hiera_config.rb +2 -0
  46. data/lib/octocatalog-diff/catalog-diff/cli/options/hiera_path.rb +2 -0
  47. data/lib/octocatalog-diff/catalog-diff/cli/options/hiera_path_strip.rb +2 -0
  48. data/lib/octocatalog-diff/catalog-diff/cli/options/hostname.rb +2 -0
  49. data/lib/octocatalog-diff/catalog-diff/cli/options/ignore.rb +2 -0
  50. data/lib/octocatalog-diff/catalog-diff/cli/options/ignore_attr.rb +2 -0
  51. data/lib/octocatalog-diff/catalog-diff/cli/options/ignore_tags.rb +2 -0
  52. data/lib/octocatalog-diff/catalog-diff/cli/options/include_tags.rb +2 -0
  53. data/lib/octocatalog-diff/catalog-diff/cli/options/master_cache_branch.rb +2 -0
  54. data/lib/octocatalog-diff/catalog-diff/cli/options/output_file.rb +2 -0
  55. data/lib/octocatalog-diff/catalog-diff/cli/options/output_format.rb +2 -0
  56. data/lib/octocatalog-diff/catalog-diff/cli/options/parallel.rb +2 -0
  57. data/lib/octocatalog-diff/catalog-diff/cli/options/parser.rb +2 -0
  58. data/lib/octocatalog-diff/catalog-diff/cli/options/pass_env_vars.rb +2 -0
  59. data/lib/octocatalog-diff/catalog-diff/cli/options/pe_enc_ssl_ca.rb +2 -0
  60. data/lib/octocatalog-diff/catalog-diff/cli/options/pe_enc_ssl_client_cert.rb +2 -0
  61. data/lib/octocatalog-diff/catalog-diff/cli/options/pe_enc_ssl_client_key.rb +2 -0
  62. data/lib/octocatalog-diff/catalog-diff/cli/options/pe_enc_token.rb +2 -0
  63. data/lib/octocatalog-diff/catalog-diff/cli/options/pe_enc_token_file.rb +2 -0
  64. data/lib/octocatalog-diff/catalog-diff/cli/options/pe_enc_url.rb +2 -0
  65. data/lib/octocatalog-diff/catalog-diff/cli/options/preserve_environments.rb +16 -0
  66. data/lib/octocatalog-diff/catalog-diff/cli/options/puppet_binary.rb +2 -0
  67. data/lib/octocatalog-diff/catalog-diff/cli/options/puppet_master.rb +2 -0
  68. data/lib/octocatalog-diff/catalog-diff/cli/options/puppet_master_api_version.rb +2 -0
  69. data/lib/octocatalog-diff/catalog-diff/cli/options/puppet_master_ssl_ca.rb +2 -0
  70. data/lib/octocatalog-diff/catalog-diff/cli/options/puppet_master_ssl_client_cert.rb +2 -0
  71. data/lib/octocatalog-diff/catalog-diff/cli/options/puppet_master_ssl_client_key.rb +2 -0
  72. data/lib/octocatalog-diff/catalog-diff/cli/options/puppetdb_api_version.rb +14 -0
  73. data/lib/octocatalog-diff/catalog-diff/cli/options/puppetdb_ssl_ca.rb +2 -0
  74. data/lib/octocatalog-diff/catalog-diff/cli/options/puppetdb_ssl_client_cert.rb +2 -0
  75. data/lib/octocatalog-diff/catalog-diff/cli/options/puppetdb_ssl_client_key.rb +2 -0
  76. data/lib/octocatalog-diff/catalog-diff/cli/options/puppetdb_ssl_client_password.rb +2 -0
  77. data/lib/octocatalog-diff/catalog-diff/cli/options/puppetdb_ssl_client_password_file.rb +2 -0
  78. data/lib/octocatalog-diff/catalog-diff/cli/options/puppetdb_url.rb +2 -0
  79. data/lib/octocatalog-diff/catalog-diff/cli/options/quiet.rb +2 -0
  80. data/lib/octocatalog-diff/catalog-diff/cli/options/retry_failed_catalog.rb +2 -0
  81. data/lib/octocatalog-diff/catalog-diff/cli/options/safe_to_delete_cached_master_dir.rb +2 -0
  82. data/lib/octocatalog-diff/catalog-diff/cli/options/storeconfigs.rb +2 -0
  83. data/lib/octocatalog-diff/catalog-diff/cli/options/suppress_absent_file_details.rb +2 -0
  84. data/lib/octocatalog-diff/catalog-diff/cli/options/to_from_branch.rb +2 -0
  85. data/lib/octocatalog-diff/catalog-diff/cli/options/validate_references.rb +27 -0
  86. data/lib/octocatalog-diff/catalog-diff/cli/printer.rb +2 -0
  87. data/lib/octocatalog-diff/catalog-diff/differ.rb +2 -0
  88. data/lib/octocatalog-diff/catalog-diff/display.rb +2 -0
  89. data/lib/octocatalog-diff/catalog-diff/display/json.rb +2 -0
  90. data/lib/octocatalog-diff/catalog-diff/display/text.rb +2 -0
  91. data/lib/octocatalog-diff/catalog-util/bootstrap.rb +7 -1
  92. data/lib/octocatalog-diff/catalog-util/builddir.rb +49 -13
  93. data/lib/octocatalog-diff/catalog-util/cached_master_directory.rb +2 -0
  94. data/lib/octocatalog-diff/catalog-util/command.rb +61 -1
  95. data/lib/octocatalog-diff/catalog-util/enc.rb +2 -0
  96. data/lib/octocatalog-diff/catalog-util/enc/noop.rb +2 -0
  97. data/lib/octocatalog-diff/catalog-util/enc/pe.rb +2 -0
  98. data/lib/octocatalog-diff/catalog-util/enc/pe/v1.rb +2 -0
  99. data/lib/octocatalog-diff/catalog-util/enc/script.rb +3 -1
  100. data/lib/octocatalog-diff/catalog-util/facts.rb +2 -0
  101. data/lib/octocatalog-diff/catalog-util/fileresources.rb +19 -14
  102. data/lib/octocatalog-diff/catalog-util/git.rb +2 -0
  103. data/lib/octocatalog-diff/catalog.rb +75 -2
  104. data/lib/octocatalog-diff/catalog/computed.rb +16 -0
  105. data/lib/octocatalog-diff/catalog/json.rb +2 -0
  106. data/lib/octocatalog-diff/catalog/noop.rb +2 -0
  107. data/lib/octocatalog-diff/catalog/puppetdb.rb +2 -0
  108. data/lib/octocatalog-diff/catalog/puppetmaster.rb +8 -2
  109. data/lib/octocatalog-diff/facts.rb +2 -0
  110. data/lib/octocatalog-diff/facts/json.rb +2 -0
  111. data/lib/octocatalog-diff/facts/puppetdb.rb +10 -1
  112. data/lib/octocatalog-diff/facts/yaml.rb +2 -0
  113. data/lib/octocatalog-diff/puppetdb.rb +2 -0
  114. data/lib/octocatalog-diff/util/colored.rb +2 -0
  115. data/lib/octocatalog-diff/util/httparty.rb +2 -0
  116. data/lib/octocatalog-diff/util/parallel.rb +4 -1
  117. data/lib/octocatalog-diff/util/puppetversion.rb +2 -0
  118. data/lib/octocatalog-diff/version.rb +2 -0
  119. metadata +11 -2
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'open3'
2
4
  require 'shellwords'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'cli/catalogs'
2
4
  require_relative 'cli/diffs'
3
5
  require_relative 'cli/options'
@@ -164,7 +166,8 @@ module OctocatalogDiff
164
166
  logger.level = Logger::ERROR if options[:quiet]
165
167
 
166
168
  # Some debugging information up front
167
- logger.debug "Running octocatalog-diff #{VERSION} with ruby #{RUBY_VERSION}"
169
+ version_display = ENV['OCTOCATALOG_DIFF_CUSTOM_VERSION'] || VERSION
170
+ logger.debug "Running octocatalog-diff #{version_display} with ruby #{RUBY_VERSION}"
168
171
  logger.debug "Command line arguments: #{argv_save.inspect}"
169
172
  logger.debug "Running on host #{Socket.gethostname} (#{RUBY_PLATFORM})"
170
173
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
  require 'open3'
3
5
  require 'yaml'
@@ -155,6 +157,7 @@ module OctocatalogDiff
155
157
  task = OctocatalogDiff::Util::Parallel::Task.new(
156
158
  method: method(:build_catalog),
157
159
  validator: method(:catalog_validator),
160
+ validator_args: { task: key },
158
161
  description: "build_catalog for #{@options["#{key}_env".to_sym]}",
159
162
  args: args
160
163
  )
@@ -195,7 +198,7 @@ module OctocatalogDiff
195
198
  # and remove the compilation directory (which is a tmpdir) to reveal only the relative
196
199
  # path to the files involved.
197
200
  dir = catalog.compilation_dir || ''
198
- dir_regex = Regexp.new(Regexp.escape(dir) + '/environments/production/')
201
+ dir_regex = Regexp.new(Regexp.escape(dir) + '/environments/[^/]+/')
199
202
  error_display = catalog.error_message.split("\n").map do |line|
200
203
  line.sub(/^Error:/, '[Puppet Error]').gsub(dir_regex, '')
201
204
  end.join("\n")
@@ -229,9 +232,12 @@ module OctocatalogDiff
229
232
 
230
233
  # Validate a catalog in the parallel execution
231
234
  # @param catalog [OctocatalogDiff::Catalog] Catalog object
235
+ # @param logger [Logger] Logger object (presently unused)
236
+ # @param args [Hash] Additional arguments set specifically for validator
232
237
  # @return [Boolean] true if catalog is valid, false otherwise
233
- def catalog_validator(catalog = nil, _logger = @logger)
238
+ def catalog_validator(catalog = nil, _logger = @logger, args = {})
234
239
  return false unless catalog.is_a?(OctocatalogDiff::Catalog)
240
+ catalog.validate_references if args[:task] == :to
235
241
  catalog.valid?
236
242
  end
237
243
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../differ'
2
4
 
3
5
  module OctocatalogDiff
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
 
3
5
  module OctocatalogDiff
@@ -26,8 +28,7 @@ module OctocatalogDiff
26
28
  unless input.include?('=')
27
29
  raise ArgumentError, "Fact override '#{input}' is not in 'key=(data type)value' format"
28
30
  end
29
- input.strip!
30
- @key, raw_value = input.split('=', 2)
31
+ @key, raw_value = input.strip.split('=', 2)
31
32
  @value = parsed_value(raw_value)
32
33
  elsif key.nil?
33
34
  message = "Define a key when the input is not a string (#{input.class} => #{input.inspect})"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../cli'
2
4
  require_relative '../../facts'
3
5
  require_relative '../../version'
@@ -28,6 +30,10 @@ module OctocatalogDiff
28
30
  @weight || DEFAULT_WEIGHT
29
31
  end
30
32
 
33
+ def self.name
34
+ self::NAME
35
+ end
36
+
31
37
  def self.newoption(name, &block)
32
38
  klass = Class.new(OctocatalogDiff::CatalogDiff::Cli::Options::Option)
33
39
  klass.const_set('NAME', name)
@@ -59,12 +65,18 @@ module OctocatalogDiff
59
65
  end
60
66
 
61
67
  # Read in *.rb files in the 'options' directory and create classes from them.
62
- # Sort the classes according to weight and return the list of sorted classes.
68
+ # Sort the classes according to weight and name and return the list of sorted classes.
63
69
  # @return [Array<Class>] Sorted classes
64
70
  def self.option_classes
65
71
  files = Dir.glob(File.join(File.dirname(__FILE__), 'options', '*.rb'))
66
72
  files.each { |file| load file } # Populates self.classes
67
- classes.sort { |a, b| a.weight <=> b.weight }
73
+ classes.sort do |a, b|
74
+ [
75
+ a.weight <=> b.weight,
76
+ a.name.downcase <=> b.name.downcase,
77
+ a.object_id <=> b.object_id
78
+ ].find(&:nonzero?)
79
+ end
68
80
  end
69
81
 
70
82
  # Sets up options that can be defined globally or for just one branch. For example, with a
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Option to set the base checkout directory of puppet repository
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Option to bootstrap the current directory (by default, the bootstrap script is NOT
2
4
  # run when the catalog builds in the current directory).
3
5
  # @param parser [OptionParser object] The OptionParser argument
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Allow the bootstrap environment to be set up via the command line.
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Allow specification of a bootstrap script. This runs after checking out the directory, and before running
2
4
  # puppet there. Good for running librarian to install modules, and anything else site-specific that needs
3
5
  # to be done.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Option to bootstrap directories and then exit
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Allow (or create) directories that are already bootstrapped. Handy to allow "bootstrap once, build many"
2
4
  # to save time when diffing multiple catalogs on this system.
3
5
  # @param parser [OptionParser object] The OptionParser argument
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Cache a bootstrapped checkout of 'master' and use that for time-saving when the SHA
2
4
  # has not changed.
3
5
  # @param parser [OptionParser object] The OptionParser argument
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # When set, --catalog-only will only compile the catalog for the 'to' branch, and skip any
2
4
  # diffing activity. The catalog will be printed to STDOUT or written to the output file.
3
5
  # @param parser [OptionParser object] The OptionParser argument
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Color printing option
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Provide additional command line flags to set when running Puppet to compile catalogs.
4
+ # @param parser [OptionParser object] The OptionParser argument
5
+ # @param options [Hash] Options hash being constructed; this is modified in this method.
6
+ OctocatalogDiff::CatalogDiff::Cli::Options::Option.newoption(:command_line) do
7
+ has_weight 510
8
+
9
+ def parse(parser, options)
10
+ OctocatalogDiff::CatalogDiff::Cli::Options.option_globally_or_per_branch(
11
+ parser: parser,
12
+ options: options,
13
+ cli_name: 'command-line',
14
+ option_name: 'command_line',
15
+ desc: 'Command line arguments',
16
+ datatype: []
17
+ )
18
+ end
19
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # When a file is specified with `source => 'puppet:///modules/something/foo.txt'`, remove
2
4
  # the 'source' attribute and populate the 'content' attribute with the text of the file.
3
5
  # This allows for a diff of the content, rather than a diff of the location, which is
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Specify which directories from the base should be symlinked into the temporary compilation
4
+ # environment. This is useful only in conjunction with `--preserve-environments`.
5
+ # @param parser [OptionParser object] The OptionParser argument
6
+ # @param options [Hash] Options hash being constructed; this is modified in this method.
7
+ OctocatalogDiff::CatalogDiff::Cli::Options::Option.newoption(:create_symlinks) do
8
+ has_weight 503
9
+
10
+ def parse(parser, options)
11
+ OctocatalogDiff::CatalogDiff::Cli::Options.option_globally_or_per_branch(
12
+ parser: parser,
13
+ options: options,
14
+ cli_name: 'create-symlinks',
15
+ option_name: 'create_symlinks',
16
+ desc: 'Symlinks to create',
17
+ datatype: []
18
+ )
19
+ end
20
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Debugging option
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Option to print debugging output for the bootstrap script in addition to the normal
2
4
  # debugging output. Note that `--debug` must also be enabled for this option to have
3
5
  # any effect.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Toggle on or off the display of data type changes when the string representation
2
4
  # is the same. For example with this enabled, '42' (the string) and 42 (the integer)
3
5
  # will be displayed as a difference. With this disabled, this is not displayed as a
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Provide ability to display details of 'added' resources in the output.
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Display source filename and line number for diffs
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Path to external node classifier, relative to the base directory of the checkout.
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Specify the environment to use when compiling the catalog. This is useful only in conjunction
4
+ # with `--preserve-environments`.
5
+ # @param parser [OptionParser object] The OptionParser argument
6
+ # @param options [Hash] Options hash being constructed; this is modified in this method.
7
+ OctocatalogDiff::CatalogDiff::Cli::Options::Option.newoption(:environment) do
8
+ has_weight 502
9
+
10
+ def parse(parser, options)
11
+ OctocatalogDiff::CatalogDiff::Cli::Options.option_globally_or_per_branch(
12
+ parser: parser,
13
+ options: options,
14
+ cli_name: 'environment',
15
+ option_name: 'environment',
16
+ desc: 'Environment for catalog compilation'
17
+ )
18
+ end
19
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'json'
2
4
 
3
5
  # If pre-compiled catalogs are available, these can be used to short-circuit the build process.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Allow an existing fact file to be provided, to avoid pulling facts from PuppetDB.
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Allow override of facts on the command line. Fact overrides can be supplied for the 'to' or 'from' catalog,
2
4
  # or for both. There is some attempt to handle data types here (since all items on the command line are strings)
3
5
  # by permitting a data type specification as well.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Get the facts terminus. Generally this is 'yaml' and a fact file will be loaded from PuppetDB or
2
4
  # elsewhere in the environment. However it can be set to 'facter' which will run facter on the host
3
5
  # on which this is running.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Set --from-puppetdb to pull most recent catalog from PuppetDB instead of compiling
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Provide ability to set custom header or to display no header at all
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Specify a relative path to the Hiera yaml file
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Specify the path to the Hiera data directory (relative to the top level Puppet checkout). For Puppet Enterprise and the
2
4
  # Puppet control repo template, the value of this should be 'hieradata', which is the default.
3
5
  # @param parser [OptionParser object] The OptionParser argument
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Specify the path to strip off the datadir to munge hiera.yaml file
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Set hostname, which is used to look up facts in PuppetDB, and in the header of diff display.
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Options used when comparing catalogs - set ignored changes.
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Specify attributes to ignore
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Provide ability to set one or more tags, which will cause catalog-diff
2
4
  # to ignore any changes for any defined type where this tag is set.
3
5
  # @param parser [OptionParser object] The OptionParser argument
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Options used when comparing catalogs - tags are generally ignored; you can un-ignore them.
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Allow override of the branch that is cached. This defaults to 'origin/master'.
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Output file option
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Output format option
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Disable or enable parallel processing of catalogs.
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Enable future parser for both branches or for just one
2
4
  # @param parser [OptionParser object] The OptionParser argument
3
5
  # @param options [Hash] Options hash being constructed; this is modified in this method.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # One or more environment variables that should be made available to the Puppet binary when parsing
2
4
  # the catalog. For example, --pass-env-vars FOO,BAR will make the FOO and BAR environment variables
3
5
  # available. Setting these variables is your responsibility outside of octocatalog-diff.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Specify the CA certificate for the Puppet Enterprise ENC. If specified, this will enable SSL verification
2
4
  # that the certificate being presented has been signed by this CA, and that the common name
3
5
  # matches the name you are using to connecting.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Specify the client certificate for connecting to the Puppet Enterprise ENC. This must be specified along with
2
4
  # --pe-enc-ssl-client-key in order to work.
3
5
  # @param parser [OptionParser object] The OptionParser argument