<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,4 +1,4 @@
-# Highrise (0.12.0)
+# Highrise (0.13.0)
 
 ## What is it?
 </diff>
      <filename>README.mkdn</filename>
    </modified>
    <modified>
      <diff>@@ -27,10 +27,8 @@ Highrise::Base.site = 'http://your_site.highrisehq.com/'
 Highrise::Base.user = 'your_api_auth_token'
                           }
     gemspec.authors = [&quot;Marcos Tapaj&#243;s&quot;, &quot;Ken Mayer&quot;]
-    gemspec.add_dependency('activeresource', '&gt;=2.2')
-    gemspec.add_dependency('activesupport', '&gt;=2.1')
-    gemspec.add_dependency('curb')
-    gemspec.add_dependency('hpricot')
+    gemspec.add_dependency('activeresource', '&gt;= 2.1')
+    gemspec.add_dependency('activesupport', '&gt;= 2.1')
   end
 rescue LoadError
   puts &quot;Jeweler not available. Install it with: sudo gem install jeweler -s http://gems.github.com&quot;</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
 --- 
-:minor: 13
+:minor: 0
 :patch: 0
-:major: 0
+:major: 1</diff>
      <filename>VERSION.yml</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,6 @@
+# Generated by jeweler
+# DO NOT EDIT THIS FILE
+# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
 # -*- encoding: utf-8 -*-
 
 Gem::Specification.new do |s|
@@ -6,7 +9,7 @@ Gem::Specification.new do |s|
 
   s.required_rubygems_version = Gem::Requirement.new(&quot;&gt;= 0&quot;) if s.respond_to? :required_rubygems_version=
   s.authors = [&quot;Marcos Tapaj\303\263s&quot;, &quot;Ken Mayer&quot;]
-  s.date = %q{2009-05-29}
+  s.date = %q{2009-09-01}
   s.description = %q{
 Based on the original API module from DHH, http://developer.37signals.com/highrise/, this
 gem is a cleaned up, tested version of the same. Contributors have added support for tags 
@@ -40,8 +43,6 @@ Highrise::Base.user = 'your_api_auth_token'
      &quot;lib/highrise/base.rb&quot;,
      &quot;lib/highrise/comment.rb&quot;,
      &quot;lib/highrise/company.rb&quot;,
-     &quot;lib/highrise/curlhelper.rb&quot;,
-     &quot;lib/highrise/curly.rb&quot;,
      &quot;lib/highrise/email.rb&quot;,
      &quot;lib/highrise/group.rb&quot;,
      &quot;lib/highrise/kase.rb&quot;,
@@ -57,17 +58,13 @@ Highrise::Base.user = 'your_api_auth_token'
      &quot;spec/cachable_spec.rb&quot;,
      &quot;spec/highrise/base_spec.rb&quot;,
      &quot;spec/highrise/comment_spec.rb&quot;,
-     &quot;spec/highrise/companies/16883216.html&quot;,
      &quot;spec/highrise/company_spec.rb&quot;,
-     &quot;spec/highrise/curlhelper_spec.rb&quot;,
-     &quot;spec/highrise/curly_spec.rb&quot;,
      &quot;spec/highrise/email_spec.rb&quot;,
      &quot;spec/highrise/group_spec.rb&quot;,
      &quot;spec/highrise/kase_spec.rb&quot;,
      &quot;spec/highrise/membership_spec.rb&quot;,
      &quot;spec/highrise/note_spec.rb&quot;,
      &quot;spec/highrise/pagination_spec.rb&quot;,
-     &quot;spec/highrise/people/16887003.html&quot;,
      &quot;spec/highrise/person_spec.rb&quot;,
      &quot;spec/highrise/subject_spec.rb&quot;,
      &quot;spec/highrise/tag_spec.rb&quot;,
@@ -80,15 +77,13 @@ Highrise::Base.user = 'your_api_auth_token'
   s.homepage = %q{http://github.com/kmayer/highrise}
   s.rdoc_options = [&quot;--charset=UTF-8&quot;]
   s.require_paths = [&quot;lib&quot;]
-  s.rubygems_version = %q{1.3.3}
+  s.rubygems_version = %q{1.3.5}
   s.summary = %q{Ruby wrapper around Highrise API}
   s.test_files = [
     &quot;spec/cachable_spec.rb&quot;,
      &quot;spec/highrise/base_spec.rb&quot;,
      &quot;spec/highrise/comment_spec.rb&quot;,
      &quot;spec/highrise/company_spec.rb&quot;,
-     &quot;spec/highrise/curlhelper_spec.rb&quot;,
-     &quot;spec/highrise/curly_spec.rb&quot;,
      &quot;spec/highrise/email_spec.rb&quot;,
      &quot;spec/highrise/group_spec.rb&quot;,
      &quot;spec/highrise/kase_spec.rb&quot;,
@@ -111,20 +106,14 @@ Highrise::Base.user = 'your_api_auth_token'
     s.specification_version = 3
 
     if Gem::Version.new(Gem::RubyGemsVersion) &gt;= Gem::Version.new('1.2.0') then
-      s.add_runtime_dependency(%q&lt;activeresource&gt;, [&quot;&gt;= 2.2&quot;])
+      s.add_runtime_dependency(%q&lt;activeresource&gt;, [&quot;&gt;= 2.1&quot;])
       s.add_runtime_dependency(%q&lt;activesupport&gt;, [&quot;&gt;= 2.1&quot;])
-      s.add_runtime_dependency(%q&lt;curb&gt;, [&quot;&gt;= 0&quot;])
-      s.add_runtime_dependency(%q&lt;hpricot&gt;, [&quot;&gt;= 0&quot;])
     else
-      s.add_dependency(%q&lt;activeresource&gt;, [&quot;&gt;= 2.2&quot;])
+      s.add_dependency(%q&lt;activeresource&gt;, [&quot;&gt;= 2.1&quot;])
       s.add_dependency(%q&lt;activesupport&gt;, [&quot;&gt;= 2.1&quot;])
-      s.add_dependency(%q&lt;curb&gt;, [&quot;&gt;= 0&quot;])
-      s.add_dependency(%q&lt;hpricot&gt;, [&quot;&gt;= 0&quot;])
     end
   else
-    s.add_dependency(%q&lt;activeresource&gt;, [&quot;&gt;= 2.2&quot;])
+    s.add_dependency(%q&lt;activeresource&gt;, [&quot;&gt;= 2.1&quot;])
     s.add_dependency(%q&lt;activesupport&gt;, [&quot;&gt;= 2.1&quot;])
-    s.add_dependency(%q&lt;curb&gt;, [&quot;&gt;= 0&quot;])
-    s.add_dependency(%q&lt;hpricot&gt;, [&quot;&gt;= 0&quot;])
   end
 end</diff>
      <filename>highrise.gemspec</filename>
    </modified>
    <modified>
      <diff>@@ -9,9 +9,7 @@
 # 
 #   module CachedResource
 #     class Base &lt; ActiveResource::Base
-#     end
-#     class ActiveResource::Connection
-#       include Cachable
+#       include ::Cachable
 #     end
 #   end
 #
@@ -23,14 +21,14 @@
 # these stores
 #
 # === Configuration examples ('off' is the default):
-#   CachedResource.connection.cache_store = ActiveSupport::Cache.lookup_store :memory_store
-#   CachedResource.connection.cache_store = ActiveSupport::Cache.lookup_store :file_store, &quot;/path/to/cache/directory&quot;
-#   CachedResource.connection.cache_store = ActiveSupport::Cache.lookup_store :drb_store, &quot;druby://localhost:9192&quot;
-#   CachedResource.connection.cache_store = ActiveSupport::Cache.lookup_store :mem_cache_store, &quot;localhost&quot;
-#   CachedResource.connection.cache_store = MyOwnStore.new(&quot;parameter&quot;)
+#   CachedResource.cache_store = ActiveSupport::Cache.lookup_store :memory_store
+#   CachedResource.cache_store = ActiveSupport::Cache.lookup_store :file_store, &quot;/path/to/cache/directory&quot;
+#   CachedResource.cache_store = ActiveSupport::Cache.lookup_store :drb_store, &quot;druby://localhost:9192&quot;
+#   CachedResource.cache_store = ActiveSupport::Cache.lookup_store :mem_cache_store, &quot;localhost&quot;
+#   CachedResource.cache_store = MyOwnStore.new(&quot;parameter&quot;)
 #
 # === If you are using a store that has write options, you can set them
-#   CachedResource.connection.store_options = { :expires_in =&gt; 60.seconds }
+#   CachedResource.store_options = { :expires_in =&gt; 60.seconds }
 #
 # Note: To ensure that caching is turned off, set CachedResource.connection.cache_store = nil
 #
@@ -38,13 +36,16 @@
 
 module Cachable
   def self.included(base)
+    base.extend ClassMethods
     base.class_eval do
-      include InstanceMethods
-      alias_method_chain :get, :cache
+      class &lt;&lt; self
+        alias_method_chain :find_every, :cache
+        alias_method_chain :find_single, :cache
+      end
     end
   end
 
-  module InstanceMethods
+  module ClassMethods
     attr_writer :cache_store, :store_options
     
     def cache_store
@@ -61,9 +62,19 @@ module Cachable
 
   private
 
-    def get_with_cache(path, headers = {})
-      return get_without_cache(path, headers) unless is_caching?
-      fetch(path) { get_without_cache(path, headers) }
+    # A little hacky -- we need to intercept the finds, but not get too deep inside the connection
+    def find_every_with_cache(options)
+      return find_every_without_cache(options) unless is_caching?
+      prefix_options, query_options = split_options(options[:params])
+      path = collection_path(prefix_options, query_options)
+      fetch(path) { find_every_without_cache(options)}
+    end
+
+    def find_single_with_cache(scope, options)
+      return find_single_without_cache(scope, options) unless is_caching?
+      prefix_options, query_options = split_options(options[:params])
+      path = element_path(scope, prefix_options, query_options)
+      fetch(path) { find_single_without_cache(scope, options)}
     end
 
     def cache_key(*args)</diff>
      <filename>lib/cachable.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,7 @@
 require 'active_resource'
-require 'activesupport'
-require 'active_support/basic_object'
 
 require File.dirname(__FILE__) + '/highrise/base'
 require File.dirname(__FILE__) + '/highrise/pagination'
-require File.dirname(__FILE__) + '/highrise/curly'
-require File.dirname(__FILE__) + '/highrise/curlhelper'
 require File.dirname(__FILE__) + '/highrise/taggable'
 require File.dirname(__FILE__) + '/highrise/subject'
 require File.dirname(__FILE__) + '/highrise/comment'</diff>
      <filename>lib/highrise.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,8 +2,6 @@ require File.dirname(__FILE__) + '/../cachable'
 
 module Highrise
   class Base &lt; ActiveResource::Base
-  end
-  class ActiveResource::Connection
-    include Cachable
+    include ::Cachable
   end
 end</diff>
      <filename>lib/highrise/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,33 +1,17 @@
 module Highrise
-  module Taggable
-    
-    # thanks for the user Inka, http://forum.37signals.com/highrise/forums/15/topics/1312?page=2
-        
+  module Taggable        
+    def tags
+      self.get(:tags)
+    end
     def tag!(tag_name)
       self.post(:tags, :name =&gt; tag_name) unless tag_name.blank?
-    end
-    
+    end    
     def untag!(tag_name)
-      to_delete = self.tags.find{|t| t.name==tag_name} unless tag_name.blank?
-      self.untag_id!(to_delete.id) unless to_delete.nil?
-    end
-            
+      to_delete = self.tags.find{|t| t['name'] == tag_name} unless tag_name.blank?
+      self.untag_id!(to_delete['id']) unless to_delete.nil?
+    end     
     def untag_id!(tag_id)
       self.delete(&quot;tags/#{tag_id}&quot;)
     end
-
-    def tags      
-      tags = []
-      get_document.search(&quot;#show_tags a&quot;).each{ |a|
-       tags &lt;&lt; Highrise::Tag.new(:id =&gt; a['href'].gsub(/.*\//, ''), :name =&gt; a.inner_html) if a['class'] == &quot;grey tag&quot;
-      }
-      tags
-    end
-        
-    def get_document
-      @curl_helper ||= CurlHelper.new
-      @doc = @curl_helper.get_document_from_id(&quot;#{self.class.collection_name}/#{self.id}&quot;)
-    end
-    
   end
 end</diff>
      <filename>lib/highrise/taggable.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,44 +3,42 @@ require File.dirname(__FILE__) + '/spec_helper'
 describe Highrise::Base, &quot;class configuration&quot; do
   before(:each) do
     Highrise::Base.site = 'http://example.com.i:3000'
-    @connection = Highrise::Base.connection
   end
     
   it &quot;should tell us if caching is active&quot; do
-    @connection.cache_store = ActiveSupport::Cache.lookup_store :memory_store
-    @connection.is_caching?.should == true
+    Highrise::Base.cache_store = ActiveSupport::Cache.lookup_store :memory_store
+    Highrise::Base.is_caching?.should == true
   end
   
   it &quot;should tell us if caching is not active&quot; do
-    @connection.cache_store = nil
-    @connection.is_caching?.should == false
+    Highrise::Base.cache_store = nil
+    Highrise::Base.is_caching?.should == false
   end
 end
 
 describe Highrise::Base do
   before(:all) do
     Highrise::Base.site = 'http://example.com.i:3000'
-    @connection = Highrise::Base.connection
-    @connection.cache_store = ActiveSupport::Cache.lookup_store :memory_store
+    Highrise::Base.cache_store = ActiveSupport::Cache.lookup_store :memory_store
   end
   
   after(:all) do
-    @connection.cache_store = :none
+    Highrise::Base.cache_store = :none
   end
   
   before(:each) do
     @thing = Highrise::Base.new
     @key = :key
-    @connection.stub!(:cache_key).and_return(@key)
+    Highrise::Base.stub!(:cache_key).and_return(@key)
   end
   
   context &quot;when a cached response is available&quot; do
     before(:each) do
-      @connection.cache_store.write(@key, @thing.attributes)
+      Highrise::Base.cache_store.write(@key, @thing)
     end
     
     it &quot;should NOT make a request to the RESTful server&quot; do
-      ActiveResource::Connection.should_not_receive(:get_without_cache)
+      Highrise::Base.should_not_receive(:find_single_without_cache)
       Highrise::Base.find(1)
     end
     
@@ -51,18 +49,18 @@ describe Highrise::Base do
   
   context &quot;when a cached response is NOT available&quot; do
     before(:each) do
-      @connection.cache_store.delete(@key)
+      Highrise::Base.cache_store.delete(@key)
     end
     
     it &quot;SHOULD perform an ARes request&quot; do
-      @connection.should_receive(:get_without_cache).and_return(@thing.attributes)
+      Highrise::Base.should_receive(:find_single_without_cache).and_return(@thing)
       Highrise::Base.find(1)
     end
     
     it &quot;should cache the response using the caching key&quot; do
-      @connection.should_receive(:get_without_cache).and_return(@thing.attributes)
+      Highrise::Base.should_receive(:find_single_without_cache).and_return(@thing)
       Highrise::Base.find(1)
-      @connection.cache_store.read(@key).should == @thing.attributes
+      Highrise::Base.cache_store.read(@key).should == @thing
     end
   end
 end
\ No newline at end of file</diff>
      <filename>spec/cachable_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,11 +4,11 @@ describe Highrise::Company do
 
   before(:each) do
     Highrise::Base.site = 'http://example.com.i:3000'
-    @company = Highrise::Company.new
+    @company = Highrise::Company.new(:id =&gt; 1)
     returning @tags = [] do 
-      @tags &lt;&lt; Highrise::Tag.new(:id =&gt; &quot;414578&quot;, :name =&gt; &quot;cliente&quot;)
-      @tags &lt;&lt; Highrise::Tag.new(:id =&gt; &quot;414580&quot;, :name =&gt; &quot;ged&quot;)
-      @tags &lt;&lt; Highrise::Tag.new(:id =&gt; &quot;414579&quot;, :name =&gt; &quot;iepc&quot;)
+      @tags &lt;&lt; {'id' =&gt; &quot;414578&quot;, 'name' =&gt; &quot;cliente&quot;}
+      @tags &lt;&lt; {'id' =&gt; &quot;414580&quot;, 'name' =&gt; &quot;ged&quot;}
+      @tags &lt;&lt; {'id' =&gt; &quot;414579&quot;, 'name' =&gt; &quot;iepc&quot;}
     end
   end
   
@@ -39,8 +39,7 @@ describe Highrise::Company do
   describe &quot;.tags&quot; do
     
     it &quot;should return an array of all tags for that company.&quot; do
-      file_path = File.dirname(__FILE__) + &quot;/companies/16883216.html&quot;
-      @company.stub!(:get_document).and_return(Hpricot(File.open(file_path,&quot;r&quot;){|f| f.read}))
+      @company.should_receive(:get).with(:tags).and_return(@tags)
       @company.tags.should == @tags
     end
     
@@ -49,7 +48,7 @@ describe Highrise::Company do
   describe &quot;tag!(tag_name)&quot; do
   
     it &quot;should create a tag for this company.&quot; do
-      @company.should_receive(:post).with(:tags, :name =&gt; &quot;client&quot; ).at_least(1).times.and_return(true)
+      @company.should_receive(:post).with(:tags, :name =&gt; &quot;client&quot; ).and_return(true)
       @company.tag!(&quot;client&quot;).should be_true
     end
     
@@ -58,9 +57,8 @@ describe Highrise::Company do
   describe &quot;untag!(tag_name)&quot; do
   
     it &quot;should delete a tag for this company.&quot; do
-      file_path = File.dirname(__FILE__) + &quot;/companies/16883216.html&quot;
-      @company.stub!(:get_document).and_return(Hpricot(File.open(file_path,&quot;r&quot;){|f| f.read}))
-      @company.should_receive(:delete).with(&quot;tags/414578&quot;).at_least(1).times.and_return(true)
+      @company.should_receive(:get).with(:tags).and_return(@tags)
+      @company.should_receive(:delete).with(&quot;tags/414578&quot;).and_return(true)
       @company.untag!(&quot;cliente&quot;).should be_true
     end
     </diff>
      <filename>spec/highrise/company_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,10 +4,10 @@ describe Highrise::Person do
 
   before(:each) do
     Highrise::Base.site = 'http://example.com.i:3000'
-    @person = Highrise::Person.new
+    @person = Highrise::Person.new(:id =&gt; 1)
     returning @tags = [] do 
-      @tags &lt;&lt; Highrise::Tag.new(:id =&gt; &quot;414578&quot;, :name =&gt; &quot;cliente&quot;)
-      @tags &lt;&lt; Highrise::Tag.new(:id =&gt; &quot;414587&quot;, :name =&gt; &quot;walk&quot;)
+      @tags &lt;&lt; {'id' =&gt; &quot;414578&quot;, 'name' =&gt; &quot;cliente&quot;}
+      @tags &lt;&lt; {'id' =&gt; &quot;414587&quot;, 'name' =&gt; &quot;walk&quot;}
     end
   end
   
@@ -53,8 +53,7 @@ describe Highrise::Person do
   describe &quot;.tags&quot; do
     
     it &quot;should return an array of all tags for that user.&quot; do
-      file_path = File.dirname(__FILE__) + &quot;/people/16887003.html&quot;
-      @person.stub!(:get_document).and_return(Hpricot(File.open(file_path,&quot;r&quot;){|f| f.read}))
+      @person.should_receive(:get).with(:tags).and_return(@tags)
       @person.tags.should == @tags
     end
     
@@ -63,7 +62,7 @@ describe Highrise::Person do
   describe &quot;tag!(tag_name)&quot; do
   
     it &quot;should create a tag for this user.&quot; do
-      @person.should_receive(:post).with(:tags, :name =&gt; &quot;Forum_User&quot; ).at_least(1).times.and_return(true)
+      @person.should_receive(:post).with(:tags, :name =&gt; &quot;Forum_User&quot; ).and_return(true)
       @person.tag!(&quot;Forum_User&quot;).should be_true
     end
     
@@ -72,9 +71,8 @@ describe Highrise::Person do
   describe &quot;untag!(tag_name)&quot; do
   
     it &quot;should delete a tag for this user.&quot; do
-      file_path = File.dirname(__FILE__) + &quot;/people/16887003.html&quot;
-      @person.stub!(:get_document).and_return(Hpricot(File.open(file_path,&quot;r&quot;){|f| f.read}))
-      @person.should_receive(:delete).with(&quot;tags/414578&quot;).at_least(1).times.and_return(true)
+      @person.should_receive(:get).with(:tags).and_return(@tags)
+      @person.should_receive(:delete).with(&quot;tags/414578&quot;).and_return(true)
       @person.untag!(&quot;cliente&quot;).should be_true
     end
     </diff>
      <filename>spec/highrise/person_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,4 +4,5 @@ progress
 --loadby
 mtime
 --reverse
--rubygems
\ No newline at end of file
+-rubygems
+--debugger
\ No newline at end of file</diff>
      <filename>spec/spec.opts</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,17 @@
 require File.dirname(__FILE__) + '/../lib/highrise'
 
-def turn_methods_public(classe, method_name = nil)
+def turn_methods_public(klass, method_name = nil)
   if method_name
-    classe.class_eval do
+    klass.class_eval do
       public method_name
     end
   else
-    turn_all_methods_public classe
+    turn_all_methods_public klass
   end
 end
 
-def turn_all_methods_public(classe)
-  classe.class_eval do
+def turn_all_methods_public(klass)
+  klass.class_eval do
     private_instance_methods.each { |instance_method| public instance_method }
     private_methods.each { |method| public_class_method method } 
     protected_instance_methods.each { |instance_method| public instance_method }</diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/highrise/curlhelper.rb</filename>
    </removed>
    <removed>
      <filename>lib/highrise/curly.rb</filename>
    </removed>
    <removed>
      <filename>spec/highrise/companies/16883216.html</filename>
    </removed>
    <removed>
      <filename>spec/highrise/curlhelper_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/highrise/curly_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/highrise/people/16887003.html</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>b65222c0f1b2e41038113b64e34cd7a099426229</id>
    </parent>
  </parents>
  <author>
    <name>Kenneth Mayer</name>
    <email>kmayer@bitwrangler.com</email>
  </author>
  <url>http://github.com/tapajos/highrise/commit/6071801ffe2a6676a126ac338e93cd7b481cdd41</url>
  <id>6071801ffe2a6676a126ac338e93cd7b481cdd41</id>
  <committed-date>2009-09-02T00:32:53-07:00</committed-date>
  <authored-date>2009-09-02T00:32:19-07:00</authored-date>
  <message>Version bump to 1.0.0
Revised Taggable interface to support new tag API from 37Sigs and (removed curl dependencies)
Refactored Cachable</message>
  <tree>95db4367feb65faf3e84e2f58edc9c1798a19889</tree>
  <committer>
    <name>Kenneth Mayer</name>
    <email>kmayer@bitwrangler.com</email>
  </committer>
</commit>
