HomePhorge

(#6833) support 'script' as a short form of 'action'
633f63cdbc1dUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#6833) support 'script' as a short form of 'action'

At the moment the action method is a fairly heavy tool: it provides a DSL, and
is designed to allow substantial metadata to be added to the action.

For some users this is low on value, since they just want to write a little
script that drives things a bit differently. Which there is substantial value
in the metadata, adding the capability to do these light-weight things quickly
is valid.

To meet this we add a script action; the contrast is:

action :foo do
  # other metadata goes here
  invoke do |args|
    # method body goes here
  end
end

script :bar do |args|
  # method body goes here
end
# ...and if you want metadata, you have to add it in more ugly, procedural
# ways, which we are not going to encourage.

Reviewed-By: Pieter van de Bruggen <pieter@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUb3c059e74b19: (Maint.) Require 'puppet/interface' in spec_helper.rb
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPU633f63cdbc1d: (#6833) support 'script' as a short form of 'action' (authored by Daniel Pittman <daniel@puppetlabs.com>).Mar 24 2011, 9:41 PM