Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ before_script:
- sudo luarocks install lua-cjson
- sudo luarocks install luaposix
- sudo luarocks install lunit
- sudo luarocks install luasec
- cd ..

script:
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,20 @@ See docs/index.html for more details.

Prerequisites
=============
To run the tests:
```
#for unit tests
$luarocks install lunit
$luarocks install luaposix
$luarocks install luasocket
$luarocks install lua-cjson

#for generating docs
$luarocks install ldoc
luarocks install lunit
luarocks install lua-cjson
luarocks install luaposix
luarocks install luasocket
luarocks install luasec

lunit tests/*.lua
```

To generate the docs:
```
luarocks install ldoc

ldoc raven.lua -d docs -p raven-lua
```
65 changes: 35 additions & 30 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<div id="navigation">
<br/>
<h1>ldoc</h1>
<h1>raven-lua</h1>


<h2>Contents</h2>
Expand All @@ -34,7 +34,7 @@ <h2>Contents</h2>


<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<ul class="nowrap">
<li><strong>raven</strong></li>
</ul>

Expand Down Expand Up @@ -88,7 +88,8 @@ <h2><a href="#Functions">Functions</a></h2>
<br/>


<h2><a name="Functions"></a>Functions</h2>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>

<dl class="function">
<dt>
<a name = "new"></a>
Expand All @@ -105,13 +106,20 @@ <h3>Parameters:</h3>
</li>
<li><span class="parameter">dsn</span>
The DSN of the Sentry instance with this format:
<pre>{PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}???/{PATH}{PROJECT_ID}</pre>
<pre>{PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}/{PATH}{PROJECT_ID}</pre>
<pre>http://pub:secret@127.0.0.1:8080/sentry/proj-id</pre>
</li>
<li><span class="parameter">conf</span>
client configuration. Conf should be a hash table. Possiable
keys are: "tags", "logger". For example:
<pre>{ tags = { foo = "bar", abc = "def" }, logger = "myLogger" }</pre>
client configuration. Conf should be a hash table. Possible keys are:
<ul>
<li><span class="parameter">tags</span> extra tags to include on all reported errors</li>
<li><span class="parameter">logger</span></li>
<li><span class="parameter">verify_ssl</span> boolean of whether to perform SSL certificate verification</li>
<li><span class="parameter">cafile</span> path to CA certificate bundle file.
Required only when using luasec, ngx version uses the <tt>lua_ssl_trusted_certificate</tt> directive for this.</li>
</ul>
For example:
<pre>{ tags = { foo = "bar", abc = "def" }, logger = "myLogger", verify_ssl = false }</pre>
</li>
</ul>

Expand All @@ -125,10 +133,9 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example">
<span class="keyword">local</span> raven = <span class="global">require</span> <span class="string">"raven"</span>
<span class="keyword">local</span> rvn = raven:new(dsn, { tags = { foo = <span class="string">"bar"</span>, abc = <span class="string">"def"</span> },
logger = <span class="string">"myLogger"</span> })</pre>
<pre class="example"><span class="keyword">local</span> raven = <span class="global">require</span> <span class="string">"raven"</span>
<span class="keyword">local</span> rvn = raven:new(dsn, { tags = { foo = <span class="string">"bar"</span>, abc = <span class="string">"def"</span> },
logger = <span class="string">"myLogger"</span> })</pre>
</ul>

</dd>
Expand Down Expand Up @@ -183,12 +190,11 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example">
<span class="keyword">local</span> raven = <span class="global">require</span> <span class="string">"raven"</span>
<span class="keyword">local</span> rvn = raven:new(dsn, { tags = { foo = <span class="string">"bar"</span>, abc = <span class="string">"def"</span> },
logger = <span class="string">"myLogger"</span> })
<span class="keyword">local</span> id, err = rvn:captureException(exception,
{ tags = { foo = <span class="string">"bar"</span>, abc = <span class="string">"def"</span> }})</pre>
<pre class="example"><span class="keyword">local</span> raven = <span class="global">require</span> <span class="string">"raven"</span>
<span class="keyword">local</span> rvn = raven:new(dsn, { tags = { foo = <span class="string">"bar"</span>, abc = <span class="string">"def"</span> },
logger = <span class="string">"myLogger"</span> })
<span class="keyword">local</span> id, err = rvn:captureException(exception,
{ tags = { foo = <span class="string">"bar"</span>, abc = <span class="string">"def"</span> }})</pre>
</ul>

</dd>
Expand Down Expand Up @@ -229,12 +235,11 @@ <h3>Returns:</h3>

