ruport 0.4.23 → 0.4.99

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/AUTHORS +16 -8
  2. data/CHANGELOG +30 -1
  3. data/README +144 -114
  4. data/Rakefile +12 -4
  5. data/TODO +4 -7
  6. data/bin/rope +21 -28
  7. data/examples/line_graph.rb +36 -0
  8. data/examples/sample_invoice_report.rb +1 -1
  9. data/examples/simple_graph.rb +8 -0
  10. data/lib/SVG/Graph/Bar.rb +137 -0
  11. data/lib/SVG/Graph/BarBase.rb +140 -0
  12. data/lib/SVG/Graph/BarHorizontal.rb +136 -0
  13. data/lib/SVG/Graph/Graph.rb +977 -0
  14. data/lib/SVG/Graph/Line.rb +444 -0
  15. data/lib/SVG/Graph/Pie.rb +394 -0
  16. data/lib/SVG/Graph/Plot.rb +494 -0
  17. data/lib/SVG/Graph/Schedule.rb +373 -0
  18. data/lib/SVG/Graph/TimeSeries.rb +241 -0
  19. data/lib/ruport.rb +2 -2
  20. data/lib/ruport/config.rb +47 -3
  21. data/lib/ruport/data/collection.rb +17 -1
  22. data/lib/ruport/data/record.rb +101 -8
  23. data/lib/ruport/data/set.rb +81 -2
  24. data/lib/ruport/data/set.rb.rej +147 -0
  25. data/lib/ruport/data/set.rb~ +73 -0
  26. data/lib/ruport/data/table.rb +127 -2
  27. data/lib/ruport/data/taggable.rb +21 -2
  28. data/lib/ruport/format.rb +36 -44
  29. data/lib/ruport/format/engine.rb +21 -1
  30. data/lib/ruport/format/plugin.rb +64 -1
  31. data/lib/ruport/mailer.rb +70 -36
  32. data/lib/ruport/meta_tools.rb +15 -6
  33. data/lib/ruport/query.rb +1 -1
  34. data/lib/ruport/rails/reportable.rb +23 -1
  35. data/lib/ruport/report.rb +11 -11
  36. data/lib/ruport/report/invoice.rb +16 -0
  37. data/lib/ruport/system_extensions.rb +3 -55
  38. data/test/{tc_database.rb → _test_database.rb} +0 -0
  39. data/test/{tc_config.rb → test_config.rb} +0 -0
  40. data/test/{tc_format.rb → test_format.rb} +1 -0
  41. data/test/{tc_format_engine.rb → test_format_engine.rb} +14 -2
  42. data/test/test_graph.rb +101 -0
  43. data/test/{tc_invoice.rb → test_invoice.rb} +7 -1
  44. data/test/test_mailer.rb +108 -0
  45. data/test/test_meta_tools.rb +14 -0
  46. data/test/{tc_plugin.rb → test_plugin.rb} +12 -1
  47. data/test/{tc_query.rb → test_query.rb} +0 -0
  48. data/test/{tc_record.rb → test_record.rb} +9 -0
  49. data/test/{tc_report.rb → test_report.rb} +2 -1
  50. data/test/{tc_ruport.rb → test_ruport.rb} +0 -0
  51. data/test/test_set.rb +118 -0
  52. data/test/test_set.rb.rej +16 -0
  53. data/test/{tc_set.rb → test_set.rb~} +17 -0
  54. data/test/{tc_sql_split.rb → test_sql_split.rb} +0 -0
  55. data/test/{tc_table.rb → test_table.rb} +15 -0
  56. data/test/{tc_taggable.rb → test_taggable.rb} +0 -0
  57. data/test/unit.log +361 -0
  58. metadata +52 -30
  59. data/examples/bar.pdf +0 -193
  60. data/examples/f.log +0 -5
  61. data/examples/foo.pdf +0 -193
  62. data/lib/ruport/format/document.rb +0 -78
  63. data/lib/ruport/format/open_node.rb +0 -38
  64. data/test/tc_data_row.rb +0 -132
  65. data/test/tc_data_set.rb +0 -386
  66. data/test/tc_document.rb +0 -42
  67. data/test/tc_element.rb +0 -18
  68. data/test/tc_page.rb +0 -42
  69. data/test/tc_section.rb +0 -45
  70. data/test/ts_all.rb +0 -12
  71. data/test/ts_format.rb +0 -7
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: ruport
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.23
7
- date: 2006-08-10 00:00:00 -04:00
6
+ version: 0.4.99
7
+ date: 2006-08-14 00:00:00 -04:00
8
8
  summary: A generalized Ruby report generation and templating engine.
