<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,10 @@
 == master
 
+== 0.1.0 / 2008-07-06
+
+* Add support for specifying the parent class/module in the name of the class/module being created
+* Don't depend on active_support
+
 == 0.0.4 / 2008-05-05
 
 * Updated documentation</diff>
      <filename>CHANGELOG.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@ require 'rake/contrib/sshpublisher'
 
 spec = Gem::Specification.new do |s|
   s.name              = 'module_creation_helper'
-  s.version           = '0.0.4'
+  s.version           = '0.1.0'
   s.platform          = Gem::Platform::RUBY
   s.summary           = 'Adds a helper method for creating new modules and classes at runtime.'
   </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -27,16 +27,14 @@ module PluginAWeek #:nodoc:
         #   Class.create('Woddle', :superclass =&gt; Waddle::Widdle, :parent =&gt; Waddle)  # =&gt; Waddle::Woddle
         #   Waddle::Woddle.superclass                                                 # =&gt; Waddle::Widdle
         def create(name, options = {}, &amp;block)
-          options.assert_valid_keys(
-            :superclass,
-            :parent
-          )
+          # Validate the provided options
+          invalid_options = options.keys - [:superclass, :parent]
+          raise ArgumentError, &quot;Unknown key(s): #{invalid_options.join(&quot;, &quot;)}&quot; unless invalid_options.empty?
+          
+          # Validate usage of :superclass option
           raise ArgumentError, 'Modules cannot have superclasses' if options[:superclass] &amp;&amp; self.to_s == 'Module'
           
-          options.reverse_merge!(
-            :superclass =&gt; Object,
-            :parent =&gt; Object
-          )
+          options = {:superclass =&gt; Object, :parent =&gt; Object}.merge(options)
           parent = options[:parent]
           superclass = options[:superclass]
           
@@ -46,12 +44,12 @@ module PluginAWeek #:nodoc:
             superclass = ''
           end
           
-          parent.class_eval &lt;&lt;-end_eval
+          mod = parent.class_eval &lt;&lt;-end_eval
             #{self.to_s.downcase} #{name}#{superclass}
+              self
             end
           end_eval
           
-          mod = parent.const_get(name)
           mod.class_eval(&amp;block) if block_given?
           mod
         end</diff>
      <filename>lib/module_creation_helper/extensions/module.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,9 +4,11 @@ module Ford
 end
 
 class Vehicle
-  cattr_accessor :test_name
-  cattr_accessor :test_inspect
-  cattr_accessor :test_to_s
+  class &lt;&lt; self
+    attr_accessor :test_name
+    attr_accessor :test_inspect
+    attr_accessor :test_to_s
+  end
   
   def self.inherited(base)
     self.test_name = base.name
@@ -21,7 +23,7 @@ class ModuleCreationHelperTest &lt; Test::Unit::TestCase
   end
 end
 
-class ModuleCreationHelperForClassTest &lt; Test::Unit::TestCase
+class ClassTest &lt; Test::Unit::TestCase
   def setup
     @car = Class.create('Car')
   end
@@ -31,7 +33,6 @@ class ModuleCreationHelperForClassTest &lt; Test::Unit::TestCase
   end
   
   def test_should_have_object_as_parent
-    assert_equal Object, @car.parent
     assert Object.const_defined?('Car')
   end
   
@@ -40,7 +41,7 @@ class ModuleCreationHelperForClassTest &lt; Test::Unit::TestCase
   end
 end
 
-class ModuleCreationHelperForClassWithSuperclassTest &lt; Test::Unit::TestCase
+class ClassWithSuperclassTest &lt; Test::Unit::TestCase
   def setup
     @car = Class.create('Car', :superclass =&gt; Vehicle)
   end
@@ -50,7 +51,6 @@ class ModuleCreationHelperForClassWithSuperclassTest &lt; Test::Unit::TestCase
   end
   
   def test_should_have_object_as_parent
-    assert_equal Object, @car.parent
     assert Object.const_defined?('Car')
   end
   
@@ -71,7 +71,7 @@ class ModuleCreationHelperForClassWithSuperclassTest &lt; Test::Unit::TestCase
   end
 end
 
-class ModuleCreationHelperForClassWithParentTest &lt; Test::Unit::TestCase
+class ClassWithParentTest &lt; Test::Unit::TestCase
   def setup
     @car = Class.create('Car', :parent =&gt; Ford)
   end
@@ -81,7 +81,6 @@ class ModuleCreationHelperForClassWithParentTest &lt; Test::Unit::TestCase
   end
   
   def test_should_be_nested_within_parent
-    assert_equal Ford, @car.parent
     assert Ford.const_defined?('Car')
   end
   
@@ -90,7 +89,45 @@ class ModuleCreationHelperForClassWithParentTest &lt; Test::Unit::TestCase
   end
 end
 
