<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitmodules</filename>
    </added>
    <added>
      <filename>vendor/fakeweb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -5,7 +5,7 @@ task :default =&gt; :spec
 
 spec_opts = 'spec/spec.opts'
 spec_glob = FileList['spec/**/*_spec.rb']
-libs = ['lib', 'spec']
+libs = ['lib', 'spec', 'vendor/fakeweb/lib']
 
 desc 'Run all specs in spec directory'
 Spec::Rake::SpecTask.new(:spec) do |t|</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -35,30 +35,26 @@ describe Contacts::Google, '.authentication_url' do
   end
 
   it 'should be able to exchange one-time for session token' do
-    # connection = mock_connection
-    # response = mock_response
-    # Net::HTTP.expects(:new).with('www.google.com', 443).returns(connection)
-    # connection.expects(:start)
-    # connection.expects(:get).with('/accounts/AuthSubSessionToken', 'Authorization' =&gt; %(AuthSub token=&quot;dummytoken&quot;)).returns(response)
-    # response.expects(:body).returns()
-    FakeWeb::register_uri 'https://www.google.com/accounts/AuthSubSessionToken',
+    FakeWeb::register_uri(:get, 'https://www.google.com/accounts/AuthSubSessionToken',
       :string =&gt; &quot;Token=G25aZ-v_8B\nExpiration=20061004T123456Z&quot;,
       :verify =&gt; lambda { |req|
         req['Authorization'].should == %(AuthSub token=&quot;dummytoken&quot;)
       }
+    )
 
     Contacts::Google.session_token('dummytoken').should == 'G25aZ-v_8B'
   end
   
   it &quot;should support client login&quot; do
-    FakeWeb::register_uri 'https://www.google.com/accounts/ClientLogin',
+    FakeWeb::register_uri(:post, 'https://www.google.com/accounts/ClientLogin',
       :method =&gt; 'POST',
       :query =&gt; {
         'accountType' =&gt; 'GOOGLE', 'service' =&gt; 'cp', 'source' =&gt; 'Contacts-Ruby',
         'Email' =&gt; 'mislav@example.com', 'Passwd' =&gt; 'dummyPassword'
       },
       :string =&gt; &quot;SID=klw4pHhL_ry4jl6\nLSID=Ij6k-7Ypnc1sxm\nAuth=EuoqMSjN5uo-3B&quot;
-
+    )
+    
     Contacts::Google.client_login('mislav@example.com', 'dummyPassword').should == 'EuoqMSjN5uo-3B'
   end
   </diff>
      <filename>spec/gmail/auth_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,13 +17,14 @@ describe Contacts::Google do
 
   describe 'fetches contacts feed via HTTP GET' do
     it 'with defaults' do
-      FakeWeb::register_uri 'www.google.com/m8/feeds/contacts/default/thin',
+      FakeWeb::register_uri(:get, 'www.google.com/m8/feeds/contacts/default/thin',
         :string =&gt; 'thin results',
         :verify =&gt; lambda { |req|
           req['Authorization'].should == %(AuthSub token=&quot;dummytoken&quot;)
           req['Accept-Encoding'].should == 'gzip'
           req['User-Agent'].should == &quot;Ruby Contacts v#{Contacts::VERSION::STRING} (gzip)&quot;
         }
+      )
         
       response = @gmail.get({})
       response.body.should == 'thin results'
@@ -33,8 +34,9 @@ describe Contacts::Google do
       @gmail = Contacts::Google.new('dummytoken', 'person@example.com')
       @gmail.projection = 'full'
       
-      FakeWeb::register_uri 'www.google.com/m8/feeds/contacts/person%40example.com/full',
+      FakeWeb::register_uri(:get, 'www.google.com/m8/feeds/contacts/person%40example.com/full',
         :string =&gt; 'full results'
+      )
 
       response = @gmail.get({})
       response.body.should == 'full results'
@@ -69,8 +71,9 @@ describe Contacts::Google do
   end
 
   it 'raises a fetching error when something goes awry' do
-    FakeWeb::register_uri 'www.google.com/m8/feeds/contacts/default/thin',
+    FakeWeb::register_uri(:get, 'www.google.com/m8/feeds/contacts/default/thin',
       :status =&gt; [404, 'YOU FAIL']
+    )
       
     lambda {
       @gmail.get({})
@@ -137,7 +140,10 @@ describe Contacts::Google do
     end
 
     it 'should have implicit :descending with :order' do
-      expect_params({ 'orderby' =&gt; 'lastmodified', 'sortorder' =&gt; 'descending' }, true)
+      expect_params 'orderby' =&gt; 'lastmodified', 
+                    'sortorder' =&gt; 'descending',
+                    'max-results' =&gt; '200'
+                    
       @gmail.contacts :order =&gt; 'lastmodified'
     end
 
@@ -151,9 +157,9 @@ describe Contacts::Google do
       @gmail.contacts :limit =&gt; nil, :offset =&gt; 0
     end
 
-    def expect_params(params, partial = false)
-      FakeWeb::register_uri 'www.google.com/m8/feeds/contacts/default/thin',
-        :query =&gt; params, :query_partial_match =&gt; partial
+    def expect_params(params)
+      query_string = Contacts::Google.query_string(params)
+      FakeWeb::register_uri(:get, &quot;www.google.com/m8/feeds/contacts/default/thin?#{query_string}&quot;)
     end
     
   end</diff>
      <filename>spec/gmail/fetching_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,6 +6,7 @@ require 'mocha'
 
 require 'cgi'
 require 'fake_web'
+FakeWeb.allow_net_connect = false
 
 module SampleFeeds
   FEED_DIR = File.dirname(__FILE__) + '/feeds/'</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>spec/fake_net_http.rb</filename>
    </removed>
    <removed>
      <filename>spec/fake_web.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>461962f70684086b28998e09b5158e80575a7f58</id>
    </parent>
  </parents>
  <author>
    <name>Mislav Marohni&#263;</name>
    <email>mislav.marohnic@gmail.com</email>
  </author>
  <url>http://github.com/mislav/contacts/commit/9bc68f98b081e85579aa4a97ea7e0d32cae9800f</url>
  <id>9bc68f98b081e85579aa4a97ea7e0d32cae9800f</id>
  <committed-date>2009-01-08T21:03:45-08:00</committed-date>
  <authored-date>2009-01-08T21:03:45-08:00</authored-date>
  <message>add mislav/fakeweb as submodule and compensate for the changes</message>
  <tree>f4948e271e7f391fc090c6a7d2ba2030cdddf35b</tree>
  <committer>
    <name>Mislav Marohni&#263;</name>
    <email>mislav.marohnic@gmail.com</email>
  </committer>
</commit>
