<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>t/002-server.t</filename>
    </added>
    <added>
      <filename>t/003-database.t</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,10 +1,17 @@
 all: code
 
 code: clean
-	erlc -o ebin src/erlang_couchdb.erl
+	erlc +debug_info -o ./ebin src/erlang_couchdb.erl
 
 clean:
 	rm -rfv ebin/*.beam erl_crash.dump
 
 dist-src: clean
 	tar zcvf erlang_couchdb-0.2.3.tgz Makefile src/
+
+test: all
+	prove -v t/*.t
+
+cover: all
+	COVER=1 prove t/*.t
+	erl -noshell -eval 'etap_report:create()' -s init stop</diff>
      <filename>Makefile</filename>
    </modified>
    <modified>
      <diff>@@ -36,3 +36,9 @@ To create an object and set a number of attributes:
 
     erlang_couchdb:fold([erlang_couchdb:set_value(K, V) || {K,V} &lt;- L],
     erlang_couchdb:empty())
+
+# TODO
+
+ * Document attachments 
+
+Your contributions are welcome.</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -168,26 +168,41 @@ decode_json(Body) -&gt;
 %% @doc Create a new database.
 create_database({Server, ServerPort}, Database) when is_list(Server), is_integer(ServerPort) -&gt;
     Url = build_uri(Database),
-    raw_request(&quot;PUT&quot;, Server, ServerPort, Url, []).
+    case raw_request(&quot;PUT&quot;, Server, ServerPort, Url, []) of
+        {json, {struct, [{&lt;&lt;&quot;ok&quot;&gt;&gt;, true}]}} -&gt; ok;
+        Other -&gt; {error, Other}
+    end.
 
 %% @doc Create a new database.
 delete_database({Server, ServerPort}, Database) when is_list(Server), is_integer(ServerPort) -&gt;
     Url = build_uri(Database),
-    raw_request(&quot;DELETE&quot;, Server, ServerPort, Url, []).
+    case raw_request(&quot;DELETE&quot;, Server, ServerPort, Url, []) of
+        {json, {struct, [{&lt;&lt;&quot;ok&quot;&gt;&gt;, true}]}} -&gt; ok;
+        Other -&gt; {error, Other}
+    end.
 
 %% @doc Get info about a database.
 database_info({Server, ServerPort}, Database) when is_list(Server), is_integer(ServerPort) -&gt;
     Url = build_uri(Database),
-    raw_request(&quot;GET&quot;, Server, ServerPort, Url, []).
+    case raw_request(&quot;GET&quot;, Server, ServerPort, Url, []) of
+        {json, {struct, Props}} -&gt; {ok, Props};
+        Other -&gt; {error, Other}
+    end.
 
 %% @doc Get info about a server.
 server_info({Server, ServerPort}) when is_list(Server), is_integer(ServerPort) -&gt;
     Url = build_uri(),
-    raw_request(&quot;GET&quot;, Server, ServerPort, Url, []).
+    case raw_request(&quot;GET&quot;, Server, ServerPort, Url, []) of
+        {json, {struct, Welcome}} -&gt; {ok, Welcome};
+        Other -&gt; {other, Other}
+    end.
 
 %% @edoc Retieve all the databases
 retrieve_all_dbs({Server, ServerPort}) when is_list(Server), is_integer(ServerPort) -&gt;
-    raw_request(&quot;GET&quot;, Server, ServerPort, &quot;/_all_dbs&quot;,[]).
+    case raw_request(&quot;GET&quot;, Server, ServerPort, &quot;/_all_dbs&quot;,[]) of
+        {json, Database} -&gt; {ok, Database};
+        Other -&gt; {error, Other}
+    end.
 
 %% @doc Create a new document. This function will create a document with a
 %% list of attributes and leaves it up to the server to create an id for it.</diff>
      <filename>src/erlang_couchdb.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,10 @@
 #!/usr/bin/env escript
 %% -*- erlang -*-
+%%! -pa ./ebin
 
 main(_) -&gt;
-    etap:plan(1),
+    etap:plan(2),
     etap_can:loaded_ok(erlang_couchdb, &quot;Module 'erlang_couchdb' loaded&quot;),
+    etap_can:can_ok(erlang_couchdb, server_info),
     etap:end_tests(),
     ok.</diff>
      <filename>t/001-load.t</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>94ff8e86a960311848f5bce0524d1a966c4dfca1</id>
    </parent>
  </parents>
  <author>
    <name>Nick Gerakines</name>
    <email>nick@gerakines.net</email>
  </author>
  <url>http://github.com/pib/erlang_couchdb/commit/a3f1f5596b741c1ae7c07b2d3be73e0af675384f</url>
  <id>a3f1f5596b741c1ae7c07b2d3be73e0af675384f</id>
  <committed-date>2009-02-17T23:00:21-08:00</committed-date>
  <authored-date>2009-02-17T23:00:21-08:00</authored-date>
  <message>Improving test coverage.</message>
  <tree>4bee2b4ee16350ce476042ccfdbd8f4cfbc27d28</tree>
  <committer>
    <name>Nick Gerakines</name>
    <email>nick@gerakines.net</email>
  </committer>
</commit>
