Skip to content

Commit

Permalink
Generate edocs via asciiedoc
Browse files Browse the repository at this point in the history
  • Loading branch information
norton committed Nov 22, 2012
1 parent 8fbbe2b commit 7e4e1c5
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 139 deletions.
90 changes: 43 additions & 47 deletions README.md
Expand Up @@ -17,14 +17,11 @@ please contribute if you find UBF-REDIS useful.</em></p>
please follow this recipe:</p>


<pre><tt>$ mkdir working-directory-name
<pre><code>$ mkdir working-directory-name
$ cd working-directory-name
$ git clone https://github.com/ubf/ubf-redis.git ubf_redis
$ cd ubf_redis
$ ./rebar get-deps
$ ./rebar clean
$ ./rebar compile
$ ./rebar eunit</tt></pre>
$ make deps clean compile test</code></pre>

<p>For an alternative recipe with other "features" albeit more complex,
please read further.</p>
Expand All @@ -44,22 +41,22 @@ server clone in Erlang.</p>
<ul>
<li>
<p>
<tt>src/ruf.erl</tt> Redis network protocol (a.k.a. RUF) encoder/decoder
<code>src/ruf.erl</code> Redis network protocol (a.k.a. RUF) encoder/decoder
</p>
</li>
<li>
<p>
<tt>src/ruf_term.erl</tt> Redis <em>raw</em> Erlang encoder/decoder
<code>src/ruf_term.erl</code> Redis <em>raw</em> Erlang encoder/decoder
</p>
</li>
<li>
<p>
<tt>src/ubf_redis_types_plugin.erl</tt> Erlang types for Redis RPC
<code>src/ubf_redis_types_plugin.erl</code> Erlang types for Redis RPC
</p>
</li>
<li>
<p>
<tt>src/ubf_redis_plugin.erl</tt> Erlang Redis RPC request/response pairs
<code>src/ubf_redis_plugin.erl</code> Erlang Redis RPC request/response pairs
</p>
</li>
</ul>
Expand All @@ -69,22 +66,22 @@ specification and behavior of these building blocks.</p>
<ul>
<li>
<p>
<tt>test/qc/ruf_tests.erl prop_ruf_requests()</tt> tests encoding and
<code>test/qc/ruf_tests.erl prop_ruf_requests()</code> tests encoding and
decoding of RUF requests. Test inputs are <em>automagically</em> generated
using the above Redis RPC types.<em>This QC test has been completed.</em>
</p>
</li>
<li>
<p>
<tt>test/qc/ruf_tests.erl prop_ruf_responses()</tt> tests encoding and
<code>test/qc/ruf_tests.erl prop_ruf_responses()</code> tests encoding and
decoding of RUF responses. Test inputs are <em>automagically</em>
generated using the above Redis RPC types.<em>This QC test has been
completed.</em>
</p>
</li>
<li>
<p>
<tt>test/qc/redis_proxy_tests.erl</tt> tests an Erlang Redis client talking
<code>test/qc/redis_proxy_tests.erl</code> tests an Erlang Redis client talking
with an Erlang Redis "Proxy" server. The Redis "Proxy" server
forwards all requests transparently to a "real" Redis server (using
another internal Erlang Redis client). All requests and responses
Expand Down Expand Up @@ -145,8 +142,8 @@ Configure your e-mail and name for Git
</p>


<pre><tt>$ git config \--global user.email "you@example.com"
$ git config \--global user.name "Your Name"</tt></pre>
<pre><code>$ git config \--global user.email "you@example.com"
$ git config \--global user.name "Your Name"</code></pre>

</li>
<li>
Expand All @@ -155,9 +152,9 @@ Install Repo
</p>


<pre><tt>$ mkdir -p ~/bin
<pre><code>$ mkdir -p ~/bin
$ wget -O - https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo</tt></pre>
$ chmod a+x ~/bin/repo</code></pre>

</li>
<li>
Expand All @@ -166,9 +163,9 @@ Create working directory
</p>


<pre><tt>$ mkdir working-directory-name
<pre><code>$ mkdir working-directory-name
$ cd working-directory-name
$ repo init -u https://github.com/ubf/manifests.git -m ubf-redis-default.xml</tt></pre>
$ repo init -u https://github.com/ubf/manifests.git -m ubf-redis-default.xml</code></pre>


<table><tr>
Expand Down Expand Up @@ -197,12 +194,12 @@ Download Git repositories
</p>


<pre><tt>$ cd working-directory-name
$ repo sync</tt></pre>
<pre><code>$ cd working-directory-name
$ repo sync</code></pre>