<h3>Usage:</h3>
<ul>
<pre class="example">
<span class="keyword">local</span> raven = <span class="global">require</span> <span class="string">"raven"</span>
<span class="keyword">local</span> rvn = raven:new(dsn, { tags = { foo = <span class="string">"bar"</span>, abc = <span class="string">"def"</span> },
logger = <span class="string">"myLogger"</span> })
<span class="keyword">local</span> id, err = rvn:captureMessage(<span class="string">"Sample message"</span>,
{ tags = { foo = <span class="string">"bar"</span>, abc = <span class="string">"def"</span> }})</pre>
<pre class="example"><span class="keyword">local</span> raven = <span class="global">require</span> <span class="string">"raven"</span>
<span class="keyword">local</span> rvn = raven:new(dsn, { tags = { foo = <span class="string">"bar"</span>, abc = <span class="string">"def"</span> },
logger = <span class="string">"myLogger"</span> })
<span class="keyword">local</span> id, err = rvn:captureMessage(<span class="string">"Sample message"</span>,
{ tags = { foo = <span class="string">"bar"</span>, abc = <span class="string">"def"</span> }})</pre>
</ul>

</dd>
Expand Down Expand Up @@ -264,18 +269,17 @@ <h3>Parameters:</h3>
<h3>Returns:</h3>
<ol>

"f" 's return value(s)
the same with xpcall
</ol>



<h3>Usage:</h3>
<ul>
<pre class="example">
<span class="keyword">function</span> func(a, b, c)
<span class="keyword">return</span> a * b + c
<span class="keyword">end</span>
<span class="keyword">return</span> rvn:call(func, a, b, c)</pre>
<pre class="example"><span class="keyword">function</span> func(a, b, c)
<span class="keyword">return</span> a * b + c
<span class="keyword">end</span>
<span class="keyword">return</span> rvn:call(func, a, b, c)</pre>
</ul>

</dd>
Expand All @@ -285,7 +289,8 @@ <h3>Usage:</h3>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.2</a></i>
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2017-05-16 12:19:18 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
35 changes: 18 additions & 17 deletions docs/ldoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ del,ins {
text-decoration: none;
}
li {
list-style: disc;
margin-left: 20px;
}
caption,th {
Expand Down Expand Up @@ -71,7 +70,7 @@ body {
background-color: #ffffff; margin: 0px;
}

code, tt { font-family: monospace; }
code, tt { font-family: monospace; font-size: 1.1em; }
span.parameter { font-family:monospace; }
span.parameter:after { content:":"; }
span.types:before { content:"("; }
Expand All @@ -88,7 +87,7 @@ em { font-style: italic;}

h1 {
font-size: 1.5em;
margin: 0 0 20px 0;
margin: 20px 0 20px 0;
}
h2, h3, h4 { margin: 15px 0 10px 0; }
h2 { font-size: 1.25em; }
Expand All @@ -114,24 +113,18 @@ p.name {
padding-top: 1em;
}

pre.example {
background-color: rgb(245, 245, 245);
border: 1px solid silver;
padding: 10px;
margin: 10px 0 10px 0;
font-family: "Andale Mono", monospace;
font-size: .85em;
}

pre {
background-color: rgb(245, 245, 245);
border: 1px solid silver;
border: 1px solid #C0C0C0; /* silver */
padding: 10px;
margin: 10px 0 10px 0;
overflow: auto;
font-family: "Andale Mono", monospace;
}

pre.example {
font-size: .85em;
}

table.index { border: 1px #00007f; }
table.index td { text-align: left; vertical-align: top; }
Expand Down Expand Up @@ -159,7 +152,7 @@ table.index td { text-align: left; vertical-align: top; }

#navigation {
float: left;
width: 18em;
width: 14em;
vertical-align: top;
background-color: #f0f0f0;
overflow: visible;
Expand Down Expand Up @@ -193,7 +186,7 @@ table.index td { text-align: left; vertical-align: top; }
}

#content {
margin-left: 18em;
margin-left: 14em;
padding: 1em;
width: 700px;
border-left: 2px solid #cccccc;
Expand Down Expand Up @@ -286,17 +279,25 @@ ol ul { margin-top: 0px; }
ol ol { margin-top: 0px; }
ul ol { margin-top: 0px; }

/* make the target distinct; helps when we're navigating to a function */
a:target + * {
background-color: #FF9;
}


/* styles for prettification of source */
pre .comment { color: #558817; }
pre .constant { color: #a8660d; }
pre .escape { color: #844631; }
pre .keyword { color: #2239a8; font-weight: bold; }
pre .keyword { color: #aa5050; font-weight: bold; }
pre .library { color: #0e7c6b; }
pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; }
pre .string { color: #a8660d; }
pre .string { color: #8080ff; }
pre .number { color: #f8660d; }
pre .operator { color: #2239a8; font-weight: bold; }
pre .preprocessor, pre .prepro { color: #a33243; }
pre .global { color: #800080; }
pre .user-keyword { color: #800080; }
pre .prompt { color: #558817; }
pre .url { color: #272fc2; text-decoration: underline; }

Loading