├── .dockerignore
├── .github
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE.md
├── PULL_REQUEST_TEMPLATE.md
├── dependabot.template.yml
├── dependabot.yml
└── workflows
│ ├── add-dependabot-pr-to-project.yml
│ ├── generate-dependabot.yml
│ ├── main.yml
│ └── release.yml
├── .gitignore
├── .rubocop.yml
├── .version
├── Dockerfile
├── Gemfile
├── LICENSE
├── README.md
├── Rakefile
├── bin
└── octocatalog-diff
├── config
└── puppet-versions.json
├── doc
├── CHANGELOG.md
├── advanced-bootstrap.md
├── advanced-cache-dir.md
├── advanced-catalog-only.md
├── advanced-catalog-validation.md
├── advanced-ci.md
├── advanced-compare-file-text.md
├── advanced-dynamic-ignores.md
├── advanced-environment-variables.md
├── advanced-environments.md
├── advanced-filter.md
├── advanced-future-parser.md
├── advanced-hiera-path-stripping.md
├── advanced-ignores.md
├── advanced-output-formats.md
├── advanced-output-hacks.md
├── advanced-override-enc.md
├── advanced-override-facts.md
├── advanced-pe-enc.md
├── advanced-puppet-master.md
├── advanced-puppet-versions.md
├── advanced-script-override.md
├── advanced-storeconfigs.md
├── advanced-using-without-git.md
├── advanced.md
├── basic.md
├── configuration-enc.md
├── configuration-hiera.md
├── configuration-puppet.md
├── configuration-puppetdb.md
├── configuration.md
├── dev
│ ├── README.md
│ ├── api.md
│ ├── api
│ │ ├── v1.md
│ │ └── v1
│ │ │ ├── calls
│ │ │ ├── catalog-diff.md
│ │ │ ├── catalog.md
│ │ │ └── config.md
│ │ │ └── objects
│ │ │ ├── catalog.md
│ │ │ ├── diff.md
│ │ │ └── override.md
│ ├── coverage.md
│ ├── how-to-add-options.md
│ ├── integration-tests.md
│ ├── releasing.md
│ └── run-from-branch.md
├── images
│ ├── octocatolog-diff-logo.png
│ ├── pull-request-identify-branch.png
│ └── screenshot1.png
├── installation.md
├── limitations.md
├── optionsref.md
├── requirements.md
├── roadmap.md
├── similar.md
├── troubleshooting.md
└── versions
│ └── v1.md
├── examples
├── api
│ └── v1
│ │ ├── catalog-builder-local-files.rb
│ │ ├── catalog-diff-git-repo.rb
│ │ └── catalog-diff-local-files.rb
├── ci
│ ├── puppet_catalog_diff_spec.rb
│ └── puppet_catalogs_spec.rb
├── octocatalog-diff.cfg.rb
└── script-overrides
│ └── git-extract-submodules
│ ├── README.md
│ └── git-extract.sh
├── lib
├── octocatalog-diff.rb
└── octocatalog-diff
│ ├── api
│ ├── v1.rb
│ └── v1
│ │ ├── catalog-compile.rb
│ │ ├── catalog-diff.rb
│ │ ├── catalog.rb
│ │ ├── common.rb
│ │ ├── config.rb
│ │ ├── diff.rb
│ │ └── override.rb
│ ├── bootstrap.rb
│ ├── catalog-diff
│ ├── differ.rb
│ ├── display.rb
│ ├── display
│ │ ├── json.rb
│ │ ├── legacy_json.rb
│ │ └── text.rb
│ ├── filter.rb
│ └── filter
│ │ ├── absent_file.rb
│ │ ├── compilation_dir.rb
│ │ ├── equivalent_array_no_datatypes.rb
│ │ ├── json.rb
│ │ ├── single_item_array.rb
│ │ └── yaml.rb
│ ├── catalog-util
│ ├── bootstrap.rb
│ ├── builddir.rb
│ ├── cached_master_directory.rb
│ ├── command.rb
│ ├── enc.rb
│ ├── enc
│ │ ├── noop.rb
│ │ ├── pe.rb
│ │ ├── pe
│ │ │ └── v1.rb
│ │ └── script.rb
│ ├── facts.rb
│ ├── fileresources.rb
│ └── git.rb
│ ├── catalog.rb
│ ├── catalog
│ ├── computed.rb
│ ├── json.rb
│ ├── noop.rb
│ ├── puppetdb.rb
│ └── puppetmaster.rb
│ ├── cli.rb
│ ├── cli
│ ├── diffs.rb
│ ├── options.rb
│ ├── options
│ │ ├── basedir.rb
│ │ ├── bootstrap_current.rb
│ │ ├── bootstrap_environment.rb
│ │ ├── bootstrap_script.rb
│ │ ├── bootstrap_then_exit.rb
│ │ ├── bootstrapped_dirs.rb
│ │ ├── cached_master_dir.rb
│ │ ├── catalog_only.rb
│ │ ├── color.rb
│ │ ├── command_line.rb
│ │ ├── compare_file_text.rb
│ │ ├── create_symlinks.rb
│ │ ├── debug.rb
│ │ ├── debug_bootstrap.rb
│ │ ├── display_datatype_changes.rb
│ │ ├── display_detail_add.rb
│ │ ├── display_source_file_line.rb
│ │ ├── enc.rb
│ │ ├── enc_override.rb
│ │ ├── environment.rb
│ │ ├── existing_catalogs.rb
│ │ ├── fact_file.rb
│ │ ├── fact_override.rb
│ │ ├── facts_terminus.rb
│ │ ├── filters.rb
│ │ ├── from_puppetdb.rb
│ │ ├── header.rb
│ │ ├── hiera_config.rb
│ │ ├── hiera_path.rb
│ │ ├── hiera_path_strip.rb
│ │ ├── hostname.rb
│ │ ├── ignore.rb
│ │ ├── ignore_attr.rb
│ │ ├── ignore_tags.rb
│ │ ├── include_tags.rb
│ │ ├── master_cache_branch.rb
│ │ ├── output_file.rb
│ │ ├── output_format.rb
│ │ ├── override_script_path.rb
│ │ ├── parallel.rb
│ │ ├── parser.rb
│ │ ├── pass_env_vars.rb
│ │ ├── pe_enc_ssl_ca.rb
│ │ ├── pe_enc_ssl_client_cert.rb
│ │ ├── pe_enc_ssl_client_key.rb
│ │ ├── pe_enc_token.rb
│ │ ├── pe_enc_token_file.rb
│ │ ├── pe_enc_url.rb
│ │ ├── preserve_environments.rb
│ │ ├── puppet_binary.rb
│ │ ├── puppet_master.rb
│ │ ├── puppet_master_api_version.rb
│ │ ├── puppet_master_ssl_ca.rb
│ │ ├── puppet_master_ssl_client_cert.rb
│ │ ├── puppet_master_ssl_client_key.rb
│ │ ├── puppet_master_timeout.rb
│ │ ├── puppet_master_token.rb
│ │ ├── puppet_master_token_file.rb
│ │ ├── puppet_master_update_catalog.rb
│ │ ├── puppet_master_update_facts.rb
│ │ ├── puppetdb_api_version.rb
│ │ ├── puppetdb_package_inventory.rb
│ │ ├── puppetdb_ssl_ca.rb
│ │ ├── puppetdb_ssl_client_cert.rb
│ │ ├── puppetdb_ssl_client_key.rb
│ │ ├── puppetdb_ssl_client_password.rb
│ │ ├── puppetdb_ssl_client_password_file.rb
│ │ ├── puppetdb_ssl_crl.rb
│ │ ├── puppetdb_token.rb
│ │ ├── puppetdb_token_file.rb
│ │ ├── puppetdb_url.rb
│ │ ├── quiet.rb
│ │ ├── retry_failed_catalog.rb
│ │ ├── safe_to_delete_cached_master_dir.rb
│ │ ├── save_catalog.rb
│ │ ├── storeconfigs.rb
│ │ ├── storeconfigs_backend.rb
│ │ ├── suppress_absent_file_details.rb
│ │ ├── to_from_branch.rb
│ │ ├── truncate_details.rb
│ │ ├── use_lcs.rb
│ │ └── validate_references.rb
│ └── printer.rb
│ ├── errors.rb
│ ├── external
│ └── pson
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── common.rb
│ │ ├── pure.rb
│ │ ├── pure
│ │ ├── generator.rb
│ │ └── parser.rb
│ │ └── version.rb
│ ├── facts.rb
│ ├── facts
│ ├── json.rb
│ ├── puppetdb.rb
│ └── yaml.rb
│ ├── puppetdb.rb
│ ├── util
│ ├── catalogs.rb
│ ├── colored.rb
│ ├── httparty.rb
│ ├── parallel.rb
│ ├── puppetversion.rb
│ ├── scriptrunner.rb
│ └── util.rb
│ └── version.rb
├── octocatalog-diff.gemspec
├── rake
├── common.rb
├── doc.rb
├── gem.rb
├── rubocop.rb
├── spec.rb
└── templates
│ └── optionsref.erb
├── script
├── bootstrap
├── cibuild
├── fmt
├── git-pre-commit
├── octocatalog-diff-wrapper
├── puppet
└── timeout
├── scripts
├── env
│ └── env.sh
├── git-extract
│ └── git-extract.sh
└── puppet
│ └── puppet.sh
├── spec
└── octocatalog-diff
│ ├── fixtures
│ ├── catalogs
│ │ ├── catalog-1-puppetdb.json
│ │ ├── catalog-1-v4.json
│ │ ├── catalog-1.json
│ │ ├── catalog-2-v4.json
│ │ ├── catalog-2.json
│ │ ├── catalog-empty.json
│ │ ├── catalog-modules-test.json
│ │ ├── catalog-nested-attributes.json
│ │ ├── catalog-test-file-absent.json
│ │ ├── catalog-test-file-v4-tagged.json
│ │ ├── catalog-test-file-v4.json
│ │ ├── catalog-test-file.json
│ │ ├── compilation-dir-1.json
│ │ ├── compilation-dir-2.json
│ │ ├── default-catalog-changed.json
│ │ ├── default-catalog-v3.json
│ │ ├── default-catalog-v4.json
│ │ ├── filter-equivalent-array-1.json
│ │ ├── filter-equivalent-array-2.json
│ │ ├── filter-single-item-array-1.json
│ │ ├── filter-single-item-array-2.json
│ │ ├── ignore-add-remove-1.json
│ │ ├── ignore-add-remove-2.json
│ │ ├── ignore-enhanced-changes-1.json
│ │ ├── ignore-enhanced-changes-2.json
│ │ ├── ignore-equivalent-yaml-1.json
│ │ ├── ignore-equivalent-yaml-2.json
│ │ ├── ignore-parameter-set-1.json
│ │ ├── ignore-parameter-set-2.json
│ │ ├── ignore-tags-new.json
│ │ ├── ignore-tags-old.json
│ │ ├── ignore-type-title-attr-1.json
│ │ ├── ignore-type-title-attr-2.json
│ │ ├── include-tags-new.json
│ │ ├── include-tags-old.json
│ │ ├── reference-validation-broken-2.json
│ │ ├── reference-validation-broken.json
│ │ ├── reference-validation-ok-2.json
│ │ ├── reference-validation-ok.json
│ │ ├── regression-fixnum-1.json
│ │ ├── regression-fixnum-2.json
│ │ ├── tiny-catalog-2-puppetdb-converted.json
│ │ ├── tiny-catalog-2-puppetdb.json
│ │ ├── tiny-catalog-2.json
│ │ ├── tiny-catalog-tags.json
│ │ ├── tiny-catalog-v4-api.json
│ │ └── tiny-catalog.json
│ ├── cli-configs
│ │ ├── fact-file.rb
│ │ ├── invalid.rb
│ │ ├── no-op.rb
│ │ ├── not-class.rb
│ │ ├── not-hash.rb
│ │ ├── not-proper.rb
│ │ ├── not-ruby.rb
│ │ └── valid.rb
│ ├── configs
│ │ ├── hiera.yaml
│ │ ├── pe-enc-token.txt
│ │ ├── puppet-master-token.txt
│ │ ├── puppetdb-token.txt
│ │ └── trivial-enc.sh
│ ├── diffs
│ │ ├── catalog-1-vs-catalog-2.json
│ │ ├── changed-and-added.json
│ │ ├── datatype-differences.json
│ │ ├── ignore-tags-full.json
│ │ ├── ignore-tags-partial.json
│ │ ├── ignore-tags-reversed.json
│ │ ├── mountpoint.json
│ │ └── string-equality.json
│ ├── enc
│ │ └── puppet-enterprise-enc.yaml
│ ├── facts
│ │ ├── encoded-facts.json
│ │ ├── fact-overrides-datatypes.yaml
│ │ ├── facts.foo
│ │ ├── facts.json
│ │ ├── facts.yaml
│ │ ├── facts_esc.json
│ │ ├── facts_esc.yaml
│ │ ├── unstructured.yaml
│ │ ├── valid-facts-different-ip.yaml
│ │ ├── valid-facts.yaml
│ │ └── valid-packages.yaml
│ ├── git-repos
│ │ ├── simple-repo.tar
│ │ └── simple-repo.tgz
│ ├── override-scripts
│ │ └── git-extract.sh
│ ├── packages
│ │ └── valid-packages.json
│ ├── repos
│ │ ├── arbitrary-command-line
│ │ │ ├── environments
│ │ │ │ ├── foo
│ │ │ │ │ ├── environment.conf
│ │ │ │ │ ├── manifests
│ │ │ │ │ │ └── site.pp
│ │ │ │ │ └── modules
│ │ │ │ │ │ └── foo
│ │ │ │ │ │ └── manifests
│ │ │ │ │ │ └── init.pp
│ │ │ │ └── production
│ │ │ │ │ └── manifests
│ │ │ │ │ └── site.pp
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── foo
│ │ │ │ └── manifests
│ │ │ │ └── init.pp
│ │ ├── bootstrap
│ │ │ ├── config
│ │ │ │ ├── bootstrap.sh
│ │ │ │ └── broken-bootstrap.sh
│ │ │ ├── external-modules
│ │ │ │ └── test
│ │ │ │ │ ├── manifests
│ │ │ │ │ └── init.pp
│ │ │ │ │ └── templates
│ │ │ │ │ └── foo.erb
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── .gitkeep
│ │ ├── convert-resources
│ │ │ ├── broken
│ │ │ │ ├── manifests
│ │ │ │ │ └── site.pp
│ │ │ │ └── modules
│ │ │ │ │ └── test
│ │ │ │ │ ├── files
│ │ │ │ │ └── foo-old
│ │ │ │ │ └── manifests
│ │ │ │ │ └── init.pp
│ │ │ ├── new
│ │ │ │ ├── manifests
│ │ │ │ │ └── site.pp
│ │ │ │ └── modules
│ │ │ │ │ └── test
│ │ │ │ │ ├── files
│ │ │ │ │ ├── binary-new
│ │ │ │ │ ├── binary-old
│ │ │ │ │ ├── binary-old2
│ │ │ │ │ ├── foo-new
│ │ │ │ │ ├── foo-old
│ │ │ │ │ └── foo-old2
│ │ │ │ │ └── manifests
│ │ │ │ │ ├── array1.pp
│ │ │ │ │ ├── array2.pp
│ │ │ │ │ ├── array3.pp
│ │ │ │ │ └── init.pp
│ │ │ └── old
│ │ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ │ └── modules
│ │ │ │ └── test
│ │ │ │ ├── files
│ │ │ │ ├── bar-old
│ │ │ │ ├── binary-old
│ │ │ │ └── foo-old
│ │ │ │ └── manifests
│ │ │ │ ├── array1.pp
│ │ │ │ ├── array2.pp
│ │ │ │ ├── array3.pp
│ │ │ │ └── init.pp
│ │ ├── default
│ │ │ ├── config
│ │ │ │ ├── enc.sh
│ │ │ │ ├── hiera-backend-as-string.yaml
│ │ │ │ ├── hiera-other-backends.yaml
│ │ │ │ ├── hiera.yaml
│ │ │ │ ├── hiera5-simple.yaml
│ │ │ │ ├── hiera5-symbols-simple.yaml
│ │ │ │ ├── hiera5-symbols.yaml
│ │ │ │ └── hiera5.yaml
│ │ │ ├── hieradata
│ │ │ │ └── common.yaml
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ ├── roles
│ │ │ │ └── manifests
│ │ │ │ │ └── default.pp
│ │ │ │ ├── sshkeys_core
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ └── lib
│ │ │ │ │ └── puppet
│ │ │ │ │ ├── provider
│ │ │ │ │ ├── ssh_authorized_key
│ │ │ │ │ │ └── parsed.rb
│ │ │ │ │ └── sshkey
│ │ │ │ │ │ └── parsed.rb
│ │ │ │ │ └── type
│ │ │ │ │ ├── ssh_authorized_key.rb
│ │ │ │ │ └── sshkey.rb
│ │ │ │ ├── stdlib
│ │ │ │ ├── LICENSE
│ │ │ │ ├── NOTICE
│ │ │ │ ├── README.md
│ │ │ │ └── lib
│ │ │ │ │ └── puppet
│ │ │ │ │ └── parser
│ │ │ │ │ └── functions
│ │ │ │ │ ├── defined_with_params.rb
│ │ │ │ │ ├── ensure_resource.rb
│ │ │ │ │ └── ensure_resources.rb
│ │ │ │ └── system
│ │ │ │ └── manifests
│ │ │ │ ├── init.pp
│ │ │ │ ├── root_ssh_key.pp
│ │ │ │ ├── root_ssh_keys.pp
│ │ │ │ ├── user.pp
│ │ │ │ └── users.pp
│ │ ├── enc-diff
│ │ │ ├── config
│ │ │ │ ├── enc-1.sh
│ │ │ │ └── enc-2.sh
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── test
│ │ │ │ └── manifests
│ │ │ │ └── init.pp
│ │ ├── enc-overrides
│ │ │ ├── enc.sh
│ │ │ ├── hiera.yaml
│ │ │ ├── hieradata
│ │ │ │ ├── common.yaml
│ │ │ │ └── roles
│ │ │ │ │ ├── one.yaml
│ │ │ │ │ └── two.yaml
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── test
│ │ │ │ └── manifests
│ │ │ │ └── init.pp
│ │ ├── environment-variables
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── test
│ │ │ │ ├── lib
│ │ │ │ └── puppet
│ │ │ │ │ └── parser
│ │ │ │ │ └── functions
│ │ │ │ │ └── env.rb
│ │ │ │ └── manifests
│ │ │ │ └── init.pp
│ │ ├── fact-overrides-datatypes
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── test
│ │ │ │ ├── manifests
│ │ │ │ └── init.pp
│ │ │ │ └── templates
│ │ │ │ └── test.erb
│ │ ├── fact-overrides
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── test
│ │ │ │ └── manifests
│ │ │ │ └── init.pp
│ │ ├── failing-catalog
│ │ │ └── manifests
│ │ │ │ └── site.pp
│ │ ├── hiera5
│ │ │ ├── config
│ │ │ │ ├── hiera3-global.yaml
│ │ │ │ └── hiera5-global.yaml
│ │ │ ├── data
│ │ │ │ ├── common.yaml
│ │ │ │ ├── nodes
│ │ │ │ │ └── rspec-node.xyz.github.net.yaml
│ │ │ │ ├── rspec-node.xyz.github.net.yaml
│ │ │ │ └── xyz.yaml
│ │ │ ├── extra-special
│ │ │ │ └── xyz.yaml
│ │ │ ├── hiera.yaml
│ │ │ ├── hieradata
│ │ │ │ ├── common.yaml
│ │ │ │ ├── nodes
│ │ │ │ │ └── rspec-node.xyz.github.net.yaml
│ │ │ │ └── xyz.yaml
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ ├── modules
│ │ │ │ └── test
│ │ │ │ │ └── manifests
│ │ │ │ │ └── init.pp
│ │ │ └── special
│ │ │ │ └── xyz.yaml
│ │ ├── ignore-tags-new
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── mymodule
│ │ │ │ └── manifests
│ │ │ │ ├── init.pp
│ │ │ │ ├── resource1.pp
│ │ │ │ └── resource2.pp
│ │ ├── ignore-tags-old
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── mymodule
│ │ │ │ └── manifests
│ │ │ │ ├── init.pp
│ │ │ │ ├── resource1.pp
│ │ │ │ └── resource2.pp
│ │ ├── json-diff
│ │ │ ├── hiera.yaml
│ │ │ ├── hieradata
│ │ │ │ ├── common.yaml
│ │ │ │ └── roles
│ │ │ │ │ └── bar.yaml
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── bar
│ │ │ │ ├── files
│ │ │ │ ├── different-json.bar
│ │ │ │ ├── different-json.default
│ │ │ │ ├── identical-json
│ │ │ │ ├── not-json.bar
│ │ │ │ ├── not-json.default
│ │ │ │ ├── similar-json.bar.json
│ │ │ │ └── similar-json.default.json
│ │ │ │ ├── manifests
│ │ │ │ └── init.pp
│ │ │ │ └── templates
│ │ │ │ ├── different-json.erb
│ │ │ │ ├── identical-json.erb
│ │ │ │ ├── not-json.erb
│ │ │ │ └── similar-json.erb
│ │ ├── modulepath
│ │ │ ├── environment.conf
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ ├── modules
│ │ │ │ └── modulestest
│ │ │ │ │ ├── files
│ │ │ │ │ ├── foo
│ │ │ │ │ │ └── bar.txt
│ │ │ │ │ └── tmp
│ │ │ │ │ │ └── modulestest
│ │ │ │ │ └── manifests
│ │ │ │ │ └── init.pp
│ │ │ └── site
│ │ │ │ └── sitetest
│ │ │ │ ├── files
│ │ │ │ └── tmp
│ │ │ │ │ └── sitetest
│ │ │ │ └── manifests
│ │ │ │ └── init.pp
│ │ ├── pe-enc
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ ├── bar
│ │ │ │ └── manifests
│ │ │ │ │ └── init.pp
│ │ │ │ ├── baz
│ │ │ │ └── manifests
│ │ │ │ │ └── init.pp
│ │ │ │ └── foo
│ │ │ │ └── manifests
│ │ │ │ └── init.pp
│ │ ├── preserve-environments
│ │ │ ├── environments
│ │ │ │ ├── one
│ │ │ │ │ ├── environment.conf
│ │ │ │ │ ├── hiera.yaml
│ │ │ │ │ ├── hieradata
│ │ │ │ │ │ └── common.yaml
│ │ │ │ │ ├── manifests
│ │ │ │ │ │ └── site.pp
│ │ │ │ │ └── modules
│ │ │ │ │ │ └── bar
│ │ │ │ │ │ ├── files
│ │ │ │ │ │ └── bar-static.txt
│ │ │ │ │ │ └── manifests
│ │ │ │ │ │ └── init.pp
│ │ │ │ └── two
│ │ │ │ │ ├── environment.conf
│ │ │ │ │ ├── hiera.yaml
│ │ │ │ │ ├── hieradata
│ │ │ │ │ └── common.yaml
│ │ │ │ │ ├── manifests
│ │ │ │ │ └── site.pp
│ │ │ │ │ └── modules
│ │ │ │ │ └── bar
│ │ │ │ │ ├── files
│ │ │ │ │ └── bar-static.txt
│ │ │ │ │ └── manifests
│ │ │ │ │ └── init.pp
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ ├── modules
│ │ │ │ └── foo
│ │ │ │ │ ├── files
│ │ │ │ │ └── foo-static.txt
│ │ │ │ │ └── manifests
│ │ │ │ │ └── init.pp
│ │ │ └── site
│ │ │ │ └── sitetest
│ │ │ │ ├── files
│ │ │ │ └── sitetest-static.txt
│ │ │ │ └── manifests
│ │ │ │ └── init.pp
│ │ ├── reference-validation
│ │ │ ├── hiera.yaml
│ │ │ ├── hieradata
│ │ │ │ ├── common.yaml
│ │ │ │ └── roles
│ │ │ │ │ ├── all.yaml
│ │ │ │ │ ├── broken-alias.yaml
│ │ │ │ │ ├── broken-before.yaml
│ │ │ │ │ ├── broken-notify.yaml
│ │ │ │ │ ├── broken-require.yaml
│ │ │ │ │ ├── broken-subscribe.yaml
│ │ │ │ │ ├── working-alias.yaml
│ │ │ │ │ └── working-file.yaml
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── test
│ │ │ │ └── manifests
│ │ │ │ ├── alias_callers.pp
│ │ │ │ ├── alias_targets.pp
│ │ │ │ ├── before_callers.pp
│ │ │ │ ├── before_targets.pp
│ │ │ │ ├── file_tests.pp
│ │ │ │ ├── foo
│ │ │ │ └── bar.pp
│ │ │ │ ├── init.pp
│ │ │ │ ├── notify_callers.pp
│ │ │ │ ├── notify_targets.pp
│ │ │ │ ├── require_callers.pp
│ │ │ │ ├── require_targets.pp
│ │ │ │ ├── subscribe_callers.pp
│ │ │ │ └── subscribe_targets.pp
│ │ ├── regressions
│ │ │ ├── README.md
│ │ │ ├── hiera.yaml
│ │ │ ├── hieradata
│ │ │ │ └── common.yaml
│ │ │ ├── manifests
│ │ │ │ └── site.pp
│ │ │ └── modules
│ │ │ │ └── file_no_parameters
│ │ │ │ └── manifests
│ │ │ │ └── init.pp
│ │ ├── tiny-repo
│ │ │ └── modules
│ │ │ │ └── test
│ │ │ │ └── files
│ │ │ │ └── tmp
│ │ │ │ └── foo
│ │ └── yaml-diff
│ │ │ ├── hiera.yaml
│ │ │ ├── hieradata
│ │ │ ├── common.yaml
│ │ │ └── roles
│ │ │ │ └── bar.yaml
│ │ │ ├── manifests
│ │ │ └── site.pp
│ │ │ └── modules
│ │ │ └── bar
│ │ │ ├── files
│ │ │ ├── different-yaml.bar
│ │ │ ├── different-yaml.default
│ │ │ ├── identical-yaml
│ │ │ ├── not-yaml.bar
│ │ │ ├── not-yaml.default
│ │ │ ├── similar-yaml.bar
│ │ │ ├── similar-yaml.default
│ │ │ ├── unparseable-yaml.bar
│ │ │ └── unparseable-yaml.default
│ │ │ ├── manifests
│ │ │ └── init.pp
│ │ │ └── templates
│ │ │ ├── different-yaml.erb
│ │ │ ├── identical-yaml.erb
│ │ │ ├── not-yaml.erb
│ │ │ ├── similar-yaml.erb
│ │ │ ├── unparseable-yaml-2.erb
│ │ │ └── unparseable-yaml.erb
│ ├── scripts
│ │ └── enc
│ │ │ ├── fails-stderr-only.sh
│ │ │ ├── fails-stdout-only.sh
│ │ │ ├── fails-stdout-stderr.sh
│ │ │ ├── succeeds-cleanly.sh
│ │ │ └── succeeds-stderr.sh
│ └── ssl
│ │ └── generated
│ │ ├── README.md
│ │ ├── bogushost.crt
│ │ ├── ca.crt
│ │ ├── ca.key
│ │ ├── client-other-ca.crt
│ │ ├── client-password.crt
│ │ ├── client-password.key
│ │ ├── client.crt
│ │ ├── client.key
│ │ ├── client.p12
│ │ ├── client.pem
│ │ ├── crl.pem
│ │ ├── other-ca.crt
│ │ ├── other-ca.key
│ │ ├── server.crt
│ │ └── server.key
│ ├── integration
│ ├── api_catalog_compile_spec.rb
│ ├── arbitrary_command_line_spec.rb
│ ├── basic_spec.rb
│ ├── bootstrap_script_spec.rb
│ ├── bootstrap_then_exit_spec.rb
│ ├── cached_master_dir_spec.rb
│ ├── catalog_compute_spec.rb
│ ├── catalog_from_puppetdb_spec.rb
│ ├── catalog_only_spec.rb
│ ├── cli_spec.rb
│ ├── compilation_dir_spec.rb
│ ├── convert_file_resources_spec.rb
│ ├── datatype_display_spec.rb
│ ├── enc_branch_spec.rb
│ ├── enc_override_spec.rb
│ ├── examples_spec.rb
│ ├── fact_file_by_branch_spec.rb
│ ├── fact_override_spec.rb
│ ├── file_absent_spec.rb
│ ├── filter_equivalent_array_no_datatypes_spec.rb
│ ├── filter_single_item_array.rb
│ ├── hiera5_spec.rb
│ ├── ignore_regexp_spec.rb
│ ├── ignore_tags_spec.rb
│ ├── ignore_wildcards_spec.rb
│ ├── include_tags_spec.rb
│ ├── integration_helper.rb
│ ├── json_diff_spec.rb
│ ├── modulepath_spec.rb
│ ├── outputs_spec.rb
│ ├── override_script_path_spec.rb
│ ├── pass_env_vars_spec.rb
│ ├── pe_enc_spec.rb
│ ├── preserve_environments_spec.rb
│ ├── puppetdb_spec.rb
│ ├── puppetmaster_spec.rb
│ ├── reference_validation_spec.rb
│ ├── regressions_spec.rb
│ ├── text_diff_spec.rb
│ └── yaml_diff_spec.rb
│ ├── links
│ └── README.md
│ ├── mocks
│ └── puppetdb.rb
│ ├── support
│ └── httparty
│ │ ├── MIT-LICENSE
│ │ ├── README.md
│ │ └── ssl_test_server.rb
│ └── tests
│ ├── api
│ ├── v1
│ │ ├── catalog-compile_spec.rb
│ │ ├── catalog-diff_spec.rb
│ │ ├── catalog_spec.rb
│ │ ├── common_spec.rb
│ │ ├── config_spec.rb
│ │ ├── diff_spec.rb
│ │ └── override_spec.rb
│ └── v1_spec.rb
│ ├── bootstrap_spec.rb
│ ├── catalog-diff
│ ├── differ_spec.rb
│ ├── display
│ │ └── text_spec.rb
│ ├── display_spec.rb
│ ├── filter
│ │ ├── absent_file_spec.rb
│ │ ├── compilation_dir_spec.rb
│ │ ├── equivalent_array_no_datatypes_spec.rb
│ │ ├── json_spec.rb
│ │ ├── single_item_array_spec.rb
│ │ └── yaml_spec.rb
│ └── filter_spec.rb
│ ├── catalog-util
│ ├── bootstrap_spec.rb
│ ├── builddir_spec.rb
│ ├── cached_master_directory_spec.rb
│ ├── command_spec.rb
│ ├── enc
│ │ ├── noop_spec.rb
│ │ ├── pe_spec.rb
│ │ └── script_spec.rb
│ ├── enc_spec.rb
│ ├── facts_spec.rb
│ ├── fileresources_spec.rb
│ └── git_spec.rb
│ ├── catalog
│ ├── computed_spec.rb
│ ├── json_spec.rb
│ ├── noop_spec.rb
│ ├── puppetdb_spec.rb
│ └── puppetmaster_spec.rb
│ ├── catalog_spec.rb
│ ├── cli
│ ├── diffs_spec.rb
│ ├── options
│ │ ├── basedir_spec.rb
│ │ ├── bootstrap_current_spec.rb
│ │ ├── bootstrap_environment_spec.rb
│ │ ├── bootstrap_script_spec.rb
│ │ ├── bootstrap_then_exit_spec.rb
│ │ ├── bootstrapped_dirs_spec.rb
│ │ ├── cached_master_dir_spec.rb
│ │ ├── catalog_only_spec.rb
│ │ ├── color_spec.rb
│ │ ├── command_line_spec.rb
│ │ ├── compare_file_text_spec.rb
│ │ ├── create_symlinks_spec.rb
│ │ ├── debug_bootstrap_spec.rb
│ │ ├── debug_spec.rb
│ │ ├── display_datatype_changes_spec.rb
│ │ ├── display_detail_add_spec.rb
│ │ ├── display_source_file_line_spec.rb
│ │ ├── enc_override_spec.rb
│ │ ├── enc_spec.rb
│ │ ├── environment_spec.rb
│ │ ├── existing_catalogs_spec.rb
│ │ ├── fact_file_spec.rb
│ │ ├── fact_override_spec.rb
│ │ ├── facts_terminus_spec.rb
│ │ ├── filters_spec.rb
│ │ ├── from_puppetdb_spec.rb
│ │ ├── header_spec.rb
│ │ ├── hiera_config_spec.rb
│ │ ├── hiera_path_spec.rb
│ │ ├── hiera_path_strip_spec.rb
│ │ ├── hostname_spec.rb
│ │ ├── ignore_attr_spec.rb
│ │ ├── ignore_spec.rb
│ │ ├── ignore_tags_spec.rb
│ │ ├── include_tags_spec.rb
│ │ ├── master_cache_branch_spec.rb
│ │ ├── output_file_spec.rb
│ │ ├── output_format_spec.rb
│ │ ├── override_script_path_spec.rb
│ │ ├── parallel_spec.rb
│ │ ├── parser_spec.rb
│ │ ├── pass_env_vars_spec.rb
│ │ ├── pe_enc_ssl_ca_spec.rb
│ │ ├── pe_enc_ssl_client_cert_spec.rb
│ │ ├── pe_enc_ssl_client_key_spec.rb
│ │ ├── pe_enc_token_file_spec.rb
│ │ ├── pe_enc_token_spec.rb
│ │ ├── pe_enc_url_spec.rb
│ │ ├── preserve_environments_spec.rb
│ │ ├── puppet_binary_spec.rb
│ │ ├── puppet_master_api_version_spec.rb
│ │ ├── puppet_master_spec.rb
│ │ ├── puppet_master_ssl_ca_spec.rb
│ │ ├── puppet_master_ssl_client_cert_spec.rb
│ │ ├── puppet_master_ssl_client_key_spec.rb
│ │ ├── puppet_master_timeout_spec.rb
│ │ ├── puppet_master_token_file_spec.rb
│ │ ├── puppet_master_token_spec.rb
│ │ ├── puppet_master_update_catalog_spec.rb
│ │ ├── puppet_master_update_facts_spec.rb
│ │ ├── puppetdb_api_version_spec.rb
│ │ ├── puppetdb_ssl_ca_spec.rb
│ │ ├── puppetdb_ssl_client_cert_spec.rb
│ │ ├── puppetdb_ssl_client_key_spec.rb
│ │ ├── puppetdb_ssl_client_password_file_spec.rb
│ │ ├── puppetdb_ssl_client_password_spec.rb
│ │ ├── puppetdb_ssl_crl_spec.rb
│ │ ├── puppetdb_token_file_spec.rb
│ │ ├── puppetdb_token_spec.rb
│ │ ├── puppetdb_url_spec.rb
│ │ ├── quiet_spec.rb
│ │ ├── retry_failed_catalog_spec.rb
│ │ ├── safe_to_delete_cached_master_dir_spec.rb
│ │ ├── save_catalog_spec.rb
│ │ ├── storeconfigs_backend_spec.rb
│ │ ├── storeconfigs_spec.rb
│ │ ├── suppress_absent_file_details_spec.rb
│ │ ├── to_from_branch_spec.rb
│ │ ├── truncate_details_spec.rb
│ │ ├── use_lcs_spec.rb
│ │ └── validate_references_spec.rb
│ ├── options_helper.rb
│ ├── options_spec.rb
│ └── printer_spec.rb
│ ├── cli_spec.rb
│ ├── external
│ └── pson
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── pson_spec.rb
│ ├── facts
│ ├── json_spec.rb
│ ├── puppetdb_spec.rb
│ └── yaml_spec.rb
│ ├── facts_spec.rb
│ ├── puppetdb_spec.rb
│ ├── spec_helper.rb
│ └── util
│ ├── catalogs_spec.rb
│ ├── httparty_spec.rb
│ ├── parallel_spec.rb
│ ├── scriptrunner_spec.rb
│ └── util_spec.rb
└── vendor
└── cache
├── CFPropertyList-2.2.8.gem
├── ast-2.4.2.gem
├── concurrent-ruby-1.1.7.gem
├── deep_merge-1.2.1.gem
├── diff-lcs-1.5.1.gem
├── diffy-3.4.2.gem
├── docile-1.1.5.gem
├── facter-2.5.7.gem
├── fast_gettext-1.1.2.gem
├── gettext-3.2.6.gem
├── gettext-setup-0.30.gem
├── hashdiff-1.1.1.gem
├── hiera-3.12.0.gem
├── hocon-1.3.1.gem
├── httparty-0.21.0.gem
├── httpclient-2.8.3.gem
├── json-2.7.2.gem
├── json_pure-1.8.6.gem
├── json_pure-2.0.2.gem
├── locale-2.1.4.gem
├── mime-types-3.5.2.gem
├── mime-types-data-3.2023.1205.gem
├── mini_mime-1.1.5.gem
├── multi_json-1.15.0.gem
├── multi_xml-0.6.0.gem
├── parallel-1.24.0.gem
├── parallel_tests-2.7.1.gem
├── parser-2.7.2.0.gem
├── powerpack-0.1.3.gem
├── puppet-4.10.10.gem
├── puppet-5.5.22.gem
├── puppet-5.5.8.gem
├── puppet-6.18.0.gem
├── puppet-7.3.0.gem
├── puppet-7.32.1.gem
├── puppet-resource_api-1.8.13.gem
├── puppetdb-terminus-3.2.4.gem
├── rainbow-2.2.2.gem
├── rake-12.3.3.gem
├── rspec-3.4.0.gem
├── rspec-core-3.4.4.gem
├── rspec-expectations-3.4.0.gem
├── rspec-mocks-3.4.1.gem
├── rspec-retry-0.5.0.gem
├── rspec-support-3.4.1.gem
├── rubocop-0.49.0.gem
├── ruby-progressbar-1.13.0.gem
├── rugged-0.27.5.gem
├── rugged-1.7.2.gem
├── safe_yaml-1.0.4.gem
├── scanf-1.0.0.gem
├── semantic_puppet-1.0.2.gem
├── simplecov-0.14.1.gem
├── simplecov-erb-0.1.1.gem
├── simplecov-html-0.10.2.gem
├── text-1.3.1.gem
└── unicode-display_width-1.8.0.gem
/.github/dependabot.template.yml:
--------------------------------------------------------------------------------
1 | ---
2 | version: 2
3 | updates:
4 | - package-ecosystem: "bundler"
5 | directory: "/"
6 | schedule:
7 | interval: "daily"
8 | open-pull-requests-limit: 20
9 | vendor: true
10 | - package-ecosystem: "docker"
11 | directory: "/"
12 | schedule:
13 | interval: "daily"
14 | open-pull-requests-limit: 20
15 | - package-ecosystem: "github-actions"
16 | directory: "/"
17 | schedule:
18 | interval: "daily"
19 | open-pull-requests-limit: 20
20 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # This file was generated by the "Generate Dependabot Glob" action. Do not edit it directly.
2 | # Make changes to `.github/dependabot.template.yml` and a PR will be automatically created.
3 | version: 2
4 | updates:
5 | - package-ecosystem: bundler
6 | directory: /
7 | schedule:
8 | interval: daily
9 | open-pull-requests-limit: 20
10 | vendor: true
11 | - package-ecosystem: docker
12 | directory: /
13 | schedule:
14 | interval: daily
15 | open-pull-requests-limit: 20
16 | - package-ecosystem: github-actions
17 | directory: /
18 | schedule:
19 | interval: daily
20 | open-pull-requests-limit: 20
21 |
--------------------------------------------------------------------------------
/.github/workflows/add-dependabot-pr-to-project.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Assign Dependabot PR to Compute Foundation Project
3 |
4 | on:
5 | workflow_dispatch:
6 | pull_request:
7 | types: [opened, reopened, labeled]
8 |
9 | permissions:
10 | contents: read
11 | pull-requests: write
12 |
13 | jobs:
14 | add-to-project:
15 | name: Add to Compute Foundation Project Board
16 | runs-on: ubuntu-latest
17 | steps:
18 | - uses: actions/add-to-project@v1.0.2
19 | with:
20 | project-url: https://github.com/orgs/github/projects/5753/ # Compute Foundation Project Board
21 | github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
22 | labeled: dependencies,external-dependency
23 |
--------------------------------------------------------------------------------
/.github/workflows/generate-dependabot.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: Generate dependabot.yml
3 |
4 | on:
5 | push:
6 | repository_dispatch:
7 | workflow_dispatch:
8 |
9 | permissions:
10 | contents: write
11 | pull-requests: write
12 |
13 | jobs:
14 | generate:
15 | runs-on: ubuntu-latest
16 | steps:
17 | - uses: actions/checkout@v4
18 |
19 | - name: Generate dependabot.yml
20 | uses: Makeshift/generate-dependabot-glob-action@5cd45385ce6519f68d574aab9699832b3a5e5031 # v1.3.4
21 |
22 | - name: Create Pull Request
23 | uses: peter-evans/create-pull-request@6cd32fd93684475c31847837f87bb135d40a2b79 # v7.0.3
24 | with:
25 | title: '[Automated] Update dependabot.yml'
26 | body: |
27 | This PR was automatically generated by the generate-dependabot.yml workflow.
28 |
--------------------------------------------------------------------------------
/.version:
--------------------------------------------------------------------------------
1 | 2.3.1
2 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | ARG RUBY_VERSION="2.6"
2 | FROM ruby:${RUBY_VERSION} as ruby
3 | ARG RUBY_VERSION
4 | ENV RUBY_VERSION="${RUBY_VERSION}"
5 | RUN rm -rf $GEM_HOME $BUNDLE_PATH $BUNDLE_BIN $BUNDLE_APP_CONFIG
6 | RUN apt-get update && apt-get install -y cmake openssl libssl-dev
7 | RUN sed -i'' -e 's/CipherString = DEFAULT@SECLEVEL=2/CipherString = DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf
8 | RUN sed -i'' -e 's/MinProtocol = TLSv1.2/MinProtocol = TLSv1/g' /etc/ssl/openssl.cnf
9 |
10 | FROM scratch AS app
11 | ARG PUPPET_VERSION
12 | ENV PUPPET_VERSION="${PUPPET_VERSION}"
13 | COPY --from=ruby / /
14 | WORKDIR /app
15 | ENV LANG="C.UTF-8"
16 | COPY . .
17 | #RUN gem install bundler -v 1.17.2
18 | RUN script/bootstrap
19 |
20 | CMD ["/app/script/cibuild"]
21 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gemspec
4 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | require 'rake'
2 | require 'fileutils'
3 |
4 | Dir.chdir File.dirname(__FILE__)
5 |
6 | load 'rake/common.rb'
7 | Dir['rake/*.rb'].each { |f| load f unless f =~ %r{/common.rb} }
8 |
9 | task gem: ['gem:build', 'gem:tag', 'gem:push']
10 |
11 | task rubocop: 'rubocop:all'
12 | task style: :rubocop
13 |
14 | task spec: 'spec:all'
15 | task test: :spec
16 |
17 | task default: :spec
18 |
--------------------------------------------------------------------------------
/config/puppet-versions.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "minimum_version": "4.0.0",
4 | "maximum_version": "4.99.99",
5 | "additional_gems": [
6 | { "name": "puppetdb-terminus", "version": "3.2.4" }
7 | ]
8 | },
9 | {
10 | "minimum_version": "5.0.0",
11 | "maximum_version": "5.99.99",
12 | "additional_gems": []
13 | },
14 | {
15 | "minimum_version": "6.0.0",
16 | "maximum_version": "6.99.99",
17 | "additional_gems": []
18 | },
19 | {
20 | "minimum_version": "7.0.0",
21 | "maximum_version": "7.99.99",
22 | "additional_gems": []
23 | }
24 | ]
25 |
--------------------------------------------------------------------------------
/doc/advanced-ci.md:
--------------------------------------------------------------------------------
1 | # Using `octocatalog-diff` in CI
2 |
3 | ## Catalog compilation check
4 |
5 | Compile the catalog for several important hosts, and ensure that all catalogs successfully compile before permitting the merge. This is a pass/fail check.
6 |
7 | - [Sample rspec file for catalog compilation test](/examples/ci/puppet_catalogs_spec.rb)
8 |
9 | ## Catalog difference analysis
10 |
11 | Compute the difference between the proposed code and the base branch across a number of hosts. This is more than just a pass/fail check, as a human should review the results to ensure that the differences are expected.
12 |
13 | - [Sample rspec file for catalog difference analysis](/examples/ci/puppet_catalog_diff_spec.rb)
14 |
--------------------------------------------------------------------------------
/doc/advanced-future-parser.md:
--------------------------------------------------------------------------------
1 | # Enabling the future parser
2 |
3 | The [future parser](https://docs.puppet.com/puppet/3.8/reference/experiments_future.html) is a feature in Puppet 3.8 designed to provide functionally identical to the Puppet language in Puppet 4.0.
4 |
5 | You can use these options to enable the future parser for the "from" catalog, the "to" catalog, or both catalogs:
6 |
7 | - `--parser-from future` will enable the future parser for the "from" catalog
8 | - `--parser-to future` will enable the future parser for the "to" catalog
9 | - `--parser future` will enable the future parser for both the "from" catalog and the "to" catalog
10 |
11 | Note that you can also enable the future parser by creating a file named `environment.conf` in the base directory of your Puppet checkout. When `octocatalog-diff` computes the catalog from this directory, Puppet will read this file and act upon it accordingly.
12 |
--------------------------------------------------------------------------------
/doc/advanced-puppet-versions.md:
--------------------------------------------------------------------------------
1 | # Compiling the same catalog with different Puppet versions
2 |
3 | `octocatalog-diff` can be a valuable tool when upgrading from one Puppet version to another. By instructing `octocatalog-diff` to compile the "from" catalog with one version of Puppet, and the "to" catalog with another version of Puppet, you can look for changes that arise due to different Puppet versions.
4 |
5 | To use this feature, simply point `octocatalog-diff` at the Puppet binary you wish to use for each catalog.
6 |
7 | - `--from-puppet-binary DIRECTORY_PATH/puppet` will compile the "from" catalog with the specified Puppet binary
8 | - `--to-puppet-binary DIRECTORY_PATH/puppet` will compile the "to" catalog with the specified Puppet binary
9 | - `--puppet-binary DIRECTORY_PATH/puppet` will compile both catalogs with the specified Puppet binary
10 |
--------------------------------------------------------------------------------
/doc/dev/README.md:
--------------------------------------------------------------------------------
1 | # octocatalog-diff developer documentation
2 |
--------------------------------------------------------------------------------
/doc/dev/api.md:
--------------------------------------------------------------------------------
1 | # octocatalog-diff API documentation
2 |
3 | The octocatalog-diff API allows developers to construct and work with certain octocatalog-diff internals in their own projects.
4 |
5 | The current API version is [API v1](/doc/dev/api/v1.md), which is available as of octocatalog-diff version 1.0.
6 |
--------------------------------------------------------------------------------
/doc/images/octocatolog-diff-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/doc/images/octocatolog-diff-logo.png
--------------------------------------------------------------------------------
/doc/images/pull-request-identify-branch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/doc/images/pull-request-identify-branch.png
--------------------------------------------------------------------------------
/doc/images/screenshot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/doc/images/screenshot1.png
--------------------------------------------------------------------------------
/examples/script-overrides/git-extract-submodules/README.md:
--------------------------------------------------------------------------------
1 | # git submodules
2 |
3 | See https://github.com/github/octocatalog-diff/issues/88 for context.
4 |
--------------------------------------------------------------------------------
/examples/script-overrides/git-extract-submodules/git-extract.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script is called from lib/octocatalog-diff/catalog-util/git.rb and is used to
4 | # archive and extract a certain branch of a git repository into a target directory.
5 |
6 | if [ -z "$OCD_GIT_EXTRACT_BRANCH" ]; then
7 | echo "Error: Must declare OCD_GIT_EXTRACT_BRANCH"
8 | exit 255
9 | fi
10 |
11 | if [ -z "$OCD_GIT_EXTRACT_TARGET" ]; then
12 | echo "Error: Must declare OCD_GIT_EXTRACT_TARGET"
13 | exit 255
14 | fi
15 |
16 | set -euf -o pipefail
17 | git clone --single-branch -b "$OCD_GIT_EXTRACT_BRANCH" . "$OCD_GIT_EXTRACT_TARGET"
18 | ( cd "$OCD_GIT_EXTRACT_TARGET" && git submodule init && git submodule sync && git submodule update )
19 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff.rb:
--------------------------------------------------------------------------------
1 | # These are all the classes we believe people might want to call directly, so load
2 | # them in response to a 'require octocatalog-diff'.
3 |
4 | loads = %w(api/v1 bootstrap catalog cli errors facts puppetdb version)
5 | loads.each { |f| require_relative "octocatalog-diff/#{f}" }
6 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/api/v1.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative 'v1/catalog'
4 | require_relative 'v1/catalog-compile'
5 | require_relative 'v1/catalog-diff'
6 | require_relative 'v1/config'
7 | require_relative 'v1/diff'
8 | require_relative 'v1/override'
9 |
10 | module OctocatalogDiff
11 | module API
12 | # Call available methods for this version of the API
13 | module V1
14 | def self.catalog(options = nil)
15 | OctocatalogDiff::API::V1::CatalogCompile.catalog(options)
16 | end
17 |
18 | def self.catalog_diff(options = nil)
19 | OctocatalogDiff::API::V1::CatalogDiff.catalog_diff(options)
20 | end
21 |
22 | def self.config(options = nil)
23 | OctocatalogDiff::API::V1::Config.config(options)
24 | end
25 | end
26 | end
27 | end
28 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/api/v1/common.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module OctocatalogDiff
4 | module API
5 | module V1
6 | # Common functions for API v1
7 | class Common
8 | def self.logger_from_options(options)
9 | # If logger is not provided, create an object that can have messages written to it.
10 | # There won't be a way to access these messages, so if you want to log messages, then
11 | # provide that logger!
12 | logger = options[:logger] || Logger.new(StringIO.new)
13 |
14 | # We can't keep :logger in the options due to marshal/unmarshal as part of parallelization.
15 | pass_opts = options.dup
16 | pass_opts.delete(:logger)
17 |
18 | # Return cleaned options and logger
19 | [pass_opts, logger]
20 | end
21 | end
22 | end
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/catalog-util/enc/noop.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module OctocatalogDiff
4 | module CatalogUtil
5 | class ENC
6 | # No-op ENC.
7 | class Noop
8 | # Constructor
9 | def initialize(_options)
10 | end
11 |
12 | # Retrieve content
13 | def content
14 | ''
15 | end
16 |
17 | # Error message
18 | def error_message
19 | nil
20 | end
21 | end
22 | end
23 | end
24 | end
25 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/catalog/noop.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../catalog'
4 |
5 | require 'json'
6 |
7 | module OctocatalogDiff
8 | class Catalog
9 | # Represents a null Puppet catalog.
10 | class Noop < OctocatalogDiff::Catalog
11 | def initialize(options)
12 | super
13 |
14 | @catalog_json = '{"resources":[]}'
15 | @catalog = { 'resources' => [] }
16 | @error_message = nil
17 | @node = options.fetch(:node, 'noop')
18 | end
19 | end
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/basedir.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Option to set the base checkout directory of puppet repository
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:basedir) do
7 | has_weight 10
8 |
9 | def parse(parser, options)
10 | parser.on('--basedir DIRNAME', 'Use an alternate base directory (git checkout of puppet repository)') do |dir|
11 | path = File.absolute_path(dir)
12 | raise Errno::ENOENT, 'Invalid basedir provided' unless Dir.exist?(path)
13 | options[:basedir] = path
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/bootstrap_current.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Option to bootstrap the current directory (by default, the bootstrap script is NOT
4 | # run when the catalog builds in the current directory).
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:bootstrap_current) do
8 | has_weight 48
9 |
10 | def parse(parser, options)
11 | parser.on('--bootstrap-current', 'Run bootstrap script for the current directory too') do
12 | options[:bootstrap_current] = true
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/bootstrap_script.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Allow specification of a bootstrap script. This runs after checking out the directory, and before running
4 | # puppet there. Good for running librarian to install modules, and anything else site-specific that needs
5 | # to be done.
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(:bootstrap_script) do
9 | has_weight 40
10 |
11 | def parse(parser, options)
12 | parser.on('--bootstrap-script FILENAME', 'Bootstrap script relative to checkout directory') do |file|
13 | options[:bootstrap_script] = file
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/bootstrap_then_exit.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Option to bootstrap directories and then exit
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:bootstrap_then_exit) do
7 | has_weight 70
8 |
9 | def parse(parser, options)
10 | parser.on('--bootstrap-then-exit', 'Bootstrap from-dir and/or to-dir and then exit') do
11 | options[:bootstrap_then_exit] = true
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/cached_master_dir.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Cache a bootstrapped checkout of 'master' and use that for time-saving when the SHA
4 | # has not changed.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:cached_master_dir) do
8 | has_weight 160
9 |
10 | def parse(parser, options)
11 | parser.on('--cached-master-dir PATH', 'Cache bootstrapped origin/master at this path') do |path_in|
12 | path = File.absolute_path(path_in)
13 | unless Dir.exist?(path)
14 | begin
15 | Dir.mkdir path, 0o755
16 | rescue Errno::ENOENT => exc
17 | raise Errno::ENOENT, "Invalid cached master directory path: #{exc}"
18 | end
19 | end
20 | options[:cached_master_dir] = path
21 | end
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/catalog_only.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # When set, --catalog-only will only compile the catalog for the 'to' branch, and skip any
4 | # diffing activity. The catalog will be printed to STDOUT or written to the output file.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:catalog_only) do
8 | has_weight 290
9 |
10 | def parse(parser, options)
11 | desc = 'Only compile the catalog for the "to" branch but do not diff'
12 | parser.on('--[no-]catalog-only', desc) do |x|
13 | options[:catalog_only] = x
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/color.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Color printing option
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:color) do
7 | has_weight 80
8 |
9 | def parse(parser, options)
10 | parser.on('--[no-]color', 'Enable/disable colors in output') do |color|
11 | options[:colors] = color
12 | options[:format] = color ? :color_text : :text
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/command_line.rb:
--------------------------------------------------------------------------------
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::Cli::Options::Option.newoption(:command_line) do
7 | has_weight 510
8 |
9 | def parse(parser, options)
10 | OctocatalogDiff::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
20 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/create_symlinks.rb:
--------------------------------------------------------------------------------
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::Cli::Options::Option.newoption(:create_symlinks) do
8 | has_weight 503
9 |
10 | def parse(parser, options)
11 | OctocatalogDiff::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
21 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/debug.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Debugging option
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:debug) do
7 | has_weight 110
8 |
9 | def parse(parser, options)
10 | parser.on('--[no-]debug', '-d', 'Print debugging messages to STDERR') do |x|
11 | options[:debug] = x
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/debug_bootstrap.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Option to print debugging output for the bootstrap script in addition to the normal
4 | # debugging output. Note that `--debug` must also be enabled for this option to have
5 | # any effect.
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(:debug_bootstrap) do
9 | has_weight 49
10 |
11 | def parse(parser, options)
12 | parser.on('--debug-bootstrap', 'Print debugging output for bootstrap script') do
13 | options[:debug_bootstrap] = true
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/display_datatype_changes.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Toggle on or off the display of data type changes when the string representation
4 | # is the same. For example with this enabled, '42' (the string) and 42 (the integer)
5 | # will be displayed as a difference. With this disabled, this is not displayed as a
6 | # difference.
7 | # @param parser [OptionParser object] The OptionParser argument
8 | # @param options [Hash] Options hash being constructed; this is modified in this method.
9 | OctocatalogDiff::Cli::Options::Option.newoption(:display_datatype_changes) do
10 | has_weight 280
11 |
12 | def parse(parser, options)
13 | desc = 'Display changes in data type even when strings match'
14 | parser.on('--[no-]display-datatype-changes', desc) do |x|
15 | options[:display_datatype_changes] = x
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/display_detail_add.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Provide ability to display details of 'added' resources in the output.
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:display_detail_add) do
7 | has_weight 250
8 |
9 | def parse(parser, options)
10 | parser.on('--[no-]display-detail-add', 'Display parameters and other details for added resources') do |x|
11 | options[:display_detail_add] = x
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/display_source_file_line.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Display source filename and line number for diffs
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:display_source_file_line) do
7 | has_weight 200
8 |
9 | def parse(parser, options)
10 | parser.on('--[no-]display-source', 'Show source file and line for each difference') do |x|
11 | options[:display_source_file_line] = x
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/environment.rb:
--------------------------------------------------------------------------------
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::Cli::Options::Option.newoption(:environment) do
8 | has_weight 502
9 |
10 | def parse(parser, options)
11 | OctocatalogDiff::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
20 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/fact_override.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Allow override of facts on the command line. Fact overrides can be supplied for the 'to' or 'from' catalog,
4 | # or for both. There is some attempt to handle data types here (since all items on the command line are strings)
5 | # by permitting a data type specification as well.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:fact_override) do
7 | has_weight 320
8 |
9 | def parse(parser, options)
10 | # Set 'fact_override_in' because more processing is needed, once the command line options
11 | # have been parsed, to make this into the final form 'fact_override'.
12 | OctocatalogDiff::Cli::Options.option_globally_or_per_branch(
13 | parser: parser,
14 | options: options,
15 | cli_name: 'fact-override',
16 | option_name: 'fact_override_in',
17 | desc: 'Override fact',
18 | datatype: []
19 | )
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/facts_terminus.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Get the facts terminus. Generally this is 'yaml' and a fact file will be loaded from PuppetDB or
4 | # elsewhere in the environment. However it can be set to 'facter' which will run facter on the host
5 | # on which this is running.
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(:facts_terminus) do
9 | has_weight 310
10 |
11 | def parse(parser, options)
12 | termini = %w(yaml facter)
13 | parser.on('--facts-terminus STRING', "Facts terminus: one of #{termini.join(', ')}") do |x|
14 | raise ArgumentError, "Invalid facts terminus #{x}; supported: #{termini.join(', ')}" unless termini.include?(x)
15 | options[:facts_terminus] = x
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/filters.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify one or more filters to apply to the results of the catalog difference.
4 | # For a list of available filters and further explanation, please refer to
5 | # Filtering results.
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(:filters) do
9 | has_weight 199
10 |
11 | def parse(parser, options)
12 | parser.on('--filters FILTER1[,FILTER2[,...]]', Array, 'Filters to apply') do |x|
13 | options[:filters] ||= []
14 | options[:filters].concat x
15 |
16 | require_relative '../../catalog-diff/filter'
17 | options[:filters].each { |filter| OctocatalogDiff::CatalogDiff::Filter.assert_that_filter_exists(filter) }
18 | end
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/from_puppetdb.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Set --from-puppetdb to pull most recent catalog from PuppetDB instead of compiling
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:from_puppetdb) do
7 | has_weight 300
8 |
9 | def parse(parser, options)
10 | desc = 'Pull "from" catalog from PuppetDB instead of compiling'
11 | parser.on('--[no-]from-puppetdb', desc) do |x|
12 | options[:from_puppetdb] = x
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/ignore_attr.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify attributes to ignore
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:ignore_attr) do
7 | has_weight 190
8 |
9 | def parse(parser, options)
10 | parser.on('--ignore-attr "attr1,attr2,..."', Array, 'Attributes to ignore') do |res|
11 | options[:ignore] ||= []
12 | res.each do |item|
13 | item_subst = item.gsub(/(\\f|::)/, "\f")
14 | options[:ignore] << { attr: item_subst }
15 | end
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/include_tags.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Options used when comparing catalogs - tags are generally ignored; you can un-ignore them.
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:include_tags) do
7 | has_weight 140
8 |
9 | def parse(parser, options)
10 | parser.on('--[no-]include-tags', 'Include changes to tags in the diff output') do |x|
11 | options[:include_tags] = x
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/master_cache_branch.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Allow override of the branch that is cached. This defaults to 'origin/master'.
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:master_cache_branch) do
7 | has_weight 160
8 |
9 | def parse(parser, options)
10 | parser.on('--master-cache-branch BRANCH', 'Branch to cache') do |x|
11 | options[:master_cache_branch] = x
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/output_file.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Output file option
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:output_file) do
7 | has_weight 90
8 |
9 | def parse(parser, options)
10 | parser.on('--output-file FILENAME', '-o', 'Output results into FILENAME') do |filename|
11 | path = File.absolute_path(filename)
12 | options[:output_file] = path
13 | options[:format] = :text
14 | options[:colors] = false
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/parallel.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Disable or enable parallel processing of 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::Cli::Options::Option.newoption(:parallel) do
7 | has_weight 300
8 |
9 | def parse(parser, options)
10 | parser.on('--[no-]parallel', 'Enable or disable parallel processing') do |x|
11 | options[:parallel] = x
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/pe_enc_ssl_ca.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the CA certificate for the Puppet Enterprise ENC. If specified, this will enable SSL verification
4 | # that the certificate being presented has been signed by this CA, and that the common name
5 | # matches the name you are using to connecting.
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(:pe_enc_ssl_ca) do
9 | has_weight 352
10 |
11 | def parse(parser, options)
12 | parser.on('--pe-enc-ssl-ca FILENAME', 'CA certificate that signed the ENC API certificate') do |x|
13 | raise Errno::ENOENT, "--pe-enc-ssl-ca #{x} does not point to a valid file" unless File.file?(x)
14 | options[:pe_enc_ssl_ca] = x
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/pe_enc_ssl_client_cert.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the client certificate for connecting to the Puppet Enterprise ENC. This must be specified along with
4 | # --pe-enc-ssl-client-key in order to work.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:pe_enc_ssl_client_cert) do
8 | has_weight 353
9 |
10 | def parse(parser, options)
11 | parser.on('--pe-enc-ssl-client-cert FILENAME', 'SSL client certificate to connect to PE ENC') do |x|
12 | raise Errno::ENOENT, "--pe-enc-ssl-client-cert #{x} does not point to a valid file" unless File.file?(x)
13 | options[:pe_enc_ssl_client_cert] = File.read(x)
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/pe_enc_ssl_client_key.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the client key for connecting to Puppet Enterprise ENC. This must be specified along with
4 | # --pe-enc-ssl-client-cert in order to work.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:pe_enc_ssl_client_key) do
8 | has_weight 354
9 |
10 | def parse(parser, options)
11 | parser.on('--pe-enc-ssl-client-key FILENAME', 'SSL client key to connect to PE ENC') do |x|
12 | raise Errno::ENOENT, "--pe-enc-ssl-client-key #{x} does not point to a valid file" unless File.file?(x)
13 | options[:pe_enc_ssl_client_key] = File.read(x)
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/pe_enc_token.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the access token to access the Puppet Enterprise ENC. Refer to
4 | # https://docs.puppet.com/pe/latest/nc_forming_requests.html#authentication for
5 | # details on generating and obtaining a token. Use this option to specify the text
6 | # of the token. (Use --pe-enc-token-file to read the content of the token from a file.)
7 | # @param parser [OptionParser object] The OptionParser argument
8 | # @param options [Hash] Options hash being constructed; this is modified in this method.
9 | OctocatalogDiff::Cli::Options::Option.newoption(:pe_enc_token) do
10 | has_weight 351
11 |
12 | def parse(parser, options)
13 | parser.on('--pe-enc-token TOKEN', 'Token to access the Puppet Enterprise ENC API') do |token|
14 | options[:pe_enc_token] = token
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/preserve_environments.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Preserve the `environments` directory from the repository when compiling the catalog. Likely
4 | # requires some combination of `--to-environment`, `--from-environment`, and/or `--create-symlinks`
5 | # to work correctly.
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(:preserve_environments) do
9 | has_weight 501
10 |
11 | def parse(parser, options)
12 | parser.on('--[no-]preserve-environments', 'Enable or disable environment preservation') do |x|
13 | options[:preserve_environments] = x
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppet_binary.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Set --puppet-binary, --to-puppet-binary, --from-puppet-binary
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:puppet_binary) do
7 | has_weight 300
8 |
9 | def parse(parser, options)
10 | OctocatalogDiff::Cli::Options.option_globally_or_per_branch(
11 | parser: parser,
12 | options: options,
13 | cli_name: 'puppet-binary',
14 | option_name: 'puppet_binary',
15 | desc: 'Full path to puppet binary'
16 | )
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppet_master.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the hostname, or hostname:port, for the Puppet Master.
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:puppet_master) do
7 | has_weight 320
8 |
9 | def parse(parser, options)
10 | OctocatalogDiff::Cli::Options.option_globally_or_per_branch(
11 | parser: parser,
12 | options: options,
13 | cli_name: 'puppet-master',
14 | option_name: 'puppet_master',
15 | desc: 'Hostname or Hostname:PortNumber for Puppet Master'
16 | )
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppet_master_token.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify a PE RBAC token used to authenticate to Puppetserver for v4
4 | # catalog API calls.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:puppet_master_token) do
8 | has_weight 310
9 |
10 | def parse(parser, options)
11 | OctocatalogDiff::Cli::Options.option_globally_or_per_branch(
12 | parser: parser,
13 | options: options,
14 | datatype: '',
15 | cli_name: 'puppet-master-token',
16 | option_name: 'puppet_master_token',
17 | desc: 'PE RBAC token to authenticate to the Puppetserver API v4'
18 | )
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppet_master_update_catalog.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify if, when using the Puppetserver v4 catalog API, the Puppetserver should
4 | # update the catalog in PuppetDB.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:puppet_master_update_catalog) do
8 | has_weight 320
9 |
10 | def parse(parser, options)
11 | OctocatalogDiff::Cli::Options.option_globally_or_per_branch(
12 | parser: parser,
13 | options: options,
14 | datatype: false,
15 | cli_name: 'puppet-master-update-catalog',
16 | option_name: 'puppet_master_update_catalog',
17 | desc: 'Update catalog in PuppetDB when using Puppetmaster API version 4'
18 | )
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppet_master_update_facts.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify if, when using the Puppetserver v4 catalog API, the Puppetserver should
4 | # update the facts in PuppetDB.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:puppet_master_update_facts) do
8 | has_weight 320
9 |
10 | def parse(parser, options)
11 | OctocatalogDiff::Cli::Options.option_globally_or_per_branch(
12 | parser: parser,
13 | options: options,
14 | datatype: false,
15 | cli_name: 'puppet-master-update-facts',
16 | option_name: 'puppet_master_update_facts',
17 | desc: 'Update facts in PuppetDB when using Puppetmaster API version 4'
18 | )
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppetdb_api_version.rb:
--------------------------------------------------------------------------------
1 | # Specify the API version to use for the PuppetDB. The current values supported are '3' or '4', and '4' is
2 | # the default.
3 | # @param parser [OptionParser object] The OptionParser argument
4 | # @param options [Hash] Options hash being constructed; this is modified in this method.
5 | OctocatalogDiff::Cli::Options::Option.newoption(:puppetdb_api_version) do
6 | has_weight 319
7 |
8 | def parse(parser, options)
9 | parser.on('--puppetdb-api-version N', OptionParser::DecimalInteger, 'Version of PuppetDB API (3 or 4)') do |x|
10 | options[:puppetdb_api_version] = x
11 | raise ArgumentError, 'Only PuppetDB versions 3 and 4 are supported' unless [3, 4].include?(x)
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppetdb_ssl_ca.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the CA certificate for PuppetDB. If specified, this will enable SSL verification
4 | # that the certificate being presented has been signed by this CA, and that the common name
5 | # matches the name you are using to connecting.
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(:puppetdb_ssl_ca) do
9 | has_weight 310
10 | order_within_weight 10
11 |
12 | def parse(parser, options)
13 | parser.on('--puppetdb-ssl-ca FILENAME', 'CA certificate that signed the PuppetDB certificate') do |x|
14 | raise Errno::ENOENT, "--puppetdb-ssl-ca #{x} does not point to a valid file" unless File.file?(x)
15 | options[:puppetdb_ssl_ca] = x
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppetdb_ssl_client_cert.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the client certificate for connecting to PuppetDB. This must be specified along with
4 | # --puppetdb-ssl-client-key in order to work.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:puppetdb_ssl_client_cert) do
8 | has_weight 310
9 | order_within_weight 20
10 |
11 | def parse(parser, options)
12 | parser.on('--puppetdb-ssl-client-cert FILENAME', 'SSL client certificate to connect to PuppetDB') do |x|
13 | raise Errno::ENOENT, "--puppetdb-ssl-client-cert #{x} does not point to a valid file" unless File.file?(x)
14 | options[:puppetdb_ssl_client_cert] = File.read(x)
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppetdb_ssl_client_key.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the client key for connecting to PuppetDB. This must be specified along with
4 | # --puppetdb-ssl-client-cert in order to work.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:puppetdb_ssl_client_key) do
8 | has_weight 310
9 | order_within_weight 30
10 |
11 | def parse(parser, options)
12 | parser.on('--puppetdb-ssl-client-key FILENAME', 'SSL client key to connect to PuppetDB') do |x|
13 | raise Errno::ENOENT, "--puppetdb-ssl-client-key #{x} does not point to a valid file" unless File.file?(x)
14 | options[:puppetdb_ssl_client_key] = File.read(x)
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppetdb_ssl_client_password.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the password for a PEM or PKCS12 private key on the command line.
4 | # Note that `--puppetdb-ssl-client-password-file` is slightly more secure because
5 | # the text of the password won't appear in the process list.
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(:puppetdb_ssl_client_cert) do
9 | has_weight 310
10 | order_within_weight 35
11 |
12 | def parse(parser, options)
13 | parser.on('--puppetdb-ssl-client-password PASSWORD', 'Password for SSL client key to connect to PuppetDB') do |x|
14 | options[:puppetdb_ssl_client_password] = x
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppetdb_ssl_client_password_file.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the password for a PEM or PKCS12 private key, by reading it from a file.
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:puppetdb_ssl_client_password_file) do
7 | has_weight 310
8 | order_within_weight 37
9 |
10 | def parse(parser, options)
11 | parser.on('--puppetdb-ssl-client-password-file FILENAME', 'Read password for SSL client key from a file') do |x|
12 | raise Errno::ENOENT, "--puppetdb-ssl-client-password-file #{x} does not point to a valid file" unless File.file?(x)
13 | options[:puppetdb_ssl_client_password] = File.read(x)
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppetdb_ssl_crl.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the Certificate Revocation List for PuppetDB SSL.
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:puppetdb_ssl_crl) do
7 | has_weight 310
8 | order_within_weight 11
9 |
10 | def parse(parser, options)
11 | parser.on('--puppetdb-ssl-crl FILENAME', 'Certificate Revocation List provided by the Puppetserver') do |x|
12 | raise Errno::ENOENT, "--puppetdb-ssl-crl #{x} does not point to a valid file" unless File.file?(x)
13 | options[:puppetdb_ssl_crl] = x
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppetdb_token.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Specify the PE RBAC token to access the PuppetDB API. Refer to
4 | # https://puppet.com/docs/pe/latest/rbac/rbac_token_auth_intro.html#generate-a-token-using-puppet-access
5 | # for details on generating and obtaining a token. Use this option to specify the text
6 | # of the token. (Use --puppetdb-token-file to read the content of the token from a file.)
7 | # @param parser [OptionParser object] The OptionParser argument
8 | # @param options [Hash] Options hash being constructed; this is modified in this method.
9 | OctocatalogDiff::Cli::Options::Option.newoption(:puppetdb_token) do
10 | has_weight 310
11 |
12 | def parse(parser, options)
13 | parser.on('--puppetdb-token TOKEN', 'Token to access the PuppetDB API') do |token|
14 | options[:puppetdb_token] = token
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/puppetdb_url.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require 'uri'
4 |
5 | # Specify the base URL for PuppetDB. This will generally look like https://puppetdb.yourdomain.com:8081
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(:puppetdb_url) do
9 | has_weight 310
10 | order_within_weight 1
11 |
12 | def parse(parser, options)
13 | parser.on('--puppetdb-url URL', 'PuppetDB base URL') do |url|
14 | # Test the format of the incoming URL. Only HTTPS should really be used, but we will
15 | # support HTTP begrudgingly as well.
16 | obj = URI.parse(url)
17 | raise ArgumentError, 'PuppetDB URL must be http or https' unless obj.is_a?(URI::HTTPS) || obj.is_a?(URI::HTTP)
18 | options[:puppetdb_url] = url
19 | end
20 | end
21 | end
22 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/quiet.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Quiet option
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:quiet) do
7 | has_weight 120
8 |
9 | def parse(parser, options)
10 | parser.on('--[no-]quiet', '-q', 'Quiet (no status messages except errors)') do |x|
11 | options[:quiet] = x
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/retry_failed_catalog.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Transient errors can cause catalog compilation problems. This adds an option to retry
4 | # a failed catalog multiple times before kicking out an error message.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:retry_failed_catalog) do
8 | has_weight 230
9 |
10 | def parse(parser, options)
11 | parser.on('--retry-failed-catalog N', OptionParser::DecimalInteger, 'Retry building a failed catalog N times') do |x|
12 | options[:retry_failed_catalog] = x
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/safe_to_delete_cached_master_dir.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # By specifying a directory path here, you are explicitly giving permission to the program
4 | # to delete it if it believes it needs to be created (e.g., if the SHA has changed of the
5 | # cached directory).
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(:safe_to_delete_cached_master_dir) do
9 | has_weight 160
10 |
11 | def parse(parser, options)
12 | parser.on('--safe-to-delete-cached-master-dir PATH', 'OK to delete cached master directory at this path') do |path_in|
13 | path = File.absolute_path(path_in)
14 | options[:safe_to_delete_cached_master_dir] = path
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/storeconfigs.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Set storeconfigs (integration with PuppetDB for collected resources)
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:storeconfigs) do
7 | has_weight 220
8 |
9 | def parse(parser, options)
10 | parser.on('--[no-]storeconfigs', 'Enable integration with puppetdb for collected resources') do |x|
11 | options[:storeconfigs] = x
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/storeconfigs_backend.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Set storeconfigs (integration with PuppetDB for collected resources)
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:storeconfigs) do
7 | has_weight 220
8 |
9 | def parse(parser, options)
10 | parser.on('--storeconfigs-backend TERMINUS', 'Set the terminus used for storeconfigs') do |x|
11 | options[:storeconfigs_backend] = x
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/to_from_branch.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Set the 'from' and 'to' branches, which is used to compile catalogs. A branch of '.' means to use
4 | # the current contents of the base code directory without any git checkouts.
5 | # @param parser [OptionParser object] The OptionParser argument
6 | # @param options [Hash] Options hash being constructed; this is modified in this method.
7 | OctocatalogDiff::Cli::Options::Option.newoption(:to_from_branch) do
8 | has_weight 20
9 |
10 | def parse(parser, options)
11 | parser.on('--from FROM_BRANCH', '-f', 'Branch you are coming from') do |env|
12 | options[:from_env] = env
13 | end
14 | parser.on('--to TO_BRANCH', '-t', 'Branch you are going to') do |env|
15 | options[:to_env] = env
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/truncate_details.rb:
--------------------------------------------------------------------------------
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
17 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/cli/options/use_lcs.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Configures using the Longest common subsequence (LCS) algorithm to determine differences in arrays
4 | # @param parser [OptionParser object] The OptionParser argument
5 | # @param options [Hash] Options hash being constructed; this is modified in this method.
6 | OctocatalogDiff::Cli::Options::Option.newoption(:use_lcs) do
7 | has_weight 250
8 |
9 | def parse(parser, options)
10 | parser.on('--[no-]use-lcs', 'Use the LCS algorithm to determine differences in arrays') do |x|
11 | options[:use_lcs] = x
12 | end
13 | end
14 | end
15 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/external/pson/LICENSE:
--------------------------------------------------------------------------------
1 | Puppet - Automating Configuration Management.
2 |
3 | Copyright (C) 2005-2016 Puppet, Inc.
4 |
5 | Puppet, Inc. can be contacted at: info@puppet.com
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | https://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/external/pson/pure.rb:
--------------------------------------------------------------------------------
1 | require_relative 'common'
2 | require_relative 'pure/parser'
3 | require_relative 'pure/generator'
4 |
5 | module PSON
6 | # This module holds all the modules/classes that implement PSON's
7 | # functionality in pure ruby.
8 | module Pure
9 | $DEBUG and warn "Using pure library for PSON."
10 | PSON.parser = Parser
11 | PSON.generator = Generator
12 | end
13 |
14 | PSON_LOADED = true
15 | end
16 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/external/pson/version.rb:
--------------------------------------------------------------------------------
1 | module PSON
2 | # PSON version
3 | VERSION = '1.1.9'
4 | VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5 | VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6 | VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
7 | VERSION_BUILD = VERSION_ARRAY[2] # :nodoc:
8 | end
9 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/util/colored.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | # Create colorizing methods in the 'String' class, but only if 'colors_enabled'
4 | # has been set.
5 | class String
6 | COLORS = {
7 | 'red' => 31,
8 | 'green' => 32,
9 | 'yellow' => 33,
10 | 'cyan' => 36
11 | }.freeze
12 |
13 | COLORS.each do |color, _value|
14 | define_method(color) do
15 | @@colors_enabled ? "\e[0;#{COLORS[color]};49m#{self}\e[0m" : self
16 | end
17 | end
18 |
19 | def self.colors_enabled=(value)
20 | @@colors_enabled = value # rubocop:disable Style/ClassVars
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/lib/octocatalog-diff/version.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | module OctocatalogDiff
4 | # Determine the version of octocatalog-diff
5 | class Version
6 | version_file = File.expand_path('../../.version', File.dirname(__FILE__))
7 | VERSION = File.read(version_file).strip.freeze
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/rake/common.rb:
--------------------------------------------------------------------------------
1 | # Constants
2 | BASEDIR = File.expand_path('..', File.dirname(__FILE__)).freeze
3 | PUPPET_BINARY = File.join(BASEDIR, 'bin', 'puppet').freeze
4 | TEST_COMMAND = begin
5 | if ENV['TRAVIS']
6 | "rspec --pattern '*_spec.rb'"
7 | else
8 | "parallel_rspec --suffix '_spec.rb$'"
9 | end
10 | end.freeze
11 |
--------------------------------------------------------------------------------
/script/fmt:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
4 | RUBOCOP_YML="${DIR}/.rubocop.yml"
5 | bundle exec rubocop --config "${RUBOCOP_YML}" --no-color -D $@
6 |
--------------------------------------------------------------------------------
/script/octocatalog-diff-wrapper:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script exists to make it easier to test alternate branches of octocatalog-diff.
4 | # It is intended as a one-for-one replacement of `octocatalog-diff` as installed by the gem.
5 |
6 | CURRENT_PWD="$(pwd)"
7 | CHECKOUT_BASE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
8 |
9 | if [ -z "$OCTOCATALOG_DIFF_CONFIG_FILE" ]; then
10 | if [ -f "${CURRENT_PWD}/.octocatalog-diff.cfg.rb" ]; then
11 | export OCTOCATALOG_DIFF_CONFIG_FILE="${CURRENT_PWD}/.octocatalog-diff.cfg.rb"
12 | fi
13 | fi
14 |
15 | cd "$CHECKOUT_BASE"
16 | export OCTOCATALOG_DIFF_CUSTOM_VERSION="@$(git rev-parse HEAD)"
17 | bundle exec bin/octocatalog-diff --basedir "$CURRENT_PWD" $*
18 |
--------------------------------------------------------------------------------
/script/timeout:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | require 'shellwords'
4 | require 'timeout'
5 |
6 | seconds = ARGV.shift
7 | raise "Usage: #{__FILE__} " unless seconds
8 | begin
9 | Timeout::timeout(seconds.to_i) do
10 | system ARGV.map { |i| Shellwords.escape(i) }.join(" ")
11 | exit $?.exitstatus
12 | end
13 | rescue Timeout::Error
14 | STDERR.puts "Timed out after #{seconds} seconds"
15 | exit 124
16 | end
17 |
--------------------------------------------------------------------------------
/scripts/env/env.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script echoes back the environment. This is used for spec testing
4 | # and possible debugging.
5 |
6 | env
7 |
--------------------------------------------------------------------------------
/scripts/git-extract/git-extract.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This script is called from lib/octocatalog-diff/catalog-util/git.rb and is used to
4 | # archive and extract a certain branch of a git repository into a target directory.
5 |
6 | if [ -z "$OCD_GIT_EXTRACT_BRANCH" ]; then
7 | echo "Error: Must declare OCD_GIT_EXTRACT_BRANCH"
8 | exit 255
9 | fi
10 |
11 | if [ -z "$OCD_GIT_EXTRACT_TARGET" ]; then
12 | echo "Error: Must declare OCD_GIT_EXTRACT_TARGET"
13 | exit 255
14 | fi
15 |
16 | set -euf -o pipefail
17 | git archive --format=tar "$OCD_GIT_EXTRACT_BRANCH" | ( cd "$OCD_GIT_EXTRACT_TARGET" && tar -xf - )
18 |
--------------------------------------------------------------------------------
/scripts/puppet/puppet.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # Script to run Puppet. The default implementation here is simply to pass
4 | # through the command line arguments (which are likely to be numerous when
5 | # compiling a catalog).
6 |
7 | if [ -z "$OCD_PUPPET_BINARY" ]; then
8 | echo "Error: PUPPET_BINARY must be set"
9 | exit 255
10 | fi
11 |
12 | "$OCD_PUPPET_BINARY" "$@"
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/catalog-empty.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "tags": ["github"],
5 | "name": "my.rspec.node",
6 | "version": "production",
7 | "environment": "production",
8 | "resources": [
9 | ],
10 | "classes": [
11 | ]
12 | },
13 | "metadata": {
14 | "api_version": 1
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/ignore-enhanced-changes-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "tags": ["settings"],
5 | "name": "my.rspec.node",
6 | "version": "production",
7 | "environment": "production",
8 | "resources": [
9 | {
10 | "type": "File",
11 | "title": "/tmp/awesome",
12 | "file": "/environments/production/modules/foo/manifests/init.pp",
13 | "line": 10,
14 | "exported": false,
15 | "parameters": {
16 | "content": "This is my file.\nMy file is amazing.\nIt is also awesome.",
17 | "group": "root",
18 | "mode": "0755",
19 | "notify": "Service[foo]",
20 | "owner": "root"
21 | }
22 | }
23 | ],
24 | "classes": [
25 | "settings"
26 | ]
27 | },
28 | "metadata": {
29 | "api_version": 1
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/ignore-enhanced-changes-2.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "tags": ["settings"],
5 | "name": "my.rspec.node",
6 | "version": "production",
7 | "environment": "production",
8 | "resources": [
9 | {
10 | "type": "File",
11 | "title": "/tmp/awesome",
12 | "file": "/environments/production/modules/foo/manifests/init.pp",
13 | "line": 10,
14 | "exported": false,
15 | "parameters": {
16 | "content": "This is my file.\nMy file is cool.\nIt is also awesome.",
17 | "ensure": "file",
18 | "group": "root",
19 | "mode": "0644",
20 | "owner": "root"
21 | }
22 | }
23 | ],
24 | "classes": [
25 | "settings"
26 | ]
27 | },
28 | "metadata": {
29 | "api_version": 1
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/ignore-equivalent-yaml-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "tags": ["settings"],
5 | "name": "my.rspec.node",
6 | "version": "production",
7 | "environment": "production",
8 | "resources": [
9 | {
10 | "type": "File",
11 | "title": "/tmp/foo.yaml",
12 | "exported": false,
13 | "parameters": {
14 | "content": "foo:\n bar: baz\n"
15 | }
16 | }
17 | ]
18 | },
19 | "metadata": {
20 | "api_version": 1
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/ignore-equivalent-yaml-2.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "tags": ["settings"],
5 | "name": "my.rspec.node",
6 | "version": "production",
7 | "environment": "production",
8 | "resources": [
9 | {
10 | "type": "File",
11 | "title": "/tmp/foo.yaml",
12 | "exported": false,
13 | "parameters": {
14 | "content": "---\n foo:\n bar: baz\n"
15 | }
16 | }
17 | ]
18 | },
19 | "metadata": {
20 | "api_version": 1
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/ignore-parameter-set-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "tags": ["settings"],
5 | "name": "my.rspec.node",
6 | "version": "production",
7 | "environment": "production",
8 | "resources": [
9 | {
10 | "type": "Myres",
11 | "title": "res1",
12 | "file": "/environments/production/modules/foo/manifests/init.pp",
13 | "line": 10,
14 | "exported": false,
15 | "parameters": {
16 | "set1": ["one", "two", "three"],
17 | "set2": ["a", "b"]
18 | }
19 | }
20 | ],
21 | "classes": [
22 | "settings"
23 | ]
24 | },
25 | "metadata": {
26 | "api_version": 1
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/ignore-parameter-set-2.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "tags": ["settings"],
5 | "name": "my.rspec.node",
6 | "version": "production",
7 | "environment": "production",
8 | "resources": [
9 | {
10 | "type": "Myres",
11 | "title": "res1",
12 | "file": "/environments/production/modules/foo/manifests/init.pp",
13 | "line": 10,
14 | "exported": false,
15 | "parameters": {
16 | "set1": ["three", "two", "one"],
17 | "set2": ["a", "b", "c"],
18 | "set3": [1, 2, 3]
19 | }
20 | }
21 | ],
22 | "classes": [
23 | "settings"
24 | ]
25 | },
26 | "metadata": {
27 | "api_version": 1
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/regression-fixnum-1.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "name": "octoawesome-fe-00decaf.example.com",
5 | "version": "",
6 | "environment": "production",
7 | "resources": [
8 | {
9 | "type": "Special",
10 | "title": "My::Silly::Class",
11 | "tags": [
12 | "class",
13 | "my::silly::class",
14 | "my",
15 | "silly",
16 | "class"
17 | ],
18 | "exported": false,
19 | "parameters": {
20 | "number_one": 7199,
21 | "number_two": 2181
22 | }
23 | }
24 | ]
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/regression-fixnum-2.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "name": "octoawesome-fe-00decaf.example.com",
5 | "version": "",
6 | "environment": "production",
7 | "resources": [
8 | {
9 | "type": "Special",
10 | "title": "My::Silly::Class",
11 | "tags": [
12 | "class",
13 | "my::silly::class",
14 | "my",
15 | "silly",
16 | "class"
17 | ],
18 | "exported": false,
19 | "parameters": {
20 | "number_one": 7199,
21 | "number_two": 2181,
22 | "number_three": 1234,
23 | "string": "boom"
24 | }
25 | }
26 | ]
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/tiny-catalog-2-puppetdb-converted.json:
--------------------------------------------------------------------------------
1 | {"document_type":"Catalog","resources":[{"type":"Stage","title":"main","tags":["stage"],"exported":false,"parameters":{"name":"main"}},{"type":"Class","title":"Settings","tags":["class","settings"],"exported":false},{"type":"Class","title":"Fizzbuzz","tags":["class","fizzbuzz"],"exported":false}],"tags":["settings"],"name":"my.rspec.node","version":"production","environment":"production"}
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/tiny-catalog-2.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "tags": ["settings"],
5 | "name": "my.rspec.node",
6 | "version": "production",
7 | "environment": "production",
8 | "resources": [
9 | {
10 | "type": "Stage",
11 | "title": "main",
12 | "tags": ["stage"],
13 | "exported": false,
14 | "parameters": {
15 | "name": "main"
16 | }
17 | },
18 | {
19 | "type": "Class",
20 | "title": "Settings",
21 | "tags": ["class","settings"],
22 | "exported": false
23 | },
24 | {
25 | "type": "Class",
26 | "title": "Fizzbuzz",
27 | "tags": ["class","fizzbuzz"],
28 | "exported": false
29 | }
30 | ],
31 | "classes": [
32 | "settings"
33 | ]
34 | },
35 | "metadata": {
36 | "api_version": 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/tiny-catalog-tags.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "tags": ["settings"],
5 | "name": "my.rspec.node",
6 | "version": "production",
7 | "environment": "production",
8 | "resources": [
9 | {
10 | "type": "Stage",
11 | "title": "main",
12 | "tags": ["stage","blah::foo"],
13 | "exported": false,
14 | "parameters": {
15 | "name": "main"
16 | }
17 | },
18 | {
19 | "type": "Class",
20 | "title": "Settings",
21 | "tags": ["class","settings"],
22 | "exported": false
23 | }
24 | ],
25 | "classes": [
26 | "settings"
27 | ]
28 | },
29 | "metadata": {
30 | "api_version": 1
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/catalogs/tiny-catalog.json:
--------------------------------------------------------------------------------
1 | {
2 | "document_type": "Catalog",
3 | "data": {
4 | "tags": ["settings"],
5 | "name": "my.rspec.node",
6 | "version": "production",
7 | "environment": "production",
8 | "resources": [
9 | {
10 | "type": "Stage",
11 | "title": "main",
12 | "tags": ["stage"],
13 | "exported": false,
14 | "parameters": {
15 | "name": "main"
16 | }
17 | },
18 | {
19 | "type": "Class",
20 | "title": "Settings",
21 | "tags": ["class","settings"],
22 | "exported": false
23 | }
24 | ],
25 | "classes": [
26 | "settings"
27 | ]
28 | },
29 | "metadata": {
30 | "api_version": 1
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/cli-configs/fact-file.rb:
--------------------------------------------------------------------------------
1 | # This is a configuration file for octocatalog-diff
2 |
3 | module OctocatalogDiff
4 | class Config
5 | def self.config
6 | {
7 | facts: OctocatalogDiff::Facts.new(
8 | backend: :yaml,
9 | fact_file_string: File.read(File.join(ENV['PUPPET_FACT_FILE_DIR'], 'valid-facts.yaml'))
10 | ),
11 | fact_file: File.join(ENV['PUPPET_FACT_FILE_DIR'], 'valid-facts.yaml')
12 | }
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/cli-configs/invalid.rb:
--------------------------------------------------------------------------------
1 | # This is a configuration file for octocatalog-diff
2 |
3 | module OctocatalogDiff
4 | class Config
5 | def self.config
6 | raise 'Fizz Buzz'
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/cli-configs/no-op.rb:
--------------------------------------------------------------------------------
1 | # This is a configuration file for octocatalog-diff
2 |
3 | module OctocatalogDiff
4 | class Config
5 | def self.config
6 | {}
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/cli-configs/not-class.rb:
--------------------------------------------------------------------------------
1 | # This is a configuration file for octocatalog-diff
2 |
3 | module OctocatalogDiff
4 | class ConfigFooBar
5 | def self.config
6 | raise 'Fizz Buzz'
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/cli-configs/not-hash.rb:
--------------------------------------------------------------------------------
1 | # This is a configuration file for octocatalog-diff
2 |
3 | module OctocatalogDiff
4 | class Config
5 | def self.config
6 | %w(apple banana)
7 | end
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/cli-configs/not-proper.rb:
--------------------------------------------------------------------------------
1 | # This is a configuration file for octocatalog-diff
2 |
3 | module OctocatalogDiff
4 | class Config
5 | def self.foobuzz
6 | {
7 | header: :default,
8 | hiera_config: 'config/hiera.yaml',
9 | hiera_path: 'hieradata'
10 | }
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/cli-configs/not-ruby.rb:
--------------------------------------------------------------------------------
1 | Ruby is not here.
2 | It should fail to compile.
3 | And raise an error.
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/cli-configs/valid.rb:
--------------------------------------------------------------------------------
1 | # This is a configuration file for octocatalog-diff
2 |
3 | module OctocatalogDiff
4 | class Config
5 | def self.config
6 | {
7 | header: :default,
8 | hiera_config: 'config/hiera.yaml',
9 | hiera_path: 'hieradata'
10 | }
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/configs/hiera.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - yaml
4 | :yaml:
5 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
6 | :hierarchy:
7 | - servers/%{::fqdn}
8 | - datacenter/%{::datacenter}
9 | - platform/%{::virtual}
10 | - os/%{::operatingsystem}/%{::lsbdistcodename}
11 | - os/%{::operatingsystem}
12 | - common
13 | :merge_behavior: deeper
14 | :logger: console
15 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/configs/pe-enc-token.txt:
--------------------------------------------------------------------------------
1 | opawwvdsjskjfbzgusmilrsfunuwdwpqfezyrttzjasxenslhzvvakyvumixxcmeudcwqnwbekfacsjqapccxbbytalbwejfdvnnavnsexoaxkdmxxjzkucdwizyhuxxtxuxzyvzpxjxtxwslekrmdthhllrlhidtcbaeuwwvmzipvelxvtcfwbslzxsfutkmehhotxsxkwneeqjucyqdnixwysuoextqiejtmirlmxugddcevziamafhtdvwrgszbdpmoxtjdkxjvpxlbaqetvzbbmftxxbapxnknmpitkrftgjdcenpvyaqslzfsdkzxnkrrhdkuunmqfdebtcyxjwhnmioyqgatrvdsxqcvcwzovfqnlgzvnxocvdxaxvvpybgdrkdiraagvfnbeujeppczzvallxlshtgccowcrklfkxhxixldosrcpwobflkbnvdbszyjtwzrdlrjcpmvquktdqxohiqqeboesnrvauluqopzdcquqlthmfmzvkbfxwosfceeuilqhpjtwggphsrmvdowpoizsfxecqkwlrjzhoiicwwxfrcorkucgrgthkqkhytrnnqgrolexourqcezrfjaanzoyzbafwdhfqdkokpwayfbnwctkgcxywzmrfosfezbpemuxciueagsukyhldxuesbdegrqmbzjiljflykdwukgxgwnrkrharsoykafaefvvazbdgddcxhgzcqhdtvkzfurdpporhoxdjcvixubwosfrltfwnhexzljntxhrvaxzapzazhnhegvlxfdpzxumegzaicxqkgjajxfbsblkhnzruxtarxhkqyqwvfitybujgcrpzffovczmirwswmcrowpfsofkkntemky
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/configs/puppet-master-token.txt:
--------------------------------------------------------------------------------
1 | secretpuppetmastertoken
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/configs/puppetdb-token.txt:
--------------------------------------------------------------------------------
1 | bxejuxstqwhmbrwskpfokcukvjlzmzwlouvpdcnwfypsrefnqycxezwzjiccnpnmherjhxgvrdjdhgzeaoxkjekfluyrlhxkkvllvzaunlmcqfrdnmqlovdensweblnfrgslaxcwurxeadofxlquqeercnypbuypsgnxastvuhqgxnlotrkghcvkkoyzrwmmzxocnftthosfeenxzijfnzciuukeqhmwqxnwbncxttadyrdcapokhcwykcliuhmbejdulkvxixxbcxljdvvtlbqmfqgoisadvhduoskedbykwgzfcdmfytcwkakuliytrtjpiqxaathxutizixtgbkncizjcpqiibvkjgdvblzcekqvsbyzkeaycydhxbbgmevkxzuexwdawsvanchjwzcxrrpuvwtxcsdkraluzbmozaunnfvyjoezvawxfoelmduzaqkffetecdchotxpumoxyrxeuxhxugckrfkzvapkhiniersercnemnkgspdxspfktdqrrxfpiooinqtdzvwwwyrpkzlvvxxkajgshacadawgkzpdbfarhqcflbbqtzwfshnfmpxrsuljxkdzrtxtulwoomwvykauxzxzgxqdqrbksirroxwqcveryrwfswqjmsqlddjdgvzhnsftinetaxvhfzgylxhmtammzfephrwftmudbtdkfscpxxzfudjbfzjkaozgxbxhhplddsbyhafmmvfdhqoozozwnrtjtwicxpvwdrvozrwiecxresxbuzpovfdeuxdgzqoyjzscfxrrzsvtrbtobqkscvujeqiqgiwbgjrpwslavvfldzpblhagpltlxpxwsqvgabemwfocnsugajffjtaxehaxwti
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/configs/trivial-enc.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # The simplest and least functional ENC you'll ever see
4 | echo '---'
5 | exit 0
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/diffs/changed-and-added.json:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | "~",
4 | "File\f/usr/bin/node-waf\fparameters\fensure",
5 | "/usr/share/nvm/0.8.11/bin/node-waf",
6 | "link"
7 | ],
8 | [
9 | "!",
10 | "File\f/usr/bin/node-waf\fparameters\ftarget",
11 | null,
12 | "/usr/share/nvm/0.8.11/bin/node-waf"
13 | ],
14 | [
15 | "~",
16 | "File\f/usr/bin/npm\fparameters\fensure",
17 | "link",
18 | "/usr/share/nvm/0.8.11/bin/npm"
19 | ],
20 | [
21 | "!",
22 | "File\f/usr/bin/npm\fparameters\ftarget",
23 | "/usr/share/nvm/0.8.11/bin/npm",
24 | null
25 | ]
26 | ]
27 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/diffs/datatype-differences.json:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | "+",
4 | "File\f/tmp/foo",
5 | {
6 | "type": "File",
7 | "title": "/tmp/new-file/ignored/one",
8 | "exported": false,
9 | "parameters": {
10 | "content": "new repo",
11 | "tag": "ignored_catalog_diff"
12 | }
13 | },
14 | {
15 | "file": "/var/folders/dw/xxx/T/yyy/environments/production/modules/mymodule/manifests/resource2.pp",
16 | "line": 17
17 | }
18 | ],
19 | [
20 | "~",
21 | "File\f/tmp/bar\fparameters\fmode",
22 | 755,
23 | "755",
24 | {
25 | "file": "/var/folders/dw/xxx/T/yyy/environments/production/modules/mymodule/manifests/resource2.pp",
26 | "line": 27
27 | },
28 | {
29 | "file": "/var/folders/dw/xxx/T/yyy/environments/production/modules/mymodule/manifests/resource2.pp",
30 | "line": 27
31 | }
32 | ]
33 | ]
34 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/enc/puppet-enterprise-enc.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | foo:
4 | foo_param: This foo_param came from the ENC
5 | baz: {}
6 | parameters:
7 | bar_variable: This bar_variable came from the ENC
8 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/encoded-facts.json:
--------------------------------------------------------------------------------
1 | {
2 | "name":"rspec-node.abc.github.net",
3 | "values":{
4 | "apt_update_last_success":1458162123,
5 | "architecture":"amd64",
6 | "datacenter":"xyz",
7 | "fqdn":"rspec-node.xyz.github.net",
8 | "_timestamp":"2014-12-02 14:56:20 -0600"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/fact-overrides-datatypes.yaml:
--------------------------------------------------------------------------------
1 | --- !ruby/object:Puppet::Node::Facts
2 | name: rspec-node.xyz.github.net
3 | values:
4 | _timestamp: '2016-03-16 16:02:13 -0500'
5 | apt_update_last_success: 1458162123
6 | architecture: amd64
7 | clientcert: rspec-node.github.net
8 | datacenter: xyz
9 | domain: xyz.github.net
10 | fqdn: rspec-node.xyz.github.net
11 | ipaddress: 10.20.30.40
12 | kernel: Linux
13 | real_boolean: false
14 | real_float: 3.14159
15 | real_integer: 42
16 | real_string: chicken
17 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/facts.foo:
--------------------------------------------------------------------------------
1 | # Exists only to test options parser unrecognized extension
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/facts.json:
--------------------------------------------------------------------------------
1 | {
2 | "apt_update_last_success":1458162123,
3 | "architecture":"amd64",
4 | "datacenter":"xyz",
5 | "fqdn":"rspec-node.xyz.github.net",
6 | "_timestamp":"2014-12-02 14:56:20 -0600"
7 | }
8 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/facts.yaml:
--------------------------------------------------------------------------------
1 | #--- !ruby/object:Puppet::Node::Facts
2 | name: rspec-node.xyz.github.net
3 | values:
4 | apt_update_last_success: 1458162123
5 | architecture: amd64
6 | datacenter: xyz
7 | fqdn: rspec-node.xyz.github.net
8 | "_timestamp": 2014-12-02 12:56:20.865795 -08:00
9 | expiration: 2014-12-02 13:11:20.521667 -08:00
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/facts_esc.json:
--------------------------------------------------------------------------------
1 | {
2 | "apt_update_last_success":1458162123,
3 | "architecture":"amd64",
4 | "datacenter":"xyz",
5 | "fqdn":"rspec-node.xyz.github.net",
6 | "math":"1+2=3",
7 | "percent":"25%20=5",
8 | "_timestamp":"2014-12-02 14:56:20 -0600"
9 | }
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/facts_esc.yaml:
--------------------------------------------------------------------------------
1 | #--- !ruby/object:Puppet::Node::Facts
2 | name: rspec-node.xyz.github.net
3 | values:
4 | apt_update_last_success: 1458162123
5 | architecture: amd64
6 | datacenter: xyz
7 | fqdn: rspec-node.xyz.github.net
8 | math: "1+2=3"
9 | percent: "25%20=5"
10 | "_timestamp": 2014-12-02 12:56:20.865795 -08:00
11 | expiration: 2014-12-02 13:11:20.521667 -08:00
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/unstructured.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | apt_update_last_success: 1458162123
3 | architecture: amd64
4 | datacenter: xyz
5 | fqdn: rspec-node.xyz.github.net
6 | "_timestamp": 2014-12-02 12:56:20.865795 -08:00
7 | ec2_metadata:
8 | ami-id: ami-deadbeef
9 | ami-launch-index: "0"
10 | ami-manifest-path: "(unknown)"
11 | block-device-mapping:
12 | ami: /dev/sda1
13 | ephemeral0: sdb
14 | ephemeral1: sdc
15 | root: /dev/sda1
16 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/valid-facts-different-ip.yaml:
--------------------------------------------------------------------------------
1 | --- !ruby/object:Puppet::Node::Facts
2 | name: rspec-node.xyz.github.net
3 | values:
4 | _timestamp: '2016-03-16 16:02:13 -0500'
5 | apt_update_last_success: 1458162123
6 | architecture: amd64
7 | clientcert: rspec-node.github.net
8 | datacenter: xyz
9 | domain: xyz.github.net
10 | fqdn: rspec-node.xyz.github.net
11 | ipaddress: 10.30.50.70
12 | kernel: Linux
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/valid-facts.yaml:
--------------------------------------------------------------------------------
1 | --- !ruby/object:Puppet::Node::Facts
2 | name: rspec-node.xyz.github.net
3 | values:
4 | _timestamp: '2016-03-16 16:02:13 -0500'
5 | apt_update_last_success: 1458162123
6 | architecture: amd64
7 | clientcert: rspec-node.github.net
8 | datacenter: xyz
9 | domain: xyz.github.net
10 | fqdn: rspec-node.xyz.github.net
11 | ipaddress: 10.20.30.40
12 | kernel: Linux
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/facts/valid-packages.yaml:
--------------------------------------------------------------------------------
1 | --- !ruby/object:Puppet::Node::Facts
2 | name: rspec-node.xyz.github.net
3 | values:
4 | _timestamp: '2016-03-16 16:02:13 -0500'
5 | apt_update_last_success: 1458162123
6 | architecture: amd64
7 | clientcert: rspec-node.github.net
8 | datacenter: xyz
9 | domain: xyz.github.net
10 | fqdn: rspec-node.xyz.github.net
11 | ipaddress: 10.20.30.40
12 | kernel: Linux
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/git-repos/simple-repo.tar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/spec/octocatalog-diff/fixtures/git-repos/simple-repo.tar
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/git-repos/simple-repo.tgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/spec/octocatalog-diff/fixtures/git-repos/simple-repo.tgz
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/override-scripts/git-extract.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # For test purposes only, this script would ordinarily run a git checkout, but here
4 | # it's going to generate a directory structure by copying some other fixture.
5 |
6 | if [ -z "$OCD_GIT_EXTRACT_BRANCH" ]; then
7 | echo "Error: Must declare OCD_GIT_EXTRACT_BRANCH"
8 | exit 255
9 | fi
10 |
11 | if [ -z "$OCD_GIT_EXTRACT_TARGET" ]; then
12 | echo "Error: Must declare OCD_GIT_EXTRACT_TARGET"
13 | exit 255
14 | fi
15 |
16 | if [ -z "$FIXTURE_DIR" ]; then
17 | echo "Error: Must declare FIXTURE_DIR"
18 | exit 255
19 | fi
20 |
21 | set -euf -o pipefail
22 | cd "${FIXTURE_DIR}/${OCD_GIT_EXTRACT_BRANCH}"
23 | tar -cf - . | ( cd "$OCD_GIT_EXTRACT_TARGET" && tar -xf - )
24 | mkdir -p "$OCD_GIT_EXTRACT_TARGET/environments"
25 | ln -s "$OCD_GIT_EXTRACT_TARGET" "$OCD_GIT_EXTRACT_TARGET/environments/production"
26 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/packages/valid-packages.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "certname": "valid-packages",
4 | "package_name": "kernel",
5 | "version": "3.2.1",
6 | "provider": "yum"
7 | },
8 | {
9 | "certname": "valid-packages",
10 | "package_name": "bash",
11 | "version": "4.0.0",
12 | "provider": "yum"
13 | }
14 | ]
15 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/arbitrary-command-line/environments/foo/environment.conf:
--------------------------------------------------------------------------------
1 | modulepath = ./modules
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/arbitrary-command-line/environments/foo/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | file { '/tmp/environment-foo-site':
3 | content => 'File created from environments/foo/manifests/site.pp',
4 | }
5 | include foo
6 | }
7 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/arbitrary-command-line/environments/foo/modules/foo/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class foo {
2 | file { '/tmp/environment-foo-module':
3 | content => 'Created by environments/foo modules/foo',
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/arbitrary-command-line/environments/production/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | file { '/tmp/environment-production-site':
3 | content => 'File created from environments/production/manifests/site.pp',
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/arbitrary-command-line/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | file { '/tmp/foo':
3 | content => 'File created from manifests/site.pp',
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/arbitrary-command-line/modules/foo/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class foo {
2 | file { '/tmp/foo-module':
3 | content => 'Created by main modules/foo',
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/bootstrap/config/bootstrap.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ls -lR > /tmp/foo.$$
3 | echo "Hello, stdout"
4 | echo "Hello, stderr" 1>&2
5 | cp -r external-modules/test modules
6 | exit 0
7 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/bootstrap/config/broken-bootstrap.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo "Fail, stdout"
4 | echo "Fail, stderr" 1>&2
5 | exit 1
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/bootstrap/external-modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test {
2 | file { '/tmp/foo':
3 | content => template('test/foo.erb'),
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/bootstrap/external-modules/test/templates/foo.erb:
--------------------------------------------------------------------------------
1 | Test 123
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/bootstrap/manifests/site.pp:
--------------------------------------------------------------------------------
1 | include test
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/bootstrap/modules/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/spec/octocatalog-diff/fixtures/repos/bootstrap/modules/.gitkeep
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/broken/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include test
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/broken/modules/test/files/foo-old:
--------------------------------------------------------------------------------
1 | content of foo-old
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/broken/modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test {
2 | file { '/tmp/foo1':
3 | tag => ['_convert_file_resources_foo1_'],
4 | source => 'puppet:///modules/test/foo-new',
5 | }
6 |
7 | file { '/tmp/foo2':
8 | tag => ['_convert_file_resources_foo2_'],
9 | source => 'puppet:///modules/test/foo-old',
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | if $::test_class {
3 | include "test::${::test_class}"
4 | } else {
5 | include test
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/files/binary-new:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/files/binary-new
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/files/binary-old:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/files/binary-old
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/files/binary-old2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/files/binary-old2
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/files/foo-new:
--------------------------------------------------------------------------------
1 | content of foo-new
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/files/foo-old:
--------------------------------------------------------------------------------
1 | content of foo-old
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/files/foo-old2:
--------------------------------------------------------------------------------
1 | content of foo-old
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/manifests/array1.pp:
--------------------------------------------------------------------------------
1 | class test::array1 {
2 | file { '/tmp/foo':
3 | source => [
4 | 'puppet:///modules/test/foo-new',
5 | 'puppet:///modules/test/foo-old',
6 | ]
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/manifests/array2.pp:
--------------------------------------------------------------------------------
1 | class test::array2 {
2 | file { '/tmp/foo':
3 | source => [
4 | 'puppet:///modules/test/foo-bar',
5 | 'puppet:///modules/test/foo-new',
6 | ]
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/manifests/array3.pp:
--------------------------------------------------------------------------------
1 | class test::array3 {
2 | file { '/tmp/foo':
3 | source => [
4 | 'puppet:///modules/test/foo-bar',
5 | 'puppet:///modules/test/foo-baz',
6 | ]
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/new/modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test {
2 | file { '/tmp/foo1':
3 | source => 'puppet:///modules/test/foo-new',
4 | }
5 |
6 | file { '/tmp/foo2':
7 | source => 'puppet:///modules/test/foo-old',
8 | }
9 |
10 | file { '/tmp/foo3':
11 | source => 'puppet:///modules/test/foo-old2',
12 | }
13 |
14 | file { '/tmp/binary1':
15 | source => 'puppet:///modules/test/binary-new',
16 | }
17 |
18 | file { '/tmp/binary2':
19 | source => 'puppet:///modules/test/binary-old',
20 | }
21 |
22 | file { '/tmp/binary3':
23 | source => 'puppet:///modules/test/binary-old2',
24 | }
25 |
26 | file { '/tmp/bar':
27 | content => "content of bar\n",
28 | }
29 |
30 | file { '/tmp/bar2':
31 | content => "content of new-bar\n",
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/old/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | if $::test_class {
3 | include "test::${::test_class}"
4 | } else {
5 | include test
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/old/modules/test/files/bar-old:
--------------------------------------------------------------------------------
1 | content of bar
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/old/modules/test/files/binary-old:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/spec/octocatalog-diff/fixtures/repos/convert-resources/old/modules/test/files/binary-old
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/old/modules/test/files/foo-old:
--------------------------------------------------------------------------------
1 | content of foo-old
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/old/modules/test/manifests/array1.pp:
--------------------------------------------------------------------------------
1 | class test::array1 {
2 | file { '/tmp/foo':
3 | source => [
4 | 'puppet:///modules/test/foo-new',
5 | 'puppet:///modules/test/foo-old',
6 | ]
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/old/modules/test/manifests/array2.pp:
--------------------------------------------------------------------------------
1 | class test::array2 {
2 | file { '/tmp/foo':
3 | source => [
4 | 'puppet:///modules/test/foo-bar',
5 | 'puppet:///modules/test/foo-old',
6 | ]
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/old/modules/test/manifests/array3.pp:
--------------------------------------------------------------------------------
1 | class test::array3 {
2 | file { '/tmp/foo':
3 | source => [
4 | 'puppet:///modules/test/foo-bar',
5 | 'puppet:///modules/test/foo-baz',
6 | ]
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/convert-resources/old/modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test {
2 | file { '/tmp/foo1':
3 | source => 'puppet:///modules/test/foo-old',
4 | }
5 |
6 | file { '/tmp/foo2':
7 | source => 'puppet:///modules/test/foo-old',
8 | }
9 |
10 | file { '/tmp/foo3':
11 | source => 'puppet:///modules/test/foo-old',
12 | }
13 |
14 | file { '/tmp/binary1':
15 | source => 'puppet:///modules/test/binary-old',
16 | }
17 |
18 | file { '/tmp/binary2':
19 | source => 'puppet:///modules/test/binary-old',
20 | }
21 |
22 | file { '/tmp/binary3':
23 | source => 'puppet:///modules/test/binary-old',
24 | }
25 |
26 | file { '/tmp/bar':
27 | source => 'puppet:///modules/test/bar-old',
28 | }
29 |
30 | file { '/tmp/bar2':
31 | source => 'puppet:///modules/test/bar-old',
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/config/enc.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # The simplest and least functional ENC you'll ever see
4 | echo '---'
5 | exit 0
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/config/hiera-backend-as-string.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends: yaml
3 | :yaml:
4 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
5 | :hierarchy:
6 | - servers/%{::fqdn}
7 | - datacenter/%{::datacenter}
8 | - platform/%{::virtual}
9 | - os/%{::operatingsystem}/%{::lsbdistcodename}
10 | - os/%{::operatingsystem}
11 | - common
12 | :merge_behavior: deeper
13 | :logger: console
14 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/config/hiera-other-backends.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - eyaml
4 | - yaml
5 | - json
6 | :yaml:
7 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
8 | :eyaml:
9 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
10 | :json:
11 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
12 | :hierarchy:
13 | - servers/%{::fqdn}
14 | - datacenter/%{::datacenter}
15 | - platform/%{::virtual}
16 | - os/%{::operatingsystem}/%{::lsbdistcodename}
17 | - os/%{::operatingsystem}
18 | - common
19 | :merge_behavior: deeper
20 | :logger: console
21 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/config/hiera.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - yaml
4 | :yaml:
5 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
6 | :hierarchy:
7 | - servers/%{::fqdn}
8 | - datacenter/%{::datacenter}
9 | - platform/%{::virtual}
10 | - os/%{::operatingsystem}/%{::lsbdistcodename}
11 | - os/%{::operatingsystem}
12 | - common
13 | :merge_behavior: deeper
14 | :logger: console
15 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/config/hiera5-simple.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | version: 5
3 | defaults:
4 | datadir: /var/lib/puppet/environments/%{::environment}/hieradata
5 | hierarchy:
6 | - name: "fqdn"
7 | path: "servers/%{::fqdn}.yaml"
8 | - name: "datacenter"
9 | path: "datacenter/%{::datacenter}.yaml"
10 | - name: "special"
11 | path: "special/%{::operatingsystem}.yaml"
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/config/hiera5-symbols-simple.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :version: 5
3 | :defaults:
4 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
5 | :hierarchy:
6 | - :name: "fqdn"
7 | :path: "servers/%{::fqdn}.yaml"
8 | - :name: "datacenter"
9 | :path: "datacenter/%{::datacenter}.yaml"
10 | - :name: "special"
11 | :path: "special/%{::operatingsystem}.yaml"
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/config/hiera5-symbols.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :version: 5
3 | :defaults:
4 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
5 | :hierarchy:
6 | - :name: "fqdn"
7 | :path: "servers/%{::fqdn}.yaml"
8 | - :name: "datacenter"
9 | :path: "datacenter/%{::datacenter}.yaml"
10 | - :name: "special"
11 | :path: "special/%{::operatingsystem}.yaml"
12 | :datadir: /var/lib/puppet/environments/%{::environment}/special
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/config/hiera5.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | version: 5
3 | defaults:
4 | datadir: /var/lib/puppet/environments/%{::environment}/hieradata
5 | hierarchy:
6 | - name: "fqdn"
7 | path: "servers/%{::fqdn}.yaml"
8 | - name: "datacenter"
9 | path: "datacenter/%{::datacenter}.yaml"
10 | - name: "special"
11 | path: "special/%{::operatingsystem}.yaml"
12 | datadir: /var/lib/puppet/environments/%{::environment}/special
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | class { 'roles::default': }
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/modules/roles/manifests/default.pp:
--------------------------------------------------------------------------------
1 | class roles::default {
2 | include system
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/modules/sshkeys_core/README.md:
--------------------------------------------------------------------------------
1 | This is enough of puppetlabs sshkeys_core to allow to sample catalogs in this
2 | repository to compile on Puppet 6. For the most recent version of sshkeys_core please go to:
3 |
4 | https://github.com/puppetlabs/puppetlabs-sshkeys_core
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/modules/stdlib/NOTICE:
--------------------------------------------------------------------------------
1 | stdlib puppet module
2 |
3 | Copyright (C) 2011-2016 Puppet Labs, Inc.
4 |
5 | and some parts:
6 |
7 | Copyright (C) 2011 Krzysztof Wilczynski
8 |
9 |
10 | Puppet Labs can be contacted at: info@puppetlabs.com
11 |
12 |
13 | Licensed under the Apache License, Version 2.0 (the "License");
14 | you may not use this file except in compliance with the License.
15 | You may obtain a copy of the License at
16 |
17 | http://www.apache.org/licenses/LICENSE-2.0
18 |
19 | Unless required by applicable law or agreed to in writing, software
20 | distributed under the License is distributed on an "AS IS" BASIS,
21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 | See the License for the specific language governing permissions and
23 | limitations under the License.
24 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/modules/stdlib/README.md:
--------------------------------------------------------------------------------
1 | This is enough of puppetlabs stdlib to allow to sample catalogs in this
2 | repository to compile. For the most recent version of stdlib please go to:
3 |
4 | https://github.com/puppetlabs/puppetlabs-stdlib
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/modules/system/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class system (
2 | $value_from_hiera_required,
3 | $value_from_hiera_optional = 'unspecified',
4 | $value_from_hiera_undef = undef,
5 | ) {
6 | include system::root_ssh_keys
7 | include system::users
8 | }
9 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/modules/system/manifests/root_ssh_key.pp:
--------------------------------------------------------------------------------
1 | define system::root_ssh_key {
2 | $key_sha1 = sha1($name)
3 | ssh_authorized_key { "root@${key_sha1}":
4 | user => 'root',
5 | type => 'ssh-rsa',
6 | key => $name,
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/modules/system/manifests/root_ssh_keys.pp:
--------------------------------------------------------------------------------
1 | class system::root_ssh_keys (
2 | $keys = hiera_array('system::root_ssh_keys::keys', []),
3 | ) {
4 | file { '/root/.ssh':
5 | ensure => directory,
6 | owner => 'root',
7 | group => 'root',
8 | mode => '0700',
9 | }
10 | system::root_ssh_key { $keys:
11 | require => File['/root/.ssh'],
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/modules/system/manifests/user.pp:
--------------------------------------------------------------------------------
1 | define system::user (
2 | $uid,
3 | $gid,
4 | $directory,
5 | $comment,
6 | $shell,
7 | $sshkey,
8 | ) {
9 | group { $name:
10 | ensure => present,
11 | gid => $gid,
12 | }
13 |
14 | user { $name:
15 | ensure => present,
16 | comment => $comment,
17 | gid => $gid,
18 | managehome => true,
19 | purge_ssh_keys => true,
20 | shell => $shell,
21 | uid => $uid,
22 | require => Group[$name],
23 | }
24 |
25 | ssh_authorized_key { "${name}@local":
26 | user => $name,
27 | type => 'ssh-rsa',
28 | key => $sshkey,
29 | require => User[$name],
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/default/modules/system/manifests/users.pp:
--------------------------------------------------------------------------------
1 | class system::users (
2 | $user_hash,
3 | ) {
4 | ensure_resources('system::user', $user_hash)
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-diff/config/enc-1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cat <<-EOF
4 | parameters: {}
5 | EOF
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-diff/config/enc-2.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cat <<-EOF
4 | parameters:
5 | top_level_param: foo
6 | EOF
7 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-diff/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include test
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-diff/modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test {
2 | if defined('$top_level_param') {
3 | file { '/tmp/bar':
4 | content => $::top_level_param,
5 | }
6 | } else {
7 | file { '/tmp/bar':
8 | ensure => absent,
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-overrides/enc.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | cat <<-EOF
4 | parameters:
5 | role: one
6 | EOF
7 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-overrides/hiera.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - yaml
4 | :yaml:
5 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
6 | :hierarchy:
7 | - roles/%{::role}
8 | - common
9 | :merge_behavior: deeper
10 | :logger: console
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-overrides/hieradata/common.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::var_one: common
3 | test::var_two: common
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-overrides/hieradata/roles/one.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::var_one: one
3 | test::var_two: one
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-overrides/hieradata/roles/two.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::var_one: two
3 | test::var_two: two
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-overrides/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include test
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/enc-overrides/modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test (
2 | $var_one,
3 | $var_two = 'default',
4 | ) {
5 | file { '/tmp/one':
6 | content => $var_one,
7 | }
8 |
9 | file { '/tmp/two':
10 | content => $var_two,
11 | }
12 |
13 | file { '/tmp/three':
14 | content => 'three',
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/environment-variables/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include test
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/environment-variables/modules/test/lib/puppet/parser/functions/env.rb:
--------------------------------------------------------------------------------
1 | module Puppet::Parser::Functions
2 | newfunction(:env, type: :rvalue) { |args| ENV[args[0]] }
3 | end
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/environment-variables/modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test {
2 | if env('FOO') {
3 | $foo = env('FOO')
4 | } else {
5 | $foo = 'undefined'
6 | }
7 |
8 | file { '/tmp/foo':
9 | content => "Foo is ${foo}",
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/fact-overrides-datatypes/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include test
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/fact-overrides-datatypes/modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test {
2 | file { '/tmp/file':
3 | content => template('test/test.erb'),
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/fact-overrides/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include test
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/fact-overrides/modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test {
2 | file { '/tmp/ipaddress':
3 | content => $::ipaddress,
4 | }
5 |
6 | if $foofoo {
7 | file { '/tmp/foofoo':
8 | content => $foofoo
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/failing-catalog/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include this::module::does::not::exist
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/config/hiera3-global.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - yaml
4 | :yaml:
5 | :datadir: /var/lib/puppet/environments/%{::environment}/data
6 | :hierarchy:
7 | - nodes/%{::fqdn}
8 | - common
9 | :merge_behavior: deeper
10 | :logger: console
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/config/hiera5-global.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | version: 5
3 | defaults:
4 | datadir: /var/lib/puppet/environments/%{::environment}/hieradata
5 | data_hash: yaml_data
6 |
7 | hierarchy:
8 | - name: "Default structure data"
9 | path: "nodes/%{::fqdn}.yaml"
10 |
11 | - name: "Special data"
12 | path: "%{::datacenter}.yaml"
13 | datadir: /var/lib/puppet/environments/%{::environment}/special
14 |
15 | - name: "Common data"
16 | path: "common.yaml"
17 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/data/common.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::param_from_node: Should not be displayed from common
3 | test::param_from_special: Should not be displayed from common
4 | test::param_from_common: Greets from data/common
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/data/nodes/rspec-node.xyz.github.net.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::param_from_nodes: Greets from data/nodes
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/data/rspec-node.xyz.github.net.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::param_from_nodes: Greets from data/nodes
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/data/xyz.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::param_from_special: This should never be displayed!
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/extra-special/xyz.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::param_from_extra_special: Greets from extra-special
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/hiera.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | version: 5
3 | defaults:
4 | datadir: data
5 | data_hash: yaml_data
6 |
7 | hierarchy:
8 | - name: "Default structure data"
9 | path: "nodes/%{::fqdn}.yaml"
10 |
11 | - name: "Special data"
12 | path: "%{::datacenter}.yaml"
13 | datadir: special
14 |
15 | - name: "Extra-special data"
16 | path: "%{::datacenter}.yaml"
17 | datadir: extra-special
18 |
19 | - name: "Common data"
20 | path: "common.yaml"
21 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/hieradata/common.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::param_from_node: Should not be displayed from common
3 | test::param_from_special: Should not be displayed from common
4 | test::param_from_common: Greets from common
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/hieradata/nodes/rspec-node.xyz.github.net.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::param_from_nodes: Greets from nodes
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/hieradata/xyz.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::param_from_special: This should never be displayed!
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include test
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test (
2 | $param_from_nodes = 'hard-coded',
3 | $param_from_special = 'hard-coded',
4 | $param_from_extra_special = 'hard-coded',
5 | $param_from_common = 'hard-coded'
6 | ) {
7 | file { '/tmp/nodes': content => $param_from_nodes }
8 | file { '/tmp/special': content => $param_from_special }
9 | file { '/tmp/extra-special': content => $param_from_extra_special }
10 | file { '/tmp/common': content => $param_from_common }
11 | }
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/hiera5/special/xyz.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | test::param_from_special: Greets from special
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/ignore-tags-new/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node 'default' {
2 | include mymodule
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/ignore-tags-new/modules/mymodule/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class mymodule {
2 |
3 | mymodule::resource1 { 'one':
4 | foo => 'FOO-NEW',
5 | bar => 'BAR-NEW',
6 | }
7 |
8 | mymodule::resource1 { 'two':
9 | foo => 'FOO-NEW',
10 | }
11 |
12 | mymodule::resource1 { 'three':
13 | bar => 'BAR-NEW',
14 | }
15 |
16 | mymodule::resource1 { 'four':
17 | }
18 |
19 | mymodule::resource2 { 'one':
20 | foo => 'FOO-NEW',
21 | bar => 'BAR-NEW',
22 | }
23 |
24 | mymodule::resource2 { 'two':
25 | foo => 'FOO-NEW',
26 | }
27 |
28 | mymodule::resource2 { 'three':
29 | bar => 'BAR-NEW',
30 | }
31 |
32 | mymodule::resource2 { 'four':
33 | }
34 |
35 | mymodule::resource2 { 'five':
36 | foo => 'FOO-NEW',
37 | bar => 'BAR-NEW',
38 | tag => ['ignored_catalog_diff'],
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/ignore-tags-new/modules/mymodule/manifests/resource1.pp:
--------------------------------------------------------------------------------
1 | define mymodule::resource1 (
2 | $foo = 'file content',
3 | $bar = undef,
4 | ) {
5 | tag 'ignored_catalog_diff__mymodule__resource1'
6 |
7 | file { "/tmp/resource1/${name}":
8 | content => $foo,
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/ignore-tags-new/modules/mymodule/manifests/resource2.pp:
--------------------------------------------------------------------------------
1 | define mymodule::resource2 (
2 | $foo = 'file content',
3 | $bar = undef,
4 | ) {
5 | file { "/tmp/resource2/${name}":
6 | content => $foo,
7 | }
8 |
9 | file { "/tmp/ignored/${name}":
10 | content => 'new repo',
11 | tag => ['ignored_catalog_diff'],
12 | }
13 |
14 | file { "/tmp/new-file/ignored/${name}":
15 | content => 'new repo',
16 | tag => ['ignored_catalog_diff'],
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/ignore-tags-old/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node 'default' {
2 | include mymodule
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/ignore-tags-old/modules/mymodule/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class mymodule {
2 |
3 | mymodule::resource1 { 'one':
4 | foo => 'FOO-OLD',
5 | bar => 'BAR-OLD',
6 | }
7 |
8 | mymodule::resource1 { 'two':
9 | foo => 'FOO-OLD',
10 | }
11 |
12 | mymodule::resource1 { 'three':
13 | bar => 'BAR-OLD',
14 | }
15 |
16 | mymodule::resource1 { 'four':
17 | }
18 |
19 | mymodule::resource2 { 'one':
20 | foo => 'FOO-OLD',
21 | bar => 'BAR-OLD',
22 | }
23 |
24 | mymodule::resource2 { 'two':
25 | foo => 'FOO-OLD',
26 | }
27 |
28 | mymodule::resource2 { 'three':
29 | bar => 'BAR-OLD',
30 | }
31 |
32 | mymodule::resource2 { 'four':
33 | }
34 |
35 | mymodule::resource2 { 'five':
36 | foo => 'FOO-OLD',
37 | bar => 'BAR-OLD',
38 | tag => ['ignored_catalog_diff'],
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/ignore-tags-old/modules/mymodule/manifests/resource1.pp:
--------------------------------------------------------------------------------
1 | define mymodule::resource1 (
2 | $foo = 'file content',
3 | $bar = undef,
4 | ) {
5 | file { "/tmp/resource1/${name}":
6 | content => $foo,
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/ignore-tags-old/modules/mymodule/manifests/resource2.pp:
--------------------------------------------------------------------------------
1 | define mymodule::resource2 (
2 | $foo = 'file content',
3 | $bar = undef,
4 | ) {
5 | file { "/tmp/resource2/${name}":
6 | content => $foo,
7 | }
8 |
9 | file { "/tmp/ignored/${name}":
10 | content => 'old repo',
11 | tag => ['ignored_catalog_diff'],
12 | }
13 |
14 | file { "/tmp/old-file/ignored/${name}":
15 | content => 'old repo',
16 | tag => ['ignored_catalog_diff'],
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/hiera.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - yaml
4 | :yaml:
5 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
6 | :hierarchy:
7 | - roles/%{::role}
8 | - common
9 | :merge_behavior: deeper
10 | :logger: console
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/hieradata/common.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | bar::parameter: default
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/hieradata/roles/bar.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | bar::parameter: bar
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include bar
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/files/different-json.bar:
--------------------------------------------------------------------------------
1 | {"value": "bar"}
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/files/different-json.default:
--------------------------------------------------------------------------------
1 | {"value": "default"}
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/files/identical-json:
--------------------------------------------------------------------------------
1 | {"value": "identical"}
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/files/not-json.bar:
--------------------------------------------------------------------------------
1 | ---
2 | title: "This is not JSON"
3 | value: "bar"
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/files/not-json.default:
--------------------------------------------------------------------------------
1 | ---
2 | title: "This is not JSON"
3 | value: "default"
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/files/similar-json.bar.json:
--------------------------------------------------------------------------------
1 | {
2 | "structure": {
3 | "value": "bar",
4 | "array": [
5 | "foo",
6 | "bar",
7 | "baz"
8 | ]
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/files/similar-json.default.json:
--------------------------------------------------------------------------------
1 | {"structure":{"value":"bar","array":["foo","bar","baz"]}}
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/templates/different-json.erb:
--------------------------------------------------------------------------------
1 | { "value": "<%= @parameter %>" }
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/templates/identical-json.erb:
--------------------------------------------------------------------------------
1 | { "value": "nachos" }
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/templates/not-json.erb:
--------------------------------------------------------------------------------
1 | ---
2 | title: "This is not JSON"
3 | value: "<%= @parameter %>"
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/json-diff/modules/bar/templates/similar-json.erb:
--------------------------------------------------------------------------------
1 | <% if @parameter == 'default' %>
2 | {
3 | "structure": {
4 | "value": "bar",
5 | "array": [
6 | "foo",
7 | "bar",
8 | "baz"
9 | ]
10 | }
11 | }
12 | <% else %>
13 | {"structure":{"value":"bar","array":["foo","bar","baz"]}}
14 | <% end %>
15 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/modulepath/environment.conf:
--------------------------------------------------------------------------------
1 | modulepath=modules:site:$basemodulepath
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/modulepath/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include modulestest
3 | include sitetest
4 | }
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/modulepath/modules/modulestest/files/foo/bar.txt:
--------------------------------------------------------------------------------
1 | # Hi
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/modulepath/modules/modulestest/files/tmp/modulestest:
--------------------------------------------------------------------------------
1 | Modules Test
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/modulepath/modules/modulestest/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class modulestest {
2 | file { '/tmp/modulestest':
3 | source => 'puppet:///modules/modulestest/tmp/modulestest',
4 | }
5 |
6 | file { '/tmp/foobaz':
7 | ensure => directory,
8 | source => 'puppet:///modules/modulestest/foo',
9 | recurse => true,
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/modulepath/site/sitetest/files/tmp/sitetest:
--------------------------------------------------------------------------------
1 | Site Test
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/modulepath/site/sitetest/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class sitetest {
2 | file { '/tmp/sitetest':
3 | source => 'puppet:///modules/sitetest/tmp/sitetest',
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/pe-enc/manifests/site.pp:
--------------------------------------------------------------------------------
1 | include bar
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/pe-enc/modules/bar/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class bar {
2 | if defined('$bar_variable') {
3 | file { '/tmp/bar':
4 | content => $::bar_variable,
5 | }
6 | } else {
7 | file { '/tmp/bar':
8 | content => 'not set',
9 | }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/pe-enc/modules/baz/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class baz (
2 | $baz_param = 'not set'
3 | ) {
4 | file { '/tmp/baz':
5 | content => $baz_param,
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/pe-enc/modules/foo/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class foo (
2 | $foo_param = 'not set',
3 | ) {
4 | file { '/tmp/foo':
5 | content => $foo_param,
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/one/environment.conf:
--------------------------------------------------------------------------------
1 | modulepath = ../../modules:../../site:./modules
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/one/hiera.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - yaml
4 | :yaml:
5 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
6 | :hierarchy:
7 | - common
8 | :merge_behavior: deeper
9 | :logger: console
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/one/hieradata/common.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | bar::param: 'Value from one/hieradata/common.yaml'
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/one/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include foo
3 | include bar
4 | }
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/one/modules/bar/files/bar-static.txt:
--------------------------------------------------------------------------------
1 | Bar one
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/one/modules/bar/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class bar (
2 | $param = '',
3 | ) {
4 | include sitetest
5 |
6 | file { '/tmp/bar':
7 | owner => 'one',
8 | content => $::environment,
9 | }
10 |
11 | file { '/tmp/bar-static.txt':
12 | source => 'puppet:///modules/bar/bar-static.txt',
13 | }
14 |
15 | file { '/tmp/bar-param.txt':
16 | content => "one ${param}",
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/two/environment.conf:
--------------------------------------------------------------------------------
1 | modulepath = ../../modules:../../site:./modules
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/two/hiera.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - yaml
4 | :yaml:
5 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
6 | :hierarchy:
7 | - common
8 | :merge_behavior: deeper
9 | :logger: console
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/two/hieradata/common.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | bar::param: 'Value from two/hieradata/common.yaml'
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/two/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include foo
3 | include bar
4 | }
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/two/modules/bar/files/bar-static.txt:
--------------------------------------------------------------------------------
1 | Bar two
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/environments/two/modules/bar/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class bar (
2 | $param = '',
3 | ) {
4 | include sitetest
5 |
6 | file { '/tmp/bar':
7 | owner => 'two',
8 | content => $::environment,
9 | }
10 |
11 | file { '/tmp/bar-static.txt':
12 | source => 'puppet:///modules/bar/bar-static.txt',
13 | }
14 |
15 | file { '/tmp/bar-param.txt':
16 | content => "two ${param}",
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include foo
3 | include bar
4 | }
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/modules/foo/files/foo-static.txt:
--------------------------------------------------------------------------------
1 | Hello there!
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/modules/foo/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class foo {
2 | file { '/tmp/foo':
3 | owner => 'foo',
4 | content => $::environment,
5 | }
6 |
7 | file { '/tmp/foo-static.txt':
8 | source => 'puppet:///modules/foo/foo-static.txt',
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/site/sitetest/files/sitetest-static.txt:
--------------------------------------------------------------------------------
1 | Site test
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/preserve-environments/site/sitetest/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class sitetest {
2 | file { '/tmp/sitetest':
3 | owner => 'sitetest',
4 | content => $::environment,
5 | }
6 |
7 | file { '/tmp/sitetest-static.txt':
8 | source => 'puppet:///site/sitetest/sitetest-static.txt',
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/hiera.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - yaml
4 | :yaml:
5 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
6 | :hierarchy:
7 | - roles/%{::reference_validation_role}
8 | - common
9 | :merge_behavior: deeper
10 | :logger: console
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/hieradata/common.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | - test
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/hieradata/roles/all.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | - test::before_callers
4 | - test::before_targets
5 | - test::notify_callers
6 | - test::notify_targets
7 | - test::require_callers
8 | - test::require_targets
9 | - test::subscribe_callers
10 | - test::subscribe_targets
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/hieradata/roles/broken-alias.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | - test::alias_callers
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/hieradata/roles/broken-before.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | - test::before_callers
4 | - test::notify_callers
5 | - test::notify_targets
6 | - test::require_callers
7 | - test::require_targets
8 | - test::subscribe_callers
9 | - test::subscribe_targets
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/hieradata/roles/broken-notify.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | - test::before_callers
4 | - test::before_targets
5 | - test::notify_callers
6 | - test::require_callers
7 | - test::require_targets
8 | - test::subscribe_callers
9 | - test::subscribe_targets
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/hieradata/roles/broken-require.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | - test::before_callers
4 | - test::before_targets
5 | - test::notify_callers
6 | - test::notify_targets
7 | - test::require_callers
8 | - test::subscribe_callers
9 | - test::subscribe_targets
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/hieradata/roles/broken-subscribe.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | - test::before_callers
4 | - test::before_targets
5 | - test::notify_callers
6 | - test::notify_targets
7 | - test::require_callers
8 | - test::require_targets
9 | - test::subscribe_callers
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/hieradata/roles/working-alias.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | - test::alias_callers
4 | - test::alias_targets
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/hieradata/roles/working-file.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | - test::file_tests
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | hiera_include('classes')
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/alias_callers.pp:
--------------------------------------------------------------------------------
1 | class test::alias_callers {
2 | exec { 'before alias caller':
3 | command => '/bin/true',
4 | before => Exec['before alias target'],
5 | }
6 |
7 | exec { 'notify alias caller':
8 | command => '/bin/true',
9 | before => Exec['notify alias target'],
10 | }
11 |
12 | exec { 'require alias caller':
13 | command => '/bin/true',
14 | before => Exec['require alias target'],
15 | }
16 |
17 | exec { 'subscribe alias caller':
18 | command => '/bin/true',
19 | before => Exec['subscribe alias target'],
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/alias_targets.pp:
--------------------------------------------------------------------------------
1 | class test::alias_targets {
2 | exec { 'the before alias target':
3 | command => '/bin/true',
4 | alias => 'before alias target',
5 | }
6 |
7 | exec { 'the notify alias target':
8 | command => '/bin/true',
9 | alias => 'notify alias target',
10 | }
11 |
12 | exec { 'the require alias target':
13 | command => '/bin/true',
14 | alias => 'require alias target',
15 | }
16 |
17 | exec { 'the subscribe alias target':
18 | command => '/bin/true',
19 | alias => 'subscribe alias target',
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/before_callers.pp:
--------------------------------------------------------------------------------
1 | class test::before_callers {
2 | exec { 'before caller':
3 | command => '/bin/true',
4 | before => Exec['before target'],
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/before_targets.pp:
--------------------------------------------------------------------------------
1 | class test::before_targets {
2 | exec { 'before target':
3 | command => '/bin/true',
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/file_tests.pp:
--------------------------------------------------------------------------------
1 | class test::file_tests {
2 | file { '/foo':
3 | ensure => directory,
4 | }
5 |
6 | file { '/bar':
7 | ensure => directory,
8 | require => File['/foo/'],
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/foo/bar.pp:
--------------------------------------------------------------------------------
1 | define test::foo::bar {
2 | exec { "test::foo::bar ${name}":
3 | command => '/bin/true',
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/init.pp:
--------------------------------------------------------------------------------
1 | class test {
2 |
3 | # Test resource
4 | file { '/tmp/test-main':
5 | content => 'it works',
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/notify_callers.pp:
--------------------------------------------------------------------------------
1 | class test::notify_callers {
2 | exec { 'notify caller':
3 | notify => Test::Foo::Bar['notify target'],
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/notify_targets.pp:
--------------------------------------------------------------------------------
1 | class test::notify_targets {
2 | test::foo::bar { 'notify target': }
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/require_callers.pp:
--------------------------------------------------------------------------------
1 | class test::require_callers {
2 | exec { 'require caller':
3 | command => '/bin/true',
4 | require => Exec['require target'],
5 | }
6 |
7 | exec { 'require caller 2':
8 | command => '/bin/true',
9 | require => Exec['require caller'],
10 | }
11 |
12 | exec { ['require caller 3', 'require caller 4']:
13 | command => '/bin/true',
14 | require => [
15 | Exec['require caller'],
16 | Exec['require target'],
17 | ]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/require_targets.pp:
--------------------------------------------------------------------------------
1 | class test::require_targets {
2 | exec { 'require target':
3 | command => '/bin/true',
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/subscribe_callers.pp:
--------------------------------------------------------------------------------
1 | class test::subscribe_callers {
2 | exec { 'subscribe caller 1':
3 | command => '/bin/true',
4 | subscribe => Exec['subscribe target'],
5 | }
6 |
7 | exec { 'subscribe caller 2':
8 | command => '/bin/true',
9 | subscribe => [
10 | Exec['subscribe target'],
11 | Exec['subscribe target 2']
12 | ]
13 | }
14 |
15 | exec { 'subscribe caller 3':
16 | command => '/bin/true',
17 | subscribe => [
18 | Exec['subscribe caller 1'],
19 | Exec['subscribe target']
20 | ]
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/reference-validation/modules/test/manifests/subscribe_targets.pp:
--------------------------------------------------------------------------------
1 | class test::subscribe_targets {
2 | exec { 'subscribe target':
3 | command => '/bin/true',
4 | }
5 |
6 | exec { 'subscribe target 2':
7 | command => '/bin/true',
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/regressions/README.md:
--------------------------------------------------------------------------------
1 | # regressions repo fixture
2 |
3 | We occasionally encounter edge cases that don't deserve their entire fixture.
4 |
5 | We'll add them here.
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/regressions/hiera.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - yaml
4 | :yaml:
5 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
6 | :hierarchy:
7 | - common
8 | :merge_behavior: deeper
9 | :logger: console
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/regressions/hieradata/common.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | classes:
3 | - file_no_parameters
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/regressions/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | hiera_include('classes')
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/regressions/modules/file_no_parameters/manifests/init.pp:
--------------------------------------------------------------------------------
1 | # https://github.com/github/octocatalog-diff/pull/122
2 |
3 | class file_no_parameters {
4 | file { '/tmp/foo': }
5 | }
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/tiny-repo/modules/test/files/tmp/foo:
--------------------------------------------------------------------------------
1 | foo
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/hiera.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | :backends:
3 | - yaml
4 | :yaml:
5 | :datadir: /var/lib/puppet/environments/%{::environment}/hieradata
6 | :hierarchy:
7 | - roles/%{::role}
8 | - common
9 | :merge_behavior: deeper
10 | :logger: console
11 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/hieradata/common.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | bar::parameter: default
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/hieradata/roles/bar.yaml:
--------------------------------------------------------------------------------
1 | ---
2 | bar::parameter: bar
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/manifests/site.pp:
--------------------------------------------------------------------------------
1 | node default {
2 | include bar
3 | }
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/files/different-yaml.bar:
--------------------------------------------------------------------------------
1 | ---
2 | value: bar
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/files/different-yaml.default:
--------------------------------------------------------------------------------
1 | ---
2 | value: default
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/files/identical-yaml:
--------------------------------------------------------------------------------
1 | ---
2 | value: identical
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/files/not-yaml.bar:
--------------------------------------------------------------------------------
1 | ---{ "title": "This is not YAML", "value": "bar" }
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/files/not-yaml.default:
--------------------------------------------------------------------------------
1 | ---{ "title": "This is not YAML", "value": "default" }
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/files/similar-yaml.bar:
--------------------------------------------------------------------------------
1 | ---
2 | structure:
3 | value: bar
4 | array:
5 | - foo
6 | - bar
7 | - baz
8 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/files/similar-yaml.default:
--------------------------------------------------------------------------------
1 | ---
2 | structure:
3 | value: bar
4 | array:
5 | - foo
6 | - bar
7 | - baz
8 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/files/unparseable-yaml.bar:
--------------------------------------------------------------------------------
1 | --- !ruby/object:This::Does::Not::Exist
2 | name: foo
3 | value: bar
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/files/unparseable-yaml.default:
--------------------------------------------------------------------------------
1 | --- !ruby/object:This::Does::Not::Exist
2 | name: foo
3 | value: default
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/templates/different-yaml.erb:
--------------------------------------------------------------------------------
1 | ---
2 | value: <%= @parameter %>
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/templates/identical-yaml.erb:
--------------------------------------------------------------------------------
1 | ---
2 | value: nachos
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/templates/not-yaml.erb:
--------------------------------------------------------------------------------
1 | ---{ "title": "This is not YAML", "value": "<%= @parameter %>" }
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/templates/similar-yaml.erb:
--------------------------------------------------------------------------------
1 | ---
2 | <% if @parameter == 'default' %>
3 | structure:
4 | value: bar
5 | array:
6 | - foo
7 | - bar
8 | - baz
9 | <% else %>
10 | structure:
11 | value: bar
12 | array:
13 | - foo
14 | - bar
15 | - baz
16 | <% end %>
17 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/templates/unparseable-yaml-2.erb:
--------------------------------------------------------------------------------
1 | --- !ruby/object:This::Does::Not::Exist
2 | name: foo
3 | value: baz
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/repos/yaml-diff/modules/bar/templates/unparseable-yaml.erb:
--------------------------------------------------------------------------------
1 | --- !ruby/object:This::Does::Not::Exist
2 | name: foo
3 | value: <%= @parameter %>
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/scripts/enc/fails-stderr-only.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo 'This is to stderr' 1>&2
4 | exit 1
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/scripts/enc/fails-stdout-only.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo 'This is to stdout'
4 | exit 1
5 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/scripts/enc/fails-stdout-stderr.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo 'This is to stdout'
4 | echo 'This is to stderr' 1>&2
5 | exit 1
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/scripts/enc/succeeds-cleanly.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo 'This is to stdout'
4 | echo "FOO is ${FOO}"
5 | exit 0
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/scripts/enc/succeeds-stderr.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | echo 'This is to stdout'
4 | echo 'This is to stderr' 1>&2
5 | exit 0
6 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/ssl/generated/README.md:
--------------------------------------------------------------------------------
1 | SSL stuff in this directory taken from: https://github.com/jnunemaker/httparty
2 | Used to test the SSL PuppetDB stuff.
3 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/ssl/generated/bogushost.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICBTCCAW6gAwIBAgIBATANBgkqhkiG9w0BAQUFADAuMSwwKgYDVQQDEyNJTlNF
3 | Q1VSRSBUZXN0IENlcnRpZmljYXRlIEF1dGhvcml0eTAgFw0xMDEwMjAxMzQ2MjNa
4 | GA80NzQ4MDkxNTEzNDYyM1owDzENMAsGA1UEAxMEYm9nbzCBnzANBgkqhkiG9w0B
5 | AQEFAAOBjQAwgYkCgYEAr6b0ZBrRrVvPmPbQv36Jnj5jv00ZkhimXrmbv9Z1AdIZ
6 | WSsBpMd8TP7exE5OR5/DaxKmiZqVskgRyRkLm52/Dkt7Ncrzr5I3unHnMqsAv/28
7 | 5fGlYoRxnkCGMse/6NOFgCemRFw/bglxPNAGrFYKStameBRbCm0dCgtlvcwzdf8C
8 | AwEAAaNQME4wDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQUddLPFtGmb0aFWbTl2kAo
9 | xD+fd6kwHwYDVR0jBBgwFoAUy0Lz6RgmtpywlBOXdPABQArp358wDQYJKoZIhvcN
10 | AQEFBQADgYEAosqpPVsFu6cOIhGFT85Y1wwRUaihO0vWO7ghBU5ScuRU3tuvyJDZ
11 | Z/HoAMXV6XZjVZzRosjtPjFbyWkZYjUqJJRMyEaRiGArWe6urKLzwnD6R9O3eNa5
12 | 7bgFhzZ5WBldJmtq4A3oNqBuvgZkYM6NVKvS4UoakkTliHB21/mDOSY=
13 | -----END CERTIFICATE-----
14 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/ssl/generated/client-other-ca.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIB+DCCAWECAQEwDQYJKoZIhvcNAQEFBQAwLjEsMCoGA1UEAxMjSU5TRUNVUkUg
3 | VGVzdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwIBcNMTYwODI1MDYxMjI0WhgPNDc1
4 | NDA3MjIwNjEyMjRaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRl
5 | MSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxv
6 | Y2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0FTdrfyYZVqIEDPI
7 | 2jKpKPqZKxmHhNzkoyDrD+3tsF+fbDATY2Nij3VpfFHGefV0IPODN4nSdKaMgdDr
8 | 3iILL4QGAEYt7j1yV3yZcMkVZ+H43JrLxYql9KoaTOIGOCOt7t6aDqzoKX6hykef
9 | Jhalq29J/FWQSG3kJszl2re0qnMCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAeYGxK
10 | bm5lrHqU8K/5eVDwKGY0F/60qZaU8SXoK2zDTGKAb3j7KGxA3WgUCPsMBj9V7JXb
11 | RQXf5g/ba/pHhKf6Gxlnu4YqjdRpVBUXgmuQdnx0zLjLJgdl8H/pafX3fQSjxjhR
12 | jZAhaMf7zg7r00vQxOhN4Vc/VOqd2pp5KqhvDw==
13 | -----END CERTIFICATE-----
14 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/ssl/generated/client-password.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIB+DCCAWECAQEwDQYJKoZIhvcNAQEFBQAwLjEsMCoGA1UEAxMjSU5TRUNVUkUg
3 | VGVzdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwIBcNMTYwODI1MDYxMTA0WhgPNDc1
4 | NDA3MjIwNjExMDRaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRl
5 | MSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxv
6 | Y2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEArNRGg6d0z0GERd/S
7 | IOBaB8i0atBpa8LmYObpt7gPXBU//vlCUL22KWnW1+4Ox5BWTJeS7lSz4QesZujS
8 | YHa1ma52saYxMZcFxbvQeflhT5ym1Po2laSl33E/UpNAYwfDr9bWVrDT4xspjD96
9 | Vrzz2rtA+QfSwyijOliTGAIivgsCAwEAATANBgkqhkiG9w0BAQUFAAOBgQADH6ej
10 | +nomBgU/65ugYmI6NxzWv1kfTYgMPcy8NZmFQjl3+9nZZ8rHFDVKjX9WyrkXqU19
11 | v8EgFfj+JFJLuahR0aYg672/y6jLVg6rnIcV+KWqG9C5U7ZkhEVD2/OCQ4gCDURt
12 | N+qEpubxycpdig+2oQm7/mnPbJ7T1vNhhU7SFg==
13 | -----END CERTIFICATE-----
14 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/ssl/generated/client.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIB+DCCAWECAQEwDQYJKoZIhvcNAQEFBQAwLjEsMCoGA1UEAxMjSU5TRUNVUkUg
3 | VGVzdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwIBcNMTYwODI1MDYwODAxWhgPNDc1
4 | NDA3MjIwNjA4MDFaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRl
5 | MSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMTCWxv
6 | Y2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0FTdrfyYZVqIEDPI
7 | 2jKpKPqZKxmHhNzkoyDrD+3tsF+fbDATY2Nij3VpfFHGefV0IPODN4nSdKaMgdDr
8 | 3iILL4QGAEYt7j1yV3yZcMkVZ+H43JrLxYql9KoaTOIGOCOt7t6aDqzoKX6hykef
9 | Jhalq29J/FWQSG3kJszl2re0qnMCAwEAATANBgkqhkiG9w0BAQUFAAOBgQAJOpir
10 | foNIesOyX4GdBajmESGOU/VjGBsgXOzkc5QeBtD7dRWL0NZ3+tBl2TfMWvHfn59M
11 | NIe87ND6TujA5ZjC4o5uIeO7209ABzdYjWHYgf6LCCZbuX+ZFh8UPioXYBlXzTyZ
12 | As328/U0T2ZXXZOR3OH+l2avPFD6b/MiGKk+Hg==
13 | -----END CERTIFICATE-----
14 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/ssl/generated/client.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/spec/octocatalog-diff/fixtures/ssl/generated/client.p12
--------------------------------------------------------------------------------
/spec/octocatalog-diff/fixtures/ssl/generated/server.crt:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIICCjCCAXOgAwIBAgIBATANBgkqhkiG9w0BAQUFADAuMSwwKgYDVQQDEyNJTlNF
3 | Q1VSRSBUZXN0IENlcnRpZmljYXRlIEF1dGhvcml0eTAgFw0xMDEwMjAxMzQ2MjNa
4 | GA80NzQ4MDkxNTEzNDYyM1owFDESMBAGA1UEAxMJbG9jYWxob3N0MIGfMA0GCSqG
5 | SIb3DQEBAQUAA4GNADCBiQKBgQCvpvRkGtGtW8+Y9tC/fomePmO/TRmSGKZeuZu/
6 | 1nUB0hlZKwGkx3xM/t7ETk5Hn8NrEqaJmpWySBHJGQubnb8OS3s1yvOvkje6cecy
7 | qwC//bzl8aVihHGeQIYyx7/o04WAJ6ZEXD9uCXE80AasVgpK1qZ4FFsKbR0KC2W9
8 | zDN1/wIDAQABo1AwTjAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBR10s8W0aZvRoVZ
9 | tOXaQCjEP593qTAfBgNVHSMEGDAWgBTLQvPpGCa2nLCUE5d08AFACunfnzANBgkq
10 | hkiG9w0BAQUFAAOBgQCR4Oor0YAvK0tNFrOLtqmC6D0F5IYCyu7komk7JGn9L4nn
11 | 7VyVxd4MXdc1r1v+WP5JtnA9ZjMmEmH9gl4gwR/Cu+TMkArsq0Z8mREOLNL8pwpx
12 | Zxgk0CwacYR9RQcpuJ9nSDzVoO5ecYkb5C9q7gwgqbmCzr7oz/rwTqRwiUZCVQ==
13 | -----END CERTIFICATE-----
14 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/links/README.md:
--------------------------------------------------------------------------------
1 | # Placeholder directory
2 |
3 | Symlinks get created here during testing.
4 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/support/httparty/README.md:
--------------------------------------------------------------------------------
1 | From https://github.com/jnunemaker/httparty
2 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/catalog-util/enc/noop_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../../spec_helper'
4 | require OctocatalogDiff::Spec.require_path('/catalog-util/enc/noop')
5 |
6 | describe OctocatalogDiff::CatalogUtil::ENC::Noop do
7 | describe '#content' do
8 | it 'should return expected value from noop backend' do
9 | testobj = OctocatalogDiff::CatalogUtil::ENC::Noop.new(foo: 'bar')
10 | expect(testobj.content).to eq('')
11 | end
12 | end
13 |
14 | describe '#error_message' do
15 | it 'should return expected value from noop backend' do
16 | testobj = OctocatalogDiff::CatalogUtil::ENC::Noop.new(foo: 'bar')
17 | expect(testobj.error_message).to eq(nil)
18 | end
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/catalog/noop_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../spec_helper'
4 | require OctocatalogDiff::Spec.require_path('/catalog')
5 |
6 | describe OctocatalogDiff::Catalog::Noop do
7 | it 'should produce a valid but empty catalog' do
8 | testobj = OctocatalogDiff::Catalog.create(backend: :noop)
9 | expect(testobj.catalog).to eq('resources' => [])
10 | expect(testobj.catalog_json).to eq('{"resources":[]}')
11 | expect(testobj.error_message).to eq(nil)
12 | expect(testobj.resources).to eq([])
13 | expect(testobj.valid?).to eq(true)
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/bootstrap_current_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_bootstrap_current' do
7 | it 'should handle --bootstrap-current' do
8 | result = run_optparse(['--bootstrap-current'])
9 | expect(result[:bootstrap_current]).to eq(true)
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/bootstrap_script_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_bootstrap_script' do
7 | it 'should set options[:bootstrap_script]' do
8 | result = run_optparse(['--bootstrap-script', 'my-bootstrap-script'])
9 | expect(result.fetch(:bootstrap_script, 'key-not-defined')).to eq('my-bootstrap-script')
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/bootstrap_then_exit_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_bootstrap_then_exit' do
7 | it 'should handle --bootstrap-then-exit' do
8 | result = run_optparse(['--bootstrap-then-exit'])
9 | expect(result[:bootstrap_then_exit]).to eq(true)
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/catalog_only_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_catalog_only' do
7 | include_examples 'true/false option', 'catalog-only', :catalog_only
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/color_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_color' do
7 | it 'should set colors off for output to file' do
8 | target = File.absolute_path(__FILE__)
9 | result = run_optparse(['--output-file', target])
10 | expect(result[:colors]).to eq(false)
11 | end
12 |
13 | include_examples 'true/false option', 'color', :colors
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/command_line_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_command_line' do
7 | include_examples 'global array option', 'command-line', :command_line
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/create_symlinks_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_create_symlinks' do
7 | include_examples 'global array option', 'create-symlinks', :create_symlinks
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/debug_bootstrap_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_debug_bootstrap' do
7 | it 'should handle --debug-bootstrap' do
8 | result = run_optparse(['--debug-bootstrap'])
9 | expect(result[:debug_bootstrap]).to eq(true)
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/debug_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_debug' do
7 | include_examples 'true/false option', 'debug', :debug
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/display_datatype_changes_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_display_datatype_changes' do
7 | include_examples 'true/false option', 'display-datatype-changes', :display_datatype_changes
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/display_detail_add_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_display_detail_add' do
7 | include_examples 'true/false option', 'display-detail-add', :display_detail_add
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/display_source_file_line_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_display_source_file_line' do
7 | include_examples 'true/false option', 'display-source', :display_source_file_line
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/enc_override_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_enc_override' do
7 | include_examples 'global array option', 'enc-override', :enc_override_in
8 |
9 | it 'should accept multiple ENC parameters of the same type' do
10 | args = ['--to-enc-override', 'foo=bar', '--to-enc-override', 'baz=buzz']
11 | result = run_optparse(args)
12 | expect(result[:to_enc_override_in]).to eq(['foo=bar', 'baz=buzz'])
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/environment_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_environment' do
7 | include_examples 'global string option', 'environment', :environment
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/fact_override_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_fact_override' do
7 | include_examples 'global array option', 'fact-override', :fact_override_in
8 |
9 | it 'should accept multiple facts of the same type' do
10 | args = ['--to-fact-override', 'foo=bar', '--to-fact-override', 'baz=buzz']
11 | result = run_optparse(args)
12 | expect(result[:to_fact_override_in]).to eq(['foo=bar', 'baz=buzz'])
13 | end
14 | end
15 | end
16 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/facts_terminus_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_facts_terminus' do
7 | valid = %w(yaml facter)
8 | valid.each do |fmt|
9 | it "should set facts terminus to #{fmt}" do
10 | result = run_optparse(['--facts-terminus', fmt])
11 | expect(result[:facts_terminus]).to eq(fmt)
12 | end
13 | end
14 |
15 | it 'should error when unrecognized option is supplied' do
16 | expect { run_optparse(['--facts-terminus', 'aldkfalkdf']) }.to raise_error(ArgumentError)
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/from_puppetdb_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_from_puppetdb' do
7 | include_examples 'true/false option', 'from-puppetdb', :from_puppetdb
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/hostname_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_hostname' do
7 | it 'should set options[:node] when hostname is set with short form' do
8 | result = run_optparse(['-n', 'octonode.rspec'])
9 | expect(result.fetch(:node, 'key-not-defined')).to eq('octonode.rspec')
10 | end
11 |
12 | it 'should set multiple nodes when passed a series of nodes' do
13 | result = run_optparse(['-n', 'octonode1.rspec,octonode2.rspec'])
14 | expect(result.fetch(:node, 'key-not-defined')).to eq(%w[octonode1.rspec octonode2.rspec])
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/include_tags_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_include_tags' do
7 | include_examples 'true/false option', 'include-tags', :include_tags
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/master_cache_branch_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppet_master_cache_branch' do
7 | it 'should handle --puppet-master-api-version with a string arg' do
8 | result = run_optparse(['--master-cache-branch', 'foobar'])
9 | expect(result[:master_cache_branch]).to eq('foobar')
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/output_file_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_output_file' do
7 | it 'should set absolute path for output to file' do
8 | target = File.absolute_path(__FILE__)
9 | result = run_optparse(['--output-file', target])
10 | expect(result[:output_file]).to eq(target)
11 | end
12 |
13 | it 'should convert relative path to absolute path' do
14 | # This changes to the 'catalog-diff' directory, in which a 'cli'
15 | # directory exists. This file is in that 'cli' directory.
16 | Dir.chdir(File.expand_path('../..', File.dirname(__FILE__)))
17 | target = File.absolute_path(__FILE__)
18 | result = run_optparse(['--output-file', './cli/options/output_file_spec.rb'])
19 | expect(result[:output_file]).to eq(target)
20 | end
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/output_format_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_output_format' do
7 | valid = %w(text json legacy_json)
8 | valid.each do |fmt|
9 | it "should set output format to #{fmt}" do
10 | result = run_optparse(['--output-format', fmt])
11 | expect(result[:format]).to eq(fmt.to_sym)
12 | end
13 | end
14 |
15 | it 'should error when unrecognized option is supplied' do
16 | expect { run_optparse(['--output-format', 'aldkfalkdf']) }.to raise_error(ArgumentError)
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/parallel_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_parallel' do
7 | include_examples 'true/false option', 'parallel', :parallel
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/pass_env_vars_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_pass_env_vars' do
7 | it 'should add one pass environment variable' do
8 | result = run_optparse(['--pass-env-vars', 'FOO'])
9 | expect(result[:pass_env_vars]).to eq(%w(FOO))
10 | end
11 |
12 | it 'should add multiple pass environment variables' do
13 | result = run_optparse(['--pass-env-vars', 'FOO,BAR'])
14 | expect(result[:pass_env_vars]).to eq(%w(FOO BAR))
15 | end
16 |
17 | it 'should add multiple pass environment variable with multiple flags' do
18 | result = run_optparse(['--pass-env-vars', 'FOO', '--pass-env-vars', 'BAR'])
19 | expect(result[:pass_env_vars]).to eq(%w(FOO BAR))
20 | end
21 | end
22 | end
23 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/pe_enc_ssl_ca_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_pe_enc_ssl_ca' do
7 | it 'should handle --pe-enc-ssl-ca with a valid file' do
8 | result = run_optparse(['--pe-enc-ssl-ca', OctocatalogDiff::Spec.fixture_path('ssl/generated/ca.crt')])
9 | expect(result[:pe_enc_ssl_ca]).to eq(OctocatalogDiff::Spec.fixture_path('ssl/generated/ca.crt'))
10 | end
11 |
12 | it 'should error when ssl ca file is not found' do
13 | expect do
14 | run_optparse(['--pe-enc-ssl-ca', OctocatalogDiff::Spec.fixture_path('ssl/generated/caasdfadfs.crt')])
15 | end.to raise_error(Errno::ENOENT)
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/pe_enc_ssl_client_cert_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_pe_enc_ssl_client_cert' do
7 | it 'should handle --pe-enc-ssl-client-cert with a valid file' do
8 | result = run_optparse(['--pe-enc-ssl-client-cert', OctocatalogDiff::Spec.fixture_path('ssl/generated/client.crt')])
9 | expect(result[:pe_enc_ssl_client_cert]).to eq(File.read(OctocatalogDiff::Spec.fixture_path('ssl/generated/client.crt')))
10 | end
11 |
12 | it 'should error when client cert file is not found' do
13 | expect do
14 | run_optparse(['--pe-enc-ssl-client-cert', OctocatalogDiff::Spec.fixture_path('ssl/generated/caasdfadfs.crt')])
15 | end.to raise_error(Errno::ENOENT)
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/pe_enc_ssl_client_key_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_pe_enc_ssl_client_key' do
7 | it 'should handle --pe-enc-ssl-client-key with a valid file' do
8 | result = run_optparse(['--pe-enc-ssl-client-key', OctocatalogDiff::Spec.fixture_path('ssl/generated/client.key')])
9 | expect(result[:pe_enc_ssl_client_key]).to eq(File.read(OctocatalogDiff::Spec.fixture_path('ssl/generated/client.key')))
10 | end
11 |
12 | it 'should error when client key file is not found' do
13 | expect do
14 | run_optparse(['--pe-enc-ssl-client-key', OctocatalogDiff::Spec.fixture_path('ssl/generated/caasdfadfs.key')])
15 | end.to raise_error(Errno::ENOENT)
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/pe_enc_token_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_pe_enc_token' do
7 | it 'should handle --pe-enc-token with a string arg' do
8 | result = run_optparse(['--pe-enc-token', 'foobar'])
9 | expect(result[:pe_enc_token]).to eq('foobar')
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/pe_enc_url_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_pe_enc_url' do
7 | it 'should handle --pe-enc-url with HTTPS URL' do
8 | result = run_optparse(['--pe-enc-url', 'https://pe-enc.your-domain-here.com:4433/classifier-api'])
9 | expect(result[:pe_enc_url]).to eq('https://pe-enc.your-domain-here.com:4433/classifier-api')
10 | end
11 |
12 | it 'should error when --pe-enc-url is not HTTPS' do
13 | expect do
14 | run_optparse(['--pe-enc-url', 'http://pe-enc.your-domain-here.com:4433/classifier-api'])
15 | end.to raise_error(ArgumentError, 'PE ENC URL must be https')
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/preserve_environments_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_preserve_environments' do
7 | include_examples 'true/false option', 'preserve-environments', :preserve_environments
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppet_binary_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppet_binary' do
7 | include_examples 'global string option', 'puppet-binary', :puppet_binary
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppet_master_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppet_master' do
7 | include_examples 'global string option', 'puppet-master', :puppet_master
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppet_master_token_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppet_master_token' do
7 | include_examples 'global string option',
8 | 'puppet-master-token',
9 | :puppet_master_token
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppet_master_update_catalog_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppet_master_update_catalog' do
7 | include_examples 'global true/false option', 'puppet-master-update-catalog', :puppet_master_update_catalog
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppet_master_update_facts_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppet_master_update_facts' do
7 | include_examples 'global true/false option', 'puppet-master-update-facts', :puppet_master_update_facts
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppetdb_api_version_spec.rb:
--------------------------------------------------------------------------------
1 | require_relative '../options_helper'
2 |
3 | describe OctocatalogDiff::Cli::Options do
4 | describe '#opt_puppetdb_api_version' do
5 | it 'should handle --puppetdb-api-version with API version 3' do
6 | result = run_optparse(['--puppetdb-api-version', '3'])
7 | expect(result[:puppetdb_api_version]).to eq(3)
8 | end
9 |
10 | it 'should handle --puppetdb-api-version with API version 4' do
11 | result = run_optparse(['--puppetdb-api-version', '4'])
12 | expect(result[:puppetdb_api_version]).to eq(4)
13 | end
14 |
15 | it 'should fail if --puppetdb-api-version is unsupported' do
16 | expect { run_optparse(['--puppetdb-api-version', '9000']) }.to raise_error(ArgumentError)
17 | end
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppetdb_ssl_ca_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppetdb_ssl_ca' do
7 | it 'should handle --puppetdb-ssl-ca with a valid file' do
8 | result = run_optparse(['--puppetdb-ssl-ca', OctocatalogDiff::Spec.fixture_path('ssl/generated/ca.crt')])
9 | expect(result[:puppetdb_ssl_ca]).to eq(OctocatalogDiff::Spec.fixture_path('ssl/generated/ca.crt'))
10 | end
11 |
12 | it 'should error when ssl ca file is not found' do
13 | expect do
14 | run_optparse(['--puppetdb-ssl-ca', OctocatalogDiff::Spec.fixture_path('ssl/generated/caasdfadfs.crt')])
15 | end.to raise_error(Errno::ENOENT)
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppetdb_ssl_client_cert_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppetdb_ssl_client_cert' do
7 | it 'should handle --puppetdb-ssl-client-cert with a valid file' do
8 | result = run_optparse(['--puppetdb-ssl-client-cert', OctocatalogDiff::Spec.fixture_path('ssl/generated/client.crt')])
9 | expect(result[:puppetdb_ssl_client_cert]).to eq(File.read(OctocatalogDiff::Spec.fixture_path('ssl/generated/client.crt')))
10 | end
11 |
12 | it 'should error when client cert file is not found' do
13 | expect do
14 | run_optparse(['--puppetdb-ssl-client-cert', OctocatalogDiff::Spec.fixture_path('ssl/generated/caasdfadfs.crt')])
15 | end.to raise_error(Errno::ENOENT)
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppetdb_ssl_client_key_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppetdb_ssl_client_key' do
7 | it 'should handle --puppetdb-ssl-client-key with a valid file' do
8 | result = run_optparse(['--puppetdb-ssl-client-key', OctocatalogDiff::Spec.fixture_path('ssl/generated/client.key')])
9 | expect(result[:puppetdb_ssl_client_key]).to eq(File.read(OctocatalogDiff::Spec.fixture_path('ssl/generated/client.key')))
10 | end
11 |
12 | it 'should error when client key file is not found' do
13 | expect do
14 | run_optparse(['--puppetdb-ssl-client-key', OctocatalogDiff::Spec.fixture_path('ssl/generated/caasdfadfs.key')])
15 | end.to raise_error(Errno::ENOENT)
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppetdb_ssl_client_password_file_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppetdb_ssl_client_password_file' do
7 | it 'should handle --puppetdb-ssl-client-password-file with a valid file' do
8 | result = run_optparse(['--puppetdb-ssl-client-password-file', OctocatalogDiff::Spec.fixture_path('facts/facts.yaml')])
9 | expect(result[:puppetdb_ssl_client_password]).to eq(File.read(OctocatalogDiff::Spec.fixture_path('facts/facts.yaml')))
10 | end
11 |
12 | it 'should error when client password file is not found' do
13 | expect do
14 | run_optparse(['--puppetdb-ssl-client-password-file', OctocatalogDiff::Spec.fixture_path('caasdfadfs')])
15 | end.to raise_error(Errno::ENOENT)
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppetdb_ssl_client_password_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppetdb_ssl_client_password' do
7 | it 'should handle --puppetdb-ssl-client-password with valid text' do
8 | result = run_optparse(['--puppetdb-ssl-client-password', 'secret'])
9 | expect(result[:puppetdb_ssl_client_password]).to eq('secret')
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppetdb_ssl_crl_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppetdb_ssl_crl' do
7 | it 'should handle --puppetdb-ssl-crl with a valid file' do
8 | result = run_optparse(['--puppetdb-ssl-crl', OctocatalogDiff::Spec.fixture_path('ssl/generated/crl.pem')])
9 | expect(result[:puppetdb_ssl_crl]).to eq(OctocatalogDiff::Spec.fixture_path('ssl/generated/crl.pem'))
10 | end
11 |
12 | it 'should error when ssl crl file is not found' do
13 | expect do
14 | run_optparse(['--puppetdb-ssl-crl', OctocatalogDiff::Spec.fixture_path('ssl/generated/caasdfadfs.crt')])
15 | end.to raise_error(Errno::ENOENT)
16 | end
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/puppetdb_token_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_puppetdb_token' do
7 | it 'should handle --puppetdb-token with a string arg' do
8 | result = run_optparse(['--puppetdb-token', 'foobar'])
9 | expect(result[:puppetdb_token]).to eq('foobar')
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/quiet_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_quiet' do
7 | include_examples 'true/false option', 'quiet', :quiet
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/retry_failed_catalog_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_retry_failed_catalog' do
7 | it 'should handle --retry-failed-catalog with integer' do
8 | result = run_optparse(['--retry-failed-catalog', '42'])
9 | expect(result[:retry_failed_catalog]).to eq(42)
10 | end
11 |
12 | it 'should error if --retry-failed-catalog is passed a non-integer' do
13 | expect { run_optparse(['--retry-failed-catalog', 'chicken']) }.to raise_error(OptionParser::InvalidArgument)
14 | end
15 |
16 | it 'should error if --retry-failed-catalog is not passed an argument' do
17 | expect { run_optparse(['--retry-failed-catalog']) }.to raise_error(OptionParser::MissingArgument)
18 | end
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/safe_to_delete_cached_master_dir_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_safe_to_delete_cached_master_dir' do
7 | it 'should be set to a directory path' do
8 | path = File.join(File.dirname(__FILE__), 'cached-master')
9 | result = run_optparse(['--safe-to-delete-cached-master-dir', path])
10 | expect(result[:safe_to_delete_cached_master_dir]).to eq(path)
11 | end
12 |
13 | it 'should be set to an absolute directory path' do
14 | path = File.join(File.dirname(__FILE__), '../../cli/options/cached-master')
15 | answer = File.join(File.dirname(__FILE__), 'cached-master')
16 | result = run_optparse(['--safe-to-delete-cached-master-dir', path])
17 | expect(result[:safe_to_delete_cached_master_dir]).to eq(answer)
18 | end
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/storeconfigs_backend_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_storeconfigs_backend' do
7 | it 'should accept all valid arguments' do
8 | result = run_optparse(['--storeconfigs-backend', 'puppetdb'])
9 | expect(result[:storeconfigs_backend]).to eq('puppetdb')
10 | end
11 | end
12 | end
13 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/storeconfigs_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_storeconfigs' do
7 | include_examples 'true/false option', 'storeconfigs', :storeconfigs
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/suppress_absent_file_details_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_suppress_absent_file_details' do
7 | include_examples 'true/false option', 'suppress-absent-file-details', :suppress_absent_file_details
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/to_from_branch_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_to_from_branch' do
7 | it 'should set options[:from_env]' do
8 | result = run_optparse(['-f', 'origin/rspec-from-branch'])
9 | expect(result.fetch(:from_env, 'key-not-defined')).to eq('origin/rspec-from-branch')
10 | end
11 |
12 | it 'should set options[:to_env]' do
13 | result = run_optparse(['-t', 'origin/rspec-to-branch'])
14 | expect(result.fetch(:to_env, 'key-not-defined')).to eq('origin/rspec-to-branch')
15 | end
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/truncate_details_spec.rb:
--------------------------------------------------------------------------------
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
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/cli/options/use_lcs_spec.rb:
--------------------------------------------------------------------------------
1 | # frozen_string_literal: true
2 |
3 | require_relative '../options_helper'
4 |
5 | describe OctocatalogDiff::Cli::Options do
6 | describe '#opt_use_lcs' do
7 | include_examples 'true/false option', 'use-lcs', :use_lcs
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/spec/octocatalog-diff/tests/external/pson/LICENSE:
--------------------------------------------------------------------------------
1 | Puppet - Automating Configuration Management.
2 |
3 | Copyright (C) 2005-2016 Puppet, Inc.
4 |
5 | Puppet, Inc. can be contacted at: info@puppet.com
6 |
7 | Licensed under the Apache License, Version 2.0 (the "License");
8 | you may not use this file except in compliance with the License.
9 | You may obtain a copy of the License at
10 |
11 | https://www.apache.org/licenses/LICENSE-2.0
12 |
13 | Unless required by applicable law or agreed to in writing, software
14 | distributed under the License is distributed on an "AS IS" BASIS,
15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | See the License for the specific language governing permissions and
17 | limitations under the License.
18 |
--------------------------------------------------------------------------------
/vendor/cache/CFPropertyList-2.2.8.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/CFPropertyList-2.2.8.gem
--------------------------------------------------------------------------------
/vendor/cache/ast-2.4.2.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/ast-2.4.2.gem
--------------------------------------------------------------------------------
/vendor/cache/concurrent-ruby-1.1.7.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/concurrent-ruby-1.1.7.gem
--------------------------------------------------------------------------------
/vendor/cache/deep_merge-1.2.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/deep_merge-1.2.1.gem
--------------------------------------------------------------------------------
/vendor/cache/diff-lcs-1.5.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/diff-lcs-1.5.1.gem
--------------------------------------------------------------------------------
/vendor/cache/diffy-3.4.2.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/diffy-3.4.2.gem
--------------------------------------------------------------------------------
/vendor/cache/docile-1.1.5.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/docile-1.1.5.gem
--------------------------------------------------------------------------------
/vendor/cache/facter-2.5.7.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/facter-2.5.7.gem
--------------------------------------------------------------------------------
/vendor/cache/fast_gettext-1.1.2.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/fast_gettext-1.1.2.gem
--------------------------------------------------------------------------------
/vendor/cache/gettext-3.2.6.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/gettext-3.2.6.gem
--------------------------------------------------------------------------------
/vendor/cache/gettext-setup-0.30.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/gettext-setup-0.30.gem
--------------------------------------------------------------------------------
/vendor/cache/hashdiff-1.1.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/hashdiff-1.1.1.gem
--------------------------------------------------------------------------------
/vendor/cache/hiera-3.12.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/hiera-3.12.0.gem
--------------------------------------------------------------------------------
/vendor/cache/hocon-1.3.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/hocon-1.3.1.gem
--------------------------------------------------------------------------------
/vendor/cache/httparty-0.21.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/httparty-0.21.0.gem
--------------------------------------------------------------------------------
/vendor/cache/httpclient-2.8.3.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/httpclient-2.8.3.gem
--------------------------------------------------------------------------------
/vendor/cache/json-2.7.2.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/json-2.7.2.gem
--------------------------------------------------------------------------------
/vendor/cache/json_pure-1.8.6.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/json_pure-1.8.6.gem
--------------------------------------------------------------------------------
/vendor/cache/json_pure-2.0.2.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/json_pure-2.0.2.gem
--------------------------------------------------------------------------------
/vendor/cache/locale-2.1.4.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/locale-2.1.4.gem
--------------------------------------------------------------------------------
/vendor/cache/mime-types-3.5.2.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/mime-types-3.5.2.gem
--------------------------------------------------------------------------------
/vendor/cache/mime-types-data-3.2023.1205.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/mime-types-data-3.2023.1205.gem
--------------------------------------------------------------------------------
/vendor/cache/mini_mime-1.1.5.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/mini_mime-1.1.5.gem
--------------------------------------------------------------------------------
/vendor/cache/multi_json-1.15.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/multi_json-1.15.0.gem
--------------------------------------------------------------------------------
/vendor/cache/multi_xml-0.6.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/multi_xml-0.6.0.gem
--------------------------------------------------------------------------------
/vendor/cache/parallel-1.24.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/parallel-1.24.0.gem
--------------------------------------------------------------------------------
/vendor/cache/parallel_tests-2.7.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/parallel_tests-2.7.1.gem
--------------------------------------------------------------------------------
/vendor/cache/parser-2.7.2.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/parser-2.7.2.0.gem
--------------------------------------------------------------------------------
/vendor/cache/powerpack-0.1.3.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/powerpack-0.1.3.gem
--------------------------------------------------------------------------------
/vendor/cache/puppet-4.10.10.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/puppet-4.10.10.gem
--------------------------------------------------------------------------------
/vendor/cache/puppet-5.5.22.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/puppet-5.5.22.gem
--------------------------------------------------------------------------------
/vendor/cache/puppet-5.5.8.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/puppet-5.5.8.gem
--------------------------------------------------------------------------------
/vendor/cache/puppet-6.18.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/puppet-6.18.0.gem
--------------------------------------------------------------------------------
/vendor/cache/puppet-7.3.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/puppet-7.3.0.gem
--------------------------------------------------------------------------------
/vendor/cache/puppet-7.32.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/puppet-7.32.1.gem
--------------------------------------------------------------------------------
/vendor/cache/puppet-resource_api-1.8.13.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/puppet-resource_api-1.8.13.gem
--------------------------------------------------------------------------------
/vendor/cache/puppetdb-terminus-3.2.4.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/puppetdb-terminus-3.2.4.gem
--------------------------------------------------------------------------------
/vendor/cache/rainbow-2.2.2.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rainbow-2.2.2.gem
--------------------------------------------------------------------------------
/vendor/cache/rake-12.3.3.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rake-12.3.3.gem
--------------------------------------------------------------------------------
/vendor/cache/rspec-3.4.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rspec-3.4.0.gem
--------------------------------------------------------------------------------
/vendor/cache/rspec-core-3.4.4.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rspec-core-3.4.4.gem
--------------------------------------------------------------------------------
/vendor/cache/rspec-expectations-3.4.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rspec-expectations-3.4.0.gem
--------------------------------------------------------------------------------
/vendor/cache/rspec-mocks-3.4.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rspec-mocks-3.4.1.gem
--------------------------------------------------------------------------------
/vendor/cache/rspec-retry-0.5.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rspec-retry-0.5.0.gem
--------------------------------------------------------------------------------
/vendor/cache/rspec-support-3.4.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rspec-support-3.4.1.gem
--------------------------------------------------------------------------------
/vendor/cache/rubocop-0.49.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rubocop-0.49.0.gem
--------------------------------------------------------------------------------
/vendor/cache/ruby-progressbar-1.13.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/ruby-progressbar-1.13.0.gem
--------------------------------------------------------------------------------
/vendor/cache/rugged-0.27.5.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rugged-0.27.5.gem
--------------------------------------------------------------------------------
/vendor/cache/rugged-1.7.2.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/rugged-1.7.2.gem
--------------------------------------------------------------------------------
/vendor/cache/safe_yaml-1.0.4.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/safe_yaml-1.0.4.gem
--------------------------------------------------------------------------------
/vendor/cache/scanf-1.0.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/scanf-1.0.0.gem
--------------------------------------------------------------------------------
/vendor/cache/semantic_puppet-1.0.2.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/semantic_puppet-1.0.2.gem
--------------------------------------------------------------------------------
/vendor/cache/simplecov-0.14.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/simplecov-0.14.1.gem
--------------------------------------------------------------------------------
/vendor/cache/simplecov-erb-0.1.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/simplecov-erb-0.1.1.gem
--------------------------------------------------------------------------------
/vendor/cache/simplecov-html-0.10.2.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/simplecov-html-0.10.2.gem
--------------------------------------------------------------------------------
/vendor/cache/text-1.3.1.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/text-1.3.1.gem
--------------------------------------------------------------------------------
/vendor/cache/unicode-display_width-1.8.0.gem:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/github/octocatalog-diff/59d46a61f7cddcd6684c3750878a86b9eeceb104/vendor/cache/unicode-display_width-1.8.0.gem
--------------------------------------------------------------------------------