Skip to content

Commit

Permalink
cleaned up coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
imajes committed Dec 21, 2008
1 parent d68ce4d commit 6d0feca
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 172 deletions.
22 changes: 11 additions & 11 deletions coverage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h3>
C0 code coverage information
</h3>
<p>
Generated on Wed Oct 01 20:56:45 +0100 2008 with
Generated on Sun Dec 21 22:36:23 +0000 2008 with
<a href='http://eigenclass.org/hiki/rcov'>
rcov 0.8.1.2
</a>
Expand All @@ -63,9 +63,9 @@ <h3>
class='heading'> Total lines </td> <td class='heading'> Lines of code </td>
<td class='heading'> Total coverage </td> <td class='heading'> Code coverage
</td> </tr> </thead> <tbody> <tr class='light'> <td> TOTAL </td> <td
class='lines_total'> <tt> 348 </tt> </td> <td class='lines_code'> <tt> 254
class='lines_total'> <tt> 371 </tt> </td> <td class='lines_code'> <tt> 269
</tt> </td> <td> <table cellspacing='0' align='right' cellpadding='0'> <tr>
<td> <tt class='coverage_total'> 94.8% </tt> &nbsp; </td> <td> <table
<td> <tt class='coverage_total'> 94.9% </tt> &nbsp; </td> <td> <table
class='percent_graph' cellspacing='0' width='100' cellpadding='0'> <tr> <td
class='covered' width='95' /> <td class='uncovered' width='5' /> </tr>
</table> </td> </tr> </table> </td> <td> <table cellspacing='0'
Expand All @@ -74,16 +74,16 @@ <h3>
width='100' cellpadding='0'> <tr> <td class='covered' width='93' /> <td
class='uncovered' width='7' /> </tr> </table> </td> </tr> </table> </td>
</tr> <tr class='dark'> <td> <a href='lib-postalmethods_rb.html'>
lib/postalmethods.rb </a> </td> <td class='lines_total'> <tt> 51 </tt> </td>
<td class='lines_code'> <tt> 37 </tt> </td> <td> <table cellspacing='0'
align='right' cellpadding='0'> <tr> <td> <tt class='coverage_total'> 98.0%
lib/postalmethods.rb </a> </td> <td class='lines_total'> <tt> 71 </tt> </td>
<td class='lines_code'> <tt> 52 </tt> </td> <td> <table cellspacing='0'
align='right' cellpadding='0'> <tr> <td> <tt class='coverage_total'> 97.2%
</tt> &nbsp; </td> <td> <table class='percent_graph' cellspacing='0'
width='100' cellpadding='0'> <tr> <td class='covered' width='98' /> <td
class='uncovered' width='2' /> </tr> </table> </td> </tr> </table> </td>
width='100' cellpadding='0'> <tr> <td class='covered' width='97' /> <td
class='uncovered' width='3' /> </tr> </table> </td> </tr> </table> </td>
<td> <table cellspacing='0' align='right' cellpadding='0'> <tr> <td> <tt
class='coverage_code'> 97.3% </tt> &nbsp; </td> <td> <table
class='coverage_code'> 96.2% </tt> &nbsp; </td> <td> <table
class='percent_graph' cellspacing='0' width='100' cellpadding='0'> <tr> <td
class='covered' width='97' /> <td class='uncovered' width='3' /> </tr>
class='covered' width='96' /> <td class='uncovered' width='4' /> </tr>
</table> </td> </tr> </table> </td> </tr> <tr class='light'> <td> <a
href='lib-postalmethods-document_processor_rb.html'>
lib/postalmethods/document_processor.rb </a> </td> <td class='lines_total'>
Expand Down Expand Up @@ -124,7 +124,7 @@ <h3>
class='uncovered' width='0' /> </tr> </table> </td> </tr> </table> </td>
</tr> <tr class='dark'> <td> <a
href='lib-postalmethods-send_letter_rb.html'>
lib/postalmethods/send_letter.rb </a> </td> <td class='lines_total'> <tt> 46
lib/postalmethods/send_letter.rb </a> </td> <td class='lines_total'> <tt> 49
</tt> </td> <td class='lines_code'> <tt> 31 </tt> </td> <td> <table
cellspacing='0' align='right' cellpadding='0'> <tr> <td> <tt
class='coverage_total'> 100.0% </tt> &nbsp; </td> <td> <table
Expand Down
2 changes: 1 addition & 1 deletion coverage/lib-postalmethods-document_processor_rb.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h3>
C0 code coverage information
</h3>
<p>
Generated on Wed Oct 01 20:56:46 +0100 2008 with
Generated on Sun Dec 21 22:36:24 +0000 2008 with
<a href='http://eigenclass.org/hiki/rcov'>
rcov 0.8.1.2
</a>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lib-postalmethods-exceptions_rb.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h3>
C0 code coverage information
</h3>
<p>
Generated on Wed Oct 01 20:56:46 +0100 2008 with
Generated on Sun Dec 21 22:36:24 +0000 2008 with
<a href='http://eigenclass.org/hiki/rcov'>
rcov 0.8.1.2
</a>
Expand Down
2 changes: 1 addition & 1 deletion coverage/lib-postalmethods-get_letter_status_rb.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h3>
C0 code coverage information
</h3>
<p>
Generated on Wed Oct 01 20:56:46 +0100 2008 with
Generated on Sun Dec 21 22:36:24 +0000 2008 with
<a href='http://eigenclass.org/hiki/rcov'>
rcov 0.8.1.2
</a>
Expand Down
103 changes: 53 additions & 50 deletions coverage/lib-postalmethods-send_letter_rb.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ <h3>
C0 code coverage information
</h3>
<p>
Generated on Wed Oct 01 20:56:46 +0100 2008 with
Generated on Sun Dec 21 22:36:24 +0000 2008 with
<a href='http://eigenclass.org/hiki/rcov'>
rcov 0.8.1.2
</a>
Expand All @@ -174,7 +174,7 @@ <h3>
<td class='heading'> Total coverage </td> <td class='heading'> Code coverage
</td> </tr> </thead> <tbody> <tr class='light'> <td> <a
href='lib-postalmethods-send_letter_rb.html'>
lib/postalmethods/send_letter.rb </a> </td> <td class='lines_total'> <tt> 46
lib/postalmethods/send_letter.rb </a> </td> <td class='lines_total'> <tt> 49
</tt> </td> <td class='lines_code'> <tt> 31 </tt> </td> <td> <table
cellspacing='0' align='right' cellpadding='0'> <tr> <td> <tt
class='coverage_total'> 100.0% </tt> &nbsp; </td> <td> <table
Expand All @@ -189,59 +189,62 @@ <h3>
module PostalMethods </span><span class="inferred0"><a name="line2"></a> 2
</span><span class="marked1"><a name="line3"></a> 3 module SendLetter
</span><span class="inferred0"><a name="line4"></a> 4 </span><span
class="marked1"><a name="line5"></a> 5 def send_letter(doc, description)
</span><span class="marked0"><a name="line6"></a> 6 raise
PostalMethods::NoPreparationException unless self.prepared </span><span
class="inferred1"><a name="line7"></a> 7 ## push a letter over the api
</span><span class="marked0"><a name="line8"></a> 8 self.document = doc
</span><span class="marked1"><a name="line9"></a> 9 rv =
@rpc_driver.sendLetter(:Username =&gt; self.username, :Password =&gt;
class="marked1"><a name="line5"></a> 5 def send_letter(doc, description,
work_mode = &quot;&quot;) </span><span class="marked0"><a name="line6"></a>
6 raise PostalMethods::NoPreparationException unless self.prepared
</span><span class="inferred1"><a name="line7"></a> 7 ## push a letter over
the api </span><span class="inferred0"><a name="line8"></a> 8 </span><span
class="inferred1"><a name="line9"></a> 9 </span><span class="inferred0"><a
name="line10"></a>10 </span><span class="marked1"><a name="line11"></a>11
self.document = doc </span><span class="marked0"><a name="line12"></a>12 rv
= @rpc_driver.sendLetterV2(:Username =&gt; self.username, :Password =&gt;
self.password, :FileExtension =&gt; self.document[:extension], </span><span
class="marked0"><a name="line10"></a>10 :FileBinaryData =&gt;
self.document[:bytes], :MyDescription =&gt; description) </span><span
class="inferred1"><a name="line11"></a>11 </span><span class="marked0"><a
name="line12"></a>12 status_code = rv.sendLetterResult.to_i </span><span
class="inferred1"><a name="line13"></a>13 </span><span class="marked0"><a
name="line14"></a>14 if status_code &gt; 0 </span><span class="marked1"><a
name="line15"></a>15 return status_code </span><span class="marked0"><a
name="line16"></a>16 elsif API_STATUS_CODES.has_key?(status_code)
</span><span class="marked1"><a name="line17"></a>17
instance_eval(&quot;raise APIStatusCode#{status_code.to_s.gsub(/(
|\-)/,'')}Exception&quot;) </span><span class="inferred0"><a
name="line18"></a>18 end </span><span class="inferred1"><a
name="line19"></a>19 end </span><span class="inferred0"><a
name="line20"></a>20 </span><span class="marked1"><a name="line21"></a>21
def send_letter_with_address(doc, description, address) </span><span
class="marked0"><a name="line22"></a>22 raise
class="marked1"><a name="line13"></a>13 :FileBinaryData =&gt;
self.document[:bytes], :MyDescription =&gt; description, :WorkMode =&gt;
self.work_mode) </span><span class="inferred0"><a name="line14"></a>14
</span><span class="marked1"><a name="line15"></a>15 status_code =
rv.sendLetterV2Result.to_i </span><span class="inferred0"><a
name="line16"></a>16 </span><span class="marked1"><a name="line17"></a>17 if
status_code &gt; 0 </span><span class="marked0"><a name="line18"></a>18
return status_code </span><span class="marked1"><a name="line19"></a>19
elsif API_STATUS_CODES.has_key?(status_code) </span><span class="marked0"><a
name="line20"></a>20 instance_eval(&quot;raise
APIStatusCode#{status_code.to_s.gsub(/( |\-)/,'')}Exception&quot;)
</span><span class="inferred1"><a name="line21"></a>21 end </span><span
class="inferred0"><a name="line22"></a>22 end </span><span
class="inferred1"><a name="line23"></a>23 </span><span class="marked0"><a
name="line24"></a>24 def send_letter_with_address(doc, description, address)
</span><span class="marked1"><a name="line25"></a>25 raise
PostalMethods::NoPreparationException unless self.prepared </span><span
class="marked1"><a name="line23"></a>23 raise
class="marked0"><a name="line26"></a>26 raise
PostalMethods::AddressNotHashException unless (address.class == Hash)
</span><span class="inferred0"><a name="line24"></a>24 </span><span
class="inferred1"><a name="line25"></a>25 ## setup the document </span><span
class="marked0"><a name="line26"></a>26 self.document = doc </span><span
class="inferred1"><a name="line27"></a>27 </span><span class="marked0"><a
name="line28"></a>28 opts = {:Username =&gt; self.username, :Password =&gt;
self.password, :FileExtension =&gt; self.document[:extension], </span><span
class="marked1"><a name="line29"></a>29 :FileBinaryData =&gt;
self.document[:bytes], :MyDescription =&gt; description} </span><span
</span><span class="inferred1"><a name="line27"></a>27 </span><span
class="inferred0"><a name="line28"></a>28 ## setup the document </span><span
class="marked1"><a name="line29"></a>29 self.document = doc </span><span
class="inferred0"><a name="line30"></a>30 </span><span class="marked1"><a
name="line31"></a>31 opts.merge!(address) </span><span class="inferred0"><a
name="line32"></a>32 </span><span class="inferred1"><a name="line33"></a>33
## push a letter over the api </span><span class="marked0"><a
name="line34"></a>34 rv = @rpc_driver.sendLetterAndAddress(opts)
</span><span class="marked1"><a name="line35"></a>35 status_code =
rv.sendLetterAndAddressResult.to_i </span><span class="inferred0"><a
name="line36"></a>36 </span><span class="marked1"><a name="line37"></a>37 if
status_code &gt; 0 </span><span class="marked0"><a name="line38"></a>38
return status_code </span><span class="marked1"><a name="line39"></a>39
elsif API_STATUS_CODES.has_key?(status_code) </span><span class="marked0"><a
name="line40"></a>40 instance_eval(&quot;raise
name="line31"></a>31 opts = {:Username =&gt; self.username, :Password =&gt;
self.password, :FileExtension =&gt; self.document[:extension], </span><span
class="marked0"><a name="line32"></a>32 :FileBinaryData =&gt;
self.document[:bytes], :MyDescription =&gt; description, :WorkMode =&gt;
self.work_mode} </span><span class="inferred1"><a name="line33"></a>33
</span><span class="marked0"><a name="line34"></a>34 opts.merge!(address)
</span><span class="inferred1"><a name="line35"></a>35 </span><span
class="inferred0"><a name="line36"></a>36 ## push a letter over the api
</span><span class="marked1"><a name="line37"></a>37 rv =
@rpc_driver.sendLetterAndAddressV2(opts) </span><span class="marked0"><a
name="line38"></a>38 status_code = rv.sendLetterAndAddressV2Result.to_i
</span><span class="inferred1"><a name="line39"></a>39 </span><span
class="marked0"><a name="line40"></a>40 if status_code &gt; 0 </span><span
class="marked1"><a name="line41"></a>41 return status_code </span><span
class="marked0"><a name="line42"></a>42 elsif
API_STATUS_CODES.has_key?(status_code) </span><span class="marked1"><a
name="line43"></a>43 instance_eval(&quot;raise
APIStatusCode#{status_code.to_s.gsub(/( |\-)/,'')}Exception&quot;)
</span><span class="inferred1"><a name="line41"></a>41 end </span><span
class="inferred0"><a name="line42"></a>42 end </span><span
class="inferred1"><a name="line43"></a>43 </span><span class="inferred0"><a
name="line44"></a>44 end </span><span class="inferred1"><a
name="line45"></a>45 </span><span class="inferred0"><a name="line46"></a>46
</span><span class="inferred0"><a name="line44"></a>44 end </span><span
class="inferred1"><a name="line45"></a>45 end </span><span
class="inferred0"><a name="line46"></a>46 </span><span class="inferred1"><a
name="line47"></a>47 end </span><span class="inferred0"><a
name="line48"></a>48 </span><span class="inferred1"><a name="line49"></a>49
end </span></pre>
<hr />
<p> Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'> rcov
Expand Down
Loading

0 comments on commit 6d0feca

Please sign in to comment.