ziya 2.1.7 → 2.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +10 -0
- data/Gemfile.lock +29 -0
- data/History.txt +34 -4
- data/{README.txt → README.rdoc} +1 -36
- data/README.txt1 +310 -0
- data/Rakefile +17 -43
- data/examples/charts/public/charts/.DS_Store +0 -0
- data/lib/ziya.rb +129 -104
- data/lib/ziya/charts/base.rb +17 -9
- data/lib/ziya/gauges/base.rb +4 -2
- data/lib/ziya/gauges/signal.rb +4 -4
- data/lib/ziya/gauges/support/base.rb +3 -3
- data/lib/ziya/maps/base.rb +4 -2
- data/lib/ziya/maps/support/base.rb +1 -1
- data/lib/ziya/maps/support/range.rb +1 -1
- data/lib/ziya/yaml_helpers/charts.rb +1 -1
- data/resources/charts/.DS_Store +0 -0
- data/resources/charts/charts_library/.DS_Store +0 -0
- data/resources/charts/sliders/.DS_Store +0 -0
- data/resources/gauges/.DS_Store +0 -0
- data/resources/maps/.DS_Store +0 -0
- data/spec/charts/support/chart_pref_spec.rb +1 -1
- data/spec/gauges/signal_spec.rb +2 -2
- data/spec/gauges/support/area_spec.rb +5 -5
- data/spec/gauges/support/image_spec.rb +2 -2
- data/spec/gauges/support/line_spec.rb +2 -2
- data/spec/gauges/support/link_spec.rb +2 -2
- data/spec/gauges/support/move_spec.rb +2 -2
- data/spec/gauges/support/polygon_spec.rb +2 -2
- data/spec/gauges/support/radial_numbers_spec.rb +4 -5
- data/spec/gauges/support/radial_ticks_spec.rb +2 -2
- data/spec/gauges/support/rotate_spec.rb +2 -2
- data/spec/gauges/support/scale_spec.rb +2 -2
- data/spec/gauges/support/text_spec.rb +2 -2
- data/spec/maps/base_spec.rb +1 -1
- data/spec/maps/support/default_color_spec.rb +2 -2
- data/spec/maps/support/heat_range_spec.rb +3 -2
- data/spec/ziya_spec.rb +1 -5
- data/version.txt +1 -0
- data/{ziya.gemspec → ziya.gemspec1} +0 -0
- metadata +54 -41
- data/Manifest.txt +0 -343
- data/lib/ziya/version.rb +0 -14
- data/tasks/ann.rake +0 -76
- data/tasks/annotations.rake +0 -22
- data/tasks/doc.rake +0 -53
- data/tasks/gem.rake +0 -110
- data/tasks/manifest.rake +0 -49
- data/tasks/post_load.rake +0 -26
- data/tasks/rubyforge.rake +0 -57
- data/tasks/setup.rb +0 -227
- data/tasks/spec.rake +0 -61
- data/tasks/svn.rake +0 -44
- data/tasks/test.rake +0 -38
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
bones (3.4.7)
|
5
|
+
little-plugger (>= 1.1.2)
|
6
|
+
loquacious (>= 1.6.4)
|
7
|
+
rake (>= 0.8.7)
|
8
|
+
bones-extras (1.2.4)
|
9
|
+
bones (>= 3.4.3)
|
10
|
+
bones-git (1.2.0)
|
11
|
+
bones (>= 3.4.7)
|
12
|
+
git (>= 1.2.5)
|
13
|
+
color (1.4.1)
|
14
|
+
git (1.2.5)
|
15
|
+
little-plugger (1.1.2)
|
16
|
+
logging (1.4.3)
|
17
|
+
little-plugger (>= 1.1.2)
|
18
|
+
loquacious (1.6.4)
|
19
|
+
rake (0.8.7)
|
20
|
+
|
21
|
+
PLATFORMS
|
22
|
+
ruby
|
23
|
+
|
24
|
+
DEPENDENCIES
|
25
|
+
bones
|
26
|
+
bones-extras
|
27
|
+
bones-git
|
28
|
+
color
|
29
|
+
logging
|
data/History.txt
CHANGED
@@ -1,4 +1,34 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
2.0.0 - Added support for XML/SWF 5.02
|
2
|
+
2.0.1 - Additional support for 5.02 + Added donut chart from 5.03
|
3
|
+
2.0.2 - Changed logging required to 0.9.X - Update to xml/swf 5.0.4
|
4
|
+
2.0.3 - README file update - Thanks to Paul James !
|
5
|
+
2.0.4 - Fixed missing encoding on composite urls - published gem on github
|
6
|
+
2.0.5 - Fixed merb app support issue
|
7
|
+
2.0.6 - Updates to support xml/swf 5.0.5
|
8
|
+
2.0.7 - Updates to support xm/swf 5.0.7
|
9
|
+
- added parameters for the ziya_js helpers ( Tx Brian ! )
|
10
|
+
- added draw button support
|
11
|
+
- added chart_note to annotate a chart
|
12
|
+
- added tooltip chart support
|
13
|
+
2.0.8 - Patches to xml/swf/5.0.7 - scroller handle fixe + Stoppped_Scolling js callback
|
14
|
+
- added support for flash_to_javascript callbacks
|
15
|
+
- added support ids in composite charts
|
16
|
+
- various bug fixes
|
17
|
+
2.1.0 - Refactor some of the underlying ziya code
|
18
|
+
- Beef up test suite
|
19
|
+
- changed component tree
|
20
|
+
- Added geographical maps support
|
21
|
+
- Changed the default ziyafy to install charts only by default
|
22
|
+
Run ziyafy --help for the various options
|
23
|
+
- Changed add( :composites, ... ) call to take in a hash of hash instead of id/url pair.
|
24
|
+
So the correct call is now of the form chart.add( :composites, :id => { :url => ... } )
|
25
|
+
You can now add extra attributes that will be passed to the generated image component.
|
26
|
+
2.1.4 - Added support for xm/swf 5.0.8
|
27
|
+
- Removed dependency on logging gem version
|
28
|
+
2.1.5 - Added ability to enhance draw and link components in subsequent stylesheets. The old
|
29
|
+
behavior was to simply override the whole component. Now you can keep enhancing these components
|
30
|
+
in higher level stylesheets.
|
31
|
+
2.1.6 - Fix issue with nil value in series being ignored where using the { :value => nil } form.
|
32
|
+
2.1.7 - Fix possible naming conflict with String extension class
|
33
|
+
2.1.8 - Added support for ruby 1.9 and bundler ( Thanks Roland Venesz and Todd Sedano for the contributions! )
|
34
|
+
|
data/{README.txt → README.rdoc}
RENAMED
@@ -2,41 +2,6 @@
|
|
2
2
|
by Fernand Galiana
|
3
3
|
git://github.com/derailed/ziya.git
|
4
4
|
|
5
|
-
== RELEASES
|
6
|
-
|
7
|
-
2.0.0 - Added support for XML/SWF 5.02
|
8
|
-
2.0.1 - Additional support for 5.02 + Added donut chart from 5.03
|
9
|
-
2.0.2 - Changed logging required to 0.9.X - Update to xml/swf 5.0.4
|
10
|
-
2.0.3 - README file update - Thanks to Paul James !
|
11
|
-
2.0.4 - Fixed missing encoding on composite urls - published gem on github
|
12
|
-
2.0.5 - Fixed merb app support issue
|
13
|
-
2.0.6 - Updates to support xml/swf 5.0.5
|
14
|
-
2.0.7 - Updates to support xm/swf 5.0.7
|
15
|
-
- added parameters for the ziya_js helpers ( Tx Brian ! )
|
16
|
-
- added draw button support
|
17
|
-
- added chart_note to annotate a chart
|
18
|
-
- added tooltip chart support
|
19
|
-
2.0.8 - Patches to xml/swf/5.0.7 - scroller handle fixe + Stoppped_Scolling js callback
|
20
|
-
- added support for flash_to_javascript callbacks
|
21
|
-
- added support ids in composite charts
|
22
|
-
- various bug fixes
|
23
|
-
2.1.0 - Refactor some of the underlying ziya code
|
24
|
-
- Beef up test suite
|
25
|
-
- changed component tree
|
26
|
-
- Added geographical maps support
|
27
|
-
- Changed the default ziyafy to install charts only by default
|
28
|
-
Run ziyafy --help for the various options
|
29
|
-
- Changed add( :composites, ... ) call to take in a hash of hash instead of id/url pair.
|
30
|
-
So the correct call is now of the form chart.add( :composites, :id => { :url => ... } )
|
31
|
-
You can now add extra attributes that will be passed to the generated image component.
|
32
|
-
2.1.4 - Added support for xm/swf 5.0.8
|
33
|
-
- Removed dependency on logging gem version
|
34
|
-
2.1.5 - Added ability to enhance draw and link components in subsequent stylesheets. The old
|
35
|
-
behavior was to simply override the whole component. Now you can keep enhancing these components
|
36
|
-
in higher level stylesheets.
|
37
|
-
2.1.6 - Fix issue with nil value in series being ignored where using the { :value => nil } form.
|
38
|
-
2.1.7 - Fix possible naming conflict with String extension class
|
39
|
-
|
40
5
|
== DESCRIPTION:
|
41
6
|
|
42
7
|
ZiYa allows you to easily create interactive charts, gauges and maps for your web applications. ZiYa leverages
|
@@ -46,7 +11,7 @@ looking charts for your application. You will also be able to use the charts, ga
|
|
46
11
|
by embedding various link in the graphical components thus bringing to the table an ideal scheme for reporting and dashboard
|
47
12
|
like applications. Your manager will love you for it !!
|
48
13
|
|
49
|
-
|
14
|
+
Sample site : http://ziya.liquidrail.com
|
50
15
|
Documentation : http://ziya.liquidrail.com/docs
|
51
16
|
Forum : http://groups.google.com/group/ziya-plugin
|
52
17
|
Repositories : git://github.com/derailed/ziya.git
|
data/README.txt1
ADDED
@@ -0,0 +1,310 @@
|
|
1
|
+
=== ZiYa
|
2
|
+
by Fernand Galiana
|
3
|
+
git://github.com/derailed/ziya.git
|
4
|
+
|
5
|
+
== DESCRIPTION:
|
6
|
+
|
7
|
+
ZiYa allows you to easily create interactive charts, gauges and maps for your web applications. ZiYa leverages
|
8
|
+
flash which offload heavy server side processing to the client. At the root ZiYa allows you to easily generate an
|
9
|
+
XML files that will be downloaded to the client for rendering. Using this gem, you will be able to easily create great
|
10
|
+
looking charts for your application. You will also be able to use the charts, gauges and maps has a navigation scheme
|
11
|
+
by embedding various link in the graphical components thus bringing to the table an ideal scheme for reporting and dashboard
|
12
|
+
like applications. Your manager will love you for it !!
|
13
|
+
|
14
|
+
Sample Site : http://ziya.liquidrail.com
|
15
|
+
Documentation : http://ziya.liquidrail.com/docs
|
16
|
+
Forum : http://groups.google.com/group/ziya-plugin
|
17
|
+
Repositories : git://github.com/derailed/ziya.git
|
18
|
+
|
19
|
+
== FEATURES:
|
20
|
+
|
21
|
+
* Supports a wide variety of chart/gauge types, sure to fit your needs.
|
22
|
+
* Geographical maps. Maps can be drillable and refreshable
|
23
|
+
* Relieves your server load by generating the actual chart on the client side.
|
24
|
+
* Provides for cascading like css-styles for your charts using YAML files.
|
25
|
+
* Themes support. You can change the appearance and behavior of any charts by introducing new themes
|
26
|
+
|
27
|
+
== REQUIREMENTS:
|
28
|
+
|
29
|
+
ZiYa depends on the following gems
|
30
|
+
|
31
|
+
* logging
|
32
|
+
* color
|
33
|
+
|
34
|
+
ZiYa comes pre-bundled with the following packages:
|
35
|
+
* XML/SWF charts Version 5.07 (http://www.maani.us/xml_charts/index.php)
|
36
|
+
* XML/SWF gauges Version 1.6 (http://www.maani.us/gauge/index.php)
|
37
|
+
* DIY Maps (http://backspace.com/mapapp/)
|
38
|
+
|
39
|
+
XML/SWF
|
40
|
+
* XML/SWF charts are free of charge unless you need to use special features such
|
41
|
+
as embedded links and printing.
|
42
|
+
|
43
|
+
The package cost $45 per domain, including localhost and is well worth the investment.
|
44
|
+
A similar fee applies to the gauge framework.
|
45
|
+
|
46
|
+
DIY Map
|
47
|
+
* This package is free for use in non-commercial applications. For commercial applications,
|
48
|
+
there is a $20.00 license per domain. I have chosen this package over others, as it supports
|
49
|
+
the interaction and configuration I was looking for, it seems stable and packs lots of features
|
50
|
+
for a reasonable price.
|
51
|
+
|
52
|
+
== INSTALL:
|
53
|
+
|
54
|
+
NOTE: You will need to add github as a gem source and thus will need gem version 1.3 or later
|
55
|
+
|
56
|
+
> gem sources -a http://gemcutter.org
|
57
|
+
|
58
|
+
> sudo gem install ziya
|
59
|
+
|
60
|
+
cd to your application directory and issue the following command
|
61
|
+
|
62
|
+
> ziyafy --charts
|
63
|
+
|
64
|
+
This will copy the necessary themes and flash files to run ZiYa in your application
|
65
|
+
public/charts directory. You can install maps and gauges components as well. Type in
|
66
|
+
|
67
|
+
> ziyafy --help
|
68
|
+
|
69
|
+
To see all available options.
|
70
|
+
|
71
|
+
== SYNOPSIS:
|
72
|
+
|
73
|
+
This gem version requires a client update to flash 9.0 and possibly you will
|
74
|
+
need to get a new license from XML/SWF >= 5.0, if you want to use
|
75
|
+
advanced features suck as links and live updates.
|
76
|
+
|
77
|
+
== Creating a ZiYa chart in a Rails 2.3 application
|
78
|
+
|
79
|
+
1 - Create a ziya.rb file under config/initializers
|
80
|
+
|
81
|
+
ziya.rb:
|
82
|
+
|
83
|
+
# Pull in the ZiYa gem framework
|
84
|
+
gem 'derailed-ziya', '= 2.1.0'
|
85
|
+
require 'ziya'
|
86
|
+
|
87
|
+
# Initializes the ZiYa Framework
|
88
|
+
Ziya.initialize(
|
89
|
+
:logger => RAILS_DEFAULT_LOGGER,
|
90
|
+
:themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public charts themes])
|
91
|
+
)
|
92
|
+
|
93
|
+
This will initialize the gem. You can log the output to stdout using the ZiYa bundled logger
|
94
|
+
or specify a file ie File.join( File.dirname(__FILE__), %w[.. log ziya.log]. If you choose to use the
|
95
|
+
ZiYa logger, you can specify the :log_level option to either :warn :info :debug or :error.
|
96
|
+
You will need to specify your themes directory typically located under public/charts/themes or any location
|
97
|
+
you'll like to choose.
|
98
|
+
|
99
|
+
3 - Create a chart controller
|
100
|
+
|
101
|
+
blee_controller.rb:
|
102
|
+
|
103
|
+
class BleeController < ApplicationController
|
104
|
+
# Load ZiYa necessary helpers
|
105
|
+
helper Ziya::HtmlHelpers::Charts
|
106
|
+
helper Ziya::YamlHelpers::Charts
|
107
|
+
|
108
|
+
# Callback from the flash movie to get the chart's data
|
109
|
+
def load_chart
|
110
|
+
# Create a bar chart with 2 series composed of 3 data points each.
|
111
|
+
# Chart will be rendered using the default look and feel
|
112
|
+
chart = Ziya::Charts::Bar.new
|
113
|
+
chart.add( :axis_category_text, %w[2006 2007 2008] )
|
114
|
+
chart.add( :series, "Dogs", [10,20,30] )
|
115
|
+
chart.add( :series, "Cats", [5,15,25] )
|
116
|
+
respond_to do |fmt|
|
117
|
+
fmt.xml { render :xml => chart.to_xml }
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
4 - Create a view
|
122
|
+
|
123
|
+
blee/index.html.erb:
|
124
|
+
|
125
|
+
# Defines the necessary tag to embed a flash movie in your html page.
|
126
|
+
# This will callback to your controller to fetch the necessary xml.
|
127
|
+
<%= ziya_chart load_chart_url -%>
|
128
|
+
|
129
|
+
5 - Create a named route
|
130
|
+
|
131
|
+
config/routes.rb:
|
132
|
+
|
133
|
+
map.load_chart '/blee/load_chart', :controller => 'blee', :action => 'load_chart'
|
134
|
+
|
135
|
+
== Styling a chart
|
136
|
+
|
137
|
+
=== Basic Theme
|
138
|
+
|
139
|
+
1 - Create a directory fred in public/charts/themes
|
140
|
+
2 - Create a file called column_chart.yml under the fred directory
|
141
|
+
2 - Edit column_chart.yml and add the following lines mind the yaml 2 space indentation!
|
142
|
+
|
143
|
+
<%= chart :column %>
|
144
|
+
<%=comp :axis_category %>
|
145
|
+
color: ff0000
|
146
|
+
|
147
|
+
3 - In fred_controller add the following directive to the chart to associate your new theme with the chart
|
148
|
+
|
149
|
+
chart.add( :theme, 'fred' )
|
150
|
+
|
151
|
+
4 - reload the page and you should now see the red x axis label
|
152
|
+
|
153
|
+
=== Cascading themes
|
154
|
+
|
155
|
+
To override the default column chart theme, you may now create an instance theme.
|
156
|
+
|
157
|
+
1 - Create fred.yml in public/chart/themes/fred
|
158
|
+
|
159
|
+
2 - Edit fred.yml as follows
|
160
|
+
|
161
|
+
<%= chart :column %>
|
162
|
+
<%=comp :axis_category %>
|
163
|
+
color: 00ff00
|
164
|
+
|
165
|
+
3 - Edit your controller to indicate the instance theme name
|
166
|
+
|
167
|
+
chart = Ziya::Charts.Column.new( nil, 'fred' )
|
168
|
+
|
169
|
+
4 - Reload the page - The x axis category labels should now be green.
|
170
|
+
|
171
|
+
NOTE: There are lots of setup example for themes in the ziya-galeria app at
|
172
|
+
git://github.com/derailed/ziya-galeria.git.
|
173
|
+
The themes component follows the xml/swf xml settings for configuration which
|
174
|
+
are documented here http://www.maani.us/xml_charts/index.php?menu=Reference
|
175
|
+
|
176
|
+
=== Using theme helpers
|
177
|
+
|
178
|
+
Just like rails view template helpers, ZiYa support helpers for theme stylesheets.
|
179
|
+
In order to use a helper for your chart you will need to use the following steps:
|
180
|
+
|
181
|
+
1 - Create a ziya directory under app/helpers
|
182
|
+
2 - Create a file called fred_helper.rb
|
183
|
+
3 - Edit fred_helper.rb and add the following lines
|
184
|
+
|
185
|
+
module Ziya::FredHelper
|
186
|
+
def random_color
|
187
|
+
%w[ffaa00 aaff00 aabbff][rand(3)]
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
4 - Edit you theme stylesheet to call the helper method
|
192
|
+
|
193
|
+
In fred.yml
|
194
|
+
|
195
|
+
<%= chart :column %>
|
196
|
+
<%=comp :axis_category %>
|
197
|
+
color: <%= random_color %>
|
198
|
+
|
199
|
+
5 - Edit you config/initializer/ziya.rb and add the following line
|
200
|
+
|
201
|
+
# Initializes the ZiYa Framework
|
202
|
+
Ziya.initialize( :logger => RAILS_DEFAULT_LOGGER,
|
203
|
+
:helpers_dir => File.join( File.dirname(__FILE__), %w[.. .. app helpers ziya] ), # <-- New line !!
|
204
|
+
:themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public charts themes])
|
205
|
+
)
|
206
|
+
|
207
|
+
6 - Restart your app server
|
208
|
+
7 - Reload the page serveral time and watch the x axis label color change
|
209
|
+
|
210
|
+
== Creating a gauge for a rails application
|
211
|
+
|
212
|
+
You will need to modify the ziya initializer and add the following directive
|
213
|
+
|
214
|
+
Ziya.initialize(
|
215
|
+
:logger => RAILS_DEFAULT_LOGGER,
|
216
|
+
:designs_dir => File.join( File.dirname(__FILE__), %w[.. .. public gauges designs] ), # => Add this !!
|
217
|
+
:themes_dir => File.join( File.dirname(__FILE__), %w[.. .. public charts themes]) )
|
218
|
+
|
219
|
+
* fred_controller.rb
|
220
|
+
|
221
|
+
class FredController < ApplicationController
|
222
|
+
def load_gauge
|
223
|
+
gauge = Ziya::Gauges::Base.new( LICENCE_KEY, 'my_gauge' )
|
224
|
+
respond_to do |fmt|
|
225
|
+
fmt.xml => { render :xml => gauge.to_xml }
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
* fred/index.html.erb
|
231
|
+
|
232
|
+
<%= ziya_gauge load_gauge_url -%>
|
233
|
+
|
234
|
+
* config/routes.rb
|
235
|
+
|
236
|
+
# Creates a named route for the chart.
|
237
|
+
map.load_gauge '/fred/load_gauge', :controller => 'fred', :action => 'load_gauge'
|
238
|
+
|
239
|
+
* public/gauges/designs/my_gauge.yml
|
240
|
+
|
241
|
+
In the design file you will leverage the components defined in the Ziya::Gauges::Support
|
242
|
+
package to create your gauge desgins. You gauges can be animated using rotate, scale and
|
243
|
+
move operations. In this example we will create a volume control that will rotate to the
|
244
|
+
desired position. In real life you will fetch the volume level from your models to
|
245
|
+
set the desired position. Take a look at the ZiYa sample application for the various
|
246
|
+
possibilities. You can think of a gauge as a portable canvas element where you can draw
|
247
|
+
you own designs using the various components provided ZiYa components ( No need to worry about
|
248
|
+
various browsers' canvas support )
|
249
|
+
|
250
|
+
<%= gauge :base %>
|
251
|
+
# specifies the number of ticks to draw in a circular fashion
|
252
|
+
<%= dial :radial_ticks, :volume %>
|
253
|
+
x: 100
|
254
|
+
y: 75
|
255
|
+
radius: 35
|
256
|
+
length: 4
|
257
|
+
start_angle: 235
|
258
|
+
end_angle: 485
|
259
|
+
ticks: 10
|
260
|
+
thickness: 2
|
261
|
+
color: 000000
|
262
|
+
# rotates the volume to the desired position.
|
263
|
+
<%= dial :rotate, :volume_setting %>
|
264
|
+
x: 100
|
265
|
+
y: 75
|
266
|
+
start: 300
|
267
|
+
span: 160
|
268
|
+
step: 5
|
269
|
+
skake_span: 20
|
270
|
+
shadow_alpha: 20
|
271
|
+
shadow_x_offset: 3
|
272
|
+
shadow_y_offset: 3
|
273
|
+
<%= dials %>
|
274
|
+
<%= dial :circle, :circle_1 %>
|
275
|
+
x: 100
|
276
|
+
y: 75
|
277
|
+
radius: 30
|
278
|
+
fill_color: 777777
|
279
|
+
line_thickness: 5
|
280
|
+
line_alpha: 75
|
281
|
+
<%= dial :circle, :circle_2 %>
|
282
|
+
x: 100
|
283
|
+
y: 55
|
284
|
+
radius: 5
|
285
|
+
fill_alpha: 80
|
286
|
+
|
287
|
+
== LICENSE:
|
288
|
+
|
289
|
+
(The MIT License)
|
290
|
+
|
291
|
+
Copyright (c) 2008 FIXME (different license?)
|
292
|
+
|
293
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
294
|
+
a copy of this software and associated documentation files (the
|
295
|
+
'Software'), to deal in the Software without restriction, including
|
296
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
297
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
298
|
+
permit persons to whom the Software is furnished to do so, subject to
|
299
|
+
the following conditions:
|
300
|
+
|
301
|
+
The above copyright notice and this permission notice shall be
|
302
|
+
included in all copies or substantial portions of the Software.
|
303
|
+
|
304
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
305
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
306
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
307
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
308
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
309
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
310
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
CHANGED
@@ -1,45 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
begin
|
2
|
+
require 'bones'
|
3
|
+
rescue LoadError
|
4
|
+
abort '### Please install the "bones" gem ###'
|
5
|
+
end
|
4
6
|
|
5
|
-
|
7
|
+
task :default => 'spec:run'
|
8
|
+
task 'gem:release' => 'spec:run'
|
6
9
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
PROJ.rubyforge_name = 'ziya'
|
18
|
-
PROJ.description = "Easily add charting to your rails/merb applications"
|
19
|
-
PROJ.spec_opts << '--color'
|
20
|
-
PROJ.rcov_dir = 'coverage'
|
21
|
-
PROJ.rdoc_dir = 'docs'
|
22
|
-
PROJ.ruby_opts = %w[-W0]
|
23
|
-
PROJ.version = ::Ziya::Version.version
|
24
|
-
PROJ.svn = 'ziya'
|
25
|
-
PROJ.rcov_threshold = 90.0
|
26
|
-
PROJ.executables = ['ziyafy']
|
27
|
-
|
28
|
-
PROJ.exclude << %w[.DS_Store$ .swo$ .swp$ .git$]
|
29
|
-
PROJ.tests = FileList['test/**/test_*.rb']
|
30
|
-
PROJ.annotation_tags << 'BOZO'
|
31
|
-
|
32
|
-
desc "Clean up artifact directories"
|
33
|
-
task :clean do
|
34
|
-
rcov_artifacts = File.join( File.dirname( __FILE__ ), "coverage" )
|
35
|
-
FileUtils.rm_rf rcov_artifacts if File.exists? rcov_artifacts
|
36
|
-
rdoc_artifacts = File.join( File.dirname( __FILE__ ), "docs" )
|
37
|
-
FileUtils.rm_rf rdoc_artifacts if File.exists? rdoc_artifacts
|
38
|
-
gem_artifacts = File.join( File.dirname( __FILE__ ), "pkg" )
|
39
|
-
FileUtils.rm_rf gem_artifacts if File.exists? gem_artifacts
|
40
|
-
end
|
41
|
-
|
42
|
-
task 'gem:package' => 'manifest:assert'
|
43
|
-
|
44
|
-
depend_on "logging", '>= 0.9.0'
|
45
|
-
depend_on "color" , '>= 1.4.0'
|
10
|
+
Bones {
|
11
|
+
name 'ziya'
|
12
|
+
authors 'Fernand Galiana'
|
13
|
+
readme_file 'README.rdoc'
|
14
|
+
email 'fernand@liquidrail.com'
|
15
|
+
url 'http://ziya.liquidrail.com/'
|
16
|
+
gem.executables %w[ziyafy]
|
17
|
+
spec_opts %w[--color]
|
18
|
+
ruby_opts %w[-W0]
|
19
|
+
}
|