<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>ChangeLog</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -106,9 +106,7 @@ Things that can greatly be improved. Please fork this project and contribute. Pa
 
  * Support for testing multi-node systems and environments.
  * OTP behaviors like gen\_server, gen\_fsm and gen\_event
- * Web requests
  * Things like the error\_logger and sasl
- * Code coverage report look and feel
  * C1 code coverage reporting and html output
  * Documentation
 
@@ -124,6 +122,6 @@ If you haven't been a test-first developer before, now is the best time to start
 CREDITS
 =======
 
-2008 Nick Gerakines&lt;br /&gt;
+2008-2009 Nick Gerakines&lt;br /&gt;
 2007-2008 Jeremy Wall&lt;br /&gt;
 2008 Jacob Vorreuter</diff>
      <filename>README.markdown</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-%% Copyright (c) 2008 Nick Gerakines &lt;nick@gerakines.net&gt;
+%% Copyright (c) 2008-2009 Nick Gerakines &lt;nick@gerakines.net&gt;
 %% 
 %% Permission is hereby granted, free of charge, to any person
 %% obtaining a copy of this software and associated documentation
@@ -20,73 +20,11 @@
 %% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 %% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 %% OTHER DEALINGS IN THE SOFTWARE.
-%%
-%% ChangeLog
-%% 2009-01-23 ngerakines
-%%   - Added etap_report module to build pretty HTML code coverage reports
-%%   - Updated readme and misc documentation
-%% 2009-01-21 ngerakines
-%%   - Bumpting to 0.3.3
-%%   - Updated documentation for the coverage report script.
-%% 2009-01-12 ngerakines
-%%   - Added experimental code coverage support.
-%% 2009-01-01 ngerakines
-%%   - Added etap:skip/1 and etap:skip/2
-%%   - Added skip support to etap:plan/1
-%%   - Misc code cleanup and documentation
-%%   - Bumping to 0.3.2, tagging release
-%%   - Adding specs and documentation
-%% - 2008-12-30 ngerakines
-%%   - Removing functionality, hurray!
-%% - 2008-12-28 ngerakines
-%%   - Added etap:is_greater/3
-%%   - Added etap_string module and updated test suite
-%% - 2008-12-26 ngerakines
-%%   - Cleaned etap_web:build_request/4 module handling of redirects
-%%   - Added functionality to etal_request
-%% - 2008-12-17 Jacob Vorreuter, ngerakines, Jeremy Wall
-%%   - Cleaned etap_web:build_request/4 module handling for get/post/put requests
-%%   - Documentation updates / cleanup
-%% - 2008-12-17 Jacob Vorreuter, ngerakines, Jeremy Wall
-%%   - Fixing bug in etap_request:status_is/2
-%%   - Added attribute inspection tests to etap_can
-%%   - Added Jacob to credits list
-%% - 2008-12-15 Jeremy Wall, ngerakines
-%%   - Added doc targets to build
-%%   - Misc build cleanup
-%% - 2008-12-11 ngerakines
-%%   - Added etap:diag_time/0
-%% - 2008-12-10 ngerakines
-%%   - Adding support for non-get requests in etap_web.
-%% - 2008-12-09 ngerakines
-%%   - Added output displaying test run time in seconds.
-%% - 2008-12-01 ngerakines
-%%   - Fixed bug in test etap_t_002.
-%%   - Minor/Misc code cleanup.
-%% - 2008-11-30 ngerakines
-%%   - Fixed by in test results where failed tests weren't being recorded.
-%%   - Added warning when planned vs executed tests aren't the same.
-%%   - Bumping rev to 0.3.1.
-%%   - Added etap:fun_is/3.
-%%   - Updated the README
-%%   - Added limited support for the dianostic syntax
-%% - 2008-11-28 ngerakines
-%%   - Minor documentation and build changes.
-%%   - Added etap_process module and updated test suite accordingly.
-%% - 2008-11-27 ngerakines
-%%   - Added etap:any/3, etap:none/3 and etap_excecption:throws_ok/3.
-%%   - Internal cleanup of etap modules.
-%% - 2008-11-25 ngerakines
-%%   - Consolidated test server and plan server.
-%%   - Added meta information when creating new plan.
-%%   - Added lots of documentation.
-%%   - Cleaned up the current test suite.
-%%   - Started extending testing capabilities of etap_request.
 %% 
 %% @author Nick Gerakines &lt;nick@gerakines.net&gt; [http://socklabs.com/]
 %% @author Jeremy Wall &lt;jeremy@marzhillstudios.com&gt;
 %% @version 0.3.3
-%% @copyright 2007-2008 Jeremy Wall, 2008 Nick Gerakines
+%% @copyright 2007-2008 Jeremy Wall, 2008-2009 Nick Gerakines
 %% @reference http://testanything.org/wiki/index.php/Main_Page
 %% @reference http://en.wikipedia.org/wiki/Test_Anything_Protocol
 %% @todo Finish implementing the skip directive.
@@ -111,10 +49,10 @@
     diag/1, plan/1, end_tests/0, not_ok/2, ok/2, is/3, isnt/3,
     any/3, none/3, fun_is/3, is_greater/3, skip/1, skip/2,
     ensure_coverage_starts/0, ensure_coverage_ends/0, coverage_report/0,
-    datetime/1
+    datetime/1, skip/3
 ]).
