<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>Manifest</filename>
    </added>
    <added>
      <filename>config/unfuddle.yml</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -11,4 +11,4 @@ Echoe.new('unfuddle','0.1.1') do |p|
   p.development_dependencies = []
 end
 
-Dir[&quot;#{File.dirname(__FILE__)}/tasks/*.rake&quot;].sort.each { |ext| load ext }
\ No newline at end of file
+Dir[&quot;#{File.dirname(__FILE__)}/lib/tasks/*.rake&quot;].sort.each { |ext| load ext }
\ No newline at end of file</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,6 @@
-rake_task_copy_path = File.join(RAILS_ROOT, &quot;lib&quot;, &quot;tasks&quot;, &quot;unfuddle.rake&quot;)
-unless File.exists?(rake_task_copy_path)
-  File.copy(File.join(File.dirname(__FILE__),&quot;lib&quot;,&quot;tasks&quot;, &quot;unfuddke.rake&quot;), rake_task_copy_path)
+if defined?(RAILS_ROOT)
+  rake_task_copy_path = File.join(RAILS_ROOT, &quot;lib&quot;, &quot;tasks&quot;, &quot;unfuddle.rake&quot;)
+  unless File.exists?(rake_task_copy_path)
+    File.copy(File.join(File.dirname(__FILE__),&quot;lib&quot;,&quot;tasks&quot;, &quot;unfuddke.rake&quot;), rake_task_copy_path)
+  end
 end
\ No newline at end of file</diff>
      <filename>install.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,13 @@
 namespace :unfuddle do
   task :setup, :environment do
-    config_path = File.join(RAILS_ROOT, &quot;config&quot;, &quot;unfuddle.yml&quot;)
-    unless File.exists?(config_path)
-      config_file = File.new(config_path, &quot;w&quot;)
-      config_file.write(File.read(config_file))
-      config_file.close
-      $stdout.puts &quot;Added the config file template to config/unfuddle.yml&quot;
+    if defined?(RAILS_ROOT)
+      config_path = File.join(RAILS_ROOT, &quot;config&quot;, &quot;unfuddle.yml&quot;)
+      unless File.exists?(config_path)
+        config_file = File.new(config_path, &quot;w&quot;)
+        config_file.write(File.read(config_file))
+        config_file.close
+        $stdout.puts &quot;Added the config file template to config/unfuddle.yml&quot;
+      end
     end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/tasks/unfuddle.rake</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,26 @@
 # Author: Tim Matheson
 # Website: http://www.timmatheson.com
+
+module Unfuddle      
+  def self.config_path
+    &quot;config/unfuddle.yml&quot;
+  end
+
+  def self.env
+    defined?(RAILS_ENV) ? RAILS_ENV : &quot;test&quot;
+  end
+
+  def self.config 
+    if File.exists?(config_path)
+      return YAML.load_file(config_path)[&quot;#{env}&quot;]
+    else
+      raise Exception, &quot;Missing #{config_path} yaml file.&quot;
+    end
+  end
+  
+  ActiveResource::Base.site     = config[&quot;uri&quot;]
+  ActiveResource::Base.user     = config[&quot;username&quot;]
+  ActiveResource::Base.password = config[&quot;password&quot;]
+end
+
 (Dir.entries(&quot;lib/unfuddle/&quot;) - [&quot;.&quot;,&quot;..&quot;,&quot;.git&quot;,&quot;.svn&quot;]).each{ |f| require &quot;lib/unfuddle/&quot; + f }
-module Unfuddle  
-end
\ No newline at end of file</diff>
      <filename>lib/unfuddle.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,4 +5,4 @@ module Unfuddle
       find(:one, :from =&gt; &quot;/api/v1/account.xml&quot;)
     end
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/unfuddle/account.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 module Unfuddle
   class Project &lt; ActiveResource::Base
-    self.prefix = &quot;/projects&quot;
+    #self.prefix = &quot;/projects&quot;
     
     def activity
     end
@@ -13,4 +13,5 @@ module Unfuddle
       find(:all, :from =&gt; &quot;/projects.xml&quot;)
     end
   end
-end
\ No newline at end of file
+end
+</diff>
      <filename>lib/unfuddle/project.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,5 @@
 module Unfuddle
   class Ticket &lt; ActiveResource::Base
-    def assignee_id
-      nil
-    end
+    self.prefix = &quot;/tickets&quot;
   end
 end
\ No newline at end of file</diff>
      <filename>lib/unfuddle/ticket.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,11 @@
 require File.dirname(__FILE__) + &quot;/../../spec_helper.rb&quot;
 describe Unfuddle::Account, &quot; a valid account&quot; do
+  it &quot;should return the current account&quot; do
+    Unfuddle::Account.current.should_not be_nil
+  end
+  
+  it &quot;should return the access key&quot; do
+    account = Unfuddle::Account.current
+    account.access_key.should_not be_nil
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/lib/unfuddle/account_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,26 @@
 require File.dirname(__FILE__) + &quot;/../../spec_helper.rb&quot;
 describe Unfuddle::Project, &quot; a valid project&quot; do
+  before(:each) do
+    @project = Unfuddle::Project.find(:first)
+  end
+  
+  it &quot;should return the project tickets&quot; do
+    @project.tickets.class.should == Array
+  end
+  
+  it &quot;should have an account id&quot; do
+    @project.account_id.should_not be_nil
+  end
+  
+  it &quot;should have an archived attribute&quot; do
+    @project.archived.should_not be_nil
+  end
+  
+  it &quot;should have an 'assignee on resolve' attribute&quot; do
+    @project.assignee_on_resolve.should_not be_nil
+  end
+  
+  it &quot;should have one of reporter, none, nochange value for 'assignee on resolve'&quot; do
+    [&quot;reporter&quot;,&quot;none&quot;,&quot;nochange&quot;].include?(@project.assignee_on_resolve).should == true
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/lib/unfuddle/project_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>cd3aeaa917de838ab08fc6ff4dc8a9aeda317cbd</id>
    </parent>
  </parents>
  <author>
    <name>Tim Matheson</name>
    <email>me@tim-mathesons-macbook.local</email>
  </author>
  <url>http://github.com/timmatheson/Unfuddle/commit/a76b37c846fb437b8ddcf5cc6c7f1ecba62abe1d</url>
  <id>a76b37c846fb437b8ddcf5cc6c7f1ecba62abe1d</id>
  <committed-date>2009-10-07T23:01:46-07:00</committed-date>
  <authored-date>2009-10-07T23:01:46-07:00</authored-date>
  <message>adding some tests fixing the modules setting up the config methods</message>
  <tree>ab9e112f18aae272d0c013d8bfa66c7db78bd3e7</tree>
  <committer>
    <name>Tim Matheson</name>
    <email>me@tim-mathesons-macbook.local</email>
  </committer>
</commit>