9
9
  require_paths:
10
10
  - lib
@@ -37,13 +37,13 @@ files:
37
37
  - examples/report.rb
38
38
  - examples/simple_mail.rb
39
39
  - examples/template.rb
40
- - examples/f.log
41
40
  - examples/sample_invoice_report.rb
42
- - examples/foo.pdf
43
- - examples/bar.pdf
41
+ - examples/line_graph.rb
42
+ - examples/simple_graph.rb
44
43
  - lib/ruport
45
44
  - lib/ruport.rb
46
45
  - lib/uport.rb
46
+ - lib/SVG
47
47
  - lib/ruport/query
48
48
  - lib/ruport/format
49
49
  - lib/ruport/rails
@@ -59,41 +59,48 @@ files:
59
59
  - lib/ruport/data.rb
60
60
  - lib/ruport/meta_tools.rb
61
61
  - lib/ruport/query/sql_split.rb
62
- - lib/ruport/format/document.rb
63
62
  - lib/ruport/format/plugin.rb
64
63
  - lib/ruport/format/engine.rb
65
- - lib/ruport/format/open_node.rb
66
64
  - lib/ruport/rails/reportable.rb
67
65
  - lib/ruport/data/table.rb
68
66
  - lib/ruport/data/taggable.rb
69
67
  - lib/ruport/data/record.rb
68
+ - lib/ruport/data/set.rb~
70
69
  - lib/ruport/data/collection.rb
71
70
  - lib/ruport/data/set.rb
71
+ - lib/ruport/data/set.rb.rej
72
72
  - lib/ruport/report/invoice.rb
73
+ - lib/SVG/Graph
74
+ - lib/SVG/Graph/Pie.rb
75
+ - lib/SVG/Graph/Plot.rb
76
+ - lib/SVG/Graph/BarHorizontal.rb
77
+ - lib/SVG/Graph/BarBase.rb
78
+ - lib/SVG/Graph/Graph.rb
79
+ - lib/SVG/Graph/Bar.rb
80
+ - lib/SVG/Graph/Line.rb
81
+ - lib/SVG/Graph/TimeSeries.rb
82
+ - lib/SVG/Graph/Schedule.rb
73
83
  - test/samples
74
- - test/tc_element.rb
75
- - test/tc_format.rb
76
- - test/ts_all.rb
77
- - test/tc_data_row.rb
78
- - test/tc_ruport.rb
79
- - test/tc_plugin.rb
80
- - test/tc_format_engine.rb
81
- - test/tc_section.rb
82
- - test/tc_database.rb
83
- - test/tc_query.rb
84
- - test/tc_config.rb
85
- - test/ts_format.rb
86
- - test/tc_sql_split.rb
87
- - test/tc_report.rb
88
- - test/tc_page.rb
84
+ - test/test_set.rb.rej
85
+ - test/test_record.rb
86
+ - test/test_set.rb
87
+ - test/test_table.rb
88
+ - test/test_format.rb
89
+ - test/test_config.rb
90
+ - test/test_ruport.rb
91
+ - test/test_invoice.rb
92
+ - test/test_plugin.rb
93
+ - test/test_set.rb~
94
+ - test/_test_database.rb
95
+ - test/test_graph.rb
89
96
  - test/unit.log
90
- - test/tc_document.rb
91
- - test/tc_data_set.rb
92
- - test/tc_invoice.rb
93
- - test/tc_taggable.rb
94
- - test/tc_record.rb
95
- - test/tc_table.rb
96
- - test/tc_set.rb
97
+ - test/test_sql_split.rb
98
+ - test/test_mailer.rb
99
+ - test/test_query.rb
100
+ - test/test_taggable.rb
101
+ - test/test_report.rb
102
+ - test/test_format_engine.rb
103
+ - test/test_meta_tools.rb
97
104
  - test/samples/ruport_test.sql