-
 -record(test_state, {planned = 0, count = 0, pass = 0, fail = 0, skip = 0, skip_reason = &quot;&quot;}).
+-vsn(&quot;0.3.3&quot;).
 
 %% @spec plan(N) -&gt; Result
 %%       N = skip | {skip, string()} | integer()
@@ -130,6 +68,15 @@ plan(N) when is_integer(N), N &gt; 0 -&gt;
     etap_server ! {self(), plan, N},
     ok.
 
+%% @spec end_tests() -&gt; ok
+%% @doc End the current test plan and output test results.
+end_tests() -&gt;
+    ensure_coverage_ends(),
+    case whereis(etap_server) of
+        undefined -&gt; ok;
+        _ -&gt; etap_server ! done, ok
+    end.
+
 %% @private
 ensure_coverage_starts() -&gt;
     case os:getenv(&quot;COVER&quot;) of
@@ -140,6 +87,8 @@ ensure_coverage_starts() -&gt;
     end.
 
 %% @private
+%% @doc Attempts to write out any collected coverage data to the cover/
+%% directory. This function should not be called externally, but it could be.
 ensure_coverage_ends() -&gt;
     case os:getenv(&quot;COVER&quot;) of
         false -&gt; ok;
@@ -150,17 +99,7 @@ ensure_coverage_ends() -&gt;
                      term_to_binary({make_ref(), now()})
                 ))
             ]),
-            X = cover:export(&quot;cover/&quot; ++ Name ++ &quot;.coverdata&quot;),
-            io:format(&quot;X ~p~n&quot;, [X])
-    end.
-
-%% @spec end_tests() -&gt; ok
-%% @doc End the current test plan and output test results.
-end_tests() -&gt;
-    ensure_coverage_ends(),
-    case whereis(etap_server) of
-        undefined -&gt; ok;
-        _ -&gt; etap_server ! done, ok
+            cover:export(&quot;cover/&quot; ++ Name ++ &quot;.coverdata&quot;)
     end.
 
 %% @spec coverage_report() -&gt; ok
@@ -258,19 +197,43 @@ fun_is(Fun, Expected, Desc) when is_function(Fun) -&gt;
     is(Fun(Expected), true, Desc).
 
 %% @equiv skip(TestFun, &quot;&quot;)
-skip(TestFun) -&gt;
+skip(TestFun) when is_function(TestFun) -&gt;
     skip(TestFun, &quot;&quot;).
 
 %% @spec skip(TestFun, Reason) -&gt; ok
 %%       TestFun = function()
 %%       Reason = string()
 %% @doc Skip a test.
-skip(TestFun, Reason) -&gt;
+skip(TestFun, Reason) when is_function(TestFun), is_list(Reason) -&gt;
     begin_skip(Reason),
     catch TestFun(),
     end_skip(),
     ok.
 
+%% @spec skip(Q, TestFun, Reason) -&gt; ok
+%%       Q = true | false | function() 
+%%       TestFun = function()
+%%       Reason = string()
+%% @doc Skips a test conditionally. The first argument to this function can
+%% either be the 'true' or 'false' atoms or a function that returns 'true' or
+%% 'false'.
+skip(QFun, TestFun, Reason) when is_function(QFun), is_function(TestFun), is_list(Reason) -&gt;
+    case QFun() of
+        true -&gt; begin_skip(Reason), TestFun(), end_skip();
+        _ -&gt; TestFun()
+    end,
+    ok;
+
+skip(Q, TestFun, Reason) when is_function(TestFun), is_list(Reason), Q == true -&gt;
+    begin_skip(Reason),
+    TestFun(),
+    end_skip(),
+    ok;
+
+skip(_, TestFun, Reason) when is_function(TestFun), is_list(Reason) -&gt;
+    TestFun(),
+    ok.
+
 %% @private
 begin_skip(Reason) -&gt;
     etap_server ! {self(), begin_skip, Reason}.
