<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.rdebugrc</filename>
    </added>
    <added>
      <filename>lib/poolparty/plugins/apache2/passenger_site.rb</filename>
    </added>
    <added>
      <filename>lib/poolparty/plugins/apache2/php5.rb</filename>
    </added>
    <added>
      <filename>lib/poolparty/plugins/apache2/virtual_host.rb</filename>
    </added>
    <added>
      <filename>lib/poolparty/plugins/haproxy.rb</filename>
    </added>
    <added>
      <filename>lib/poolparty/plugins/heartbeat.rb</filename>
    </added>
    <added>
      <filename>lib/poolparty/plugins/plugin_template.rb</filename>
    </added>
    <added>
      <filename>lib/poolparty/plugins/poolparty_base_packages.rb</filename>
    </added>
    <added>
      <filename>lib/poolparty/plugins/ruby.rb</filename>
    </added>
    <added>
      <filename>lib/poolparty/plugins/runit.rb</filename>
    </added>
    <added>
      <filename>spec/poolparty/poolparty/haproxy_spec.rb</filename>
    </added>
    <added>
      <filename>spec/poolparty/poolparty/heartbeat_spec.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -135,10 +135,6 @@ class Object
   include PoolParty::DefinableResource
 end
 
-class Class
-  include PoolParty::PluginModel
-end
-
 ## Load PoolParty Plugins and package
 module PoolParty
   %w(plugins base_packages).each do |dir|</diff>
      <filename>lib/poolparty.rb</filename>
    </modified>
    <modified>
      <diff>@@ -60,7 +60,7 @@ class String
   # Refactor this guy to get the class if the class is defined, and not always create a new one
   # although, it doesn't really matter as ruby will just reopen the class
   def class_constant(superclass=nil, opts={}, &amp;block)
