<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,4 @@
 == 0.1.0 2008-05-12
-
 * 1 major enhancement:
   * Converted to gem from Rails plugin
 
@@ -24,4 +23,4 @@ March 2
 	* Changed name of cached_response to cached_xml_response. cached_response is better name for a public method, which might return Response object, if there's a cached_xml_response, nil otherwise. Allows loading of pages to be speeded up, with queries perhaps being triggered on demand (and then cached) or by js 
 
 * January 10, 2008
-	* First checkin on plugin
+	* First checkin of plugin</diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,6 @@
+ebay_shopping successfully installed!
+For more information on ebay_shopping, see http://ebayshopping.rubyforge.org
 
-For more information on ebay_shopping, see http://ebay_shopping.rubyforge.org
-
-NOTE: Change this information in PostInstall.txt 
-You can also delete it if you don't want it.
-
-
+If you wish to set up your ebay config info (app_id, affiliate info, etc) 
+using a YAML config file copy the following into a new file and load it with
+EbayShopping::Request.config_params(&quot;/some/path/to/ebay.yml&quot;)</diff>
      <filename>PostInstall.txt</filename>
    </modified>
    <modified>
      <diff>@@ -70,4 +70,4 @@ CHANGES = $hoe.paragraphs_of('History.txt', 0..1).join(&quot;\\n\\n&quot;)
 PATH    = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : &quot;#{RUBYFORGE_PROJECT}/#{GEM_NAME}&quot;
 $hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
 $hoe.rsync_args = '-av --delete --ignore-errors'
-$hoe.spec.post_install_message = File.open(File.dirname(__FILE__) + &quot;/../PostInstall.txt&quot;).read rescue &quot;&quot;
\ No newline at end of file
+$hoe.spec.post_install_message = File.open(File.dirname(__FILE__) + &quot;/../PostInstall.txt&quot;).read + File.open(File.dirname(__FILE__) + &quot;/../ebay.yml.tpl&quot;).read rescue &quot;&quot;
\ No newline at end of file</diff>
      <filename>config/hoe.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 --- 
 :production: 
   :app_id: 
-  :affiliate_partner: &quot;9&quot; # the affiliate provider (aka tracking partner). For Ebay's own affliaite scheme this is 9. For others see http://developer.ebay.com/DevZone/shopping/docs/Concepts/ShoppingAPI_FormatOverview.html#AffiliateURLParameters  
+  :affiliate_partner: &quot;9&quot; # the affiliate provider (aka tracking partner). For Ebay's own affiliate scheme this is 9. For others see http://developer.ebay.com/DevZone/shopping/docs/Concepts/ShoppingAPI_FormatOverview.html#AffiliateURLParameters  
   :affiliate_id:  # your site's affiliate id, also known as tracking id, or PID
   :affiliate_shopper_id: &quot;my_campaign&quot; # default campaign identifier, also known (confusingly) as affiliate_user_id, or SID. Only applicable if affiliate provider is Commission Junction
   :default_site_id: # set the default ebay country here (for details see http://developer.ebay.com/DevZone/shopping/docs/CallRef/types/SiteCodeType.html). If this is blank, the US site (site_id=0) is  used by ebay. Can be overridden on individual requests</diff>
      <filename>ebay.yml.tpl</filename>
    </modified>
    <modified>
      <diff>@@ -63,11 +63,30 @@ module EbayShopping
       @call_params          = params
     end
     
-    # Get config params from YAML config file
-    def self.config_params(yaml_file=nil, env=nil)
+    # This method sets up the config params from YAML config file or a hash. 
+    # This only needs to be done once, and so should normally be done when
+    # the applicaton starts (e.g. in the envirnoment file in a Rails app).
+    #  
+    # The yaml file approach is designed to allow different environments 
+    # (e.g. production, development, etc), with, potentially different values 
+    # for each environment (if you only set the production environment, or
+    # don't specify the environment when supplying the file path, production)
+    # will be assumed (an example of the yaml file can be seen in ebay.yml.tpl 
+    # in the script directory of this gem).
+    # 
+    # To set the config params by hash just requires to pass a hash of 
+    # key-value pairs with :app_id =&gt; &quot;your_ebay_app_id&quot; the only required
+    # one. if you supply affiliate info, this will be used when constructing 
+    # the calls (and hence also in the URLs returned by ebay). Environments
+    # are ignored if a hash is supplied.
+    def self.config_params(yaml_file_path_or_hash=nil, env=nil)
       return @@config_params if @@config_params
