<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/fixtures/extensions/01_basic/app/metal/basic_metal.rb</filename>
    </added>
    <added>
      <filename>test/fixtures/extensions/02_overriding/app/metal/basic_metal.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,6 +2,7 @@
 
 === Edge
 
+* Load Metal from Extensions [Jim Gay]
 * Moved template_name to ApplicationController [Jim Gay, Michael Kessler]
 * Remove vizres plugin. [Sean Cribbs]
 * Update instance config/environments to remove ResponseCache [Jim Gay]</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -63,6 +63,10 @@ module Radiant
     def view_paths
       extensions.map { |extension| &quot;#{extension.root}/app/views&quot; }.select { |d| File.directory?(d) }.reverse
     end
+    
+    def metal_paths
+      extensions.map { |extension| &quot;#{extension.root}/app/metal&quot; }.select { |d| File.directory?(d) }.reverse
+    end
 
     # Load the extensions
     def load_extensions
@@ -101,7 +105,7 @@ module Radiant
 
       def load_paths_for(dir)
         if File.directory?(dir)
-          %w(lib app/models app/controllers app/helpers test/helpers).collect do |p|
+          %w(lib app/models app/controllers app/metal app/helpers test/helpers).collect do |p|
             path = &quot;#{dir}/#{p}&quot;
             path if File.directory?(path)
           end.compact &lt;&lt; dir</diff>
      <filename>lib/radiant/extension_loader.rb</filename>
    </modified>
    <modified>
      <diff>@@ -125,6 +125,12 @@ describe Radiant::ExtensionLoader do
     @instance.view_paths.all? {|f| File.directory?(f) }.should be_true
   end
 
+  it &quot;should have metal paths&quot; do
+    @instance.should respond_to(:metal_paths)
+    @instance.metal_paths.should be_instance_of(Array)
+    @instance.metal_paths.all? {|f| File.directory?(f) }.should be_true
+  end
+
   it &quot;should return the view paths in inverse order to the loaded&quot; do
     extensions = [BasicExtension, OverridingExtension]
     @instance.extensions = extensions
@@ -133,6 +139,15 @@ describe Radiant::ExtensionLoader do
        &quot;#{RADIANT_ROOT}/test/fixtures/extensions/01_basic/app/views&quot;
       ]
   end
+
+  it &quot;should return the metal paths in inverse order to the loaded&quot; do
+    extensions = [BasicExtension, OverridingExtension]
+    @instance.extensions = extensions
+    @instance.metal_paths.should == [
+       &quot;#{RADIANT_ROOT}/test/fixtures/extensions/02_overriding/app/metal&quot;,
+       &quot;#{RADIANT_ROOT}/test/fixtures/extensions/01_basic/app/metal&quot;
+      ]
+  end
   
   it &quot;should load and initialize extensions when discovering&quot; do
     @instance.should_receive(:load_extension_roots).and_return(@extension_paths)</diff>
      <filename>spec/lib/radiant/extension_loader_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>322e5c16d21fc599ac339378873ee931ae9d60ef</id>
    </parent>
  </parents>
  <author>
    <name>Jim Gay</name>
    <email>jim@saturnflyer.com</email>
  </author>
  <url>http://github.com/radiant/radiant/commit/f8163a38ea8475a401db58a01692e67733025da7</url>
  <id>f8163a38ea8475a401db58a01692e67733025da7</id>
  <committed-date>2009-06-12T10:11:24-07:00</committed-date>
  <authored-date>2009-06-12T10:11:24-07:00</authored-date>
  <message>load metal from extensions</message>
  <tree>b3df284767650cda436738ebc66fc48bcbe8c5b1</tree>
  <committer>
    <name>Jim Gay</name>
    <email>jim@saturnflyer.com</email>
  </committer>
</commit>
