<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,7 @@
 
 # check to see if cache_fu is loaded
-puts &quot;=&gt; cached_resource requires cache_fu! &gt;&gt; http://svn.latimesdev.com/repos/shared/ruby/plugins/cache_fu/&quot; unless Object.const_defined?(:ActsAsCached)
+puts &quot;=&gt; cached_resource requires cache_fu! &gt;&gt; git://github.com/defunkt/cache_fu.git&quot; unless Object.const_defined?(:ActsAsCached)
 
-ActiveResource::Base.send :include, CachedResource
+if defined?(ActiveResource)
+  ActiveResource::Base.send :include, CachedResource
+end
\ No newline at end of file</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,7 +16,7 @@ module CachedResource
           scope = arguments[0]
           case scope
           when :all   then cached_find_every(arguments)
-          when :first then cached_find_every(arguments).first
+          when :first then cached_find_one(arguments)
           when :one   then cached_find_one(arguments)
           else             cached_find_single(arguments)
           end
@@ -38,7 +38,7 @@ module CachedResource
             end  
           end
 
-          response_elements || cached_id_array.map { |key| key.is_a?(String) ? cached_find_single([key]) : key }
+          response_elements || cached_id_array.map { |key| key.is_a?(String) || key.is_a?(Integer) ? cached_find_single([key]) : key }
         end
 
         def cached_find_one(arguments)
@@ -60,11 +60,19 @@ module CachedResource
         private
 
         def path_key(arguments)
+          scope   = arguments[0]
           options = arguments[1] || {}
-          prefix_options, query_options = split_options(options[:params])
-          # TODO: handle :from with Symbols
-          options[:from].nil? ? collection_path(prefix_options, query_options) :
-                                &quot;#{options[:from]}#{query_string(options[:params])}&quot;
+
+          return &quot;#{scope}:&quot; +
+            case from = options[:from]
+            when Symbol
+              custom_method_collection_url(from, options[:params])
+            when String
+              &quot;#{from}#{query_string(options[:params])}&quot;
+            else
+              prefix_options, query_options = split_options(options[:params])
+              collection_path(prefix_options, query_options)
+            end          
         end
 
       end</diff>
      <filename>lib/cached_resource.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,24 +1,4 @@
-$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
-
-ENV['RAILS_ENV'] = 'test'
-
-require 'test/unit'
-
-require File.expand_path(File.join(File.dirname(__FILE__), '../../../../config/environment.rb'))
-
-module ActsAsCached
-  module ClassMethods
-    def get_cache
-      yield if block_given?
-    end
-    def set_cache
-    end
-  end
-end
-
-class TestClass &lt; ActiveResource::Base
-  cached_resource
-end
+require File.join(File.dirname(__FILE__), 'helper')
 
 class CachedResourceTest &lt; Test::Unit::TestCase
 </diff>
      <filename>test/cached_resource_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8382a201fbefd65747add96748b9732b554cc0fc</id>
    </parent>
  </parents>
  <author>
    <name>David S. Kang</name>
    <email>david.s.kang@gmail.com</email>
  </author>
  <url>http://github.com/latimes/cached_resource/commit/fdf04db896f78aaaf325968ed1c168bd7a81896c</url>
  <id>fdf04db896f78aaaf325968ed1c168bd7a81896c</id>
  <committed-date>2008-12-16T17:35:21-08:00</committed-date>
  <authored-date>2008-12-16T13:33:21-08:00</authored-date>
  <message>Fixed a couple of issues with the plugin</message>
  <tree>629afaa2c567bdb947c1c80359c025dd8893b30d</tree>
  <committer>
    <name>dmcinnes</name>
    <email>doug@dougmcinnes.com</email>
  </committer>
</commit>
