<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -22,10 +22,12 @@ module Videojuicer
       end
       
       def page_count
+        return 1 if limit.nil?
         (total.to_f/limit.to_f).ceil
       end
       
       def page_number
+        return 1 if limit.nil?
         (offset.to_f/limit.to_f).ceil
       end
       </diff>
      <filename>lib/videojuicer/resource/collection.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,4 +22,10 @@ describe Videojuicer::Resource::Collection do
     @collection.page_number.should == 2
   end
   
+  it &quot;pagination copes with a nil limit&quot; do
+    collection = Videojuicer::Resource::Collection.new(@objects[0..9], 155, 17, nil)
+    collection.page_count.should == 1
+    collection.page_number.should == 1
+  end
+  
 end
\ No newline at end of file</diff>
      <filename>spec/collection_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -85,9 +85,6 @@ shared_examples_for &quot;a RESTFUL resource model&quot; do
       it &quot;should return a collection object&quot; do
         @list.should be_kind_of(Videojuicer::Resource::Collection)
       end
-      it &quot;should add the pagination options to the collection object&quot; do
-        @list.limit.should be_kind_of(Numeric)
-      end
       
       describe &quot;with pagination settings&quot; do
         before(:all) do</diff>
      <filename>spec/shared/resource_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7f33d10537be7d7942d9d87b988624a34f06104c</id>
    </parent>
  </parents>
  <author>
    <name>Andre Ben Hamou</name>
    <email>andre@bluetheta.com</email>
  </author>
  <url>http://github.com/videojuicer/core-sdk/commit/2e45e084077093c30284a1c7e093ab55041e7528</url>
  <id>2e45e084077093c30284a1c7e093ab55041e7528</id>
  <committed-date>2009-10-07T03:51:08-07:00</committed-date>
  <authored-date>2009-10-07T03:51:08-07:00</authored-date>
  <message>SDK now properly adapted to the fact that limits are nil by default</message>
  <tree>e94e6d3d1c39cbc09a74c678263857011f755d32</tree>
  <committer>
    <name>Andre Ben Hamou</name>
    <email>andre@bluetheta.com</email>
  </committer>
</commit>