-      all_params = YAML.load_file(yaml_file)
-      @@config_params = all_params[env] || all_params[:production]
+      if yaml_file_path_or_hash.is_a?(Hash)
+        @@config_params = yaml_file_path_or_hash 
+      else
+        all_params = YAML.load_file(yaml_file_path_or_hash)
+        @@config_params = all_params[env] || all_params[:production]
+      end
     end
     
     # The response method instantiates a response object of appropriate class, i.e. :find_items_advanced generates FindItemsAdvancedResponse.</diff>
      <filename>lib/ebay_shopping.rb</filename>
    </modified>
    <modified>
      <diff>@@ -28,6 +28,14 @@ class TestEbayShopping &lt; Test::Unit::TestCase
     EbayShopping::Request.config_params(&quot;/some/path/to/ebay.yml&quot;)
   end
   
+  def test_should_get_configs_from_given_hash
+    EbayShopping::Request.class_eval(&quot;@@config_params = nil&quot;) # reset config params
+    YAML.expects(:load_file).never
+    EbayShopping::Request.config_params({:app_id =&gt; &quot;foo123&quot;, :affiliate_id =&gt; &quot;456bar&quot;})
+    assert_equal &quot;foo123&quot;, EbayShopping::Request.config_params[:app_id]
+    assert_equal &quot;456bar&quot;, EbayShopping::Request.config_params[:affiliate_id]
+  end
+  
   def test_should_get_configs_from_yaml_config_file_and_cache_result
     EbayShopping::Request.class_eval(&quot;@@config_params = nil&quot;) # reset config params
     YAML.expects(:load_file).returns({:production =&gt; {:app_id =&gt; &quot;foo123&quot;}})</diff>
      <filename>test/test_ebay_shopping.rb</filename>
    </modified>
    <modified>
      <diff>@@ -79,24 +79,23 @@
 	&lt;p&gt;&lt;pre class='syntax'&gt;
 &lt;span class=&quot;ident&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;ebay_shopping&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;'&lt;/span&gt;
 
-&lt;span class=&quot;ident&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;EbayShopping&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;constant&quot;&gt;Request&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:find_items&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:query_keywords&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;chevrolet camaro&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;quot;})&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;# use &amp;quot;ruby-ized&amp;quot; version of Ebay API calls and params&lt;/span&gt;
+&lt;span class=&quot;ident&quot;&gt;request&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;constant&quot;&gt;EbayShopping&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;constant&quot;&gt;Request&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;new&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:find_items&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;symbol&quot;&gt;:query_keywords&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;string&quot;&gt;chevrolet camaro&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;&amp;quot;})&lt;/span&gt; 
+&lt;span class=&quot;comment&quot;&gt;# use &amp;quot;ruby-ized&amp;quot; version of Ebay API calls and params&lt;/span&gt;
 
 &lt;span class=&quot;ident&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;request&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;response&lt;/span&gt;
 
 &lt;span class=&quot;ident&quot;&gt;items_for_sale&lt;/span&gt; &lt;span class=&quot;punct&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;ident&quot;&gt;response&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;items&lt;/span&gt;
 
 &lt;span class=&quot;ident&quot;&gt;items_for_sale&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;# =&amp;gt; &amp;quot;Chevrolet Camaro&amp;quot;&lt;/span&gt;
-&lt;/pre&gt;&lt;/p&gt;
-
-
-	&lt;p&gt;items_for_sale.first.view_item_url_for_natural_search # =&amp;gt; &amp;#8220;http://cgi.ebay.com/Chevrolet-Camaro_W0QQitemZ290197239377QQcategoryZ6161QQcmdZViewItemQQ&amp;#8221;&lt;/p&gt;
 
