Hi,
I'm still progressing through the language tickets, fixing and adding
interesting features. This time, this is resource collect overriding.
Here is an example usage:
@user {
"brice":
uid => 1000,...
}
and later
User <| name == brice |> {
uid => 2000
}
I tried to have the minimal impact on the existing collector code so
to not introduce new bugs. Unfortunately I couldn't find a way to write
the grammar without duplicating the AST::Collection setup code.
Please review and comment as usual :-)
Thanks
Brice
Brice Figureau (2):
Fix #1088 - Collections should have a facility for modifying found
resources
Fix #1088 - part2 - Add rspec tests
lib/puppet/parser/ast/collection.rb | 31 +
lib/puppet/parser/collector.rb | 42 +-
lib/puppet/parser/grammar.ra | 22 +-
lib/puppet/parser/parser.rb | 1311 +++++++++++++++--------------
spec/unit/parser/ast/collection.rb | 63 ++
spec/unit/parser/collector.rb | 38 +
test/data/snippets/collection_override.pp | 9 +
7 files changed, 859 insertions(+), 657 deletions(-)
create mode 100755 spec/unit/parser/ast/collection.rb
create mode 100644 test/data/snippets/collection_override.pp
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---