The previous commits in this series were based on some experimental code that referred to the elements in the registry as "hooks" rather than "callbacks". We inadvertently failed to sync up the method names before making the last commit.
Paired-with: Nick Lewis <[email protected]> Signed-off-by: Paul Berry <[email protected]> --- Local-branch: maint/next/add-registry app/views/node_groups/show.html.haml | 2 +- app/views/nodes/show.html.haml | 2 +- app/views/reports/_report.html.haml | 4 ++-- app/views/reports/_report_status_icon.html.haml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/node_groups/show.html.haml b/app/views/node_groups/show.html.haml index 7fcdc6c..f593b12 100644 --- a/app/views/node_groups/show.html.haml +++ b/app/views/node_groups/show.html.haml @@ -42,7 +42,7 @@ .section .header %h2 Nodes for this group - - Registry.each_hook :core, :node_group_view_widgets do |thing| + - Registry.each_callback :core, :node_group_view_widgets do |thing| = thing.call self, @node_group - if @node_group.all_nodes.present? = render 'nodes/nodes', :nodes => @node_group.all_nodes, :container => @node_group diff --git a/app/views/nodes/show.html.haml b/app/views/nodes/show.html.haml index 4f9b783..eaea054 100644 --- a/app/views/nodes/show.html.haml +++ b/app/views/nodes/show.html.haml @@ -71,7 +71,7 @@ .actionbar = link_to "More »", reports_node_path(@node, :kind => "apply"), :class => 'button' - - Registry.each_hook :core, :node_view_widgets do |thing| + - Registry.each_callback :core, :node_view_widgets do |thing| = thing.call self, @node - if @node.reports.inspections.count > 0 .section diff --git a/app/views/reports/_report.html.haml b/app/views/reports/_report.html.haml index 2ec775c..41b539d 100644 --- a/app/views/reports/_report.html.haml +++ b/app/views/reports/_report.html.haml @@ -3,12 +3,12 @@ = render 'report_title', :report => report - unless SETTINGS.enable_read_only_mode %ul.actions - - Registry.each_hook :report, :actions do |thing| + - Registry.each_callback :report, :actions do |thing| = thing.call self, report %li= link_to 'Destroy', report, :confirm => 'Are you sure?', :method => :delete, :class => "delete button" .item - - Registry.each_hook :core, :report_view_widgets do |thing| + - Registry.each_callback :core, :report_view_widgets do |thing| = thing.call self, report - if report.resource_statuses.present? .section diff --git a/app/views/reports/_report_status_icon.html.haml b/app/views/reports/_report_status_icon.html.haml index 6db777c..47702a3 100644 --- a/app/views/reports/_report_status_icon.html.haml +++ b/app/views/reports/_report_status_icon.html.haml @@ -1,5 +1,5 @@ %span{:title => report ? report_title_text(report) : 'No reports'} - if report - = icon(Registry.find_first_hook(:report, :status_icon) { |thing| thing.call(report) } || (report.kind == "inspect" ? :inspect : report.status)) + = icon(Registry.find_first_callback(:report, :status_icon) { |thing| thing.call(report) } || (report.kind == "inspect" ? :inspect : report.status)) - else = icon(:error) -- 1.7.2 -- 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.