+&lt;span class=&quot;ident&quot;&gt;items_for_sale&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;view_item_url_for_natural_search&lt;/span&gt; 
+&lt;span class=&quot;comment&quot;&gt;# =&amp;gt; &amp;quot;http://cgi.ebay.com/Chevrolet-Camaro_W0QQitemZ290197239377QQcategoryZ6161QQcmdZViewItemQQ&amp;quot;&lt;/span&gt;
 
-	&lt;p&gt;items_for_sale.first.gallery_url # =&amp;gt; &amp;#8220;http://thumbs.ebaystatic.com/pict/290197239377.jpg&amp;#8221;&lt;/p&gt;
+&lt;span class=&quot;ident&quot;&gt;items_for_sale&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;gallery_url&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;# =&amp;gt; &amp;quot;http://thumbs.ebaystatic.com/pict/290197239377.jpg&amp;quot;&lt;/span&gt;
 
-
-	&lt;p&gt;items_for_sale.first.converted_current_price.to_s # =&amp;gt; &amp;#8221;$38000.00&amp;#8221; 
-...etc&lt;/p&gt;
+&lt;span class=&quot;ident&quot;&gt;items_for_sale&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;first&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;converted_current_price&lt;/span&gt;&lt;span class=&quot;punct&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;to_s&lt;/span&gt; &lt;span class=&quot;comment&quot;&gt;# =&amp;gt; &amp;quot;$38000.00&amp;quot;&lt;/span&gt;
+&lt;span class=&quot;punct&quot;&gt;...&lt;/span&gt;&lt;span class=&quot;ident&quot;&gt;etc&lt;/span&gt;
+&lt;/pre&gt;&lt;/p&gt;
 
 
 	&lt;h2&gt;Demonstration of usage&lt;/h2&gt;
@@ -120,28 +119,7 @@
 	&lt;p&gt;Read the &lt;a href=&quot;http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/&quot;&gt;8 steps for fixing other people&amp;#8217;s code&lt;/a&gt; and for section &lt;a href=&quot;http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups&quot;&gt;8b: Submit patch to Google Groups&lt;/a&gt;, use the Google Group above.&lt;/p&gt;
 
 
-	&lt;p&gt;The trunk repository is &lt;code&gt;svn://rubyforge.org/var/svn/ebay_shopping/trunk&lt;/code&gt; for anonymous access.&lt;/p&gt;
-
-
-	&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;OOOORRRR&lt;/span&gt;&lt;/p&gt;
-
-
-	&lt;p&gt;You can fetch the source from either:&lt;/p&gt;
-
-
-	&lt;ul&gt;
-	&lt;li&gt;rubyforge: &lt;span class=&quot;caps&quot;&gt;MISSING IN ACTION&lt;/span&gt;&lt;/li&gt;
-	&lt;/ul&gt;
-
-
-	&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;TODO&lt;/span&gt; &amp;#8211; You can not created a RubyForge project, OR have not run &lt;code&gt;rubyforge config&lt;/code&gt;
-yet to refresh your local rubyforge data with this projects&amp;#8217; id information.&lt;/p&gt;
-
-
-	&lt;p&gt;When you do this, this message will magically disappear!&lt;/p&gt;
-
-
-	&lt;p&gt;Or you can hack website/index.txt and make it all go away!!&lt;/p&gt;
+	&lt;p&gt;You can fetch the source from:&lt;/p&gt;
 
 
 	&lt;ul&gt;
@@ -151,13 +129,6 @@ yet to refresh your local rubyforge data with this projects&amp;#8217; id informatio
 
 &lt;pre&gt;git clone git://github.com/ctagg/ebay_shopping.git&lt;/pre&gt;
 
-	&lt;h3&gt;Build and test instructions&lt;/h3&gt;
-
-
-&lt;pre&gt;cd ebay_shopping
-rake test
-rake install_gem&lt;/pre&gt;
-
 	&lt;h2&gt;License&lt;/h2&gt;
 
 </diff>
      <filename>website/index.html</filename>
    </modified>
    <modified>
      <diff>@@ -32,21 +32,23 @@ h2. The basics
 &lt;pre syntax=&quot;ruby&quot;&gt;
 require 'ebay_shopping'
 
