<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/extensions/array.rb</filename>
    </added>
    <added>
      <filename>lib/garb/account.rb</filename>
    </added>
    <added>
      <filename>test/unit/account_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -5,12 +5,14 @@ garb
 
   http://github.com/vigetlabs/garb
 
-Changes
-=======
+Important Changes
+=================
+
+  Version 0.2.4 requires happymapper from rubygems, version 0.2.5. Be sure to update.
 
   Version 0.2.0 makes major changes (compared to 0.1.0) to the way garb is used to build reports.
-  There is now both a module that gets included for generating defined classes.
-  As well as, slight changes to the way that the Report class can be used.
+  There is now both a module that gets included for generating defined classes,
+  as well as, slight changes to the way that the Report class can be used.
 
 Description
 -----------
@@ -27,9 +29,15 @@ Login
   
     &gt; Garb::Session.login(username, password)
 
+Accounts
+--------
+    &gt; Garb::Account.all
+
 Profiles
 --------
 
+    &gt; Garb::Account.first.profiles
+    
     &gt; Garb::Profile.all
     &gt; profile = Garb::Profile.all.first
 
@@ -156,12 +164,15 @@ TODOS
 Requirements
 ------------
 
-  libxml
-  happymapper
+  happymapper &gt;= 0.2.5 (should also install libxml)
 
 Install
 -------
 
+    sudo gem install garb
+
+    OR
+
     sudo gem install vigetlabs-garb -s http://gems.github.com
 
 License</diff>
      <filename>README.md</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ spec = Gem::Specification.new do |s|
   s.files             = %w(README.md Rakefile) + Dir.glob(&quot;lib/**/*&quot;)
   s.test_files        = Dir.glob(&quot;test/**/*&quot;)
 
-  s.add_dependency(&quot;jnunemaker-happymapper&quot;, [&quot;&gt;= 0.2.2&quot;])
+  s.add_dependency(&quot;happymapper&quot;, [&quot;&gt;= 0.2.5&quot;])
 end
 
 Rake::GemPackageTask.new(spec) do |pkg|</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ TODO
 
 * Sessions are currently global, which isn't awesome
 * Single user login is the only supported method currently. Intend to add hooks for using OAuth
-* Intend to make defined report classes before more like AR
-* Support start-index
+* Intend to make defined report classes behave more like AR
 * Read opensearch header in results
-* OR joining filter parameters
\ No newline at end of file
+* OR joining filter parameters
+* DONE: Support start-index
\ No newline at end of file</diff>
      <filename>TODO.txt</filename>
    </modified>
    <modified>
      <diff>@@ -10,4 +10,8 @@ class String
   def to_ga
     &quot;ga:#{self}&quot;
   end
-end
\ No newline at end of file
+
+  def from_ga
+    self.gsub(/^ga\:/, '')
+  end
+end</diff>
      <filename>lib/extensions/string.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@ require 'garb/authentication_request'
 require 'garb/data_request'
 require 'garb/session'
 require 'garb/profile'
+require 'garb/account'
 require 'garb/report_parameter'
 require 'garb/report_response'
 require 'garb/resource'
@@ -20,7 +21,7 @@ require 'garb/report'
 require 'extensions/string'
 require 'extensions/operator'
 require 'extensions/symbol'
-require 'extensions/happymapper'
+require 'extensions/array'
 
 module Garb
   # :stopdoc:</diff>
      <filename>lib/garb.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module Garb
   class Profile
     
-    attr_reader :table_id, :title, :account_name
+    attr_reader :table_id, :title, :account_name, :account_id
     
     class Property
       include HappyMapper
@@ -11,35 +11,40 @@ module Garb
       
       attribute :name, String
       attribute :value, String
+
+      def instance_name
+        name.from_ga.underscored
+      end
     end
 
     class Entry
       include HappyMapper
       
       tag 'entry'
-      
-      element :id, Integer
+
       element :title, String
       element :tableId, String, :namespace =&gt; 'dxp'
-      
-      # has_one :table_id, TableId
+
       has_many :properties, Property
     end
 
     def initialize(entry)
       @title = entry.title
       @table_id = entry.tableId
-      @account_name = entry.properties.detect{|p| p.name == 'ga:accountName'}.value
+
+      entry.properties.each do |p|
+        instance_variable_set :&quot;@#{p.instance_name}&quot;, p.value
+      end
     end
-    
+
     def id
-      @table_id.sub(/^ga:/, '')
+      @table_id.from_ga
     end
-    
+
     def self.all
       url = &quot;https://www.google.com/analytics/feeds/accounts/#{Session.email}&quot;
       response = DataRequest.new(url).send_request      
-      Entry.parse(response.body).map {|e| Garb::Profile.new(e)}
+      Entry.parse(response.body).map {|entry| new(entry)}
     end
   end
 end</diff>
      <filename>lib/garb/profile.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,11 +3,11 @@ module Garb
 
     MAJOR = 0
     MINOR = 2
-    TINY  = 3
+    TINY  = 4
 
     def self.to_s # :nodoc:
       [MAJOR, MINOR, TINY].join('.')
     end
 
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/garb/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,14 @@ module Garb
       should &quot;have a value for :id&quot; do
         assert_equal '12345', @profile.id
       end
+
+      should &quot;have a value for :account_id&quot; do
+        assert_equal '1111', @profile.account_id
+      end
+
+      should &quot;have a value for :account_name&quot; do
+        assert_equal 'Blog Beta', @profile.account_name
+      end
       
     end
 </diff>
      <filename>test/unit/profile_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,5 +5,9 @@ class StringTest &lt; Test::Unit::TestCase
     should 'prefix a string with ga: for GA' do
       assert_equal 'ga:bob', 'bob'.to_ga
     end
+
+    should 'remove ga: prefix' do
+      assert_equal 'bob', 'ga:bob'.from_ga
+    end
   end
 end
\ No newline at end of file</diff>
      <filename>test/unit/string_test.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/extensions/happymapper.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>06a7cc48fe85bde8a86cbc804462a4e5372c7f95</id>
    </parent>
  </parents>
  <author>
    <name>tpitale</name>
    <email>tpitale@gmail.com</email>
  </author>
  <url>http://github.com/vigetlabs/garb/commit/f3d467d09d99ff84ca946548e9b9fb44610ab35a</url>
  <id>f3d467d09d99ff84ca946548e9b9fb44610ab35a</id>
  <committed-date>2009-06-19T07:34:47-07:00</committed-date>
  <authored-date>2009-06-19T07:34:47-07:00</authored-date>
  <message>removed happymapper fixes and update dependency, added Account.all to get back accounts with profiles, updates to readme and todo</message>
  <tree>4a4842a01df35992ca8b5f6dc9a924d5838de8e3</tree>
  <committer>
    <name>tpitale</name>
    <email>tpitale@gmail.com</email>
  </committer>
</commit>
