postalmethods 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +16 -6
- data/README.rdoc +35 -0
- data/Rakefile +28 -4
- data/coverage/index.html +163 -0
- data/coverage/lib-postalmethods-document_processor_rb.html +226 -0
- data/coverage/lib-postalmethods-exceptions_rb.html +333 -0
- data/coverage/lib-postalmethods-get_letter_status_rb.html +285 -0
- data/coverage/lib-postalmethods-send_letter_rb.html +261 -0
- data/coverage/lib-postalmethods-utility_rb.html +277 -0
- data/coverage/lib-postalmethods_rb.html +282 -0
- data/lib/postalmethods/get_letter_status.rb +10 -11
- data/lib/postalmethods/send_letter.rb +10 -7
- data/lib/postalmethods/utility.rb +5 -4
- data/lib/postalmethods/version.rb +3 -3
- data/lib/postalmethods.rb +26 -4
- data/postalmethods.gemspec +36 -0
- data/spec/doc/WSDL-Output +868 -0
- data/spec/doc/default.rb +379 -0
- data/spec/doc/defaultMappingRegistry.rb +1 -0
- data/spec/doc/sample.pdf +0 -0
- data/spec/get_letter_status_spec.rb +4 -2
- data/spec/postalmethods_spec.rb +5 -20
- data/spec/send_letter_spec.rb +2 -3
- data/spec/spec.opts +1 -7
- data/spec/spec_helper.rb +1 -21
- data/spec/utility_spec.rb +6 -4
- data/tasks/rspec.rake +0 -12
- metadata +36 -20
- data/tasks/deployment.rake +0 -34
- data/tasks/environment.rake +0 -7
data/Manifest.txt
CHANGED
@@ -2,30 +2,40 @@ History.txt
|
|
2
2
|
License.txt
|
3
3
|
Manifest.txt
|
4
4
|
PostInstall.txt
|
5
|
+
README.rdoc
|
5
6
|
README.txt
|
6
7
|
Rakefile
|
7
8
|
config/hoe.rb
|
8
9
|
config/requirements.rb
|
10
|
+
coverage/index.html
|
11
|
+
coverage/lib-postalmethods-document_processor_rb.html
|
12
|
+
coverage/lib-postalmethods-exceptions_rb.html
|
13
|
+
coverage/lib-postalmethods-get_letter_status_rb.html
|
14
|
+
coverage/lib-postalmethods-send_letter_rb.html
|
15
|
+
coverage/lib-postalmethods-utility_rb.html
|
16
|
+
coverage/lib-postalmethods_rb.html
|
9
17
|
lib/postalmethods.rb
|
10
|
-
lib/postalmethods/version.rb
|
11
18
|
lib/postalmethods/document_processor.rb
|
12
19
|
lib/postalmethods/exceptions.rb
|
13
20
|
lib/postalmethods/get_letter_status.rb
|
14
21
|
lib/postalmethods/send_letter.rb
|
15
22
|
lib/postalmethods/utility.rb
|
23
|
+
lib/postalmethods/version.rb
|
24
|
+
postalmethods.gemspec
|
16
25
|
script/console
|
17
26
|
script/destroy
|
18
27
|
script/generate
|
19
28
|
setup.rb
|
29
|
+
spec/doc/WSDL-Output
|
30
|
+
spec/doc/default.rb
|
31
|
+
spec/doc/defaultMappingRegistry.rb
|
32
|
+
spec/doc/sample.pdf
|
20
33
|
spec/document_processor_spec.rb
|
21
34
|
spec/get_letter_status_spec.rb
|
22
35
|
spec/postalmethods_spec.rb
|
23
|
-
spec/send_letter_spec.rb
|
24
|
-
spec/utility_spec.rb
|
25
36
|
spec/rcov.opts
|
37
|
+
spec/send_letter_spec.rb
|
26
38
|
spec/spec.opts
|
27
39
|
spec/spec_helper.rb
|
28
|
-
|
29
|
-
tasks/environment.rake
|
40
|
+
spec/utility_spec.rb
|
30
41
|
tasks/rspec.rake
|
31
|
-
|
data/README.rdoc
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
= postalmethods
|
2
|
+
|
3
|
+
* Info: http://www.postalmethods.com/resources/quickstart
|
4
|
+
* Code: http://github.com/imajes/postalmethods/tree/master
|
5
|
+
|
6
|
+
== DESCRIPTION:
|
7
|
+
|
8
|
+
API wrapper library for the postal methods api.
|
9
|
+
|
10
|
+
== FEATURES/PROBLEMS:
|
11
|
+
|
12
|
+
* Provides access to all of the API methods with appropriate
|
13
|
+
exceptions as necessary.
|
14
|
+
|
15
|
+
== SYNOPSIS:
|
16
|
+
|
17
|
+
require 'postalmethods'
|
18
|
+
|
19
|
+
@doc = open(File.dirname(__FILE__) + '/../spec/doc/sample.pdf')
|
20
|
+
@client = PostalMethods::Client.new(:user => "user", :password => "password")
|
21
|
+
rv = @client.send_letter(@doc, "description of doc")
|
22
|
+
puts rv
|
23
|
+
|
24
|
+
== REQUIREMENTS:
|
25
|
+
|
26
|
+
* This gem relies on the soap4r gem.
|
27
|
+
|
28
|
+
== INSTALL:
|
29
|
+
|
30
|
+
* sudo gem install postalmethods
|
31
|
+
* get a developer account at postalmethods.com
|
32
|
+
|
33
|
+
== LICENSE:
|
34
|
+
|
35
|
+
* See License.txt
|
data/Rakefile
CHANGED
@@ -1,4 +1,28 @@
|
|
1
|
-
require
|
2
|
-
require '
|
3
|
-
|
4
|
-
|
1
|
+
%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
|
2
|
+
require File.dirname(__FILE__) + '/lib/postalmethods'
|
3
|
+
|
4
|
+
# Generate all the Rake tasks
|
5
|
+
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
6
|
+
$hoe = Hoe.new('postalmethods', PostalMethods::VERSION::STRING) do |p|
|
7
|
+
p.developer('James Cox', 'james@imaj.es')
|
8
|
+
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
9
|
+
p.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
|
10
|
+
p.rubyforge_name = p.name # TODO this is default value
|
11
|
+
# p.extra_deps = [
|
12
|
+
# ['activesupport','>= 2.0.2'],
|
13
|
+
# ]
|
14
|
+
p.extra_dev_deps = [
|
15
|
+
['newgem', ">= #{::Newgem::VERSION}"]
|
16
|
+
]
|
17
|
+
|
18
|
+
p.clean_globs |= %w[**/.DS_Store tmp *.log]
|
19
|
+
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
20
|
+
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
21
|
+
p.rsync_args = '-av --delete --ignore-errors'
|
22
|
+
end
|
23
|
+
|
24
|
+
require 'newgem/tasks' # load /tasks/*.rake
|
25
|
+
Dir['tasks/**/*.rake'].each { |t| load t }
|
26
|
+
|
27
|
+
# TODO - want other tests/tasks run by default? Add them to the list
|
28
|
+
# task :default => [:spec, :features]
|
data/coverage/index.html
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
|
3
|
+
<head>
|
4
|
+
<title>
|
5
|
+
C0 code coverage information
|
6
|
+
</title>
|
7
|
+
<style type='text/css'>
|
8
|
+
body { background-color: rgb(240, 240, 245); }
|
9
|
+
</style>
|
10
|
+
<style type='text/css'>
|
11
|
+
span.cross-ref-title { font-size: 140%; } span.cross-ref a {
|
12
|
+
text-decoration: none; } span.cross-ref { background-color:#f3f7fa;
|
13
|
+
border: 1px dashed #333; margin: 1em; padding: 0.5em; overflow: hidden; }
|
14
|
+
a.crossref-toggle { text-decoration: none; } span.marked0 {
|
15
|
+
background-color: rgb(185, 210, 200); display: block; } span.marked1 {
|
16
|
+
background-color: rgb(190, 215, 205); display: block; } span.inferred0 {
|
17
|
+
background-color: rgb(175, 200, 200); display: block; } span.inferred1 {
|
18
|
+
background-color: rgb(180, 205, 205); display: block; } span.uncovered0 {
|
19
|
+
background-color: rgb(225, 110, 110); display: block; } span.uncovered1 {
|
20
|
+
background-color: rgb(235, 120, 120); display: block; } span.overview {
|
21
|
+
border-bottom: 8px solid black; } div.overview { border-bottom: 8px solid
|
22
|
+
black; } body { font-family: verdana, arial, helvetica; } div.footer {
|
23
|
+
font-size: 68%; margin-top: 1.5em; } h1, h2, h3, h4, h5, h6 {
|
24
|
+
margin-bottom: 0.5em; } h5 { margin-top: 0.5em; } .hidden { display: none;
|
25
|
+
} div.separator { height: 10px; } /* Commented out for better readability,
|
26
|
+
esp. on IE */ /* table tr td, table tr th { font-size: 68%; } td.value
|
27
|
+
table tr td { font-size: 11px; } */ table.percent_graph { height: 12px;
|
28
|
+
border: #808080 1px solid; empty-cells: show; } table.percent_graph
|
29
|
+
td.covered { height: 10px; background: #00f000; } table.percent_graph
|
30
|
+
td.uncovered { height: 10px; background: #e00000; } table.percent_graph
|
31
|
+
td.NA { height: 10px; background: #eaeaea; } table.report {
|
32
|
+
border-collapse: collapse; width: 100%; } table.report td.heading {
|
33
|
+
background: #dcecff; border: #d0d0d0 1px solid; font-weight: bold;
|
34
|
+
text-align: center; } table.report td.heading:hover { background: #c0ffc0;
|
35
|
+
} table.report td.text { border: #d0d0d0 1px solid; } table.report
|
36
|
+
td.value, table.report td.lines_total, table.report td.lines_code {
|
37
|
+
text-align: right; border: #d0d0d0 1px solid; } table.report tr.light {
|
38
|
+
background-color: rgb(240, 240, 245); } table.report tr.dark {
|
39
|
+
background-color: rgb(230, 230, 235); }
|
40
|
+
</style>
|
41
|
+
<script type='text/javascript'>
|
42
|
+
// <![CDATA[ function toggleCode( id ) { if ( document.getElementById )
|
43
|
+
elem = document.getElementById( id ); else if ( document.all ) elem =
|
44
|
+
eval( "document.all." + id ); else return false; elemStyle = elem.style;
|
45
|
+
if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else {
|
46
|
+
elemStyle.display = "none" } return true; } // Make cross-references
|
47
|
+
hidden by default document.writeln( "<style
|
48
|
+
type=\"text/css\">span.cross-ref { display: none }</style>" ) // ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
<body>
|
52
|
+
<h3>
|
53
|
+
C0 code coverage information
|
54
|
+
</h3>
|
55
|
+
<p>
|
56
|
+
Generated on Sun Dec 21 22:36:23 +0000 2008 with
|
57
|
+
<a href='http://eigenclass.org/hiki/rcov'>
|
58
|
+
rcov 0.8.1.2
|
59
|
+
</a>
|
60
|
+
</p>
|
61
|
+
<hr />
|
62
|
+
<table class='report'> <thead> <tr> <td class='heading'> Name </td> <td
|
63
|
+
class='heading'> Total lines </td> <td class='heading'> Lines of code </td>
|
64
|
+
<td class='heading'> Total coverage </td> <td class='heading'> Code coverage
|
65
|
+
</td> </tr> </thead> <tbody> <tr class='light'> <td> TOTAL </td> <td
|
66
|
+
class='lines_total'> <tt> 371 </tt> </td> <td class='lines_code'> <tt> 269
|
67
|
+
</tt> </td> <td> <table cellspacing='0' align='right' cellpadding='0'> <tr>
|
68
|
+
<td> <tt class='coverage_total'> 94.9% </tt> </td> <td> <table
|
69
|
+
class='percent_graph' cellspacing='0' width='100' cellpadding='0'> <tr> <td
|
70
|
+
class='covered' width='95' /> <td class='uncovered' width='5' /> </tr>
|
71
|
+
</table> </td> </tr> </table> </td> <td> <table cellspacing='0'
|
72
|
+
align='right' cellpadding='0'> <tr> <td> <tt class='coverage_code'> 92.9%
|
73
|
+
</tt> </td> <td> <table class='percent_graph' cellspacing='0'
|
74
|
+
width='100' cellpadding='0'> <tr> <td class='covered' width='93' /> <td
|
75
|
+
class='uncovered' width='7' /> </tr> </table> </td> </tr> </table> </td>
|
76
|
+
</tr> <tr class='dark'> <td> <a href='lib-postalmethods_rb.html'>
|
77
|
+
lib/postalmethods.rb </a> </td> <td class='lines_total'> <tt> 71 </tt> </td>
|
78
|
+
<td class='lines_code'> <tt> 52 </tt> </td> <td> <table cellspacing='0'
|
79
|
+
align='right' cellpadding='0'> <tr> <td> <tt class='coverage_total'> 97.2%
|
80
|
+
</tt> </td> <td> <table class='percent_graph' cellspacing='0'
|
81
|
+
width='100' cellpadding='0'> <tr> <td class='covered' width='97' /> <td
|
82
|
+
class='uncovered' width='3' /> </tr> </table> </td> </tr> </table> </td>
|
83
|
+
<td> <table cellspacing='0' align='right' cellpadding='0'> <tr> <td> <tt
|
84
|
+
class='coverage_code'> 96.2% </tt> </td> <td> <table
|
85
|
+
class='percent_graph' cellspacing='0' width='100' cellpadding='0'> <tr> <td
|
86
|
+
class='covered' width='96' /> <td class='uncovered' width='4' /> </tr>
|
87
|
+
</table> </td> </tr> </table> </td> </tr> <tr class='light'> <td> <a
|
88
|
+
href='lib-postalmethods-document_processor_rb.html'>
|
89
|
+
lib/postalmethods/document_processor.rb </a> </td> <td class='lines_total'>
|
90
|
+
<tt> 25 </tt> </td> <td class='lines_code'> <tt> 20 </tt> </td> <td> <table
|
91
|
+
cellspacing='0' align='right' cellpadding='0'> <tr> <td> <tt
|
92
|
+
class='coverage_total'> 100.0% </tt> </td> <td> <table
|
93
|
+
class='percent_graph' cellspacing='0' width='100' cellpadding='0'> <tr> <td
|
94
|
+
class='covered' width='100' /> <td class='uncovered' width='0' /> </tr>
|
95
|
+
</table> </td> </tr> </table> </td> <td> <table cellspacing='0'
|
96
|
+
align='right' cellpadding='0'> <tr> <td> <tt class='coverage_code'> 100.0%
|
97
|
+
</tt> </td> <td> <table class='percent_graph' cellspacing='0'
|
98
|
+
width='100' cellpadding='0'> <tr> <td class='covered' width='100' /> <td
|
99
|
+
class='uncovered' width='0' /> </tr> </table> </td> </tr> </table> </td>
|
100
|
+
</tr> <tr class='dark'> <td> <a href='lib-postalmethods-exceptions_rb.html'>
|
101
|
+
lib/postalmethods/exceptions.rb </a> </td> <td class='lines_total'> <tt> 97
|
102
|
+
</tt> </td> <td class='lines_code'> <tt> 80 </tt> </td> <td> <table
|
103
|
+
cellspacing='0' align='right' cellpadding='0'> <tr> <td> <tt
|
104
|
+
class='coverage_total'> 93.8% </tt> </td> <td> <table
|
105
|
+
class='percent_graph' cellspacing='0' width='100' cellpadding='0'> <tr> <td
|
106
|
+
class='covered' width='94' /> <td class='uncovered' width='6' /> </tr>
|
107
|
+
</table> </td> </tr> </table> </td> <td> <table cellspacing='0'
|
108
|
+
align='right' cellpadding='0'> <tr> <td> <tt class='coverage_code'> 92.5%
|
109
|
+
</tt> </td> <td> <table class='percent_graph' cellspacing='0'
|
110
|
+
width='100' cellpadding='0'> <tr> <td class='covered' width='93' /> <td
|
111
|
+
class='uncovered' width='7' /> </tr> </table> </td> </tr> </table> </td>
|
112
|
+
</tr> <tr class='light'> <td> <a
|
113
|
+
href='lib-postalmethods-get_letter_status_rb.html'>
|
114
|
+
lib/postalmethods/get_letter_status.rb </a> </td> <td class='lines_total'>
|
115
|
+
<tt> 69 </tt> </td> <td class='lines_code'> <tt> 43 </tt> </td> <td> <table
|
116
|
+
cellspacing='0' align='right' cellpadding='0'> <tr> <td> <tt
|
117
|
+
class='coverage_total'> 100.0% </tt> </td> <td> <table
|
118
|
+
class='percent_graph' cellspacing='0' width='100' cellpadding='0'> <tr> <td
|
119
|
+
class='covered' width='100' /> <td class='uncovered' width='0' /> </tr>
|
120
|
+
</table> </td> </tr> </table> </td> <td> <table cellspacing='0'
|
121
|
+
align='right' cellpadding='0'> <tr> <td> <tt class='coverage_code'> 100.0%
|
122
|
+
</tt> </td> <td> <table class='percent_graph' cellspacing='0'
|
123
|
+
width='100' cellpadding='0'> <tr> <td class='covered' width='100' /> <td
|
124
|
+
class='uncovered' width='0' /> </tr> </table> </td> </tr> </table> </td>
|
125
|
+
</tr> <tr class='dark'> <td> <a
|
126
|
+
href='lib-postalmethods-send_letter_rb.html'>
|
127
|
+
lib/postalmethods/send_letter.rb </a> </td> <td class='lines_total'> <tt> 49
|
128
|
+
</tt> </td> <td class='lines_code'> <tt> 31 </tt> </td> <td> <table
|
129
|
+
cellspacing='0' align='right' cellpadding='0'> <tr> <td> <tt
|
130
|
+
class='coverage_total'> 100.0% </tt> </td> <td> <table
|
131
|
+
class='percent_graph' cellspacing='0' width='100' cellpadding='0'> <tr> <td
|
132
|
+
class='covered' width='100' /> <td class='uncovered' width='0' /> </tr>
|
133
|
+
</table> </td> </tr> </table> </td> <td> <table cellspacing='0'
|
134
|
+
align='right' cellpadding='0'> <tr> <td> <tt class='coverage_code'> 100.0%
|
135
|
+
</tt> </td> <td> <table class='percent_graph' cellspacing='0'
|
136
|
+
width='100' cellpadding='0'> <tr> <td class='covered' width='100' /> <td
|
137
|
+
class='uncovered' width='0' /> </tr> </table> </td> </tr> </table> </td>
|
138
|
+
</tr> <tr class='light'> <td> <a href='lib-postalmethods-utility_rb.html'>
|
139
|
+
lib/postalmethods/utility.rb </a> </td> <td class='lines_total'> <tt> 60
|
140
|
+
</tt> </td> <td class='lines_code'> <tt> 43 </tt> </td> <td> <table
|
141
|
+
cellspacing='0' align='right' cellpadding='0'> <tr> <td> <tt
|
142
|
+
class='coverage_total'> 81.7% </tt> </td> <td> <table
|
143
|
+
class='percent_graph' cellspacing='0' width='100' cellpadding='0'> <tr> <td
|
144
|
+
class='covered' width='82' /> <td class='uncovered' width='18' /> </tr>
|
145
|
+
</table> </td> </tr> </table> </td> <td> <table cellspacing='0'
|
146
|
+
align='right' cellpadding='0'> <tr> <td> <tt class='coverage_code'> 74.4%
|
147
|
+
</tt> </td> <td> <table class='percent_graph' cellspacing='0'
|
148
|
+
width='100' cellpadding='0'> <tr> <td class='covered' width='74' /> <td
|
149
|
+
class='uncovered' width='26' /> </tr> </table> </td> </tr> </table> </td>
|
150
|
+
</tr> </tbody> </table>
|
151
|
+
<hr />
|
152
|
+
<p> Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'> rcov
|
153
|
+
code coverage analysis tool for Ruby </a> version 0.8.1.2. </p>
|
154
|
+
<p>
|
155
|
+
<a href='http://validator.w3.org/check/referer'>
|
156
|
+
<img src='http://www.w3.org/Icons/valid-xhtml11' height='31' alt='Valid XHTML 1.1!' width='88' />
|
157
|
+
</a>
|
158
|
+
<a href='http://jigsaw.w3.org/css-validator/check/referer'>
|
159
|
+
<img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px' />
|
160
|
+
</a>
|
161
|
+
</p>
|
162
|
+
</body>
|
163
|
+
</html>
|
@@ -0,0 +1,226 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2
|
+
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
|
3
|
+
<head>
|
4
|
+
<title>
|
5
|
+
lib/postalmethods/document_processor.rb - C0 code coverage information
|
6
|
+
</title>
|
7
|
+
<style type='text/css'>
|
8
|
+
body { background-color: rgb(240, 240, 245); }
|
9
|
+
</style>
|
10
|
+
<style type='text/css'>
|
11
|
+
span.cross-ref-title { font-size: 140%; } span.cross-ref a {
|
12
|
+
text-decoration: none; } span.cross-ref { background-color:#f3f7fa;
|
13
|
+
border: 1px dashed #333; margin: 1em; padding: 0.5em; overflow: hidden; }
|
14
|
+
a.crossref-toggle { text-decoration: none; } span.marked0 {
|
15
|
+
background-color: rgb(185, 210, 200); display: block; } span.marked1 {
|
16
|
+
background-color: rgb(190, 215, 205); display: block; } span.inferred0 {
|
17
|
+
background-color: rgb(175, 200, 200); display: block; } span.inferred1 {
|
18
|
+
background-color: rgb(180, 205, 205); display: block; } span.uncovered0 {
|
19
|
+
background-color: rgb(225, 110, 110); display: block; } span.uncovered1 {
|
20
|
+
background-color: rgb(235, 120, 120); display: block; } span.overview {
|
21
|
+
border-bottom: 8px solid black; } div.overview { border-bottom: 8px solid
|
22
|
+
black; } body { font-family: verdana, arial, helvetica; } div.footer {
|
23
|
+
font-size: 68%; margin-top: 1.5em; } h1, h2, h3, h4, h5, h6 {
|
24
|
+
margin-bottom: 0.5em; } h5 { margin-top: 0.5em; } .hidden { display: none;
|
25
|
+
} div.separator { height: 10px; } /* Commented out for better readability,
|
26
|
+
esp. on IE */ /* table tr td, table tr th { font-size: 68%; } td.value
|
27
|
+
table tr td { font-size: 11px; } */ table.percent_graph { height: 12px;
|
28
|
+
border: #808080 1px solid; empty-cells: show; } table.percent_graph
|
29
|
+
td.covered { height: 10px; background: #00f000; } table.percent_graph
|
30
|
+
td.uncovered { height: 10px; background: #e00000; } table.percent_graph
|
31
|
+
td.NA { height: 10px; background: #eaeaea; } table.report {
|
32
|
+
border-collapse: collapse; width: 100%; } table.report td.heading {
|
33
|
+
background: #dcecff; border: #d0d0d0 1px solid; font-weight: bold;
|
34
|
+
text-align: center; } table.report td.heading:hover { background: #c0ffc0;
|
35
|
+
} table.report td.text { border: #d0d0d0 1px solid; } table.report
|
36
|
+
td.value, table.report td.lines_total, table.report td.lines_code {
|
37
|
+
text-align: right; border: #d0d0d0 1px solid; } table.report tr.light {
|
38
|
+
background-color: rgb(240, 240, 245); } table.report tr.dark {
|
39
|
+
background-color: rgb(230, 230, 235); }
|
40
|
+
</style>
|
41
|
+
<script type='text/javascript'>
|
42
|
+
// <![CDATA[ function toggleCode( id ) { if ( document.getElementById )
|
43
|
+
elem = document.getElementById( id ); else if ( document.all ) elem =
|
44
|
+
eval( "document.all." + id ); else return false; elemStyle = elem.style;
|
45
|
+
if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else {
|
46
|
+
elemStyle.display = "none" } return true; } // Make cross-references
|
47
|
+
hidden by default document.writeln( "<style
|
48
|
+
type=\"text/css\">span.cross-ref { display: none }</style>" ) // ]]>
|
49
|
+
</script>
|
50
|
+
<style type='text/css'>
|
51
|
+
span.run0 { background-color: rgb(178, 204, 255); display: block; }
|
52
|
+
span.run1 { background-color: rgb(178, 206, 255); display: block; }
|
53
|
+
span.run2 { background-color: rgb(178, 209, 255); display: block; }
|
54
|
+
span.run3 { background-color: rgb(178, 211, 255); display: block; }
|
55
|
+
span.run4 { background-color: rgb(178, 214, 255); display: block; }
|
56
|
+
span.run5 { background-color: rgb(178, 218, 255); display: block; }
|
57
|
+
span.run6 { background-color: rgb(178, 220, 255); display: block; }
|
58
|
+
span.run7 { background-color: rgb(178, 223, 255); display: block; }
|
59
|
+
span.run8 { background-color: rgb(178, 225, 255); display: block; }
|
60
|
+
span.run9 { background-color: rgb(178, 228, 255); display: block; }
|
61
|
+
span.run10 { background-color: rgb(178, 232, 255); display: block; }
|
62
|
+
span.run11 { background-color: rgb(178, 234, 255); display: block; }
|
63
|
+
span.run12 { background-color: rgb(178, 237, 255); display: block; }
|
64
|
+
span.run13 { background-color: rgb(178, 239, 255); display: block; }
|
65
|
+
span.run14 { background-color: rgb(178, 242, 255); display: block; }
|
66
|
+
span.run15 { background-color: rgb(178, 246, 255); display: block; }
|
67
|
+
span.run16 { background-color: rgb(178, 248, 255); display: block; }
|
68
|
+
span.run17 { background-color: rgb(178, 251, 255); display: block; }
|
69
|
+
span.run18 { background-color: rgb(178, 253, 255); display: block; }
|
70
|
+
span.run19 { background-color: rgb(178, 255, 253); display: block; }
|
71
|
+
span.run20 { background-color: rgb(178, 255, 249); display: block; }
|
72
|
+
span.run21 { background-color: rgb(178, 255, 247); display: block; }
|
73
|
+
span.run22 { background-color: rgb(178, 255, 244); display: block; }
|
74
|
+
span.run23 { background-color: rgb(178, 255, 242); display: block; }
|
75
|
+
span.run24 { background-color: rgb(178, 255, 239); display: block; }
|
76
|
+
span.run25 { background-color: rgb(178, 255, 235); display: block; }
|
77
|
+
span.run26 { background-color: rgb(178, 255, 233); display: block; }
|
78
|
+
span.run27 { background-color: rgb(178, 255, 230); display: block; }
|
79
|
+
span.run28 { background-color: rgb(178, 255, 228); display: block; }
|
80
|
+
span.run29 { background-color: rgb(178, 255, 225); display: block; }
|
81
|
+
span.run30 { background-color: rgb(178, 255, 221); display: block; }
|
82
|
+
span.run31 { background-color: rgb(178, 255, 219); display: block; }
|
83
|
+
span.run32 { background-color: rgb(178, 255, 216); display: block; }
|
84
|
+
span.run33 { background-color: rgb(178, 255, 214); display: block; }
|
85
|
+
span.run34 { background-color: rgb(178, 255, 211); display: block; }
|
86
|
+
span.run35 { background-color: rgb(178, 255, 207); display: block; }
|
87
|
+
span.run36 { background-color: rgb(178, 255, 205); display: block; }
|
88
|
+
span.run37 { background-color: rgb(178, 255, 202); display: block; }
|
89
|
+
span.run38 { background-color: rgb(178, 255, 200); display: block; }
|
90
|
+
span.run39 { background-color: rgb(178, 255, 197); display: block; }
|
91
|
+
span.run40 { background-color: rgb(178, 255, 193); display: block; }
|
92
|
+
span.run41 { background-color: rgb(178, 255, 191); display: block; }
|
93
|
+
span.run42 { background-color: rgb(178, 255, 188); display: block; }
|
94
|
+
span.run43 { background-color: rgb(178, 255, 186); display: block; }
|
95
|
+
span.run44 { background-color: rgb(178, 255, 183); display: block; }
|
96
|
+
span.run45 { background-color: rgb(178, 255, 179); display: block; }
|
97
|
+
span.run46 { background-color: rgb(179, 255, 178); display: block; }
|
98
|
+
span.run47 { background-color: rgb(182, 255, 178); display: block; }
|
99
|
+
span.run48 { background-color: rgb(184, 255, 178); display: block; }
|
100
|
+
span.run49 { background-color: rgb(187, 255, 178); display: block; }
|
101
|
+
span.run50 { background-color: rgb(191, 255, 178); display: block; }
|
102
|
+
span.run51 { background-color: rgb(193, 255, 178); display: block; }
|
103
|
+
span.run52 { background-color: rgb(196, 255, 178); display: block; }
|
104
|
+
span.run53 { background-color: rgb(198, 255, 178); display: block; }
|
105
|
+
span.run54 { background-color: rgb(201, 255, 178); display: block; }
|
106
|
+
span.run55 { background-color: rgb(205, 255, 178); display: block; }
|
107
|
+
span.run56 { background-color: rgb(207, 255, 178); display: block; }
|
108
|
+
span.run57 { background-color: rgb(210, 255, 178); display: block; }
|
109
|
+
span.run58 { background-color: rgb(212, 255, 178); display: block; }
|
110
|
+
span.run59 { background-color: rgb(215, 255, 178); display: block; }
|
111
|
+
span.run60 { background-color: rgb(219, 255, 178); display: block; }
|
112
|
+
span.run61 { background-color: rgb(221, 255, 178); display: block; }
|
113
|
+
span.run62 { background-color: rgb(224, 255, 178); display: block; }
|
114
|
+
span.run63 { background-color: rgb(226, 255, 178); display: block; }
|
115
|
+
span.run64 { background-color: rgb(229, 255, 178); display: block; }
|
116
|
+
span.run65 { background-color: rgb(233, 255, 178); display: block; }
|
117
|
+
span.run66 { background-color: rgb(235, 255, 178); display: block; }
|
118
|
+
span.run67 { background-color: rgb(238, 255, 178); display: block; }
|
119
|
+
span.run68 { background-color: rgb(240, 255, 178); display: block; }
|
120
|
+
span.run69 { background-color: rgb(243, 255, 178); display: block; }
|
121
|
+
span.run70 { background-color: rgb(247, 255, 178); display: block; }
|
122
|
+
span.run71 { background-color: rgb(249, 255, 178); display: block; }
|
123
|
+
span.run72 { background-color: rgb(252, 255, 178); display: block; }
|
124
|
+
span.run73 { background-color: rgb(255, 255, 178); display: block; }
|
125
|
+
span.run74 { background-color: rgb(255, 252, 178); display: block; }
|
126
|
+
span.run75 { background-color: rgb(255, 248, 178); display: block; }
|
127
|
+
span.run76 { background-color: rgb(255, 246, 178); display: block; }
|
128
|
+
span.run77 { background-color: rgb(255, 243, 178); display: block; }
|
129
|
+
span.run78 { background-color: rgb(255, 240, 178); display: block; }
|
130
|
+
span.run79 { background-color: rgb(255, 238, 178); display: block; }
|
131
|
+
span.run80 { background-color: rgb(255, 234, 178); display: block; }
|
132
|
+
span.run81 { background-color: rgb(255, 232, 178); display: block; }
|
133
|
+
span.run82 { background-color: rgb(255, 229, 178); display: block; }
|
134
|
+
span.run83 { background-color: rgb(255, 226, 178); display: block; }
|
135
|
+
span.run84 { background-color: rgb(255, 224, 178); display: block; }
|
136
|
+
span.run85 { background-color: rgb(255, 220, 178); display: block; }
|
137
|
+
span.run86 { background-color: rgb(255, 218, 178); display: block; }
|
138
|
+
span.run87 { background-color: rgb(255, 215, 178); display: block; }
|
139
|
+
span.run88 { background-color: rgb(255, 212, 178); display: block; }
|
140
|
+
span.run89 { background-color: rgb(255, 210, 178); display: block; }
|
141
|
+
span.run90 { background-color: rgb(255, 206, 178); display: block; }
|
142
|
+
span.run91 { background-color: rgb(255, 204, 178); display: block; }
|
143
|
+
span.run92 { background-color: rgb(255, 201, 178); display: block; }
|
144
|
+
span.run93 { background-color: rgb(255, 198, 178); display: block; }
|
145
|
+
span.run94 { background-color: rgb(255, 196, 178); display: block; }
|
146
|
+
span.run95 { background-color: rgb(255, 192, 178); display: block; }
|
147
|
+
span.run96 { background-color: rgb(255, 189, 178); display: block; }
|
148
|
+
span.run97 { background-color: rgb(255, 187, 178); display: block; }
|
149
|
+
span.run98 { background-color: rgb(255, 184, 178); display: block; }
|
150
|
+
span.run99 { background-color: rgb(255, 182, 178); display: block; }
|
151
|
+
span.run100 { background-color: rgb(255, 178, 178); display: block; }
|
152
|
+
</style>
|
153
|
+
</head>
|
154
|
+
<body>
|
155
|
+
<h3>
|
156
|
+
C0 code coverage information
|
157
|
+
</h3>
|
158
|
+
<p>
|
159
|
+
Generated on Sun Dec 21 22:36:24 +0000 2008 with
|
160
|
+
<a href='http://eigenclass.org/hiki/rcov'>
|
161
|
+
rcov 0.8.1.2
|
162
|
+
</a>
|
163
|
+
</p>
|
164
|
+
<hr />
|
165
|
+
<pre><span class='marked0'>Code reported as executed by Ruby looks like
|
166
|
+
this... </span><span class='marked1'>and this: this line is also marked as
|
167
|
+
covered. </span><span class='inferred0'>Lines considered as run by rcov, but
|
168
|
+
not reported by Ruby, look like this, </span><span class='inferred1'>and
|
169
|
+
this: these lines were inferred by rcov (using simple heuristics).
|
170
|
+
</span><span class='uncovered0'>Finally, here's a line marked as not
|
171
|
+
executed. </span></pre>
|
172
|
+
<table class='report'> <thead> <tr> <td class='heading'> Name </td> <td
|
173
|
+
class='heading'> Total lines </td> <td class='heading'> Lines of code </td>
|
174
|
+
<td class='heading'> Total coverage </td> <td class='heading'> Code coverage
|
175
|
+
</td> </tr> </thead> <tbody> <tr class='light'> <td> <a
|
176
|
+
href='lib-postalmethods-document_processor_rb.html'>
|
177
|
+
lib/postalmethods/document_processor.rb </a> </td> <td class='lines_total'>
|
178
|
+
<tt> 25 </tt> </td> <td class='lines_code'> <tt> 20 </tt> </td> <td> <table
|
179
|
+
cellspacing='0' align='right' cellpadding='0'> <tr> <td> <tt
|
180
|
+
class='coverage_total'> 100.0% </tt> </td> <td> <table
|
181
|
+
class='percent_graph' cellspacing='0' width='100' cellpadding='0'> <tr> <td
|
182
|
+
class='covered' width='100' /> <td class='uncovered' width='0' /> </tr>
|
183
|
+
</table> </td> </tr> </table> </td> <td> <table cellspacing='0'
|
184
|
+
align='right' cellpadding='0'> <tr> <td> <tt class='coverage_code'> 100.0%
|
185
|
+
</tt> </td> <td> <table class='percent_graph' cellspacing='0'
|
186
|
+
width='100' cellpadding='0'> <tr> <td class='covered' width='100' /> <td
|
187
|
+
class='uncovered' width='0' /> </tr> </table> </td> </tr> </table> </td>
|
188
|
+
</tr> </tbody> </table><pre><span class="marked0"><a name="line1"></a> 1
|
189
|
+
module PostalMethods </span><span class="marked1"><a name="line2"></a> 2
|
190
|
+
module DocumentProcessor </span><span class="inferred0"><a name="line3"></a>
|
191
|
+
3 </span><span class="marked1"><a name="line4"></a> 4 def document=(doc)
|
192
|
+
</span><span class="marked0"><a name="line5"></a> 5 unless doc.class == File
|
193
|
+
</span><span class="marked1"><a name="line6"></a> 6 doc = open(doc)
|
194
|
+
</span><span class="inferred0"><a name="line7"></a> 7 end </span><span
|
195
|
+
class="inferred1"><a name="line8"></a> 8 </span><span class="marked0"><a
|
196
|
+
name="line9"></a> 9 self.to_send = {} if self.to_send.nil? </span><span
|
197
|
+
class="inferred1"><a name="line10"></a>10 </span><span class="marked0"><a
|
198
|
+
name="line11"></a>11 self.to_send[:extension] =
|
199
|
+
doc.path.to_s.split('.').last </span><span class="marked1"><a
|
200
|
+
name="line12"></a>12 self.to_send[:bytes] = doc.read </span><span
|
201
|
+
class="marked0"><a name="line13"></a>13 self.to_send[:name] =
|
202
|
+
File.basename(doc.path) </span><span class="marked1"><a name="line14"></a>14
|
203
|
+
self.to_send[:file_obj] = doc </span><span class="inferred0"><a
|
204
|
+
name="line15"></a>15 end </span><span class="inferred1"><a
|
205
|
+
name="line16"></a>16 </span><span class="marked0"><a name="line17"></a>17
|
206
|
+
def document? </span><span class="marked1"><a name="line18"></a>18 true
|
207
|
+
unless self.to_send.nil? </span><span class="inferred0"><a
|
208
|
+
name="line19"></a>19 end </span><span class="inferred1"><a
|
209
|
+
name="line20"></a>20 </span><span class="marked0"><a name="line21"></a>21
|
210
|
+
def document </span><span class="marked1"><a name="line22"></a>22
|
211
|
+
self.to_send </span><span class="inferred0"><a name="line23"></a>23 end
|
212
|
+
</span><span class="inferred1"><a name="line24"></a>24 end </span><span
|
213
|
+
class="inferred0"><a name="line25"></a>25 end </span></pre>
|
214
|
+
<hr />
|
215
|
+
<p> Generated using the <a href='http://eigenclass.org/hiki.rb?rcov'> rcov
|
216
|
+
code coverage analysis tool for Ruby </a> version 0.8.1.2. </p>
|
217
|
+
<p>
|
218
|
+
<a href='http://validator.w3.org/check/referer'>
|
219
|
+
<img src='http://www.w3.org/Icons/valid-xhtml10' height='31' alt='Valid XHTML 1.0!' width='88' />
|
220
|
+
</a>
|
221
|
+
<a href='http://jigsaw.w3.org/css-validator/check/referer'>
|
222
|
+
<img src='http://jigsaw.w3.org/css-validator/images/vcss' alt='Valid CSS!' style='border:0;width:88px;height:31px' />
|
223
|
+
</a>
|
224
|
+
</p>
|
225
|
+
</body>
|
226
|
+
</html>
|