summaryrefslogtreecommitdiffstats
path: root/lib/puppet/pgraph.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-23 04:49:56 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-12-23 04:49:56 +0000
commit9bb5c50d0b30b4dfb82b6b705dfcbf0e126a9d61 (patch)
treee41fbeb90e4050ea2af6d37e7b443cf9f84be162 /lib/puppet/pgraph.rb
parentbe711d357857f5e6d4a28a22bd60dd89e9e136c0 (diff)
downloadpuppet-9bb5c50d0b30b4dfb82b6b705dfcbf0e126a9d61.tar.gz
puppet-9bb5c50d0b30b4dfb82b6b705dfcbf0e126a9d61.tar.xz
puppet-9bb5c50d0b30b4dfb82b6b705dfcbf0e126a9d61.zip
Not downcasing facts any longer, closing #210 (although not using the patch from mpalmer, since I had not noticed the patch was there). Also, making all nodes, classes, and definitions case insensitive, closing #344. Finally, I added case insensitivity to the language in general, which should preserve backwards compatibility and probably makes the most sense in the long run anyway.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1964 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/pgraph.rb')
-rw-r--r--lib/puppet/pgraph.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/puppet/pgraph.rb b/lib/puppet/pgraph.rb
index 7be785477..36df0cc96 100644
--- a/lib/puppet/pgraph.rb
+++ b/lib/puppet/pgraph.rb
@@ -66,13 +66,14 @@ class Puppet::PGraph < GRATR::Digraph
# Collect all of the edges that the passed events match. Returns
# an array of edges.
- def matching_edges(source, events)
- unless vertex?(source)
- Puppet.warning "Got an event from invalid vertex %s" % source.ref
- return []
- end
-
+ def matching_edges(events, base = nil)
events.collect do |event|
+ source = base || event.source
+
+ unless vertex?(source)
+ Puppet.warning "Got an event from invalid vertex %s" % source.ref
+ next
+ end
# Get all of the edges that this vertex should forward events
# to, which is the same thing as saying all edges directly below
# This vertex in the graph.