-    symc = ((opts &amp;&amp; opts[:preserve]) ? (&quot;#{self.camelcase}Class&quot;) : &quot;PoolParty#{self.camelcase}Class&quot;).classify
+    symc = ((opts &amp;&amp; opts[:preserve]) ? (&quot;#{self.camelcase}&quot;) : &quot;PoolParty#{self.camelcase}&quot;).classify
 
     kla=&lt;&lt;-EOE
       class #{symc} #{&quot;&lt; #{superclass}&quot; if superclass}</diff>
      <filename>lib/poolparty/core/string.rb</filename>
    </modified>
    <modified>
      <diff>@@ -40,15 +40,15 @@ module PoolParty
     # Which sets the virtual host's name as xnot.org
     # 
     # An example is included in the poolparty-apache-plugin
-    def virtual_resource(name=:virtual_resource, opts={}, &amp;block)
-      symc = &quot;#{name}&quot;.top_level_class.camelcase
-      klass = symc.class_constant(PoolParty::Plugin::Plugin, {:preserve =&gt; true}, &amp;block)
-      
-      PoolParty::Service.add_has_and_does_not_have_methods_for(symc)
-      
-      klass.module_eval &amp;block if block
-      klass
-    end
+    # def virtual_resource(name=:virtual_resource, opts={}, &amp;block)
+    #   symc = &quot;#{name}&quot;.top_level_class.camelcase
+    #   klass = symc.class_constant(PoolParty::Plugin::Plugin, {:preserve =&gt; true}, &amp;block)
+    #   
+    #   PoolParty::Service.add_has_and_does_not_have_methods_for(symc)
+    #   
+    #   klass.module_eval &amp;block if block
+    #   klass
+    # end
     
   end
 end
\ No newline at end of file</diff>
      <filename>lib/poolparty/modules/definable_resource.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 module PoolParty
-  class Base
+  module Plugin
 
 =begin rdoc
 
@@ -11,9 +11,11 @@ default host.
 
 =end
 
-    plugin :apache do
+    class Apache &lt; Plugin
       dsl_methods :passenger_version
       
+      default_options :port =&gt; 80
+      
       def loaded(opts={}, &amp;block)
         configs
         has_service(&quot;apache2&quot;, :requires =&gt; get_package(&quot;apache2&quot;))
@@ -168,6 +170,7 @@ default host.
       
       def listen(p=&quot;80&quot;)
         has_variable(:name =&gt; &quot;port&quot;, :value =&gt; p)
+        self.port = p
         @listen = true
       end
       
@@ -219,117 +222,7 @@ default host.
       
     end
 
-  virtual_resource(:virtualhost) do
-    def listen(port=&quot;80&quot;)
-      has_variable(:name =&gt; &quot;port&quot;, :value =&gt; port)
-      port port
-    end
-        
-    def virtual_host_entry(file)
-      @virtual_host_entry = true
-      if ::File.file?(file)
-        has_file(dsl_options.merge({:name =&gt; &quot;/etc/apache2/sites-available/#{name}&quot;, 
-                                :template =&gt; file, 
-                                :requires =&gt; get_package(&quot;apache2&quot;)}))
-      else
-        has_file(dsl_options.merge({:content =&gt; file, 
-                                :name =&gt; &quot;/etc/apache2/sites-available/#{name}&quot;, 
-                                :requires =&gt; get_package(&quot;apache2&quot;)}))
-      end
-    end
-
-    
-    def loaded(opts={}, parent=self)
-      has_directory(:name =&gt; &quot;/var/www&quot;, :owner =&gt; www_user, :mode=&gt;'0744')
-      has_directory(:name =&gt; &quot;/var/www/#{name}&quot;, :owner =&gt; www_user, :mode=&gt;'0744')
-      has_directory(:name =&gt; &quot;/var/www/#{name}/logs&quot;, :owner =&gt; www_user, :mode=&gt;'0744')
-
-      has_variable(:name =&gt; &quot;sitename&quot;, :value =&gt; &quot;#{name}&quot;)
-
-      unless @virtual_host_entry
-        virtual_host_entry &lt;&lt;-eof
-&lt;VirtualHost *:#{port}&gt; 
-ServerName     #{name}
-DocumentRoot   /var/www/#{name}
-&lt;/VirtualHost&gt;
-eof
-      end
-      
-      has_exec(:name =&gt; &quot;insert-site-#{name}&quot;, 
-               :command =&gt; &quot;/usr/sbin/a2ensite #{name}&quot;, 
-               :calls =&gt; get_exec(&quot;reload-apache2&quot;), 
-               :requires =&gt; get_file(&quot;/etc/apache2/sites-available/#{name}&quot;)) do
-        requires get_package(&quot;apache2&quot;)
-        if_not &quot;/bin/sh -c '[ -L /etc/apache2/sites-enabled/#{parent.name} ] &amp;&amp; [ /etc/apache2/sites-enabled/#{parent.name} -ef /etc/apache2/sites-available/#{parent.name} ]'&quot;
-      end
-    end
-
-  end
   
-  virtual_resource(:passengersite) do    # {{{
-
-    default_options(
-      :dir            =&gt; &quot;/var/www&quot;,
-      :appended_path  =&gt; nil,
-      :owner          =&gt; 'www-data', 
-      :mode           =&gt;'0744',
-      :enviornment    =&gt; 'production'
-    )
-
-    def loaded(opts={}, prnt=nil)
-      enable_passenger
-      port &quot;80&quot; unless self.port
-      
-      has_directory(:name =&gt; dir,                   :owner =&gt; www_user, :mode =&gt; '0744')
-      has_directory(:name =&gt; &quot;#{site_directory}&quot;,      :owner =&gt; www_user, :mode =&gt; '0744')
-      has_directory(:name =&gt; &quot;#{site_directory}/logs&quot;, :owner =&gt; www_user, :mode =&gt; '0744')
-      if opts[:with_deployment_directories]
-        has_directory(:name =&gt; &quot;#{site_directory}/shared&quot;, :owner =&gt; www_user, :mode=&gt;'0744')
-        has_directory(:name =&gt; &quot;#{site_directory}/shared/public&quot;, :owner =&gt; www_user, :mode=&gt;'0744')
-        has_directory(:name =&gt; &quot;#{site_directory}/shared/config&quot;, :owner =&gt; www_user, :mode=&gt;'0744')
-        has_directory(:name =&gt; &quot;#{site_directory}/shared/log&quot;, :owner =&gt; www_user, :mode=&gt;'0744')
-        has_directory(:name =&gt; &quot;#{site_directory}/releases&quot;, :owner =&gt; www_user, :mode=&gt;'0744')
-        do_once do |variable|
-          # setup an initial symlink so apache will start even if there have not been any deploys yet
-          has_directory(:name =&gt; &quot;#{site_directory}/releases/initial/public&quot;, :owner =&gt; www_user, :mode=&gt;'0744')
-          #FIXME  the following line is chef specific.  It will fail with puppet
-          
-          # has_symlink(:target_file =&gt; &quot;#{dir}/#{name}/current&quot;, :to =&gt; &quot;#{dir}/#{name}/releases/initial&quot;)
-        end        
-        log_dir = &quot;#{site_directory}/shared/log&quot;
-        appended_path &quot;current&quot;
-      else
-        log_dir = &quot;#{site_directory}/log&quot;
-      end
-      
-      passenger_entry &lt;&lt;-EOE
-&lt;VirtualHost *:#{port}&gt;
-    ServerName #{name}
-    DocumentRoot #{site_directory}/public
-    RailsEnv #{enviornment}
-    ErrorLog #{log_dir}/error_log
-    CustomLog #{log_dir}/access_log common
-&lt;/VirtualHost&gt;
-      EOE
-      
-      # has_directory(:name =&gt; &quot;/var/www&quot;)
-      # has_directory(:name =&gt; &quot;/var/www/#{name}&quot;)
-      # has_directory(:name =&gt; &quot;/var/www/#{name}/log&quot;)
-      parent.install_site(name, :no_file =&gt; true) # we already created the file with #passenger_entry
-    end
-
-    def passenger_entry(file)
-      if ::File.file?(file)
-        has_file({:name =&gt; &quot;/etc/apache2/sites-available/#{name}&quot;, :template =&gt; file})
-      else
-        has_file({:content =&gt; file, :name =&gt; &quot;/etc/apache2/sites-available/#{name}&quot; })
-      end
-    end
-
-    def site_directory
-      &quot;#{dir}/#{name}%s&quot; % [appended_path ? &quot;/&quot; + appended_path : &quot;&quot;]
-    end
-  end
   
 #   virtual_resource(:passengersite_with_ssl) do# {{{
 #     def loaded(opts={}, parent=self)
@@ -374,40 +267,6 @@ eof
 #   end
 # }}}
 
-    # Usage: 
-    # 
-    # enable_php5 do
-    #   extras :cli, :pspell, :mysql
-    # end
-    virtual_resource(:enable_php5) do
-      def loaded(opts={}, parent=self)
-        has_package(:name =&gt; &quot;php5&quot;)
-        has_package(:name =&gt; &quot;libapache2-mod-php5&quot;)
-        present_apache_module(&quot;php5&quot;)
-        has_file({:name =&gt; &quot;/etc/php5/apache2/php.ini&quot;,
-                :template =&gt; &quot;apache2/php.ini.erb&quot;,
-                :mode =&gt; 755,
-                :requires =&gt; get_package(&quot;libapache2-mod-php5&quot;),
-                :calls =&gt; get_exec(&quot;reload-apache2&quot;)})
-
-        has_file(:name =&gt; &quot;/etc/apache2/conf.d/enable-php.conf&quot;, 
-                 :mode =&gt; 755,
-                 :calls =&gt; get_exec(&quot;reload-apache2&quot;),
-                 :content =&gt; &lt;&lt;-eos 
-                 AddHandler php5-script php
-                 AddType text/html       php
-                 eos
-                 )
-      end
-
-      def extras(*names)
-        names.each do |name|
-         has_package(:name =&gt; &quot;php5-#{name}&quot;, :requires =&gt; get_package(&quot;php5&quot;))
-        end
-      end
-
-    end
-
   end
 
 end
\ No newline at end of file</diff>
      <filename>lib/poolparty/plugins/apache2/apache.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,8 +6,8 @@
                         :public_key_file  =&gt; &quot;/Users/alerner/.ssh/id_rsa.pub&quot;
 =end
 module PoolParty
-  class Base
-    plugin :authorized_key do
+  module Plugin
+    class AuthorizedKey &lt; Plugin
       
       default_options(
         :for_user =&gt; &quot;root&quot;,</diff>
      <filename>lib/poolparty/plugins/authorized_key.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,10 @@
 module PoolParty
-  class Base
-    plugin :bind do
-      
+  module Plugin
+    
+    class Bind &lt; Plugin
       def enable
-        
       end
-      
     end
+    
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/poolparty/plugins/bind.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,21 @@
 require &quot;tempfile&quot;
 # BIG TODO: Slim the place where the content is gathered from
 module PoolParty
-  class ChefRecipe
-    include Dslify
+
+  class ::PoolParty::Resources::ChefRecipe &lt; ::PoolParty::Resources::Resource
     dsl_methods :recipes
   end
-  class Chef
-    define_resource :chef_recipe do
-    end
-    define_resource :chef_library do
-    end
+  
+  class ::PoolParty::Resources::ChefLibrary &lt; ::PoolParty::Resources::Resource
+  end
     
-    plugin :include_chef_recipe do
+  module Plugin
+  # class ChefRecipe
+  #   include Dslify
+  #   dsl_methods :recipes
+  # end
+      
+    class IncludeChefRecipe &lt; Plugin
       def loaded(opts={}, &amp;block)
         has_chef_recipe ::File.basename(name)
       end
@@ -20,7 +24,7 @@ module PoolParty
       end
     end
     
-    plugin :chef do
+    class Chef &lt; Plugin
       def before_load(o, &amp;block)
       end
       
@@ -90,7 +94,7 @@ module PoolParty
         else
           unless @recipe
             @recipe = ChefRecipe.new
-            @recipe.instance_eval &amp;block if block
+            @recipe.instance_eval(&amp;block) if block
             @recipe.recipes(recipe_files.empty? ? [&quot;poolparty&quot;] : [&quot;poolparty&quot;, &quot;main&quot;])
 
             ::Suitcase::Zipper.add_content_as(@recipe.dsl_options.to_json, &quot;dna.json&quot;, &quot;chef&quot;)</diff>
      <filename>lib/poolparty/plugins/chef.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,28 +16,29 @@
   
 =end
 module PoolParty
-  class ChefDeploy
+  module Plugin
     
-    define_resource :chef_deploy_definition do
+    class ChefDeploy &lt; Plugin
       
-      dsl_methods :repo
-      
-      default_options(
-                      :branch =&gt; &quot;HEAD&quot;,
-                      :enable_submodules =&gt; true,
-                      :migrate =&gt; true,
-                      :environment =&gt; &quot;production&quot;,
-                      :shallow_clone =&gt; true,
-                      :user =&gt; &quot;www-data&quot;,
-                      :restart_command =&gt; &quot;touch tmp/restart.txt&quot;,
-                      :migration_command =&gt; &quot;rake db:migrate&quot;
-                      )
-      def present
-        :deploy
+      define_resource :chef_deploy_definition do
+        
+        dsl_methods :repo
+        
+        default_options(
+                        :branch =&gt; &quot;HEAD&quot;,
+                        :enable_submodules =&gt; true,
+                        :migrate =&gt; true,
+                        :environment =&gt; &quot;production&quot;,
+                        :shallow_clone =&gt; true,
+                        :user =&gt; &quot;www-data&quot;,
+                        :restart_command =&gt; &quot;touch tmp/restart.txt&quot;,
+                        :migration_command =&gt; &quot;rake db:migrate&quot;
+                        )
+        def present
+          :deploy
+        end
       end
-    end
-    
-    plugin :chef_deploy do
+      
       dsl_methods :branch, :enable_submodules, :migrate, :environment, :shallow_clone, :user,
                   :restart_command, :migration_command, :repo
       </diff>
      <filename>lib/poolparty/plugins/chef_deploy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,9 +16,8 @@ The deploy directory will copy the source directory from the developer machine (
 This will place the contents of ~/path/to/my/site from your machine to /mnt/bob on the cloud instances virtual_resource(:deploy_directory)
 
 =end
-
-  class DeployDirectory
-    virtual_resource(:deploy_directory) do
+  module Plugin
+    class DeployDirectory &lt; Plugin
       
       dsl_methods :from, :to, :owner, :mode, :git_pull_first
       </diff>
      <filename>lib/poolparty/plugins/deploy_directory.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,11 +29,9 @@ Gempackages describe distributed gems on the cloud. The gem is only downloaded o
 == Examples
   has_gempackage(:name =&gt; 'rake', 
     :download_url =&gt; 'http://rubyforge.org/frs/download.php/43954/rake-0.8.3.gem')
-=end
-  
-  class GempackageResource
-    
-    virtual_resource(:gem_package) do
+=end  
+    module Plugin
+      class GemPackage &lt; Plugin
       
       dsl_methods :name,            # Name of the gem
                   :download_url,    # Url to download the gem. If not set, it will try to grab the latest gem available on gems.github.com or rubyforge</diff>
      <filename>lib/poolparty/plugins/gem_package.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,13 @@
-module PoolParty    
-  class GitResource
-    
-    plugin :git do
+module PoolParty
+  module Plugin
+    class Git &lt; Plugin
+      
       def loaded(*args)
         has_package(:name =&gt; &quot;git-core&quot;)
       end
     end
     
-    plugin :git_repo do
+    class GitRepo &lt; Plugin
       dsl_methods :name,
                   :repo,
                   :dir, 
@@ -75,6 +75,7 @@ module PoolParty
     
   end
 end
+
 class DirectoryMissingError &lt; StandardError
   def initialize
     super(&quot;You must include a directory for the git repo set by to&quot;)</diff>
      <filename>lib/poolparty/plugins/git.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,19 +15,21 @@ Ensures that the line given is in the file
   has_line_in_file(&quot;ENABLED=1&quot;, &quot;/etc/default/haproxy&quot;)
 =end
 
-  class LineInFile
+  module Plugin
+    class  LineInFile &lt; Plugin
     
-    plugin :line_in_file do
       dsl_methods :file, :line
       default_options(
         :line =&gt; &quot;&quot;
       )
+      
       def loaded(opts={}, &amp;block)
         has_exec &quot;line_in_#{file}&quot; do
           command &quot;grep -q \'#{line.safe_quote}\' #{file} || echo \'#{line.safe_quote}\' &gt;&gt; #{file}&quot;
           not_if &quot;grep -q \'#{line.safe_quote}\' #{file}&quot;
         end
       end
+      
     end
     
   end</diff>
      <filename>lib/poolparty/plugins/line_in_file.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,9 +13,8 @@
     chef-deploy to deploy the application
 =end
 module PoolParty
-  class Rails
-
-    plugin :rails_deploy do
+  module Plugin
+    class  RailsDeploy&lt; Plugin
       
       dsl_methods :shared, :database_yml, :repo, :user, :user_dir
       </diff>
      <filename>lib/poolparty/plugins/rails_deploy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,15 @@
-module PoolParty    
-  class SvnResource
-        
-    virtual_resource :svn do
+module PoolParty
+  module Plugin
+    
+    class Svn &lt; Plugin
+    
       def loaded(*args)
         has_package :name =&gt; &quot;subversion&quot;
       end
+    
     end
     
-    virtual_resource :svn_repos do
+    class SvnRepos &lt; Plugin
       
       dsl_methods :creates, :command, :cwd, :source, :working_dir, :at
       
@@ -15,7 +17,7 @@ module PoolParty
         has_package(&quot;subversion&quot;)
         has_svn_repository
       end
-
+      
       def has_svn_repository
         has_directory(::File.dirname(working_dir))
         has_directory(:name =&gt; &quot;#{working_dir}&quot;, :requires =&gt; get_directory(&quot;#{::File.dirname(working_dir)}&quot;))</diff>
      <filename>lib/poolparty/plugins/svn.rb</filename>
    </modified>
    <modified>
      <diff>@@ -42,14 +42,13 @@ module PoolParty
       )
 
       include CloudResourcer
-      include PoolParty::PluginModel
       include PoolParty::Resources
       include PoolParty::Callbacks
       include PoolParty::DependencyResolverCloudExtensions
       include PrettyPrinter
 
       # Net methods
-      include ::PoolParty::Remote
+      include PoolParty::Remote
       include PoolParty::CloudDsl
       include PoolParty::Verification
       # include PoolParty::Monitors
@@ -277,7 +276,6 @@ module PoolParty
       def to_hash
         hsh = to_properties_hash
         hsh[:options].merge!({:remote_base =&gt; remote_base.to_hash})  
-        # hsh.reject{|k,v| k == :remote_base || k == :cloud}
         hsh
       end
       
@@ -378,15 +376,15 @@ module PoolParty
       end
       
       # Add all the poolparty requirements here
-      # NOTE: These are written as plugins in the lib/poolparty/base_packages directory
+      # NOTE: These are written as plugins in the lib/poolparty/plugins directory
       # for examples. 
       # Also note that there is no block associated. This is because we have written
       # all that is necessary in a method called enable
       # which is called when there is no block
       def add_poolparty_base_requirements
         # poolparty_base_heartbeat
-        poolparty_base_ruby
-        poolparty_base_packages
+        ruby
+        pool_party_base_packages
       end
                 
     end</diff>
      <filename>lib/poolparty/poolparty/cloud.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,40 +4,33 @@ require &quot;#{::File.dirname(__FILE__)}/../provision/boot_strapper.rb&quot;
 module PoolParty
   module Plugin
     
-    @available_plugins = []
     def self.available
-      @available_plugins
+      @available_plugins ||= []
     end
-    
+        
     class Plugin &lt; PoolParty::Service
       include CloudResourcer
       include PoolParty::DependencyResolverCloudExtensions
       include PoolParty::Callbacks
       
-      default_options(
-        :name =&gt; nil
-      )
+      dsl_methods :name
       
-      def initialize(opts={}, extra_opts={}, prnt=nil, &amp;block)        
+      def initialize(opts={}, extra_opts={}, prnt=nil, &amp;block)
         setup_callbacks
-        
-        run_in_context do
-          before_load(opts, &amp;block)
-        end
-        
-        block = Proc.new {enable} unless block        
-        
+
+        run_in_context {  before_load(opts, &amp;block) }
+
+        block = Proc.new {enable} unless block
+
         super(opts, &amp;block)
-        
-        run_in_context do
-          loaded opts, &amp;block
-        end
-        
+
+        run_in_context { loaded opts, &amp;block }
+
         after_create
       end
       
       # Overwrite this method
-      def before_load(o={}, &amp;block)        
+      def before_load(o={}, &amp;block)
       end
       def loaded(o={}, &amp;block)
       end
@@ -60,6 +53,14 @@ module PoolParty
         end
       end
       
+      def name(n=nil)
+        if n
+          self.name = n
+        else
+          self.name ||= self.class.to_s.split('::').pop.snake_case
+        end
+      end
+      
       def bootstrap_gems *gems
         gems.each do |g|
           Provision::BootStrapper.gem_list &lt;&lt; g unless Provision::BootStrapper.gem_list.include?(g)
@@ -75,9 +76,32 @@ module PoolParty
       end
       
       def self.inherited(subclass)
-        method_name = subclass.to_s.top_level_class.gsub(/pool_party_/, '').gsub(/_class/, '').downcase.to_sym
-        add_has_and_does_not_have_methods_for(method_name)
-        add_resource_lookup_method(method_name)
+        
+        klass = subclass.to_s.split('::').pop.to_s
+        add_has_and_does_not_have_methods_for(klass.snake_case)
+        add_resource_lookup_method(klass.snake_case)
+        
+        # Add the plugin definition to the cloud as an instance method
+        # For example apache do; apache option and method; end
+        meth = &lt;&lt;-EOM
+          def #{klass.snake_case}(opts={}, &amp;block)
+            i = plugin_store.select {|i| i if i.class.to_s =~ /#{klass}/ }.first if plugin_store
+            if i
+              i
+            else
+              inst = ::PoolParty::Plugin::#{klass}.new(opts, parent, &amp;block)               
+              plugin_store &lt;&lt; inst if plugin_store
+              inst
+            end
+          end
+        EOM
+        
+        ::PoolParty::PoolPartyBaseClass.module_eval meth
+        
+        # Store the plugins so they will be availble in an array at Plugin.available
+        ::PoolParty::Plugin.available &lt;&lt; subclass
+        super
+        
       end
       
     end</diff>
      <filename>lib/poolparty/poolparty/plugin.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,45 +3,53 @@ require File.join(File.dirname(__FILE__), &quot;resource&quot;)
 module PoolParty    
   module PluginModel
     
-    def plugin(name=:plugin, cloud=nil, &amp;block)
-      plugins[name] ||= PluginModel.new(name, &amp;block)
-    end
-    alias_method :register_plugin, :plugin
-    
-    def plugins
-      $plugins ||= {}
-    end
+    # def plugin(name=:plugin, cloud=nil, &amp;block)
+    #   # plugins[name] ||= PluginModel.new(name, &amp;block)
+    #   return plugins[name] if plugins[name]
+    #   PoolParty::Plugin.module_eval &lt;&lt;-EOM
+    #     class #{name.to_s.camelcase} &lt; Plugin
+    #     end
+    #   EOM
+    #   &quot;PoolParty::Plugin::#{name.to_s.camelcase}&quot;.constantize.module_eval &amp;block
+    #   
+    # end
+    # alias_method :register_plugin, :plugin
+    # alias_method :virtual_resource, :plugin
+    # 
+    # def plugins
+    #   $plugins ||= {}
+    # end
     
     class PluginModel
       attr_accessor :klass
       
       def initialize(name,&amp;block)        
-        symc = &quot;#{name}&quot;.top_level_class.camelcase
-        klass = symc.class_constant(PoolParty::Plugin::Plugin, {:preserve =&gt; true}, &amp;block)
-        
-        
-        lowercase_class_name = symc.downcase
-        # Store the name of the class for pretty printing later
-        # klass.name = name
-        # Add the plugin definition to the cloud as an instance method
-        meth = &lt;&lt;-EOM
-          def #{lowercase_class_name}(opts={}, &amp;block)
-            i = plugin_store.select {|i| i if i.class == #{lowercase_class_name.camelcase}Class }.first if plugin_store
-            if i
-              i
-            else              
-              inst = #{lowercase_class_name.camelcase}Class.new(opts, parent, &amp;block)
-              plugin_store &lt;&lt; inst if plugin_store
-              inst
-            end
-          end
-        EOM
-
-        PoolParty::Cloud::Cloud.class_eval meth
-        PoolParty::Service.add_has_and_does_not_have_methods_for(lowercase_class_name.to_sym)
-        
-        # Store the plugins so they will be availble in an array at Plugin.available
-        ::PoolParty::Plugin.available &lt;&lt; klass
+        # symc = &quot;#{name}&quot;.top_level_class.camelcase
+        # klass = symc.class_constant(PoolParty::Plugin::Plugin, {:preserve =&gt; true}, &amp;block)
+        # 
+        # 
+        # lowercase_class_name = symc.downcase
+        # # Store the name of the class for pretty printing later
+        # # klass.name = name
+        # # Add the plugin definition to the cloud as an instance method
+        # meth = &lt;&lt;-EOM
+        #   def #{lowercase_class_name}(opts={}, &amp;block)
+        #     i = plugin_store.select {|i| i if i.class == #{lowercase_class_name.camelcase} }.first if plugin_store
+        #     if i
+        #       i
+        #     else              
+        #       inst = #{lowercase_class_name.camelcase}.new(opts, parent, &amp;block)
+        #       plugin_store &lt;&lt; inst if plugin_store
+        #       inst
+        #     end
+        #   end
+        # EOM
+        # 
+        # PoolParty::Cloud::Cloud.class_eval meth
+        # PoolParty::Service.add_has_and_does_not_have_methods_for(lowercase_class_name.to_sym)
+        # 
+        # # Store the plugins so they will be availble in an array at Plugin.available
+        # ::PoolParty::Plugin.available &lt;&lt; klass
         
       end
       </diff>
      <filename>lib/poolparty/poolparty/plugin_model.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ module PoolParty
     $context_stack ||= []
   end
   
-  class PoolPartyBaseClass          
+  class PoolPartyBaseClass
     attr_reader :init_opts
     
     include Parenting, Dslify
@@ -72,16 +72,10 @@ module PoolParty
     end
     
     # Add to the services pool for the manifest listing
-    def add_service(serv, extra_name=&quot;&quot;)
-      subclass = &quot;#{serv.class.to_s.top_level_class.underscore.downcase}#{extra_name}&quot;
-      lowercase_class_name = subclass.to_s.underscore.downcase || subclass.downcase
-      
-      # (services[lowercase_class_name.to_sym] ||= []) &lt;&lt; serv if serv &amp;&amp; !serv.empty?
+    def add_service(serv)      
       ordered_resources &lt;&lt; serv
-      # services.merge!({lowercase_class_name.to_sym =&gt; serv})
     end
-    # Container for the services
-
+    
     def inspect
       to_properties_hash.inspect
     end
@@ -92,7 +86,6 @@ module PoolParty
           
     def to_json
       to_hash.to_json
-      # JSON.generate(to_hash)
     end
 
     def resources</diff>
      <filename>lib/poolparty/poolparty/poolparty_base_class.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ module PoolParty
     
     def to_properties_hash
       { :pp_type =&gt; &quot;plugin&quot;, :options =&gt; dsl_options, 
-        :name =&gt; self.class.to_s.top_level_class,
+        # :name =&gt; self.class.to_s.top_level_class,
         :resources =&gt; ordered_resources.map {|a| a.to_properties_hash }}
     end
     
@@ -17,20 +17,18 @@ module PoolParty
       nil
     end
     
-    def self.add_has_and_does_not_have_methods_for(typ=:file)
-      lowercase_class_name = typ.to_s.top_level_class.downcase
-      
+    def self.add_has_and_does_not_have_methods_for(typ=:file)      
       meth = &lt;&lt;-EOM
-        def __#{lowercase_class_name}(opts={}, &amp;block)
-          i = PoolParty::#{lowercase_class_name.camelcase}Class.new(opts, &amp;block)
+        def __#{typ}(opts={}, &amp;block)
+          i = ::PoolParty::Plugin::#{typ.camelcase}.new(opts, &amp;block)
           plugin_store &lt;&lt; i if respond_to?(:plugin_store)
           i
         end
-        alias :#{lowercase_class_name} :__#{lowercase_class_name}
+        alias :#{typ} :__#{typ}
       EOM
       
       PoolParty::PoolPartyBaseClass.module_eval meth
-      PoolParty::PoolPartyBaseClass.add_has_and_does_not_have_methods_for(lowercase_class_name.to_sym)
+      PoolParty::PoolPartyBaseClass.add_has_and_does_not_have_methods_for(typ.to_sym)
     end
     
   end</diff>
      <filename>lib/poolparty/poolparty/service.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,14 +2,12 @@ require File.dirname(__FILE__) + '/bin_spec_helper'
 require &quot;poolparty&quot;
 
 class PuppetResolverSpec
-  plugin :apache do
-  end
 end
 
 describe &quot;Server list active binary&quot; do
   describe &quot;with real cloud&quot; do
     before(:each) do
-      Kernel::HaproxyClass.stub!(:new).and_return nil
+      ::PoolParty::Plugin::Haproxy.stub!(:new).and_return nil
       $pool_specfile = __FILE__
       @p = PoolParty::Pool::Pool.load_from_file &quot;#{::File.dirname(__FILE__)}/fixtures/bin_cloud_for_test.rb&quot;
       @pool_hash = @p.to_properties_hash</diff>
      <filename>spec/bin/server-list-active_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -72,7 +72,7 @@ listen web_proxy 127.0.0.1:3000
       @str = &quot;prok&quot;
     end
     it &quot;should be able to turn itself into constant&quot; do
-      @str.class_constant.should == PoolPartyProkClass
+      @str.class_constant.should == PoolPartyProk
     end
     it &quot;should turn itself into a class constant&quot; do
       @str.class_constant.class.should == Class</diff>
      <filename>spec/poolparty/core/string_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -64,8 +64,6 @@ describe &quot;ChefResolver&quot; do
   describe &quot;with a cloud&quot; do
     before(:each) do
       class ChefResolverSpec
-        plugin :apache do
-        end
       end
       @cloud = cloud :hope do
         keypair &quot;bob&quot;</diff>
      <filename>spec/poolparty/dependency_resolver/chef_resolver_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,15 +22,15 @@ class DependencyResolverSpecTestCloud &lt; DependencyResolverCloudExtensionsSpecBas
   dsl_methods :keypair, :name
 end
 
-class JunkClassForDefiningPlugin
-  plugin :apache_plugin do
-    default_options(
-      :listen =&gt; 80
-    )
-    def loaded(o={},&amp;block)
-    end
-  end  
-end
+# class JunkClassForDefiningPlugin
+#   apache_plugin do
+#     default_options(
+#       :listen =&gt; 80
+#     )
+#     def loaded(o={},&amp;block)
+#     end
+#   end  
+# end
 
 describe &quot;Resolution spec&quot; do
   before(:each) do
@@ -84,7 +84,7 @@ describe &quot;Resolution spec&quot; do
     before(:each) do
       reset!
       ::File.stub!(:basename).and_return &quot;template&quot;
-      @file = &quot;Hello &lt;%= friends %&gt; on port &lt;%= listen %&gt;&quot;
+      @file = &quot;Hello &lt;%= friends %&gt; on port &lt;%= port %&gt;&quot;
       @file.stub!(:read).and_return @file
       Template.stub!(:open).and_return @file
 
@@ -95,11 +95,14 @@ describe &quot;Resolution spec&quot; do
         has_directory :name =&gt; &quot;/var/www&quot;
         has_package :name =&gt; &quot;bash&quot;
         # parent == nil
-        apache_plugin do
+        apache do
           # parent == TestClass
           # puts &quot;&lt;pre&gt;#{parent}&lt;/pre&gt; on &lt;pre&gt;#{context_stack.map {|a| a.class }.join(&quot;, &quot;)} from #{self.class}&lt;/pre&gt;&quot;
           listen &quot;8080&quot;
-          has_file :name =&gt; &quot;/etc/apache2/apache2.conf&quot;, :template =&gt; &quot;/absolute/path/to/template&quot;, :friends =&gt; &quot;bob&quot;, :render_as =&gt; :erb
+          has_file :name =&gt; &quot;/etc/apache2/apache2.conf&quot;, 
+                   :template =&gt; &quot;/absolute/path/to/template&quot;, 
+                   :friends =&gt; &quot;bob&quot;, 
+                   :render_as =&gt; :erb
         end
       end
       @cloud = clouds[:dog_for_test]
@@ -115,7 +118,7 @@ describe &quot;Resolution spec&quot; do
       @properties[:resources].class.should == Array
     end
     it &quot;contain content in the template's hash&quot; do
-      @apache_key.resources.select_with_hash(:pp_type =&gt; &quot;file&quot;).last[:content].should == &quot;Hello bob on port 8080&quot;
+      @apache_key.resources.select_with_hash(:pp_type =&gt; &quot;file&quot;).first[:content].should == &quot;Hello bob on port 8080&quot;
     end
     it &quot;contain the files in a hash&quot; do
       # puts &quot;&lt;pre&gt;#{@properties.to_yaml}&lt;/pre&gt;&quot;</diff>
      <filename>spec/poolparty/dependency_resolver/dependency_resolver_cloud_extensions_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,68 +1,68 @@
-#TODO: Reimplement
-require File.dirname(__FILE__) + '/../spec_helper'
-
-describe &quot;deployments&quot; do
-  describe &quot;class&quot; do
-    before(:each) do
-      @klass = PoolParty::Extra::Deployments
-      @file = &quot;hanky_danky_ranky.pool&quot;
-      ::File.stub!(:file?).with(@file).and_return false
-    end
-    it &quot;should have the singleton method include_deployment&quot; do
-      @klass.respond_to?(:include_deployment).should == true
-    end
-    it &quot;should return nil if the file doesn't exist&quot; do
-      @klass.include_deployment(@file).should == nil
-    end
-    describe &quot;existing file&quot; do
-      before(:each) do
-        ::File.stub!(:file?).and_return true
-        @contents = &quot;'hello goober'&quot;
-        @klass.stub!(:open).with(@file).and_return @file
-        @file.stub!(:read).and_return @contents
-        @klass.include_deployment(@file).should_not == nil
-      end
-      it &quot;should not be nil if the file does exist&quot; do        
-        @klass.include_deployment(@file).should_not == nil
-      end
-      it &quot;should create a class called PoolPartyHankyDankyRankyClass&quot; do
-        @klass.include_deployment(@file).nil?.should == false
-        Object.const_defined?(:HankyDankyRankyClass).should == true
-      end
-      it &quot;should create a method on the class called enable&quot; do
-        HankyDankyRankyClass.new.respond_to?(:enable).should == true
-      end
-      it &quot;should add the contents of the file to be eval'd on the method&quot; do
-        # puts HankyDankyRankyClass.new.enable
-        # HankyDankyRankyClass.new.enable.should == &quot;hello goober&quot;
-        pending
-      end
-    end
-    describe &quot;include_deployments&quot; do
-      before(:each) do
-        ::File.stub!(:directory?).and_return false
-        @dir = &quot;/deployments&quot;
-      end
-      it &quot;should have the method include_deployments&quot; do
-        @klass.respond_to?(:include_deployments).should == true
-      end
-      it &quot;should return nil if the directory does not exist&quot; do
-        @klass.include_deployments(@dir).should == nil
-      end
-      describe &quot;existing directory&quot; do
-        before(:each) do          
-          ::File.stub!(:directory?).and_return true
-          @contents = []
-          Dir.stub!(:[]).and_return @contents
-        end
-        it &quot;should not be nil if the directory exists&quot; do
-          @klass.include_deployments(@dir).nil?.should == false
-        end
-        it &quot;should call Dir.[] on the directory&quot; do
-          Dir.should_receive(:[]).with(&quot;#{@dir}/*&quot;).and_return []
-          @klass.include_deployments(@dir)
-        end
-      end
-    end
-  end
-end
\ No newline at end of file
+# #TODO: Reimplement
+# require File.dirname(__FILE__) + '/../spec_helper'
+# 
+# describe &quot;deployments&quot; do
+#   describe &quot;class&quot; do
+#     before(:each) do
+#       @klass = PoolParty::Extra::Deployments
+#       @file = &quot;hanky_danky_ranky.pool&quot;
+#       ::File.stub!(:file?).with(@file).and_return false
+#     end
+#     it &quot;should have the singleton method include_deployment&quot; do
+#       @klass.respond_to?(:include_deployment).should == true
+#     end
+#     it &quot;should return nil if the file doesn't exist&quot; do
+#       @klass.include_deployment(@file).should == nil
+#     end
+#     describe &quot;existing file&quot; do
+#       before(:each) do
+#         ::File.stub!(:file?).and_return true
+#         @contents = &quot;'hello goober'&quot;
+#         @klass.stub!(:open).with(@file).and_return @file
+#         @file.stub!(:read).and_return @contents
+#         @klass.include_deployment(@file).should_not == nil
+#       end
+#       it &quot;should not be nil if the file does exist&quot; do        
+#         @klass.include_deployment(@file).should_not == nil
+#       end
+#       it &quot;should create a class called PoolPartyHankyDankyRankyClass&quot; do
+#         @klass.include_deployment(@file).nil?.should == false
+#         Object.const_defined?(Plugin::HankyDankyRanky).should == true
+#       end
+#       it &quot;should create a method on the class called enable&quot; do
+#         HankyDankyRanky.new.respond_to?(:enable).should == true
+#       end
+#       it &quot;should add the contents of the file to be eval'd on the method&quot; do
+#         # puts HankyDankyRankyClass.new.enable
+#         # HankyDankyRankyClass.new.enable.should == &quot;hello goober&quot;
+#         pending
+#       end
+#     end
+#     describe &quot;include_deployments&quot; do
+#       before(:each) do
+#         ::File.stub!(:directory?).and_return false
+#         @dir = &quot;/deployments&quot;
+#       end
+#       it &quot;should have the method include_deployments&quot; do
+#         @klass.respond_to?(:include_deployments).should == true
+#       end
+#       it &quot;should return nil if the directory does not exist&quot; do
+#         @klass.include_deployments(@dir).should == nil
+#       end
+#       describe &quot;existing directory&quot; do
+#         before(:each) do          
+#           ::File.stub!(:directory?).and_return true
+#           @contents = []
+#           Dir.stub!(:[]).and_return @contents
+#         end
+#         it &quot;should not be nil if the directory exists&quot; do
+#           @klass.include_deployments(@dir).nil?.should == false
+#         end
+#         it &quot;should call Dir.[] on the directory&quot; do
+#           Dir.should_receive(:[]).with(&quot;#{@dir}/*&quot;).and_return []
+#           @klass.include_deployments(@dir)
+#         end
+#       end
+#     end
+#   end
+# end
\ No newline at end of file</diff>
      <filename>spec/poolparty/extra/deployments_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,15 @@
 require File.dirname(__FILE__) + '/../spec_helper'
 
-class TestService
-  plugin :test_service do
-    def initialize(o={}, e=nil, &amp;block)
-      super(&amp;block)
-    end
-    def enable(o={})
-      has_file(:name =&gt; &quot;/etc/poolparty/lobos&quot;)
-    end                  
+module PoolParty
+  module Plugin
+   class  TestService &lt; Plugin
+      def initialize(o={}, e=nil, &amp;block)
+        super(&amp;block)
+      end
+      def enable(o={})
+        has_file(:name =&gt; &quot;/etc/poolparty/lobos&quot;)
+      end
+    end 
   end
 end
 
@@ -214,14 +216,14 @@ describe &quot;Cloud&quot; do
               @cloud.instance_eval do
                 @heartbeat = nil
               end
-              @hb = PoolpartyBaseHeartbeatClass.new
+              @hb = PoolParty::Plugin::Heartbeat.new
             end
             it &quot;should call enable on the plugin call&quot; do
-              @hb = PoolpartyBaseHeartbeatClass.new
-              PoolpartyBaseHeartbeatClass.stub!(:new).and_return @hb
+              @hb = PoolParty::Plugin::Heartbeat.new
+              PoolParty::Plugin::Heartbeat.stub!(:new).and_return @hb
               
               @cloud.send :add_poolparty_base_requirements
-              @cloud.poolparty_base_heartbeat.should == @hb
+              @cloud.heartbeat.should == @hb
             end
             describe &quot;after adding&quot; do
               before(:each) do
@@ -234,19 +236,19 @@ describe &quot;Cloud&quot; do
                   @cloud8 = cloud :tester do
                     test_service
                   end
-                  @service = clouds[:tester].ordered_resources.select {|hsh| hsh.class == TestServiceClass }.first
+                  @service = clouds[:tester].ordered_resources.select {|hsh|
+                    hsh.name == &quot;test_service&quot; 
+                    }.first
                   @files = @service.resource(:file)
                 end
                 it &quot;should have a file resource&quot; do
-                  # @files.first.nil?.should == false
-                  pending
+                  @files.first.nil?.should == false
                 end
                 it &quot;should have an array of lines&quot; do
                   @files.class.should == Array
                 end
-                it &quot;should not be empty&quot; do
-                  # @files.should_not be_empty
-                  pending
+                it &quot;should have the file /etc/poolparty/lobos&quot; do
+                  @files.first.name.should == &quot;/etc/poolparty/lobos&quot;
                 end
               end
             end</diff>
      <filename>spec/poolparty/poolparty/cloud_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ pool :poolpartyrb do
     # Configuration
     minimum_instances 1
     
-    apachetest do
+    apache_test do
       enable_php
       site(&quot;poolpartyrb.com&quot;)
     end</diff>
      <filename>spec/poolparty/poolparty/configurers/files/ruby_basic.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ pool :poolpartyrb do
         :document_root =&gt; &quot;/www/domain2&quot;,
         :server_name =&gt; &quot;domain2.com&quot;
       })
-    end    
+    end
     
   end
   </diff>
      <filename>spec/poolparty/poolparty/configurers/files/ruby_plugins.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,34 +5,27 @@ describe &quot;Plugin&quot; do
   before(:each) do
     reset!
     @c = cloud :test_plugin_model_cloud do
-      apachetest do                
+      apache_test do                
         site(&quot;heady&quot;, {
           :document_root =&gt; &quot;/root&quot;
         })
       end
     end
   end
-  describe &quot;methods should include&quot; do
-    it &quot;register_plugin(plugin)&quot; do;WebServers.respond_to?(:register_plugin).should == true;end
-  end
+
   describe &quot;registered&quot; do
     before(:each) do
-      @plugin = @c.apachetest
+      @plugin = @c.apache_test
     end
 
-    describe &quot;storage&quot; do
-      it &quot;should be able to retrieve the plugin as a name&quot; do
-        @c.plugin(&quot;apachetest&quot;).should_not be_nil
-      end
-    end
-    it &quot;be of the class apachetesttestClass on the Kernel&quot; do
-      @plugin.class.should == Kernel::ApachetestClass
+    it &quot;be of the class apache_testtestClass on the Kernel&quot; do
+      @plugin.class.should == PoolParty::Plugin::ApacheTest
     end
     it &quot;should store the regsitered plugins in an array&quot; do
       @plugin.should_not be_nil
     end
     it &quot;should have the plugin name as a method on the cloud &quot; do
-      @c.respond_to?(:apachetest).should == true
+      @c.respond_to?(:apache_test).should == true
     end
     
     describe &quot;methods&quot; do</diff>
      <filename>spec/poolparty/poolparty/plugin_model_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,33 +8,33 @@ describe &quot;Plugin&quot; do
     before(:each) do
       reset!
       cloud :app_for_plugin do
-        apachetest do
+        apache_test do
           enable_php
           site(&quot;heady&quot;, {
             :document_root =&gt; &quot;/root&quot;
           })
         end
-        apachetest do
+        apache_test do
           site(&quot;boob&quot;)
         end
       end
-      @plugin = clouds[:app_for_plugin].apachetest
+      @plugin = clouds[:app_for_plugin].apache_test
     end
     it &quot;should not be empty&quot; do
-      clouds[:app_for_plugin].apachetest.class.should == ApachetestClass
+      clouds[:app_for_plugin].apache_test.class.should == ::PoolParty::Plugin::ApacheTest
     end
     it &quot;should set loaded == true&quot; do
-      clouds[:app_for_plugin].apachetest.loaded.should == true
+      clouds[:app_for_plugin].apache_test.loaded.should == true
     end
     it &quot;should have enable_php as a method&quot; do
-      ApachetestClass.new.respond_to?(:enable_php).should == true
+      ::PoolParty::Plugin::ApacheTest.new.respond_to?(:enable_php).should == true
     end
     it &quot;should set enable_php&quot; do
       @plugin.enable_php.should == true
     end
     it &quot;should store the plugin in the clouds plugin_store&quot; do
       clouds[:app_for_plugin].plugin_store[-2].class.should == @plugin.class
-      clouds[:app_for_plugin].apachetest
+      clouds[:app_for_plugin].apache_test
       clouds[:app_for_plugin].plugin_store[-2].class.should == @plugin.class
     end
   end</diff>
      <filename>spec/poolparty/poolparty/plugin_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,28 +1,32 @@
-class WebServers
-  plugin :apachetest do    
-    def loaded(o={}, &amp;block)
-      @loaded ||= true
-    end
-    
-    def enable
-    end
-    
-    def enable_php
-      @php = true
-    end
-    
-    def php
-      @php ||= false
-    end
+module PoolParty
+  module Plugin
     
-    def site(name=:domain1, opts={})
-      virtual_host name, opts
+    class ApacheTest &lt; Plugin
+      def loaded(o={}, &amp;block)
+        @loaded ||= true
+      end
+
+      def enable
+      end
+
+      def enable_php
+        @php = true
+      end
+
+      def php
+        @php ||= false
+      end
+
+      def site(name=:domain1, opts={})
+        virtual_host name, opts
+      end
+
+      def virtual_host(name, opts={})
+        opts = {
+          :document_root =&gt; opts[:document_root] || &quot;/www/#{name}/&quot;
+        }
+      end
     end
     
-    def virtual_host(name, opts={})
-      opts = {
-        :document_root =&gt; opts[:document_root] || &quot;/www/#{name}/&quot;
-      }
-    end        
   end
 end</diff>
      <filename>spec/poolparty/poolparty/test_plugins/webserver.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,5 @@
 require &quot;#{::File.dirname(__FILE__)}/../../test_helper&quot;
 
-class PuppetResolverSpec
-  plugin :apache do
-  end
-end
-
 class TestPuppetResolver &lt; Test::Unit::TestCase
   context &quot;from a hash&quot; do
     setup do</diff>
      <filename>test/poolparty/dependency_resolver/puppet_resolver_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -52,7 +52,7 @@ class TestCloudDsl &lt; Test::Unit::TestCase
     should &quot;call haproxy when adding enabled serivces&quot; do
       @cloud.add_optional_enabled_services
       klasses = @cloud.plugin_store.map {|a| a.class.to_s.split(&quot;::&quot;)[-1] }
-      klasses.include?(&quot;HaproxyClass&quot;).should == true
+      klasses.include?(&quot;Haproxy&quot;).should == true
     end
   end
   </diff>
      <filename>test/poolparty/modules/cloud_dsl_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@ class TestChefDeploy &lt; Test::Unit::TestCase
     end
 
     should &quot;place a resource on the cloud&quot; do
-      @cloud.ordered_resources.first.class.should == ChefDeployClass
+      assert_equal PoolParty::Plugin::ChefDeploy, @cloud.ordered_resources.first.class
     end
     should &quot;raise if :repo is not passed&quot; do
       assert_raise ReposMissingError do</diff>
      <filename>test/poolparty/plugins/chef_deploy_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,7 @@ class TestRailsDeploy &lt; Test::Unit::TestCase
     end
 
     should &quot;place a resource on the cloud&quot; do
-      @cloud.ordered_resources.first.class.should == RailsDeployClass
+      assert_equal PoolParty::Plugin::RailsDeploy, @cloud.ordered_resources.first.class
     end
     should &quot;raise if :repo is not passed&quot; do
       assert_raise PoolParty::ReposMissingError do</diff>
      <filename>test/poolparty/plugins/rails_deploy_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,23 +1,18 @@
 require &quot;#{::File.dirname(__FILE__)}/../../test_helper&quot;
 
-class PluginClass
-  plugin :box do
+module PoolParty
+  module Plugin
+    class Box &lt; Plugin
+    end
   end
 end
 
 class TestPlugins &lt; Test::Unit::TestCase
   context &quot;services&quot; do
-    # setup do
-    #   reset!
-    #   @tbc = TestBaseClass.new do
-    #     box do
-    #     end
-    #   end
-    # end
     
     should &quot; have array of availble plugins&quot; do
-      assert Plugin.available.include?(Kernel::BoxClass)
-      assert Plugin.available.include?(Kernel::GitClass)
+      assert Plugin.available.include?(PoolParty::Plugin::Box)
+      assert Plugin.available.include?(PoolParty::Plugin::Git)
     end
     
   end</diff>
      <filename>test/poolparty/poolparty/plugin_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1 +1 @@
-Subproject commit d24758aaf5fa642d858f7fc26cb93a61d9e8da99
+Subproject commit fe05bb0bb74c047e6a59fbe64fdb1bd54ec10d22</diff>
      <filename>vendor/gems/rest-client</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/poolparty/base_packages/haproxy.rb</filename>
    </removed>
    <removed>
      <filename>lib/poolparty/base_packages/heartbeat.rb</filename>
    </removed>
    <removed>
      <filename>lib/poolparty/base_packages/poolparty.rb</filename>
    </removed>
    <removed>
      <filename>lib/poolparty/base_packages/ruby.rb</filename>
    </removed>
    <removed>
      <filename>lib/poolparty/base_packages/runit.rb</filename>
    </removed>
    <removed>
      <filename>spec/poolparty/base_packages/haproxy_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/poolparty/base_packages/heartbeat_spec.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>d9f0af4a20ad2d110990ae64c8f3ef7a71935c8e</id>
    </parent>
  </parents>
  <author>
    <name>fairchild</name>
    <email>fairchild@stimble.net</email>
  </author>
  <url>http://github.com/auser/poolparty/commit/3209c62695e9456e07f926a3e6cf3db0721ebe2a</url>
  <id>3209c62695e9456e07f926a3e6cf3db0721ebe2a</id>
  <committed-date>2009-05-28T21:02:44-07:00</committed-date>
  <authored-date>2009-05-28T21:02:44-07:00</authored-date>
  <message>Move base_packages/* files to plugins/*
Eliminate the plugin do method, just 
use class &lt; Plugin to create plugins
Remove all uses of virtual_resource, replaced with class &lt; Plugin
Break Apache plugin into multiple files
FIXME: name on plugins
Add an .rdebugrc</message>
  <tree>15e6a3e0988057913218062fc8dce3ef6cd05548</tree>
  <committer>
    <name>fairchild</name>
    <email>fairchild@stimble.net</email>
  </committer>
</commit>