</li>
</ol>
<p>For futher information and help for related tools, please refer to the
<p>For further information and help for related tools, please refer to the
following links:</p>
<ul>
<li>
Expand All @@ -212,7 +209,7 @@ Erlang - <a href="http://www.erlang.org/">http://www.erlang.org/</a>
<ul>
<li>
<p>
<strong>R13B04 or newer, R15B has been tested most recently</strong>
<strong>R13B04 or newer, R15B02 has been tested most recently</strong>
</p>
</li>
</ul>
Expand All @@ -224,7 +221,7 @@ Git - <a href="http://git-scm.com/">http://git-scm.com/</a>
<ul>
<li>
<p>
<strong>Git 1.5.4 or newer, Git 1.7.9.3 has been tested recently</strong>
<strong>Git 1.5.4 or newer, Git 1.8.0 has been tested most recently</strong>
</p>
</li>
<li>
Expand All @@ -246,7 +243,7 @@ Python - <a href="http://www.python.org">http://www.python.org</a>
<ul>
<li>
<p>
<strong>Python 2.4 or newer, Python 2.7.1 has been tested most recently
<strong>Python 2.4 or newer, Python 2.7.2 has been tested most recently
(CAUTION: Python 3.x might be too new)</strong>
</p>
</li>
Expand All @@ -259,12 +256,12 @@ Python - <a href="http://www.python.org">http://www.python.org</a>
</li>
<li>
<p>
Rebar - <a href="https://github.com/basho/rebar/wiki">https://github.com/basho/rebar/wiki</a>
Rebar - <a href="https://github.com/rebar/rebar/wiki">https://github.com/rebar/rebar/wiki</a>
</p>
</li>
<li>
<p>
Repo - <a href="http://source.android.com/source/git-repo.md">http://source.android.com/source/git-repo.html</a>
Repo - <a href="http://source.android.com/source/git-repo.html">http://source.android.com/source/git-repo.html</a>
</p>
</li>
</ul>
Expand All @@ -285,8 +282,8 @@ Build
</p>


<pre><tt>$ cd working-directory-name
$ make compile</tt></pre>
<pre><code>$ cd working-directory-name
$ make compile</code></pre>

</li>
<li>
Expand All @@ -295,8 +292,8 @@ Run the unit tests
</p>


<pre><tt>$ cd working-directory-name
$ make eunit</tt></pre>
<pre><code>$ cd working-directory-name
$ make eunit</code></pre>

</li>
</ol>
Expand All @@ -317,8 +314,8 @@ Build Dialyzer's PLT <em>(required once)</em>
</p>


<pre><tt>$ cd working-directory-name
$ make build-plt</tt></pre>
<pre><code>$ cd working-directory-name
$ make build-plt</code></pre>


<table><tr>
Expand All @@ -336,8 +333,8 @@ Dialyze with specs
</p>


<pre><tt>$ cd working-directory-name
$ make dialyze</tt></pre>
<pre><code>$ cd working-directory-name
$ make dialyze</code></pre>


<table><tr>
Expand All @@ -357,8 +354,8 @@ Dialyze without specs
</p>


<pre><tt>$ cd working-directory-name
$ make dialyze-nospec</tt></pre>
<pre><code>$ cd working-directory-name
$ make dialyze-nospec</code></pre>

</li>
</ol>
Expand All @@ -373,12 +370,12 @@ $ make dialyze-nospec</tt></pre>
<li>
<p>
Make sure QuickCheck is in your Erlang code path. One simple way
to accomplish this is by adding the code path to your <tt>~/.erlang</tt>
to accomplish this is by adding the code path to your <code>~/.erlang</code>
resource file.
</p>


<pre><tt>true = code:add_pathz(os:getenv("HOME")++"/.erlang.d/deps/quviq/eqc-X.Y.Z/ebin").</tt></pre>
<pre><code>true = code:add_pathz(os:getenv("HOME")++"/.erlang.d/deps/quviq/eqc-X.Y.Z/ebin").</code></pre>

</li>
<li>
Expand All @@ -387,9 +384,8 @@ Compile for QuickCheck
</p>


<pre><tt>$ cd working-directory-name
$ make clean
$ make eqc-compile</tt></pre>
<pre><code>$ cd working-directory-name
$ make clean eqc</code></pre>

</li>
<li>
Expand All @@ -398,7 +394,7 @@ Run 5,000 Redis Encoder/Decoder QuickCheck tests
</p>


<pre><tt>$ cd working-directory-name/deps/ubf_redis/.eunit
<pre><code>$ cd working-directory-name/deps/ubf_redis/.eqc
$ erl -smp +A 5 -pz ../../ubf/ebin -pz ../../qc/ebin

1> ruf_tests:qc_run(5000).
Expand All @@ -409,7 +405,7 @@ prop_ruf_responses: ...
...
Ok, passed 5000 tests
[]
.......</tt></pre>
.......</code></pre>

</li>
<li>
Expand All @@ -418,7 +414,7 @@ Run 500 Redis Proxy QuickCheck tests
</p>


<pre><tt>$ cd working-directory-name/deps/ubf_redis/.eunit
<pre><code>$ cd working-directory-name/deps/ubf_redis/.eqc
$ erl -smp +A 5 -pz ../../ubf/ebin -pz ../../qc/ebin

1> redis_proxy_tests:qc_run(500).
Expand Down Expand Up @@ -563,15 +559,15 @@ OK, passed 500 tests
0.02% {bgrewriteaof_req,'->',{error,'ERR Background append only file rewriting already in progress'}}
0.01% {sunion_req,'->',{error,'ERR Operation against a key holding the wrong kind of value'}}
0.01% {sdiffstore_req,'->',{error,'ERR Operation against a key holding the wrong kind of value'}}
.......</tt></pre>
.......</code></pre>


<table><tr>
<td class="icon">
Tip
</td>
<td class="content">This test requires redis-server to be installed under the
<tt>/usr/local/</tt> directory.</td>
<code>/usr/local/</code> directory.</td>
</tr></table>


Expand All @@ -580,7 +576,7 @@ Tip
Caution
</td>
<td class="content">This test removes all data under the
<tt>/usr/local/var/db/redis/</tt> directory.</td>
<code>/usr/local/var/db/redis/</code> directory.</td>
</tr></table>

</li>
Expand Down

0 comments on commit 7e4e1c5

Please sign in to comment.