From 869d731cca89759f6dd7c141776b5d7358b59b9d Mon Sep 17 00:00:00 2001
From: David Heinemeier Hansson <david@envy8-2.local>
Date: Tue, 29 Apr 2008 17:16:36 -0500
Subject: Fixed response logging to use length instead of the entire thing
 (seangeo) [#27 state:resolved]

---
 activeresource/lib/active_resource/connection.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'activeresource/lib')

diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb
index 98b3f87167..46e3d1f4e3 100644
--- a/activeresource/lib/active_resource/connection.rb
+++ b/activeresource/lib/active_resource/connection.rb
@@ -140,7 +140,7 @@ module ActiveResource
         logger.info "#{method.to_s.upcase} #{site.scheme}://#{site.host}:#{site.port}#{path}" if logger
         result = nil
         time = Benchmark.realtime { result = http.send(method, path, *arguments) }
-        logger.info "--> #{result.code} #{result.message} (#{result.body ? result.body : 0}b %.2fs)" % time if logger
+        logger.info "--> #{result.code} #{result.message} (#{result.body ? result.body.length : 0}b %.2fs)" % time if logger
         handle_response(result)
       rescue Timeout::Error => e
         raise TimeoutError.new(e.message)
-- 
cgit v1.2.3


From 64092de25727c1943807bf5345107d90428135a0 Mon Sep 17 00:00:00 2001
From: Xavier Noria <fxn@hashref.com>
Date: Fri, 2 May 2008 14:45:23 +0100
Subject: Improve documentation coverage and markup Signed-off-by: Pratik Naik
 <pratiknaik@gmail.com>

---
 activeresource/lib/active_resource/base.rb       | 11 ++++++-----
 activeresource/lib/active_resource/connection.rb |  4 ++--
 2 files changed, 8 insertions(+), 7 deletions(-)

(limited to 'activeresource/lib')

diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 4072b9494d..eff92c91de 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -457,13 +457,14 @@ module ActiveResource
       # The first argument is considered to be the scope of the query.  That is, how many 
       # resources are returned from the request.  It can be one of the following.
       #
-      # +:one+:: Returns a single resource.
-      # +:first+:: Returns the first resource found.
-      # +:all+:: Returns every resource that matches the request.
+      # * <tt>:one</tt>: Returns a single resource.
+      # * <tt>:first</tt>: Returns the first resource found.
+      # * <tt>:all</tt>: Returns every resource that matches the request.
       # 
       # ==== Options
-      # +from+:: Sets the path or custom method that resources will be fetched from.
-      # +params+:: Sets query and prefix (nested URL) parameters.
+      #
+      # * +from+: Sets the path or custom method that resources will be fetched from.
+      # * +params+: Sets query and prefix (nested URL) parameters.
       #
       # ==== Examples
       #   Person.find(1)                                         
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb
index 46e3d1f4e3..0c4ea432d7 100644
--- a/activeresource/lib/active_resource/connection.rb
+++ b/activeresource/lib/active_resource/connection.rb
@@ -128,8 +128,8 @@ module ActiveResource
     end
 
     # Execute a HEAD request.
-    # Used to ...
-    def head(path, headers= {})
+    # Used to obtain meta-information about resources, such as whether they exist and their size (via response headers).
+    def head(path, headers = {})
       request(:head, path, build_request_headers(headers))
     end
 
-- 
cgit v1.2.3