-class ModuleCreationHelperForClassWithSuperclassAndParentTest &lt; Test::Unit::TestCase
+class ClassWithInferredParentTest &lt; Test::Unit::TestCase
+  def setup
+    @car = Class.create('Ford::Car')
+  end
+  
+  def test_should_have_object_as_superclass
+    assert_equal Object, @car.superclass
+  end
+  
+  def test_should_be_nested_within_parent
+    assert Ford.const_defined?('Car')
+  end
+  
+  def teardown
+    Ford.send(:remove_const, 'Car')
+  end
+end
+
+class ClassWithInferredParentAndConfiguredParenTest &lt; Test::Unit::TestCase
+  def setup
+    Module.create('Car', :parent =&gt; Ford)
+    @part = Class.create('Car::Part', :parent =&gt; Ford)
+  end
+  
+  def test_should_have_object_as_superclass
+    assert_equal Object, @part.superclass
+  end
+  
+  def test_should_be_nested_within_parent
+    assert Ford::Car.const_defined?('Part')
+  end
+  
+  def teardown
+    Ford::Car.send(:remove_const, 'Part')
+    Ford.send(:remove_const, 'Car')
+  end
+end
+
+class ClassWithSuperclassAndParentTest &lt; Test::Unit::TestCase
   def setup
     Vehicle.test_name = nil
     Vehicle.test_inspect = nil
@@ -104,7 +141,6 @@ class ModuleCreationHelperForClassWithSuperclassAndParentTest &lt; Test::Unit::Test
   end
   
   def test_should_be_nested_within_parent
-    assert_equal Ford, @car.parent
     assert Ford.const_defined?('Car')
   end
   
@@ -125,7 +161,7 @@ class ModuleCreationHelperForClassWithSuperclassAndParentTest &lt; Test::Unit::Test
   end
 end
 
-class ModuleCreationHelperForClassWithDynamicSuperclassTest &lt; Test::Unit::TestCase
+class ClassWithDynamicSuperclassTest &lt; Test::Unit::TestCase
   def setup
     @car = Class.create('Car')
     @convertible = Class.create('Convertible', :superclass =&gt; @car)
@@ -141,7 +177,7 @@ class ModuleCreationHelperForClassWithDynamicSuperclassTest &lt; Test::Unit::TestCa
   end
 end
 
-class ModuleCreationHelperForClassWithCustomMethods &lt; Test::Unit::TestCase
+class ClassWithCustomMethodsTest &lt; Test::Unit::TestCase
   def setup
     @car = Class.create('Car', :superclass =&gt; Vehicle) do
       def self.color
@@ -159,13 +195,12 @@ class ModuleCreationHelperForClassWithCustomMethods &lt; Test::Unit::TestCase
   end
 end
 
-class ModuleCreationHelperForModuleTest &lt; Test::Unit::TestCase
+class ModuleTest &lt; Test::Unit::TestCase
   def setup
     @autopilot = Module.create('Autopilot')
   end
   
   def test_should_have_object_as_parent
-    assert_equal Object, @autopilot.parent
     assert Object.const_defined?('Autopilot')
   end
   
@@ -174,19 +209,18 @@ class ModuleCreationHelperForModuleTest &lt; Test::Unit::TestCase
   end
 end
 
-class ModuleCreationHelperForModuleWithSuperclassTest &lt; Test::Unit::TestCase
+class ModuleWithSuperclassTest &lt; Test::Unit::TestCase
   def test_should_raise_an_exception
     assert_raise(ArgumentError) {Module.create(nil, :superclass =&gt; Object)}
   end
 end
 
-class ModuleCreationHelperForModuleWithParentTest &lt; Test::Unit::TestCase
+class ModuleWithParentTest &lt; Test::Unit::TestCase
   def setup
     @autopilot = Module.create('Autopilot', :parent =&gt; Ford)
   end
   
   def test_should_be_nested_within_parent
-    assert_equal Ford, @autopilot.parent
     assert Ford.const_defined?('Autopilot')
   end
   </diff>
      <filename>test/module_creation_helper_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,4 @@
 require 'test/unit'
-require 'rubygems'
-require 'active_support'
 
 $:.unshift(File.dirname(__FILE__) + '/../lib')
-require File.dirname(__FILE__) + '/../init'
\ No newline at end of file
+require File.dirname(__FILE__) + '/../init'</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>42ee1210fc75b76adbb8aa0a077db36b6aafdb3b</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Pfeifer</name>
    <email>aaron.pfeifer@gmail.com</email>
  </author>
  <url>http://github.com/pluginaweek/module_creation_helper/commit/16c3c7dbf6198654080ed251d4644110757f25d7</url>
  <id>16c3c7dbf6198654080ed251d4644110757f25d7</id>
  <committed-date>2008-07-06T19:20:35-07:00</committed-date>
  <authored-date>2008-07-06T19:20:35-07:00</authored-date>
  <message>Don't depend on active_support
Add support for specifying the parent class/module in the name of the class/module being created
Tag 0.1.0 release</message>
  <tree>e01f5b2fb3b9dd0202dd77d5e113c5758265522d</tree>
  <committer>
    <name>Aaron Pfeifer</name>
    <email>aaron.pfeifer@gmail.com</email>
  </committer>
</commit>
