<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/application/Rakefile</filename>
    </added>
    <added>
      <filename>test/application/app/controllers/application.rb</filename>
    </added>
    <added>
      <filename>test/application/app/controllers/thingy_controller.rb</filename>
    </added>
    <added>
      <filename>test/application/app/controllers/widgets_controller.rb</filename>
    </added>
    <added>
      <filename>test/application/app/models/user.rb</filename>
    </added>
    <added>
      <filename>test/application/app/models/widget.rb</filename>
    </added>
    <added>
      <filename>test/application/config/boot.rb</filename>
    </added>
    <added>
      <filename>test/application/config/database.yml</filename>
    </added>
    <added>
      <filename>test/application/config/environment.rb</filename>
    </added>
    <added>
      <filename>test/application/config/environments/test.rb</filename>
    </added>
    <added>
      <filename>test/application/config/routes.rb</filename>
    </added>
    <added>
      <filename>test/application/db/.gitignore</filename>
    </added>
    <added>
      <filename>test/application/lib/plugin_under_test_locator.rb</filename>
    </added>
    <added>
      <filename>test/application/log/.gitignore</filename>
    </added>
    <added>
      <filename>test/application/public/javascripts/application.js</filename>
    </added>
    <added>
      <filename>test/application/public/javascripts/controls.js</filename>
    </added>
    <added>
      <filename>test/application/public/javascripts/dragdrop.js</filename>
    </added>
    <added>
      <filename>test/application/public/javascripts/effects.js</filename>
    </added>
    <added>
      <filename>test/application/public/javascripts/prototype.js</filename>
    </added>
    <added>
      <filename>test/application/script/about</filename>
    </added>
    <added>
      <filename>test/application/script/console</filename>
    </added>
    <added>
      <filename>test/application/script/dbconsole</filename>
    </added>
    <added>
      <filename>test/application/script/destroy</filename>
    </added>
    <added>
      <filename>test/application/script/generate</filename>
    </added>
    <added>
      <filename>test/application/script/performance/benchmarker</filename>
    </added>
    <added>
      <filename>test/application/script/performance/profiler</filename>
    </added>
    <added>
      <filename>test/application/script/performance/request</filename>
    </added>
    <added>
      <filename>test/application/script/plugin</filename>
    </added>
    <added>
      <filename>test/application/script/process/inspector</filename>
    </added>
    <added>
      <filename>test/application/script/process/reaper</filename>
    </added>
    <added>
      <filename>test/application/script/process/spawner</filename>
    </added>
    <added>
      <filename>test/application/script/runner</filename>
    </added>
    <added>
      <filename>test/application/script/server</filename>
    </added>
    <added>
      <filename>test/application/tmp/.gitignore</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,20 @@
 Authorize
 =========
