Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Pull request Compare This branch is 38 commits ahead of ekohl:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
spec
.bumpversion.cfg
.gitignore
.rspec
.rubocop.yml
.rubocop_todo.yml
.travis.yml
CHANGELOG.md
Gemfile
README.md
Rakefile
dependency_checker.gemspec

README.md

dependency-checker

The dependency-checker tool validates dependencies in metadata.json files in Puppet modules or YAML files containing arrays of Puppet modules against the latest published versions on the Puppet Forge.

Compatibility

dependency-checker is compatible with Ruby versions 2.0.0 and newer.

Installation

via gem command:

`gem install dependency_checker`

via Gemfile:

`gem 'dependency_checker`

Usage

Run against a single Puppet module metadata.json file

$ dependency-checker /path/to/metadata.json

You can use a local/remote YAML file containing an array of modules (using syntax namespace/module)

$ dependency-checker managed_modules.yaml

It can also be run verbosely to show valid dependencies:

$ dependency-checker -v modules/*/metadata.json

You can also run it inside a module during a pre-release to determine the effect of a version bump in the metadata.json:

$ dependency-checker -c ../*/metadata.json

Or you can supply an override value

$ dependency-checker ../*/metadata.json -o puppetlabs/stdlib,10.0.0

The following optional parameters are available:

    -o, --override module,version    Forge name of module and semantic version to override
    -c, --current                    Extract override version from metadata.json inside current working directory
    -v, --[no-]verbose               Run verbosely
    -h, --help                       Display help

If attempting to use both -o and -c, an error will be thrown as these can only be used exclusively.

Testing with dependency-checker as a Rake task

You can also integrate dependency-checker checks into your tests using a Rake task:

require 'dependency_checker'

desc 'Run dependency-checker'
task :metadata_deps do
  files = FileList['modules/*/metadata.json']
  DependencyChecker::Runner.run(files)
end
You can’t perform that action at this time.