# File lib/puppet/rails/host.rb, line 116
116:   def compare_to_catalog(existing, list)
117:     compiled = list.inject({}) do |hash, resource|
118:       hash[resource.ref] = resource
119:       hash
120:     end
121: 
122:     resources = nil
123:     debug_benchmark("Resource removal") {
124:       resources = remove_unneeded_resources(compiled, existing)
125:     }
126: 
127:     # Now for all resources in the catalog but not in the db, we're pretty easy.
128:     additions = nil
129:     debug_benchmark("Resource merger") {
130:       additions = perform_resource_merger(compiled, resources)
131:     }
132: 
133:     debug_benchmark("Resource addition") {
134:       additions.each do |resource|
135:         build_rails_resource_from_parser_resource(resource)
136:       end
137: 
138:       log_accumulated_marks "Added resources"
139:     }
140:   end