@@ -317,7 +280,7 @@ test_server(State) -&gt;
     NewState = receive
         {_From, plan, N} -&gt;
             io:format(&quot;# Current time local ~s~n&quot;, [datetime(erlang:localtime())]),
-            io:format(&quot;# Using etap version 0.3~n&quot;),
+            io:format(&quot;# Using etap version ~p~n&quot;, [ proplists:get_value(vsn, proplists:get_value(attributes, etap:module_info())) ]),
             io:format(&quot;1..~p~n&quot;, [N]),
             State#test_state{
                 planned = N,</diff>
      <filename>src/etap.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-%% Copyright (c) 2008 Nick Gerakines &lt;nick@gerakines.net&gt;
+%% Copyright (c) 2008-2009 Nick Gerakines &lt;nick@gerakines.net&gt;
 %% 
 %% Permission is hereby granted, free of charge, to any person
 %% obtaining a copy of this software and associated documentation</diff>
      <filename>src/etap_application.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-%% Copyright (c) 2008 Nick Gerakines &lt;nick@gerakines.net&gt;
+%% Copyright (c) 2008-2009 Nick Gerakines &lt;nick@gerakines.net&gt;
 %% 
 %% Permission is hereby granted, free of charge, to any person
 %% obtaining a copy of this software and associated documentation</diff>
      <filename>src/etap_can.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-%% Copyright (c) 2008 Nick Gerakines &lt;nick@gerakines.net&gt;
+%% Copyright (c) 2008-2009 Nick Gerakines &lt;nick@gerakines.net&gt;
 %% 
 %% Permission is hereby granted, free of charge, to any person
 %% obtaining a copy of this software and associated documentation</diff>
      <filename>src/etap_exception.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-%% Copyright (c) 2008 Nick Gerakines &lt;nick@gerakines.net&gt;
+%% Copyright (c) 2008-2009 Nick Gerakines &lt;nick@gerakines.net&gt;
 %% 
 %% Permission is hereby granted, free of charge, to any person
 %% obtaining a copy of this software and associated documentation</diff>
      <filename>src/etap_process.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,26 @@
+%% Copyright (c) 2008-2009 Nick Gerakines &lt;nick@gerakines.net&gt;
+%% 
+%% Permission is hereby granted, free of charge, to any person
+%% obtaining a copy of this software and associated documentation
+%% files (the &quot;Software&quot;), to deal in the Software without
+%% restriction, including without limitation the rights to use,
+%% copy, modify, merge, publish, distribute, sublicense, and/or sell
+%% copies of the Software, and to permit persons to whom the
+%% Software is furnished to do so, subject to the following
+%% conditions:
+%% 
+%% The above copyright notice and this permission notice shall be
+%% included in all copies or substantial portions of the Software.
+%% 
+%% THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,
+%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+%% OTHER DEALINGS IN THE SOFTWARE.
+%%
 %% @doc A module for creating nice looking code coverage reports.
 -module(etap_report).
 -export([create/0]).</diff>
      <filename>src/etap_report.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-%% Copyright (c) 2008 Nick Gerakines &lt;nick@gerakines.net&gt;
+%% Copyright (c) 2008-2009 Nick Gerakines &lt;nick@gerakines.net&gt;
 %% 
 %% Permission is hereby granted, free of charge, to any person
 %% obtaining a copy of this software and associated documentation</diff>
      <filename>src/etap_request.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-%% Copyright (c) 2008 Nick Gerakines &lt;nick@gerakines.net&gt;
+%% Copyright (c) 2008-2009 Nick Gerakines &lt;nick@gerakines.net&gt;
 %% 
 %% Permission is hereby granted, free of charge, to any person
 %% obtaining a copy of this software and associated documentation</diff>
      <filename>src/etap_string.erl</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-%% Copyright (c) 2008 Nick Gerakines &lt;nick@gerakines.net&gt;
+%% Copyright (c) 2008-2009 Nick Gerakines &lt;nick@gerakines.net&gt;
 %% 
 %% Permission is hereby granted, free of charge, to any person
 %% obtaining a copy of this software and associated documentation
@@ -62,4 +62,4 @@ build_request(Method, Url, Headers, Body) when Method == post; Method == put -&gt;
         _ -&gt; error
     catch
         _:_ -&gt; error
-    end.
\ No newline at end of file
+    end.</diff>
      <filename>src/etap_web.erl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3793ea56f61420b6f8dcb94a2bde343582c03f48</id>
    </parent>
  </parents>
  <author>
    <name>Nick Gerakines</name>
    <email>nick@gerakines.net</email>
  </author>
  <url>http://github.com/ngerakines/etap/commit/3d0844cb41d399b85a772109244f8ae42ce11842</url>
  <id>3d0844cb41d399b85a772109244f8ae42ce11842</id>
  <committed-date>2009-02-10T10:29:35-08:00</committed-date>
  <authored-date>2009-02-10T10:29:35-08:00</authored-date>
  <message>Updating documentation. Adding etap:skip/3. Misc cleanup and changes.</message>
  <tree>1241933b2dc8419524f600dbefe91610e2fd7951</tree>
  <committer>
    <name>Nick Gerakines</name>
    <email>nick@gerakines.net</email>
  </committer>
</commit>