+authorize is a Ruby on Rails plugin providing a sophisticated Role-Based Access Control (RBAC) system.  It started as a spinoff of Bill Katz's Authorization plugin, but has been substantially tested, debugged and enhanced since then.  Current functionality highlights include:
+
+ * Polymorphic association of ActiveRecord subject models.
+ * Polymorphic association of ActiveRecord trustee models.
+ * Flexible identity mappings to support Group-based roles.
+ * Syntax to support a single ActiveRecord model being both a subject and a trustee.
+ * Dynamic methods on subjects and trustees support domain-specific syntax: user.is_owner_of(widget)? and widget.is_owned_by?(user)
+ * Class-level role support (user.is_moderator_of?(Post)
+ * Generic/global-level role support (user.is_administrator?) 
+ * Performance-optimized Domain-Specific Language (DSL) for more sophisticated predicates (available in ActionController at controller and action level).
+
+For more information on the theory of RBAC, see http://en.wikipedia.org/wiki/Role-based_access_control, but note that the term &quot;subject&quot; is used where this plugin uses the term &quot;trustee&quot;.
+
+----------------
+
 The authorize plugin extends ActionController with the ability to check permissions and react accordingly.  There are two approaches:
 a simple boolean check (permit?) and a more sophisticated predicated block (permit) with exception handling.  In both cases, the method accepts
 a permissions description string expressed in a domain-specific language.  The simplest version of this language is just the name of the required </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,4 @@
 require File.dirname(__FILE__) + '/test_helper.rb'
-require File.dirname(__FILE__) + '/lib/thingy_controller.rb'
 
 class ControllerClassTest &lt; ActionController::TestCase
   fixtures :users, :widgets, :authorizations</diff>
      <filename>test/controller_class_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,4 @@
 require File.dirname(__FILE__) + '/test_helper.rb'
-require File.dirname(__FILE__) + '/lib/widgets_controller.rb'
 
 class ControllerTest &lt; ActionController::TestCase
   fixtures :users, :widgets, :authorizations
@@ -55,9 +54,7 @@ class ControllerTest &lt; ActionController::TestCase
   end
   
   test 'should find authorizations without identities method' do
-    class DegenerateUser &lt; ActiveRecord::Base
-      acts_as_trustee
-    end
+    class ::DegenerateUser &lt; ActiveRecord::Base; acts_as_trustee; end  
     du = DegenerateUser.create
     du.authorize('steward', widgets(:foo))
     assert_nothing_raised do</diff>
      <filename>test/controller_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,52 +1,37 @@
-require 'test/unit'
-
-# Boot Rails manually, instead of via the environment.rb file.  This help limit the impact of the host application.
-# Plugins are booted as a consequence of booting Rails.
-ENV['RAILS_ENV'] = 'test'
-RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
-require File.expand_path(File.join(File.dirname(__FILE__) + '/../../../../config/boot.rb'))
-Rails::Initializer.run
-
-# Remove the host application (../app/...) from the dependency and load paths.
-ActiveSupport::Dependencies.load_paths.delete_if {|path| /app\//.match(path) }
-ActiveSupport::Dependencies.load_once_paths.delete_if {|path| /app\//.match(path) }
-$LOAD_PATH.delete_if {|path| /app\//.match(path) }
-
-# Add our testing library directory to the load path.
-$LOAD_PATH.unshift(File.dirname(__FILE__) + '/lib')
-
-ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + &quot;/debug.log&quot;)
-
-db_adapter = ENV['DB']
-# no db passed, try one of these fine config-free DBs before bombing. 
-db_adapter ||= 
-  begin
-    require 'rubygems'
-    require 'sqlite'
-    'sqlite'
-  rescue MissingSourceFile
-    begin 
-      require 'sqlite3'
-      'sqlite3'
-    rescue MissingSourceFile
-    end
-  end
-
-if db_adapter.nil?
-  raise &quot;No DB Adapter selected. Pass the DB= option to pick one, or install Sqlite or Sqlite3.&quot; 
-end
-
-db_config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml'))
-ActiveRecord::Base.establish_connection(db_config[db_adapter])
+ENV['RAILS_ENV'] ||= 'test'
+require File.expand_path(File.dirname(__FILE__) + &quot;/application/config/environment&quot;)
+require 'test_help'
 
+# From this point forward, we can assume that we have booted a generic Rails environment plus
+# our (booted) plugin.
 load(File.dirname(__FILE__) + &quot;/schema.rb&quot;)
 
-require 'action_controller/test_process'
-
-require 'active_record/fixtures'
-Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + &quot;/fixtures&quot;
+# Run the migrations (optional)
+# ActiveRecord::Migrator.migrate(&quot;#{Rails.root}/db/migrate&quot;)
 
+# Set Test::Unit options for optimal performance/fidelity.
 class Test::Unit::TestCase
   self.use_transactional_fixtures = true
   self.use_instantiated_fixtures  = false
+  self.fixture_path = &quot;#{RAILS_ROOT}/../fixtures&quot;
+  
+  def self.uses_mocha(description)
+    require 'mocha'
+    yield
+  rescue LoadError
+    $stderr.puts &quot;Skipping #{description} tests. `gem install mocha` and try again.&quot;
+  end
+
+  def self.test(name, &amp;block)  # Shamelessly lifted from ActiveSupport
+    test_name = &quot;test_#{name.gsub(/\s+/,'_')}&quot;.to_sym
+    defined = instance_method(test_name) rescue false
+    raise &quot;#{test_name} is already defined in #{self}&quot; if defined
+    if block_given?
+      define_method(test_name, &amp;block)
+    else
+      define_method(test_name) do
+        flunk &quot;No implementation provided for #{name}&quot;
+      end
+    end
+  end
 end
\ No newline at end of file</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>test/database.yml</filename>
    </removed>
    <removed>
      <filename>test/lib/thingy_controller.rb</filename>
    </removed>
    <removed>
      <filename>test/lib/user.rb</filename>
    </removed>
    <removed>
      <filename>test/lib/widget.rb</filename>
    </removed>
    <removed>
      <filename>test/lib/widgets_controller.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>dea91dbc438f52d7507f521b292a6df0d9318202</id>
    </parent>
  </parents>
  <author>
    <name>Chris Hapgood</name>
    <email>cch1@hapgoods.com</email>
  </author>
  <url>http://github.com/cch1/authorize/commit/88870f1bfe4561f81110155a74001f78ff569293</url>
  <id>88870f1bfe4561f81110155a74001f78ff569293</id>
  <committed-date>2008-10-10T12:21:27-07:00</committed-date>
  <authored-date>2008-10-10T12:21:27-07:00</authored-date>
  <message>Switched to dedicated embedded test application

 * Fixed minor namespacing warning in test.
 * Updated README.</message>
  <tree>0769c37f2c1616529e591d72264fb7a5d6592ec4</tree>
  <committer>
    <name>Chris Hapgood</name>
    <email>cch1@hapgoods.com</email>
  </committer>
</commit>
