Signed-off-by: James Turnbull <[email protected]>
---
 lib/puppet/module.rb     |    7 +------
 spec/unit/module_spec.rb |    7 -------
 2 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/lib/puppet/module.rb b/lib/puppet/module.rb
index 8da19c2..43fec0d 100644
--- a/lib/puppet/module.rb
+++ b/lib/puppet/module.rb
@@ -7,7 +7,6 @@ class Puppet::Module
   class IncompatibleModule < Error; end
   class UnsupportedPlatform < Error; end
   class IncompatiblePlatform < Error; end
-  class MissingMetadata < Error; end
   class InvalidName < Error; end
 
   include Puppet::Util::Logging
@@ -111,11 +110,7 @@ class Puppet::Module
   def load_metadata
     data = PSON.parse File.read(metadata_file)
     [:source, :author, :version, :license, :puppetversion].each do |attr|
-      unless value = data[attr.to_s]
-        unless attr == :puppetversion
-          raise MissingMetadata, "No #{attr} module metadata provided for 
#{self.name}"
-        end
-      end
+      value = data[attr.to_s]
       send(attr.to_s + "=", value)
     end
   end
diff --git a/spec/unit/module_spec.rb b/spec/unit/module_spec.rb
index c3436df..83ca4da 100755
--- a/spec/unit/module_spec.rb
+++ b/spec/unit/module_spec.rb
@@ -527,13 +527,6 @@ describe Puppet::Module do
         @module.load_metadata
         @module.send(attr).should == @data[attr.to_sym]
       end
-
-      it "should fail if #{attr} is not present in the metadata file" do
-        @data.delete(attr.to_sym)
-        @text = @data.to_json
-        File.stubs(:read).with("/my/file").returns @text
-        lambda { @module.load_metadata }.should 
raise_error(Puppet::Module::MissingMetadata)
-      end
     end
 
     it "should set puppetversion if present in the metadata file" do
-- 
1.7.3.3

-- 
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.

Reply via email to