-request = EbayShopping::Request.new(:find_items, {:query_keywords =&gt; &quot;chevrolet camaro&quot;}) # use &quot;ruby-ized&quot; version of Ebay API calls and params
+request = EbayShopping::Request.new(:find_items, {:query_keywords =&gt; &quot;chevrolet camaro&quot;}) 
+# use &quot;ruby-ized&quot; version of Ebay API calls and params
 
 response = request.response
 
 items_for_sale = response.items
 
 items_for_sale.first.title # =&gt; &quot;Chevrolet Camaro&quot;
-&lt;/pre&gt;
 
-items_for_sale.first.view_item_url_for_natural_search # =&gt; &quot;http://cgi.ebay.com/Chevrolet-Camaro_W0QQitemZ290197239377QQcategoryZ6161QQcmdZViewItemQQ&quot;
+items_for_sale.first.view_item_url_for_natural_search 
+# =&gt; &quot;http://cgi.ebay.com/Chevrolet-Camaro_W0QQitemZ290197239377QQcategoryZ6161QQcmdZViewItemQQ&quot;
 
 items_for_sale.first.gallery_url # =&gt; &quot;http://thumbs.ebaystatic.com/pict/290197239377.jpg&quot;
 
 items_for_sale.first.converted_current_price.to_s # =&gt; &quot;$38000.00&quot;
 ...etc
+&lt;/pre&gt;
 
 h2. Demonstration of usage
 
@@ -62,36 +64,12 @@ h2. How to submit patches
 
 Read the &quot;8 steps for fixing other people's code&quot;:http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section &quot;8b: Submit patch to Google Groups&quot;:http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
 
-You can fetch the source from either:
-
-&lt;% if rubyforge_project_id %&gt;
-
-* rubyforge: &quot;http://rubyforge.org/scm/?group_id=&lt;%= rubyforge_project_id %&gt;&quot;:http://rubyforge.org/scm/?group_id=&lt;%= rubyforge_project_id %&gt;
-
-&lt;pre&gt;git clone git://rubyforge.org/ebay_shopping.git&lt;/pre&gt;
-
-&lt;% else %&gt;
-
-* rubyforge: MISSING IN ACTION
-
-TODO - You can not created a RubyForge project, OR have not run &lt;code&gt;rubyforge config&lt;/code&gt;
-yet to refresh your local rubyforge data with this projects' id information.
-
-When you do this, this message will magically disappear!
-
-&lt;% end %&gt;
+You can fetch the source from:
 
 * github: &quot;http://github.com/ctagg/ebay_shopping/tree/master&quot;:http://github.com/ctagg/ebay_shopping/tree/master
 
 &lt;pre&gt;git clone git://github.com/ctagg/ebay_shopping.git&lt;/pre&gt;
 
-h3. Build and test instructions
-
-&lt;pre&gt;cd ebay_shopping
-rake test
-rake install_gem&lt;/pre&gt;
-
-
 h2. License
 
 This code is free to use under the terms of the MIT license. </diff>
      <filename>website/index.txt</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7398d3c1a59e1254cadd952d6ceb0abb41c3e24d</id>
    </parent>
  </parents>
  <author>
    <name>Chris Taggart</name>
    <email>chris@windowsxponmac.home</email>
  </author>
  <url>http://github.com/ctagg/ebay_shopping/commit/8ec1f9c3242f85033efaf5efa62c0ac79a7883cc</url>
  <id>8ec1f9c3242f85033efaf5efa62c0ac79a7883cc</id>
  <committed-date>2008-05-12T11:43:34-07:00</committed-date>
  <authored-date>2008-05-12T11:43:34-07:00</authored-date>
  <message>Added ability to config with simple hash.
Tidied up instructions</message>
  <tree>cf8c19c23e826e0fb393d3a364dc60b11e4dd9ad</tree>
  <committer>
    <name>Chris Taggart</name>
    <email>chris@windowsxponmac.home</email>
  </committer>
</commit>
