scruffy 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +8 -0
- data/History.txt +104 -0
- data/License.txt +20 -0
- data/Manifest.txt +105 -0
- data/PostInstall.txt +6 -0
- data/README.txt +66 -0
- data/Rakefile +108 -104
- data/config/hoe.rb +78 -0
- data/config/requirements.rb +15 -0
- data/lib/scruffy.rb +8 -6
- data/lib/scruffy/components/base.rb +4 -0
- data/lib/scruffy/components/legend.rb +65 -30
- data/lib/scruffy/components/viewport.rb +14 -17
- data/lib/scruffy/formatters.rb +1 -1
- data/lib/scruffy/graph.rb +18 -7
- data/lib/scruffy/graph_state.rb +24 -0
- data/lib/scruffy/helpers.rb +2 -1
- data/lib/scruffy/helpers/canvas.rb +19 -17
- data/lib/scruffy/helpers/layer_container.rb +8 -3
- data/lib/scruffy/helpers/meta.rb +5 -5
- data/lib/scruffy/helpers/point_container.rb +70 -0
- data/lib/scruffy/layers.rb +2 -0
- data/lib/scruffy/layers/average.rb +6 -1
- data/lib/scruffy/layers/bar.rb +1 -0
- data/lib/scruffy/layers/base.rb +38 -14
- data/lib/scruffy/layers/pie.rb +123 -0
- data/lib/scruffy/layers/pie_slice.rb +114 -0
- data/lib/scruffy/layers/scatter.rb +21 -0
- data/lib/scruffy/layers/sparkline_bar.rb +1 -0
- data/lib/scruffy/layers/stacked.rb +2 -5
- data/lib/scruffy/rasterizers/rmagick_rasterizer.rb +1 -2
- data/lib/scruffy/renderers.rb +2 -1
- data/lib/scruffy/renderers/base.rb +6 -4
- data/lib/scruffy/renderers/pie.rb +20 -0
- data/lib/scruffy/themes.rb +54 -4
- data/lib/scruffy/version.rb +8 -2
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/script/txt2html +82 -0
- data/setup.rb +1585 -0
- data/spec/scruffy/graph_spec.rb +175 -0
- data/spec/scruffy/layers/base_spec.rb +30 -0
- data/spec/{layers → scruffy/layers}/line_spec.rb +2 -1
- data/spec/spec_helper.rb +8 -0
- data/tasks/deployment.rake +34 -0
- data/tasks/environment.rake +7 -0
- data/tasks/website.rake +17 -0
- data/test/graph_creation_test.rb +101 -0
- data/test/test_helper.rb +2 -0
- data/test/test_scruffy.rb +11 -0
- data/website/images/blank.gif.html +7 -0
- data/website/images/graphs/all_smiles.png +0 -0
- data/website/images/graphs/bar_test.png +0 -0
- data/website/images/graphs/bar_test.svg +71 -0
- data/website/images/graphs/line_test.png +0 -0
- data/website/images/graphs/line_test.svg +60 -0
- data/website/images/graphs/multi_test.png +0 -0
- data/website/images/graphs/multi_test.svg +296 -0
- data/website/images/graphs/pie_test.png +0 -0
- data/website/images/graphs/pie_test.svg +40 -0
- data/website/images/graphs/split_test.png +0 -0
- data/website/images/graphs/split_test.svg +295 -0
- data/website/images/graphs/stacking_test.png +0 -0
- data/website/images/graphs/stacking_test.svg +146 -0
- data/website/images/header.png +0 -0
- data/website/images/header_gradient.png +0 -0
- data/website/images/overlay.png +0 -0
- data/website/images/scruffy.png +0 -0
- data/website/index.html +294 -0
- data/website/index.txt +199 -0
- data/website/javascripts/application.js +2 -0
- data/website/javascripts/controls.js +815 -0
- data/website/javascripts/dragdrop.js +913 -0
- data/website/javascripts/effects.js +958 -0
- data/website/javascripts/lightbox.js +437 -0
- data/website/javascripts/prototype.js +2006 -0
- data/website/javascripts/rounded_corners_lite.inc.js +285 -0
- data/website/stylesheets/lightbox.css +27 -0
- data/website/stylesheets/screen.css +147 -0
- data/website/stylesheets/scruffy.css +227 -0
- data/website/template.html.erb +47 -0
- metadata +135 -55
- data/spec/graph_spec.rb +0 -162
data/CHANGES
CHANGED
@@ -1,4 +1,12 @@
|
|
1
1
|
= Scruffy Changelog
|
2
|
+
== Version 0.2.3
|
3
|
+
(July 4th, 2008)
|
4
|
+
* Got pie charts working
|
5
|
+
* Added rough capability for legend to run vertically (better for Pie chart)
|
6
|
+
* Added some checks in the Pie initializer so that you simply pass a Hash of
|
7
|
+
name => values, instead of adding PieSlices in a block.
|
8
|
+
* Added a simplistic unit test that outputs a pie and line chart in PNG & SVG.
|
9
|
+
* Quite a lot of hard-wired values in here. Whole thing needs a spring clean.
|
2
10
|
|
3
11
|
== Version 0.2.2
|
4
12
|
(August 19th, 2006)
|
data/History.txt
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
= Scruffy Changelog
|
2
|
+
== Version 0.2.3
|
3
|
+
(July 4th, 2008)
|
4
|
+
* Got pie charts working
|
5
|
+
* Added rough capability for legend to run vertically (better for Pie chart)
|
6
|
+
* Added some checks in the Pie initializer so that you simply pass a Hash of
|
7
|
+
name => values, instead of adding PieSlices in a block.
|
8
|
+
* Added a simplistic unit test that outputs a pie and line chart in PNG & SVG.
|
9
|
+
* Quite a lot of hard-wired values in here. Whole thing needs a spring clean.
|
10
|
+
|
11
|
+
== Version 0.2.2
|
12
|
+
(August 19th, 2006)
|
13
|
+
|
14
|
+
* Removed all font-family and text-rendering attributes from elements.
|
15
|
+
- These were causing issues with Batik and Adobe Viewer. Horrible font problems.
|
16
|
+
* Added require 'builder' to renderers/base.rb
|
17
|
+
* Added minor shadows to most graph types. Adds some depth perception.
|
18
|
+
* Added graph.layout as an alias of renderer. (graph.layout looks nicer).
|
19
|
+
* Added markers, values, grid options.
|
20
|
+
|
21
|
+
== Version 0.2.1
|
22
|
+
(August 18th, 2006)
|
23
|
+
|
24
|
+
* Mostly documentation.
|
25
|
+
* Added Builder 2.0 dependency to gem spec.
|
26
|
+
* Removed minimum size hack in RMagickRasterizer, for now.
|
27
|
+
|
28
|
+
|
29
|
+
== Version 0.2.0
|
30
|
+
(August 14th, 2006)
|
31
|
+
|
32
|
+
- Lots of changes, hold on tight:
|
33
|
+
|
34
|
+
* Redesigned rendering system to a component-based design.
|
35
|
+
All objects on the canvas are components that can be re-arranged via renderers.
|
36
|
+
* Created default renderer for basic Gruff-like layout.
|
37
|
+
* Added Reversed and Cubed renderers to demonstrate the customization abilities (plus, they're cool).
|
38
|
+
* Added Split renderer.
|
39
|
+
* Created Viewport component to help with Cubed.
|
40
|
+
- Viewport lets you scale it's inner components and move around the
|
41
|
+
graph. Its components' sizes and positions are relative to the viewport,
|
42
|
+
not the graph.
|
43
|
+
* Set title to respect marker color if available.
|
44
|
+
* Respects :to option in Graph#render for SVG output to file.
|
45
|
+
* Stacked layer type -- accepts layers which it then uses to create a stacked graph. Such as Bar graphs
|
46
|
+
and Area graphs.
|
47
|
+
* Abstracted out layer_container functionality to helper module (for stacked graph)
|
48
|
+
* Renamed value_transformers to value_formatters.
|
49
|
+
* Refined Value Formatters.
|
50
|
+
- Created default: Number.
|
51
|
+
- Respects float precision
|
52
|
+
- Allows for "auto-precision", which will use the largest precision (up to a customizable limit)
|
53
|
+
necessary to portray the values correctly. ie: 5.1, 6.32, 7.142 becomes '5.100', '6.320', '7.142'
|
54
|
+
* Modified Legend component, Layers, and Graph component to respect categories.
|
55
|
+
- ie: Creating a Bar layer with :category => :sales and a Graph with :category => :qa will result in
|
56
|
+
the Bay layer not being displayed. Allows for more than one Graph viewport on a screen with different
|
57
|
+
layers.
|
58
|
+
* Improved rasterizing at smaller sizes( < 300px) by rasterizing the image at a larger size first, then
|
59
|
+
allowing RMagick to resize the image with specific filtering/blurring. Actually looks better than just
|
60
|
+
rasterizing the SVG at the small size from the beginning.
|
61
|
+
* Fixed Opacity on stacked graphs.
|
62
|
+
* Added Style (invisible) components to allow for CSS styling. (Not recommended, however.)
|
63
|
+
* Added Label component for arbitrary text.
|
64
|
+
* Created Theme object in place of theme hash.
|
65
|
+
|
66
|
+
== Version 0.1.0
|
67
|
+
(August 11th, 2006)
|
68
|
+
|
69
|
+
* First public release!
|
70
|
+
* Legend rendering
|
71
|
+
* Rasterizing graph to multiple image types (graph.render :as => 'PNG')
|
72
|
+
|
73
|
+
== Version 0.0.12
|
74
|
+
(August 10th, 2006)
|
75
|
+
This is not a public release.
|
76
|
+
|
77
|
+
* Rearranged Layers into a better class/module arrangement.
|
78
|
+
|
79
|
+
== Version 0.0.11
|
80
|
+
(August 10th, 2006)
|
81
|
+
This is not a public release.
|
82
|
+
|
83
|
+
* Fixed gem issue.
|
84
|
+
|
85
|
+
== Version 0.0.10
|
86
|
+
(August 10th, 2006)
|
87
|
+
|
88
|
+
This is not a public release.
|
89
|
+
|
90
|
+
|
91
|
+
* Removed bogus changelog.
|
92
|
+
|
93
|
+
|
94
|
+
== Version 0.0.9
|
95
|
+
(August 10th, 2006)
|
96
|
+
|
97
|
+
This is not a public release.
|
98
|
+
|
99
|
+
* Initial release.
|
100
|
+
* Standard renderer.
|
101
|
+
* Marker transformers: currency, percentages.
|
102
|
+
* Basic Graphs: Area, Bar, Line.
|
103
|
+
* Advanced Graphs: Average, AllSmiles.
|
104
|
+
* Initial documentation.
|
data/License.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2006 Brasten Sager (brasten@nagilum.com)
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Manifest.txt
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
CHANGES
|
2
|
+
History.txt
|
3
|
+
License.txt
|
4
|
+
MIT-LICENSE
|
5
|
+
Manifest.txt
|
6
|
+
PostInstall.txt
|
7
|
+
README
|
8
|
+
README.txt
|
9
|
+
Rakefile
|
10
|
+
config/hoe.rb
|
11
|
+
config/requirements.rb
|
12
|
+
lib/scruffy.rb
|
13
|
+
lib/scruffy/components.rb
|
14
|
+
lib/scruffy/components/background.rb
|
15
|
+
lib/scruffy/components/base.rb
|
16
|
+
lib/scruffy/components/data_markers.rb
|
17
|
+
lib/scruffy/components/graphs.rb
|
18
|
+
lib/scruffy/components/grid.rb
|
19
|
+
lib/scruffy/components/label.rb
|
20
|
+
lib/scruffy/components/legend.rb
|
21
|
+
lib/scruffy/components/style_info.rb
|
22
|
+
lib/scruffy/components/title.rb
|
23
|
+
lib/scruffy/components/value_markers.rb
|
24
|
+
lib/scruffy/components/viewport.rb
|
25
|
+
lib/scruffy/formatters.rb
|
26
|
+
lib/scruffy/graph.rb
|
27
|
+
lib/scruffy/graph_state.rb
|
28
|
+
lib/scruffy/helpers.rb
|
29
|
+
lib/scruffy/helpers/canvas.rb
|
30
|
+
lib/scruffy/helpers/layer_container.rb
|
31
|
+
lib/scruffy/helpers/meta.rb
|
32
|
+
lib/scruffy/helpers/point_container.rb
|
33
|
+
lib/scruffy/layers.rb
|
34
|
+
lib/scruffy/layers/all_smiles.rb
|
35
|
+
lib/scruffy/layers/area.rb
|
36
|
+
lib/scruffy/layers/average.rb
|
37
|
+
lib/scruffy/layers/bar.rb
|
38
|
+
lib/scruffy/layers/base.rb
|
39
|
+
lib/scruffy/layers/line.rb
|
40
|
+
lib/scruffy/layers/pie.rb
|
41
|
+
lib/scruffy/layers/pie_slice.rb
|
42
|
+
lib/scruffy/layers/scatter.rb
|
43
|
+
lib/scruffy/layers/sparkline_bar.rb
|
44
|
+
lib/scruffy/layers/stacked.rb
|
45
|
+
lib/scruffy/rasterizers.rb
|
46
|
+
lib/scruffy/rasterizers/batik_rasterizer.rb
|
47
|
+
lib/scruffy/rasterizers/rmagick_rasterizer.rb
|
48
|
+
lib/scruffy/renderers.rb
|
49
|
+
lib/scruffy/renderers/base.rb
|
50
|
+
lib/scruffy/renderers/cubed.rb
|
51
|
+
lib/scruffy/renderers/cubed3d.rb
|
52
|
+
lib/scruffy/renderers/empty.rb
|
53
|
+
lib/scruffy/renderers/pie.rb
|
54
|
+
lib/scruffy/renderers/reversed.rb
|
55
|
+
lib/scruffy/renderers/sparkline.rb
|
56
|
+
lib/scruffy/renderers/split.rb
|
57
|
+
lib/scruffy/renderers/standard.rb
|
58
|
+
lib/scruffy/themes.rb
|
59
|
+
lib/scruffy/version.rb
|
60
|
+
script/console
|
61
|
+
script/destroy
|
62
|
+
script/generate
|
63
|
+
script/txt2html
|
64
|
+
setup.rb
|
65
|
+
spec/scruffy/graph_spec.rb
|
66
|
+
spec/scruffy/layers/base_spec.rb
|
67
|
+
spec/scruffy/layers/line_spec.rb
|
68
|
+
spec/spec_helper.rb
|
69
|
+
tasks/deployment.rake
|
70
|
+
tasks/environment.rake
|
71
|
+
tasks/website.rake
|
72
|
+
test/graph_creation_test.rb
|
73
|
+
test/test_helper.rb
|
74
|
+
test/test_scruffy.rb
|
75
|
+
website/images/blank.gif.html
|
76
|
+
website/images/graphs/all_smiles.png
|
77
|
+
website/images/graphs/bar_test.png
|
78
|
+
website/images/graphs/bar_test.svg
|
79
|
+
website/images/graphs/line_test.png
|
80
|
+
website/images/graphs/line_test.svg
|
81
|
+
website/images/graphs/multi_test.png
|
82
|
+
website/images/graphs/multi_test.svg
|
83
|
+
website/images/graphs/pie_test.png
|
84
|
+
website/images/graphs/pie_test.svg
|
85
|
+
website/images/graphs/split_test.png
|
86
|
+
website/images/graphs/split_test.svg
|
87
|
+
website/images/graphs/stacking_test.png
|
88
|
+
website/images/graphs/stacking_test.svg
|
89
|
+
website/images/header.png
|
90
|
+
website/images/header_gradient.png
|
91
|
+
website/images/overlay.png
|
92
|
+
website/images/scruffy.png
|
93
|
+
website/index.html
|
94
|
+
website/index.txt
|
95
|
+
website/javascripts/application.js
|
96
|
+
website/javascripts/controls.js
|
97
|
+
website/javascripts/dragdrop.js
|
98
|
+
website/javascripts/effects.js
|
99
|
+
website/javascripts/lightbox.js
|
100
|
+
website/javascripts/prototype.js
|
101
|
+
website/javascripts/rounded_corners_lite.inc.js
|
102
|
+
website/stylesheets/lightbox.css
|
103
|
+
website/stylesheets/screen.css
|
104
|
+
website/stylesheets/scruffy.css
|
105
|
+
website/template.html.erb
|
data/PostInstall.txt
ADDED
data/README.txt
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
= scruffy
|
2
|
+
|
3
|
+
* scruffy.rubyforge.org
|
4
|
+
|
5
|
+
Author:: Brasten Sager (brasten@nagilum.com)
|
6
|
+
Date:: July 8, 2008
|
7
|
+
|
8
|
+
== DESCRIPTION:
|
9
|
+
|
10
|
+
Scruffy is a Ruby library for generating high quality, good looking graphs. It is designed
|
11
|
+
to be easy to use and highly customizable.
|
12
|
+
|
13
|
+
For basic usage instructions, refer to the documentation for Scruffy::Graph.
|
14
|
+
|
15
|
+
== FEATURES
|
16
|
+
|
17
|
+
* Renders to SVG or bitmap (PNG, JPG)
|
18
|
+
|
19
|
+
== PROBLEMS:
|
20
|
+
|
21
|
+
* 0.2.3 version has missing legend text when rendering to bitmap. This is strange because the text is there in the SVG before it goes to RMagick.
|
22
|
+
|
23
|
+
== SYNOPSIS:
|
24
|
+
|
25
|
+
graph = Scruffy::Graph.new
|
26
|
+
graph.title = "Sample Line Graph"
|
27
|
+
graph.renderer = Scruffy::Renderers::Standard.new
|
28
|
+
|
29
|
+
graph.add :line, 'Example', [20, 100, 70, 30, 106]
|
30
|
+
|
31
|
+
graph.render :to => "line_test.svg"
|
32
|
+
graph.render :width => 300, :height => 200,
|
33
|
+
:to => "line_test.png", :as => 'png'
|
34
|
+
|
35
|
+
== REQUIREMENTS:
|
36
|
+
|
37
|
+
* Needs RMagick and Magic installed, if you wish to render to bitmap.
|
38
|
+
|
39
|
+
== INSTALL:
|
40
|
+
|
41
|
+
* sudo gem install scruffy
|
42
|
+
|
43
|
+
== LICENSE:
|
44
|
+
|
45
|
+
(The MIT License)
|
46
|
+
|
47
|
+
Copyright (c) 2008 Brasten Sager (brasten@nagilum.com)
|
48
|
+
|
49
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
50
|
+
a copy of this software and associated documentation files (the
|
51
|
+
'Software'), to deal in the Software without restriction, including
|
52
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
53
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
54
|
+
permit persons to whom the Software is furnished to do so, subject to
|
55
|
+
the following conditions:
|
56
|
+
|
57
|
+
The above copyright notice and this permission notice shall be
|
58
|
+
included in all copies or substantial portions of the Software.
|
59
|
+
|
60
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
61
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
62
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
63
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
64
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
65
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
66
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,104 +1,108 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
require '
|
8
|
-
require '
|
9
|
-
require '
|
10
|
-
require '
|
11
|
-
require '
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
#
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
#
|
41
|
-
#
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
rdoc.
|
46
|
-
rdoc.
|
47
|
-
rdoc.
|
48
|
-
rdoc.
|
49
|
-
rdoc.rdoc_files.include('
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
s.
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
s.
|
67
|
-
s.
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
1
|
+
require 'config/requirements'
|
2
|
+
require 'config/hoe' # setup Hoe + all gem configuration
|
3
|
+
|
4
|
+
Dir['tasks/**/*.rake'].each { |rake| load rake }
|
5
|
+
|
6
|
+
#
|
7
|
+
#require 'rubygems'
|
8
|
+
#require 'rake'
|
9
|
+
#require 'rake/testtask'
|
10
|
+
#require 'rake/rdoctask'
|
11
|
+
#require 'rake/packagetask'
|
12
|
+
#require 'rake/gempackagetask'
|
13
|
+
#require 'rake/contrib/rubyforgepublisher'
|
14
|
+
#require 'lib/scruffy'
|
15
|
+
#require 'spec'
|
16
|
+
#require 'diff/lcs'
|
17
|
+
#require 'spec/rake/spectask'
|
18
|
+
#
|
19
|
+
#PKG_NAME = "scruffy"
|
20
|
+
#PKG_VERSION = Scruffy::VERSION::STRING
|
21
|
+
#PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
22
|
+
#PKG_FILES = FileList[
|
23
|
+
# '[A-Z]*',
|
24
|
+
# 'lib/**/*.rb',
|
25
|
+
# 'spec/**/*.rb'
|
26
|
+
#]
|
27
|
+
#
|
28
|
+
#desc 'Runs all RSpec specs (set RCOV=true for coverage output)'
|
29
|
+
#Spec::Rake::SpecTask.new do |t|
|
30
|
+
# t.spec_files = FileList['spec/**/*_spec.rb']
|
31
|
+
# t.rcov = ENV['RCOV']
|
32
|
+
#end
|
33
|
+
#
|
34
|
+
#desc "Deploy docs to RubyForge"
|
35
|
+
#task :rdoc_deploy => [:rdoc] do
|
36
|
+
# dirs = %w{doc}
|
37
|
+
# onserver = "brasten@rubyforge.org:/var/www/gforge-projects/scruffy"
|
38
|
+
# dirs.each do | dir|
|
39
|
+
# `scp -r "#{`pwd`.chomp}/#{dir}" "#{onserver}"`
|
40
|
+
# end
|
41
|
+
#end
|
42
|
+
#
|
43
|
+
## Genereate the RDoc documentation
|
44
|
+
#Rake::RDocTask.new { |rdoc|
|
45
|
+
# rdoc.rdoc_dir = 'doc'
|
46
|
+
# rdoc.title = "Scruffy - Graphing Library for Ruby"
|
47
|
+
## rdoc.options << '--line-numbers --inline-source --main README --accessor adv_attr_accessor=M'
|
48
|
+
## rdoc.template = "#{ENV['template']}.rb" if ENV['template']
|
49
|
+
# rdoc.rdoc_files.include('README', 'CHANGES', 'MIT-LICENSE')
|
50
|
+
# rdoc.rdoc_files.include('lib/scruffy.rb')
|
51
|
+
# rdoc.rdoc_files.include('lib/scruffy/*.rb')
|
52
|
+
# rdoc.rdoc_files.include('lib/scruffy/layers/*.rb')
|
53
|
+
# rdoc.rdoc_files.include('lib/scruffy/renderers/*.rb')
|
54
|
+
# rdoc.rdoc_files.include('lib/scruffy/components/*.rb')
|
55
|
+
# rdoc.rdoc_files.include('lib/scruffy/helpers/*.rb')
|
56
|
+
# rdoc.rdoc_files.include('lib/scruffy/rasterizers/*.rb')
|
57
|
+
#}
|
58
|
+
#
|
59
|
+
#spec = Gem::Specification.new do |s|
|
60
|
+
# s.name = PKG_NAME
|
61
|
+
# s.version = PKG_VERSION
|
62
|
+
# s.author = AUTHOR
|
63
|
+
# s.email = "brasten@nagilum.com"
|
64
|
+
# s.homepage = "http://scruffy.rubyforge.org"
|
65
|
+
# s.summary = "A powerful, clean graphing library for Ruby."
|
66
|
+
# s.add_dependency('builder', '>= 2.0')
|
67
|
+
# s.description = <<-EOF
|
68
|
+
# Scruffy is a Ruby library for generating powerful graphs. It is based on
|
69
|
+
# SVG, allowing for powerful, clean code, as well as a good foundation for
|
70
|
+
# future features.
|
71
|
+
# EOF
|
72
|
+
#
|
73
|
+
# s.files = PKG_FILES.to_a
|
74
|
+
# s.has_rdoc = true
|
75
|
+
# s.rubyforge_project = "scruffy"
|
76
|
+
#end
|
77
|
+
#
|
78
|
+
#Rake::GemPackageTask.new(spec) do |pkg|
|
79
|
+
# pkg.need_zip = true
|
80
|
+
# pkg.need_tar = true
|
81
|
+
#end
|
82
|
+
#
|
83
|
+
#task :verify_user do
|
84
|
+
# raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
|
85
|
+
#end
|
86
|
+
#
|
87
|
+
#task :verify_password do
|
88
|
+
# raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
|
89
|
+
#end
|
90
|
+
#
|
91
|
+
#desc "Publish gem+tgz+zip on RubyForge. You must make sure lib/version.rb is aligned with the CHANGELOG file"
|
92
|
+
#task :publish_packages => [:verify_user, :verify_password, :package] do
|
93
|
+
# require 'meta_project'
|
94
|
+
# require 'rake/contrib/xforge'
|
95
|
+
# release_files = FileList[
|
96
|
+
# "pkg/#{PKG_FILE_NAME}.gem",
|
97
|
+
# "pkg/#{PKG_FILE_NAME}.tgz",
|
98
|
+
# "pkg/#{PKG_FILE_NAME}.zip"
|
99
|
+
# ]
|
100
|
+
#
|
101
|
+
# Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |xf|
|
102
|
+
# # Never hardcode user name and password in the Rakefile!
|
103
|
+
# xf.user_name = ENV['RUBYFORGE_USER']
|
104
|
+
# xf.password = ENV['RUBYFORGE_PASSWORD']
|
105
|
+
# xf.files = release_files.to_a
|
106
|
+
# xf.release_name = "Scruffy #{PKG_VERSION}"
|
107
|
+
# end
|
108
|
+
#end
|