98
105
  - test/samples/test.yaml
99
106
  - test/samples/data.csv
@@ -110,7 +117,22 @@ files:
110
117
  - AUTHORS
111
118
  - CHANGELOG
112
119
  test_files:
113
- - test/ts_all.rb
120
+ - test/test_record.rb
121
+ - test/test_set.rb
122
+ - test/test_table.rb
123
+ - test/test_format.rb
124
+ - test/test_config.rb
125
+ - test/test_ruport.rb
126
+ - test/test_invoice.rb
127
+ - test/test_plugin.rb
128
+ - test/test_graph.rb
129
+ - test/test_sql_split.rb
130
+ - test/test_mailer.rb
131
+ - test/test_query.rb
132
+ - test/test_taggable.rb
133
+ - test/test_report.rb
134
+ - test/test_format_engine.rb
135
+ - test/test_meta_tools.rb
114
136
  rdoc_options:
115
137
  - --title
116
138
  - Ruport Documentation
@@ -1,193 +0,0 @@
1
- %PDF-1.3
2
- %����
3
-
4
- 1 0 obj
5
- << /Type /Catalog
6
- /Outlines 2 0 R
7
- /Pages 3 0 R>>
8
- endobj
9
- 2 0 obj
10
- << /Type /Outlines >>
11
- endobj
12
- 3 0 obj
13
- << /Type /Pages
14
- /Kids [6 0 R
15
- ]
16
- /Count 1
17
- /Resources <<
18
- /ProcSet 4 0 R
19
- /Font <<
20
- /F1 8 0 R >>
21
- >>
22
- /MediaBox [0 0 612.0 792.0]
23
- >>
24
- endobj
25
- 4 0 obj
26
- [/PDF /Text ]
27
- endobj
28
- 5 0 obj
29
- <<
30
- /CreationDate (D:200608100525)
31
- /Creator (sample_invoice_report.rb)
32
- /Producer (PDF::Writer for Ruby)
33
- >>
34
- endobj
35
- 6 0 obj
36
- << /Type /Page
37
- /Parent 3 0 R
38
- /Contents [
39
- 7 0 R
40
- 9 0 R
41
- 10 0 R
42
- ]
43
- >>
44
- endobj
45
- 7 0 obj
46
- <<
47
- /Length 1498 >>
48
- stream
49
-
50
- 0.000 0.000 0.000 rg
51
- 0.000 0.000 0.000 RG
52
- 0.800 0.800 0.800 RG
53
- BT 36.000 742.440 Td /F1 10.0 Tf 0 Tr (Foo Inc.) Tj ET
54
- BT 36.000 726.880 Td /F1 10.0 Tf 0 Tr (42 Rock Street) Tj ET
55
- BT 36.000 711.320 Td /F1 10.0 Tf 0 Tr (New Haven, CT) Tj ET
56
- 0.000 0.000 0.000 RG
57
- 1 w
58
- 31.000 753.750 m
59
- 31.000 707.070 l S
60
- 231.000 753.750 m
61
- 231.000 707.070 l S
62
- 30.500 753.750 m
63
- 231.500 753.750 l S
64
- 30.500 707.070 m
65
- 231.500 707.070 l S
66
- 0.800 0.800 0.800 RG
67
- BT 36.000 685.760 Td /F1 10.0 Tf 0 Tr (Gregory Brown) Tj ET
68
- BT 36.000 670.200 Td /F1 10.0 Tf 0 Tr (gregory.t.brown@gmail.com) Tj ET
69
- 0.000 0.000 0.000 RG
70
- 1 w
71
- 31.000 697.070 m
72
- 31.000 665.950 l S
73
- 231.000 697.070 m
74
- 231.000 665.950 l S
75
- 30.500 697.070 m
76
- 231.500 697.070 l S
77
- 30.500 665.950 m
78
- 231.500 665.950 l S
79
- BT 386.000 739.816 Td /F1 14.0 Tf 0 Tr (Invoice for Gregory) Tj ET
80
- 0.800 0.800 0.800 RG
81
- BT 350.000 716.256 Td /F1 10.0 Tf 0 Tr (Order ID: 18180) Tj ET
82
- BT 350.000 700.696 Td /F1 10.0 Tf 0 Tr (Customer ID: 6291) Tj ET
83
- BT 350.000 685.136 Td /F1 10.0 Tf 0 Tr (Order Date: 2006-08-10) Tj ET
84
- 0.000 0.000 0.000 RG
85
- 1 w
86
- 345.000 727.566 m
87
- 345.000 680.886 l S
88
- 545.000 727.566 m
89
- 545.000 680.886 l S
90
- 344.500 727.566 m
91
- 545.500 727.566 l S
92
- 344.500 680.886 m
93
- 545.500 680.886 l S
94
- 0.800 0.800 0.800 RG
95
- BT 81.000 604.128 Td /F1 12.0 Tf 0 Tr (item) Tj ET
96
- BT 335.750 604.128 Td /F1 12.0 Tf 0 Tr (price) Tj ET
97
- q
98
- 0.800 0.800 0.800 rg
99
- 76.000 582.068 450.000 15.560 re f
100
- 0.800 0.800 0.800 rg
101
- 76.000 550.948 450.000 15.560 re f
102
- 1 w
103
- Q
104
- BT 479.984 20.000 Td /F1 8.0 Tf 0 Tr (1 of 1) Tj ET
105
- endstream
106
- endobj
107
-
108
- 8 0 obj
109
- << /Type /Font
110
- /Subtype /Type1
111
- /Name /F1
112
- /BaseFont /Helvetica
113
- /Encoding /WinAnsiEncoding
114
- >>
115
- endobj
116
- 9 0 obj
117
- <<
118
- /Length 610 >>
119
- stream
120
-
121
- BT 81.000 586.318 Td /F1 10.0 Tf 0 Tr (Rock Collection) Tj ET
122
- BT 335.750 586.318 Td /F1 10.0 Tf 0 Tr ($25.00) Tj ET
123
- BT 81.000 570.758 Td /F1 10.0 Tf 0 Tr (Endless Sand Supply) Tj ET
124
- BT 335.750 570.758 Td /F1 10.0 Tf 0 Tr ($500.00) Tj ET
125
- BT 81.000 555.198 Td /F1 10.0 Tf 0 Tr (Fire Filled Pit) Tj ET
126
- BT 335.750 555.198 Td /F1 10.0 Tf 0 Tr ($800.00) Tj ET
127
- 0.000 0.000 0.000 RG
128
- 1 w
129
- 76.000 620.000 m
130
- 76.000 550.948 l S
131
- 1 w
132
- 330.750 620.000 m
133
- 330.750 550.948 l S
134
- 1 w
135
- 526.000 620.000 m
136
- 526.000 550.948 l S
137
- 75.500 620.000 m
138
- 526.500 620.000 l S
139
- 76.000 599.878 m
140
- 526.000 599.878 l S
141
- 75.500 550.948 m
142
- 526.500 550.948 l S
143
- endstream
144
- endobj
145
-
146
- 10 0 obj
147
- <<
148
- /Length 419 >>
149
- stream
150
-
151
- q
152
- 0.000 0.000 0.000 RG
153
- 1 w 0 J 0 j [ ] 0 d
154
- 0.800 0.800 0.800 RG
155
- BT 110.000 519.638 Td /F1 10.0 Tf 0 Tr (Be sure to visit our website at www.iheartruport.com) Tj ET
156
- 0.000 0.000 0.000 RG
157
- 1 w
158
- 105.000 530.948 m
159
- 105.000 515.388 l S
160
- 505.000 530.948 m
161
- 505.000 515.388 l S
162
- 104.500 530.948 m
163
- 505.500 530.948 l S
164
- 104.500 515.388 m
165
- 505.500 515.388 l S
166
- BT 50.000 20.000 Td /F1 8.0 Tf 0 Tr (Printed at 01:25 10/08/2006) Tj ET
167
- 1 w
168
- Q
169
- endstream
170
- endobj
171
-
172
- xref
173
- 0 11
174
- 0000000000 65535 f
175
- 0000000015 00000 n
176
- 0000000079 00000 n
177
- 0000000116 00000 n
178
- 0000000258 00000 n
179
- 0000000287 00000 n
180
- 0000000408 00000 n
181
- 0000000488 00000 n
182
- 0000002039 00000 n
183
- 0000002146 00000 n
184
- 0000002808 00000 n
185
-
186
- trailer
187
- << /Size 11
188
- /Root 1 0 R
189
- /Info 5 0 R
190
- >>
191
- startxref
192
- 3280
193
- %%EOF
@@ -1,5 +0,0 @@
1
- # Logfile created on Mon Aug 07 18:58:16 EDT 2006 by logger.rb/1.5.2.7
2
- I, [2006-08-07T18:58:16.676501 #7621] INFO -- : preparing report
3
- I, [2006-08-07T18:58:16.677282 #7621] INFO -- : generated csv from query
4
- I, [2006-08-07T18:58:30.411506 #7621] INFO -- : preparing report
5
- I, [2006-08-07T18:58:30.412121 #7621] INFO -- : generated csv from query
@@ -1,193 +0,0 @@
1
- %PDF-1.3
2
- %����
3
-
4
- 1 0 obj
5
- << /Type /Catalog
6
- /Outlines 2 0 R
7
- /Pages 3 0 R>>
8
- endobj
9
- 2 0 obj
10
- << /Type /Outlines >>
11
- endobj
12
- 3 0 obj
13
- << /Type /Pages
14
- /Kids [6 0 R
15
- ]
16
- /Count 1
17
- /Resources <<
18
- /ProcSet 4 0 R
19
- /Font <<
20
- /F1 8 0 R >>
21
- >>
22
- /MediaBox [0 0 612.0 792.0]
23
- >>
24
- endobj
25
- 4 0 obj
26
- [/PDF /Text ]
27
- endobj
28
- 5 0 obj
29
- <<
30
- /CreationDate (D:200608100525)
31
- /Creator (sample_invoice_report.rb)
32
- /Producer (PDF::Writer for Ruby)
33
- >>
34
- endobj
35
- 6 0 obj
36
- << /Type /Page
37
- /Parent 3 0 R
38
- /Contents [
39
- 7 0 R
40
- 9 0 R
41
- 10 0 R
42
- ]
43
- >>
44
- endobj
45
- 7 0 obj
46
- <<
47
- /Length 1498 >>
48
- stream
49
-
50
- 0.000 0.000 0.000 rg
51
- 0.000 0.000 0.000 RG
52
- 0.800 0.800 0.800 RG
53
- BT 36.000 742.440 Td /F1 10.0 Tf 0 Tr (Foo Inc.) Tj ET
54
- BT 36.000 726.880 Td /F1 10.0 Tf 0 Tr (42 Rock Street) Tj ET
55
- BT 36.000 711.320 Td /F1 10.0 Tf 0 Tr (New Haven, CT) Tj ET
56
- 0.000 0.000 0.000 RG
57
- 1 w
58
- 31.000 753.750 m
59
- 31.000 707.070 l S
60
- 231.000 753.750 m
61
- 231.000 707.070 l S
62
- 30.500 753.750 m
63
- 231.500 753.750 l S
64
- 30.500 707.070 m
65
- 231.500 707.070 l S
66
- 0.800 0.800 0.800 RG
67
- BT 36.000 685.760 Td /F1 10.0 Tf 0 Tr (Gregory Brown) Tj ET
68
- BT 36.000 670.200 Td /F1 10.0 Tf 0 Tr (gregory.t.brown@gmail.com) Tj ET
69
- 0.000 0.000 0.000 RG
70
- 1 w
71
- 31.000 697.070 m
72
- 31.000 665.950 l S
73
- 231.000 697.070 m
74
- 231.000 665.950 l S
75
- 30.500 697.070 m
76
- 231.500 697.070 l S
77
- 30.500 665.950 m
78
- 231.500 665.950 l S
79
- BT 386.000 739.816 Td /F1 14.0 Tf 0 Tr (Invoice for Gregory) Tj ET
80
- 0.800 0.800 0.800 RG
81
- BT 350.000 716.256 Td /F1 10.0 Tf 0 Tr (Order ID: 18180) Tj ET
82
- BT 350.000 700.696 Td /F1 10.0 Tf 0 Tr (Customer ID: 6291) Tj ET
83
- BT 350.000 685.136 Td /F1 10.0 Tf 0 Tr (Order Date: 2006-08-10) Tj ET
84
- 0.000 0.000 0.000 RG
85
- 1 w
86
- 345.000 727.566 m
87
- 345.000 680.886 l S
88
- 545.000 727.566 m
89
- 545.000 680.886 l S
90
- 344.500 727.566 m
91
- 545.500 727.566 l S
92
- 344.500 680.886 m
93
- 545.500 680.886 l S
94
- 0.800 0.800 0.800 RG
95
- BT 81.000 604.128 Td /F1 12.0 Tf 0 Tr (item) Tj ET
96
- BT 335.750 604.128 Td /F1 12.0 Tf 0 Tr (price) Tj ET
97
- q
98
- 0.800 0.800 0.800 rg
99
- 76.000 582.068 450.000 15.560 re f
100
- 0.800 0.800 0.800 rg
101
- 76.000 550.948 450.000 15.560 re f
102
- 1 w
103
- Q
104
- BT 479.984 20.000 Td /F1 8.0 Tf 0 Tr (1 of 1) Tj ET
105
- endstream
106
- endobj
107
-
108
- 8 0 obj
109
- << /Type /Font
110
- /Subtype /Type1
111
- /Name /F1
112
- /BaseFont /Helvetica
113
- /Encoding /WinAnsiEncoding
114
- >>
115
- endobj
116
- 9 0 obj
117
- <<
118
- /Length 610 >>
119
- stream
120
-
121
- BT 81.000 586.318 Td /F1 10.0 Tf 0 Tr (Rock Collection) Tj ET
122
- BT 335.750 586.318 Td /F1 10.0 Tf 0 Tr ($25.00) Tj ET
123
- BT 81.000 570.758 Td /F1 10.0 Tf 0 Tr (Endless Sand Supply) Tj ET
124
- BT 335.750 570.758 Td /F1 10.0 Tf 0 Tr ($500.00) Tj ET
125
- BT 81.000 555.198 Td /F1 10.0 Tf 0 Tr (Fire Filled Pit) Tj ET
126
- BT 335.750 555.198 Td /F1 10.0 Tf 0 Tr ($800.00) Tj ET
127
- 0.000 0.000 0.000 RG
128
- 1 w
129
- 76.000 620.000 m
130
- 76.000 550.948 l S
131
- 1 w
132
- 330.750 620.000 m
133
- 330.750 550.948 l S
134
- 1 w
135
- 526.000 620.000 m
136
- 526.000 550.948 l S
137
- 75.500 620.000 m
138
- 526.500 620.000 l S
139
- 76.000 599.878 m
140
- 526.000 599.878 l S
141
- 75.500 550.948 m
142
- 526.500 550.948 l S
143
- endstream
144
- endobj
145
-
146
- 10 0 obj
147
- <<
148
- /Length 419 >>
149
- stream
150
-
151
- q
152
- 0.000 0.000 0.000 RG
153
- 1 w 0 J 0 j [ ] 0 d
154
- 0.800 0.800 0.800 RG
155
- BT 110.000 519.638 Td /F1 10.0 Tf 0 Tr (Be sure to visit our website at www.iheartruport.com) Tj ET
156
- 0.000 0.000 0.000 RG
157
- 1 w
158
- 105.000 530.948 m
159
- 105.000 515.388 l S
160
- 505.000 530.948 m
161
- 505.000 515.388 l S
162
- 104.500 530.948 m
163
- 505.500 530.948 l S
164
- 104.500 515.388 m
165
- 505.500 515.388 l S
166
- BT 50.000 20.000 Td /F1 8.0 Tf 0 Tr (Printed at 01:25 10/08/2006) Tj ET
167
- 1 w
168
- Q
169
- endstream
170
- endobj
171
-
172
- xref
173
- 0 11
174
- 0000000000 65535 f
175
- 0000000015 00000 n
176
- 0000000079 00000 n
177
- 0000000116 00000 n
178
- 0000000258 00000 n
179
- 0000000287 00000 n
180
- 0000000408 00000 n
181
- 0000000488 00000 n
182
- 0000002039 00000 n
183
- 0000002146 00000 n
184
- 0000002808 00000 n
185
-
186
- trailer
187
- << /Size 11
188
- /Root 1 0 R
189
- /Info 5 0 R
190
- >>
191
- startxref
192
- 3280
193
- %%EOF