source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/retry_failed_catalog.rb
Ruby
mit
247
master
645
# frozen_string_literal: true # Transient errors can cause catalog compilation problems. This adds an option to retry # a failed catalog multiple times before kicking out an error message. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is mo...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppet_master_ssl_client_key.rb
Ruby
mit
247
master
927
# frozen_string_literal: true # Specify the SSL client key for Puppet Master. This makes it possible to authenticate with a # client certificate keypair to the Puppet Master. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/debug.rb
Ruby
mit
247
master
434
# frozen_string_literal: true # Debugging option # @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(:debug) do has_weight 110 def parse(parser, options) parser....
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/bootstrapped_dirs.rb
Ruby
mit
247
master
967
# frozen_string_literal: true # Allow (or create) directories that are already bootstrapped. Handy to allow "bootstrap once, build many" # to save time when diffing multiple catalogs on this system. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_package_inventory.rb
Ruby
mit
247
master
846
# frozen_string_literal: true # When pulling facts from PuppetDB in a Puppet Enterprise environment, also include # the Puppet Enterprise Package Inventory data in the fact results, if available. # Generally you should not need to specify this, but including the package inventory # data will produce a more accurate se...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/cached_master_dir.rb
Ruby
mit
247
master
823
# frozen_string_literal: true # Cache a bootstrapped checkout of 'master' and use that for time-saving when the SHA # has not changed. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. OctocatalogDiff::Cli::Options::...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/ignore_tags.rb
Ruby
mit
247
master
984
# frozen_string_literal: true # Provide ability to set one or more tags, which will cause catalog-diff # to ignore any changes for any defined type where this tag is set. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this met...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/storeconfigs_backend.rb
Ruby
mit
247
master
525
# frozen_string_literal: true # Set storeconfigs (integration with PuppetDB for collected resources) # @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(:storeconfigs) do...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_ssl_ca.rb
Ruby
mit
247
master
820
# frozen_string_literal: true # Specify the CA certificate for PuppetDB. If specified, this will enable SSL verification # that the certificate being presented has been signed by this CA, and that the common name # matches the name you are using to connecting. # @param parser [OptionParser object] The OptionParser arg...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_ssl_client_password_file.rb
Ruby
mit
247
master
743
# frozen_string_literal: true # Specify the password for a PEM or PKCS12 private key, by reading it from a file. # @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(:pupp...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/use_lcs.rb
Ruby
mit
247
master
538
# frozen_string_literal: true # Configures using the Longest common subsequence (LCS) algorithm to determine differences in arrays # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. OctocatalogDiff::Cli::Options::Opti...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/bootstrap_current.rb
Ruby
mit
247
master
596
# frozen_string_literal: true # Option to bootstrap the current directory (by default, the bootstrap script is NOT # run when the catalog builds in the current directory). # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this me...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/debug_bootstrap.rb
Ruby
mit
247
master
626
# frozen_string_literal: true # Option to print debugging output for the bootstrap script in addition to the normal # debugging output. Note that `--debug` must also be enabled for this option to have # any effect. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash bei...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/output_file.rb
Ruby
mit
247
master
565
# frozen_string_literal: true # Output file option # @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(:output_file) do has_weight 90 def parse(parser, options) ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/output_format.rb
Ruby
mit
247
master
956
# frozen_string_literal: true # Output format option. 'text' is human readable text, 'json' is an array of differences # identified by human readable keys (the preferred octocatalog-diff 1.x format), and 'legacy_json' is an # array of differences, where each difference is an array (the octocatalog-diff 0.x format). # ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_token_file.rb
Ruby
mit
247
master
1,058
# frozen_string_literal: true # Specify the PE RBAC token to access the PuppetDB API. Refer to # https://puppet.com/docs/pe/latest/rbac/rbac_token_auth_intro.html#generate-a-token-using-puppet-access # for details on generating and obtaining a token. Use this option to specify the text # in a file, to read the content...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/facts_terminus.rb
Ruby
mit
247
master
823
# frozen_string_literal: true # Get the facts terminus. Generally this is 'yaml' and a fact file will be loaded from PuppetDB or # elsewhere in the environment. However it can be set to 'facter' which will run facter on the host # on which this is running. # @param parser [OptionParser object] The OptionParser argumen...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/pe_enc_ssl_ca.rb
Ruby
mit
247
master
803
# frozen_string_literal: true # Specify the CA certificate for the Puppet Enterprise ENC. If specified, this will enable SSL verification # that the certificate being presented has been signed by this CA, and that the common name # matches the name you are using to connecting. # @param parser [OptionParser object] The...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppet_master_timeout.rb
Ruby
mit
247
master
853
# frozen_string_literal: true # Specify a timeout for retrieving a catalog from a Puppet master / Puppet server. # This timeout is specified in seconds. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. OctocatalogDi...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/catalog_only.rb
Ruby
mit
247
master
652
# frozen_string_literal: true # When set, --catalog-only will only compile the catalog for the 'to' branch, and skip any # diffing activity. The catalog will be printed to STDOUT or written to the output file. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being co...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/environment.rb
Ruby
mit
247
master
668
# frozen_string_literal: true # Specify the environment to use when compiling the catalog. This is useful only in conjunction # with `--preserve-environments`. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. Octoca...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/create_symlinks.rb
Ruby
mit
247
master
728
# frozen_string_literal: true # Specify which directories from the base should be symlinked into the temporary compilation # environment. This is useful only in conjunction with `--preserve-environments`. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constru...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_token.rb
Ruby
mit
247
master
790
# frozen_string_literal: true # Specify the PE RBAC token to access the PuppetDB API. Refer to # https://puppet.com/docs/pe/latest/rbac/rbac_token_auth_intro.html#generate-a-token-using-puppet-access # for details on generating and obtaining a token. Use this option to specify the text # of the token. (Use --puppetdb-...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/hiera_path_strip.rb
Ruby
mit
247
master
1,840
# frozen_string_literal: true # Specify the path to strip off the datadir to munge hiera.yaml file # @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(:hiera_path_strip) ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/ignore_attr.rb
Ruby
mit
247
master
597
# frozen_string_literal: true # Specify attributes to ignore # @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(:ignore_attr) do has_weight 190 def parse(parser, op...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/preserve_environments.rb
Ruby
mit
247
master
681
# frozen_string_literal: true # Preserve the `environments` directory from the repository when compiling the catalog. Likely # requires some combination of `--to-environment`, `--from-environment`, and/or `--create-symlinks` # to work correctly. # @param parser [OptionParser object] The OptionParser argument # @param ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/suppress_absent_file_details.rb
Ruby
mit
247
master
839
# frozen_string_literal: true # If enabled, this option will suppress changes to certain attributes of a file, if the # file is specified to be 'absent' in the target catalog. Suppressed changes in this case # include user, group, mode, and content, because a removed file has none of those. # <i>This option is DEPRECA...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/display_detail_add.rb
Ruby
mit
247
master
543
# frozen_string_literal: true # Provide ability to display details of 'added' resources in the output. # @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(:display_detail...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/save_catalog.rb
Ruby
mit
247
master
1,323
# frozen_string_literal: true # Allow catalogs to be saved to a file before they are diff'd. # @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(:save_catalog) do has_w...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppet_master_ssl_ca.rb
Ruby
mit
247
master
961
# frozen_string_literal: true # Specify the CA certificate for Puppet Master. If specified, this will enable SSL verification # that the certificate being presented has been signed by this CA, and that the common name # matches the name you are using to connecting. # @param parser [OptionParser object] The OptionParse...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_ssl_client_key.rb
Ruby
mit
247
master
752
# frozen_string_literal: true # Specify the client key for connecting to PuppetDB. This must be specified along with # --puppetdb-ssl-client-cert in order to work. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. Oc...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_api_version.rb
Ruby
mit
247
master
670
# Specify the API version to use for the PuppetDB. The current values supported are '3' or '4', and '4' is # the default. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. OctocatalogDiff::Cli::Options::Option.newopti...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/basedir.rb
Ruby
mit
247
master
635
# frozen_string_literal: true # Option to set the base checkout directory of puppet repository # @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(:basedir) do has_weig...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/master_cache_branch.rb
Ruby
mit
247
master
515
# frozen_string_literal: true # Allow override of the branch that is cached. This defaults to 'origin/master'. # @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(:master...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/bootstrap_then_exit.rb
Ruby
mit
247
master
504
# frozen_string_literal: true # Option to bootstrap directories and then exit # @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(:bootstrap_then_exit) do has_weight 70...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/truncate_details.rb
Ruby
mit
247
master
689
# frozen_string_literal: true # When using `--display-detail-add` by default the details of any field will be truncated # at 80 characters. Specify `--no-truncate-details` to display the full output. This option # has no effect when `--display-detail-add` is not used. # @param parser [OptionParser object] The OptionPa...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb
Ruby
mit
247
master
771
# frozen_string_literal: true # Specify the client certificate for connecting to PuppetDB. This must be specified along with # --puppetdb-ssl-client-key in order to work. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this met...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/hostname.rb
Ruby
mit
247
master
936
# frozen_string_literal: true # Set hostname, which is used to look up facts in PuppetDB, and in the header of diff display. # This option can recieve a single hostname, or a comma separated list of # multiple hostnames, which are split into an Array. Multiple hostnames do not # work with the `catalog-only` or `bootst...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/display_source_file_line.rb
Ruby
mit
247
master
519
# frozen_string_literal: true # Display source filename and line number for diffs # @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(:display_source_file_line) do has_...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/pe_enc_token.rb
Ruby
mit
247
master
774
# frozen_string_literal: true # Specify the access token to access the Puppet Enterprise ENC. Refer to # https://docs.puppet.com/pe/latest/nc_forming_requests.html#authentication for # details on generating and obtaining a token. Use this option to specify the text # of the token. (Use --pe-enc-token-file to read the ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppet_master_api_version.rb
Ruby
mit
247
master
1,018
# frozen_string_literal: true # Specify the API version to use for the Puppet Master. This makes it possible to authenticate to a # version 3.x PuppetMaster by specifying the API version as 2, or for a version 4.x PuppetMaster by # specifying API version as 3. # @param parser [OptionParser object] The OptionParser arg...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppet_master_update_catalog.rb
Ruby
mit
247
master
757
# frozen_string_literal: true # Specify if, when using the Puppetserver v4 catalog API, the Puppetserver should # update the catalog in PuppetDB. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. OctocatalogDiff::Cli...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/existing_catalogs.rb
Ruby
mit
247
master
1,115
# frozen_string_literal: true require 'json' # If pre-compiled catalogs are available, these can be used to short-circuit the build process. # These files must exist and be in Puppet catalog format. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed;...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/enc_override.rb
Ruby
mit
247
master
921
# frozen_string_literal: true # Allow override of ENC parameters on the command line. ENC parameter overrides can be supplied for the 'to' or 'from' catalog, # or for both. There is some attempt to handle data types here (since all items on the command line are strings) # by permitting a data type specification as wel...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/display_datatype_changes.rb
Ruby
mit
247
master
766
# frozen_string_literal: true # Toggle on or off the display of data type changes when the string representation # is the same. For example with this enabled, '42' (the string) and 42 (the integer) # will be displayed as a difference. With this disabled, this is not displayed as a # difference. # @param parser [Option...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/parser.rb
Ruby
mit
247
master
2,021
# frozen_string_literal: true # Enable future parser for both branches or for just one # @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(:parser) do has_weight 270 ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_ssl_client_password.rb
Ruby
mit
247
master
738
# frozen_string_literal: true # Specify the password for a PEM or PKCS12 private key on the command line. # Note that `--puppetdb-ssl-client-password-file` is slightly more secure because # the text of the password won't appear in the process list. # @param parser [OptionParser object] The OptionParser argument # @par...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/compare_file_text.rb
Ruby
mit
247
master
2,378
# 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 des...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/bootstrap_environment.rb
Ruby
mit
247
master
908
# frozen_string_literal: true # Allow the bootstrap environment to be set up via the command line. # @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(:bootstrap_environm...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/storeconfigs.rb
Ruby
mit
247
master
523
# frozen_string_literal: true # Set storeconfigs (integration with PuppetDB for collected resources) # @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(:storeconfigs) do...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/fact_override.rb
Ruby
mit
247
master
834
# frozen_string_literal: true # Allow override of facts on the command line. Fact overrides can be supplied for the 'to' or 'from' catalog, # or for both. There is some attempt to handle data types here (since all items on the command line are strings) # by permitting a data type specification as well. OctocatalogDiff...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_url.rb
Ruby
mit
247
master
837
# frozen_string_literal: true require 'uri' # Specify the base URL for PuppetDB. This will generally look like https://puppetdb.yourdomain.com:8081 # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. OctocatalogDiff::...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/command_line.rb
Ruby
mit
247
master
636
# frozen_string_literal: true # Provide additional command line flags to set when running Puppet to compile catalogs. # @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(...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/fact_file.rb
Ruby
mit
247
master
1,633
# frozen_string_literal: true # Allow an existing fact file to be provided, to avoid pulling facts from PuppetDB. # @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(:fac...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/include_tags.rb
Ruby
mit
247
master
531
# frozen_string_literal: true # Options used when comparing catalogs - tags are generally ignored; you can un-ignore them. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. OctocatalogDiff::Cli::Options::Option.newop...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/enc.rb
Ruby
mit
247
master
1,244
# frozen_string_literal: true # Path to external node classifier, relative to the base directory of the checkout. # @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(:enc...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppet_master.rb
Ruby
mit
247
master
623
# frozen_string_literal: true # Specify the hostname, or hostname:port, for the Puppet Master. # @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(:puppet_master) do ha...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/to_from_branch.rb
Ruby
mit
247
master
716
# frozen_string_literal: true # Set the 'from' and 'to' branches, which is used to compile catalogs. A branch of '.' means to use # the current contents of the base code directory without any git checkouts. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being const...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppet_master_ssl_client_cert.rb
Ruby
mit
247
master
954
# frozen_string_literal: true # Specify the SSL client certificate for Puppet Master. This makes it possible to authenticate with a # client certificate keypair to the Puppet Master. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/pe_enc_ssl_client_cert.rb
Ruby
mit
247
master
751
# frozen_string_literal: true # Specify the client certificate for connecting to the Puppet Enterprise ENC. This must be specified along with # --pe-enc-ssl-client-key in order to work. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modif...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/ignore.rb
Ruby
mit
247
master
1,074
# frozen_string_literal: true # Options used when comparing catalogs - set ignored changes. # @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(:ignore) do has_weight 1...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppet_master_token_file.rb
Ruby
mit
247
master
1,329
# frozen_string_literal: true # Specify a path to a file containing a PE RBAC token used to authenticate to the # Puppetserver for a v4 catalog API call. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. OctocatalogD...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/parallel.rb
Ruby
mit
247
master
474
# frozen_string_literal: true # Disable or enable parallel processing of catalogs. # @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(:parallel) do has_weight 300 d...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/pe_enc_ssl_client_key.rb
Ruby
mit
247
master
728
# frozen_string_literal: true # Specify the client key for connecting to Puppet Enterprise ENC. This must be specified along with # --pe-enc-ssl-client-cert in order to work. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppet_master_token.rb
Ruby
mit
247
master
694
# frozen_string_literal: true # Specify a PE RBAC token used to authenticate to Puppetserver for v4 # catalog API calls. # @param parser [OptionParser object] The OptionParser argument # @param options [Hash] Options hash being constructed; this is modified in this method. OctocatalogDiff::Cli::Options::Option.newopti...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/header.rb
Ruby
mit
247
master
1,308
# frozen_string_literal: true # Provide ability to set custom header or to display no header at all # @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(:header) do has_...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/filters.rb
Ruby
mit
247
master
834
# frozen_string_literal: true # Specify one or more filters to apply to the results of the catalog difference. # For a list of available filters and further explanation, please refer to # <a href="advanced-filter.md">Filtering results</a>. # @param parser [OptionParser object] The OptionParser argument # @param option...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/safe_to_delete_cached_master_dir.rb
Ruby
mit
247
master
757
# frozen_string_literal: true # By specifying a directory path here, you are explicitly giving permission to the program # to delete it if it believes it needs to be created (e.g., if the SHA has changed of the # cached directory). # @param parser [OptionParser object] The OptionParser argument # @param options [Hash]...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/color.rb
Ruby
mit
247
master
491
# frozen_string_literal: true # Color printing option # @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(:color) do has_weight 80 def parse(parser, options) par...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/puppetdb_ssl_crl.rb
Ruby
mit
247
master
658
# frozen_string_literal: true # Specify the Certificate Revocation List for PuppetDB SSL. # @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(:puppetdb_ssl_crl) do has_...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/quiet.rb
Ruby
mit
247
master
436
# frozen_string_literal: true # Quiet option # @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(:quiet) do has_weight 120 def parse(parser, options) parser.on('...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/hiera_path.rb
Ruby
mit
247
master
2,289
# frozen_string_literal: true # Specify the path to the Hiera data directory (relative to the top level Puppet checkout). For Puppet Enterprise and the # Puppet control repo template, the value of this should be 'hieradata', which is the default. # @param parser [OptionParser object] The OptionParser argument # @param...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/cli/options/pe_enc_token_file.rb
Ruby
mit
247
master
1,016
# frozen_string_literal: true # Specify the access token to access the Puppet Enterprise ENC. Refer to # https://docs.puppet.com/pe/latest/nc_forming_requests.html#authentication for # details on generating and obtaining a token. Use this option if the token is stored # in a file, to read the content of the token from...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/facts/puppetdb.rb
Ruby
mit
247
master
4,928
# frozen_string_literal: true require_relative '../errors' require_relative '../facts' require_relative '../puppetdb' require 'yaml' module OctocatalogDiff class Facts # Deal with facts in PuppetDB class PuppetDB # Supporting multiple versions of the PuppetDB API. PUPPETDB_QUERY_FACTS_URL = { ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/facts/yaml.rb
Ruby
mit
247
master
1,533
# frozen_string_literal: true require_relative '../facts' require 'yaml' module OctocatalogDiff class Facts # Deal with facts in YAML files class Yaml # Manipulate a YAML file so it can be parsed and return the facts as a hash. # If we leave it as Puppet::Node::Facts then it will require us to l...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/facts/json.rb
Ruby
mit
247
master
1,166
# frozen_string_literal: true require_relative '../facts' require 'json' module OctocatalogDiff class Facts # Deal with facts in JSON files class JSON # @param options [Hash] Options hash specifically for this fact type. # - :fact_file_string [String] => Fact data as a string # @...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog/computed.rb
Ruby
mit
247
master
9,464
# frozen_string_literal: true require 'fileutils' require 'json' require 'stringio' require_relative '../catalog' require_relative '../catalog-util/bootstrap' require_relative '../catalog-util/builddir' require_relative '../catalog-util/command' require_relative '../catalog-util/facts' require_relative '../util/puppe...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog/puppetmaster.rb
Ruby
mit
247
master
6,951
# frozen_string_literal: true require_relative '../catalog' require_relative '../catalog-util/facts' require_relative '../external/pson/pure' require_relative '../util/httparty' require 'json' require 'securerandom' require 'stringio' module OctocatalogDiff class Catalog # Represents a Puppet catalog that is o...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog/puppetdb.rb
Ruby
mit
247
master
2,983
# frozen_string_literal: true require 'json' require 'stringio' require_relative '../catalog' require_relative '../errors' require_relative '../puppetdb' module OctocatalogDiff class Catalog # Represents a Puppet catalog that is read from PuppetDB. class PuppetDB < OctocatalogDiff::Catalog # Construc...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog/json.rb
Ruby
mit
247
master
1,573
# frozen_string_literal: true require_relative '../catalog' require_relative '../catalog-util/fileresources' require 'json' module OctocatalogDiff class Catalog # Represents a Puppet catalog that is read in directly from a JSON file. class JSON < OctocatalogDiff::Catalog # Constructor # @param ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog/noop.rb
Ruby
mit
247
master
430
# frozen_string_literal: true require_relative '../catalog' require 'json' module OctocatalogDiff class Catalog # Represents a null Puppet catalog. class Noop < OctocatalogDiff::Catalog def initialize(options) super @catalog_json = '{"resources":[]}' @catalog = { 'resources' ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/display.rb
Ruby
mit
247
master
6,856
# frozen_string_literal: true require_relative '../api/v1/diff' require_relative 'differ' require_relative 'display/json' require_relative 'display/legacy_json' require_relative 'display/text' module OctocatalogDiff module CatalogDiff # Prepare a display of the results from a catalog-diff. Intended that this wi...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/differ.rb
Ruby
mit
247
master
31,466
# frozen_string_literal: true require 'diffy' require 'digest' require 'hashdiff' require 'json' require 'set' require 'stringio' require_relative '../catalog' require_relative '../errors' require_relative '../util/util' require_relative 'filter' HashDiff = Hashdiff unless defined? HashDiff module OctocatalogDiff ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/filter.rb
Ruby
mit
247
master
3,579
require_relative '../api/v1/diff' require_relative 'filter/absent_file' require_relative 'filter/compilation_dir' require_relative 'filter/equivalent_array_no_datatypes' require_relative 'filter/json' require_relative 'filter/single_item_array' require_relative 'filter/yaml' require 'stringio' module OctocatalogDiff ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/filter/yaml.rb
Ruby
mit
247
master
1,673
# frozen_string_literal: true require_relative '../filter' require 'yaml' module OctocatalogDiff module CatalogDiff class Filter # Filter based on equivalence of YAML objects for file resources with named extensions. class YAML < OctocatalogDiff::CatalogDiff::Filter # Public: Actually do th...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/filter/equivalent_array_no_datatypes.rb
Ruby
mit
247
master
2,533
# frozen_string_literal: true require_relative '../filter' module OctocatalogDiff module CatalogDiff class Filter # Filter out changes in parameters where the elements of an array are the # same values but different data types. For example, this would filter out # the following diffs: # ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/filter/single_item_array.rb
Ruby
mit
247
master
1,736
# frozen_string_literal: true require_relative '../filter' module OctocatalogDiff module CatalogDiff class Filter # Filter out changes in parameters when one catalog has a parameter that's an object and # the other catalog has that same parameter as an array containing the same object. # For e...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/filter/json.rb
Ruby
mit
247
master
1,667
# frozen_string_literal: true require_relative '../filter' require 'json' module OctocatalogDiff module CatalogDiff class Filter # Filter based on equivalence of JSON objects for file resources with named extensions. class JSON < OctocatalogDiff::CatalogDiff::Filter # Public: Actually do th...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/filter/compilation_dir.rb
Ruby
mit
247
master
3,377
# frozen_string_literal: true require_relative '../filter' require_relative '../../util/util' module OctocatalogDiff module CatalogDiff class Filter # Filter out changes that are due to the catalog compilation directory. class CompilationDir < OctocatalogDiff::CatalogDiff::Filter # Public: F...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/filter/absent_file.rb
Ruby
mit
247
master
2,688
# frozen_string_literal: true require_relative '../filter' require 'set' module OctocatalogDiff module CatalogDiff class Filter # Filter out changes in parameters when the "to" resource has ensure => absent. class AbsentFile < OctocatalogDiff::CatalogDiff::Filter KEEP_ATTRIBUTES = (Set.new ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/display/json.rb
Ruby
mit
247
master
1,027
# frozen_string_literal: true require_relative '../display' require 'json' module OctocatalogDiff module CatalogDiff class Display # Display the output from a diff in JSON format. This is the new format, used in octocatalog-diff # 1.x, where each diff is represented by an hash with named keys. ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/display/legacy_json.rb
Ruby
mit
247
master
1,003
# frozen_string_literal: true require_relative '../display' require 'json' module OctocatalogDiff module CatalogDiff class Display # Display the output from a diff in JSON format. This is the legacy format, used in octocatalog-diff # 0.x, where each diff is represented by an array. class Lega...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-diff/display/text.rb
Ruby
mit
247
master
24,926
# frozen_string_literal: true require_relative '../display' require_relative '../../util/colored' require_relative '../../util/util' require 'diffy' require 'json' module OctocatalogDiff module CatalogDiff class Display # Display the output from a diff in text format. Uses the 'diffy' gem to provide diff...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-util/builddir.rb
Ruby
mit
247
master
18,803
# frozen_string_literal: true require 'yaml' require_relative '../facts' require_relative 'enc' require_relative '../util/util' module OctocatalogDiff module CatalogUtil # Represents a directory that is created such that a catalog can be compiled # in it. This has the following major functions: # - Cre...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-util/git.rb
Ruby
mit
247
master
2,805
# frozen_string_literal: true require 'rugged' require_relative '../errors' require_relative '../util/scriptrunner' module OctocatalogDiff module CatalogUtil # Class to perform a git checkout (via 'git archive') of a branch from the base git # directory into another targeted directory. class Git ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-util/fileresources.rb
Ruby
mit
247
master
8,213
# frozen_string_literal: true require 'digest' module OctocatalogDiff module CatalogUtil # Used to convert file resources such as: # file { 'something': source => 'puppet:///modules/xxx/yyy'} # to: # file { 'something': content => $( cat modules/xxx/files/yyy )} # This allows the displayed d...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-util/command.rb
Ruby
mit
247
master
8,643
# frozen_string_literal: true require 'fileutils' require 'open3' require 'shellwords' module OctocatalogDiff module CatalogUtil # Used to construct the command to run 'puppet' to construct the catalog. class Command # Constructor def initialize(options = {}, logger = nil) @options = opt...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-util/enc.rb
Ruby
mit
247
master
4,422
# frozen_string_literal: true require_relative 'enc/noop' require_relative 'enc/pe' require_relative 'enc/script' require 'stringio' require 'yaml' module OctocatalogDiff module CatalogUtil # Support a generic ENC. It must use one of the supported backends found in the # 'enc' subdirectory. class ENC ...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-util/cached_master_directory.rb
Ruby
mit
247
master
8,890
# frozen_string_literal: true require_relative 'bootstrap' require_relative 'git' require_relative '../util/catalogs' require 'fileutils' module OctocatalogDiff module CatalogUtil # Handle the bootstrapped and cached checkout of [master branch]. This is an optimization # targeted at local development envir...
github
github/octocatalog-diff
https://github.com/github/octocatalog-diff
lib/octocatalog-diff/catalog-util/bootstrap.rb
Ruby
mit
247
master
7,074
# frozen_string_literal: true require_relative '../bootstrap' require_relative '../errors' require_relative '../util/parallel' require_relative 'git' require 'fileutils' module OctocatalogDiff module CatalogUtil # Methods to bootstrap a directory. Intended to be called from cli. This handles # parallelizat...