puppetlabs/puppet — pull request #231 by kelseyhightower (2011-11-22 22:34:23+00:00)
Title: Ticket/2.7.x/10940 deprecate apply for catalog

Without this patch, the `puppet apply` command uses the `--apply` option
to reference a Puppet catalog. This can cause a bit of confusion as both
the subcommand and option have the same name.

This patch improves the usability of the `puppet apply` command by
adding a new `--catalog` option. This patch also adds a deprecation
warning whenever the `--apply` option is used, which advises end-users
to use the `--catalog` option instead.

This patch updates the in-line help documentation by adding help output
for the new `--catalog` option, and adding a deprecation warning for the
`--apply` option.

The plan is to deprecate the `--apply` option in the next 2.7.x release,
and removal in the future. External documentation should be updated to
reflect the new preference towards using the `--catalog` option in-place
of `--apply`.

Preferred method of applying a Puppet catalog using `puppet apply`:

$ puppet apply --catalog

This patch also includes the spec tests covering the changes in
behavior.