a_la_chart 0.1.7 → 0.1.8
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/History.txt +6 -0
- data/README.rdoc +7 -3
- data/lib/a_la_chart/a_la_chart_helper.rb +14 -2
- metadata +40 -13
data/History.txt
CHANGED
data/README.rdoc
CHANGED
|
@@ -17,14 +17,18 @@ Note: very much in alpha development
|
|
|
17
17
|
|
|
18
18
|
== INSTALL:
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
If you use Bundler, it is highly recommended to just add this line to your Gemfile
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
gem "a_la_chart"
|
|
23
|
+
|
|
24
|
+
OR - to install this as a gem from http://rubygems.org
|
|
25
|
+
|
|
26
|
+
gem sources -a http://rubygems.org
|
|
23
27
|
gem install a_la_chart
|
|
24
28
|
|
|
25
29
|
Set up the gem in your environment.rb
|
|
26
30
|
|
|
27
|
-
config.gem "a_la_chart", :source => "http://
|
|
31
|
+
config.gem "a_la_chart", :source => "http://rubygems.org"
|
|
28
32
|
|
|
29
33
|
OR - to install this directly as a Rails plugin (not recommended, but available):
|
|
30
34
|
|
|
@@ -2,7 +2,13 @@ module ALaChartHelper
|
|
|
2
2
|
require "erb"
|
|
3
3
|
|
|
4
4
|
def inline_chart_tag(chart_make, chart_style, args={})
|
|
5
|
-
chart_tag(chart_make, chart_style, args.merge(:inline => true))
|
|
5
|
+
output = chart_tag(chart_make, chart_style, args.merge(:inline => true))
|
|
6
|
+
|
|
7
|
+
if ActionView::Base.xss_safe?
|
|
8
|
+
output.html_safe
|
|
9
|
+
else
|
|
10
|
+
output
|
|
11
|
+
end
|
|
6
12
|
end
|
|
7
13
|
|
|
8
14
|
def chart_tag(chart_make, chart_style, args={})
|
|
@@ -56,7 +62,13 @@ module ALaChartHelper
|
|
|
56
62
|
chart_template = File.join(RAILS_ROOT, template) if !File.exists?(chart_template) && defined?(RAILS_ROOT)
|
|
57
63
|
|
|
58
64
|
chart_template_erb = ERB.new(File.read(chart_template))
|
|
59
|
-
chart_template_erb.result(binding)
|
|
65
|
+
output = chart_template_erb.result(binding)
|
|
66
|
+
|
|
67
|
+
if ActionView::Base.xss_safe?
|
|
68
|
+
output.html_safe
|
|
69
|
+
else
|
|
70
|
+
output
|
|
71
|
+
end
|
|
60
72
|
end
|
|
61
73
|
|
|
62
74
|
def encode_options(options)
|
metadata
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: a_la_chart
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
|
|
4
|
+
hash: 11
|
|
5
|
+
prerelease: false
|
|
6
|
+
segments:
|
|
7
|
+
- 0
|
|
8
|
+
- 1
|
|
9
|
+
- 8
|
|
10
|
+
version: 0.1.8
|
|
5
11
|
platform: ruby
|
|
6
12
|
authors:
|
|
7
13
|
- Eric Redmond
|
|
@@ -9,29 +15,41 @@ autorequire:
|
|
|
9
15
|
bindir: bin
|
|
10
16
|
cert_chain: []
|
|
11
17
|
|
|
12
|
-
date: 2010-06-28 00:00:00 -
|
|
18
|
+
date: 2010-06-28 00:00:00 -04:00
|
|
13
19
|
default_executable:
|
|
14
20
|
dependencies:
|
|
15
21
|
- !ruby/object:Gem::Dependency
|
|
16
22
|
name: responders
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
prerelease: false
|
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
25
|
+
none: false
|
|
20
26
|
requirements:
|
|
21
27
|
- - ~>
|
|
22
28
|
- !ruby/object:Gem::Version
|
|
29
|
+
hash: 7
|
|
30
|
+
segments:
|
|
31
|
+
- 0
|
|
32
|
+
- 6
|
|
33
|
+
- 0
|
|
23
34
|
version: 0.6.0
|
|
24
|
-
|
|
35
|
+
type: :runtime
|
|
36
|
+
version_requirements: *id001
|
|
25
37
|
- !ruby/object:Gem::Dependency
|
|
26
38
|
name: has_scope
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
39
|
+
prerelease: false
|
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
41
|
+
none: false
|
|
30
42
|
requirements:
|
|
31
43
|
- - ~>
|
|
32
44
|
- !ruby/object:Gem::Version
|
|
45
|
+
hash: 11
|
|
46
|
+
segments:
|
|
47
|
+
- 0
|
|
48
|
+
- 5
|
|
49
|
+
- 0
|
|
33
50
|
version: 0.5.0
|
|
34
|
-
|
|
51
|
+
type: :runtime
|
|
52
|
+
version_requirements: *id002
|
|
35
53
|
description: A framework for managing various types of charting implementations.
|
|
36
54
|
email: eric.redmond@gmail.com
|
|
37
55
|
executables: []
|
|
@@ -78,6 +96,9 @@ files:
|
|
|
78
96
|
- lib/a_la_chart/a_la_chart_helper.rb
|
|
79
97
|
- lib/a_la_chart/config.rb
|
|
80
98
|
- lib/a_la_chart/version.rb
|
|
99
|
+
- test/a_la_chart_test.rb
|
|
100
|
+
- test/test_a_la_chart.rb
|
|
101
|
+
- test/test_helper.rb
|
|
81
102
|
has_rdoc: true
|
|
82
103
|
homepage: http://github.com/coderoshi/a_la_chart
|
|
83
104
|
licenses: []
|
|
@@ -88,21 +109,27 @@ rdoc_options:
|
|
|
88
109
|
require_paths:
|
|
89
110
|
- lib
|
|
90
111
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
|
+
none: false
|
|
91
113
|
requirements:
|
|
92
114
|
- - ">="
|
|
93
115
|
- !ruby/object:Gem::Version
|
|
116
|
+
hash: 3
|
|
117
|
+
segments:
|
|
118
|
+
- 0
|
|
94
119
|
version: "0"
|
|
95
|
-
version:
|
|
96
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
|
+
none: false
|
|
97
122
|
requirements:
|
|
98
123
|
- - ">="
|
|
99
124
|
- !ruby/object:Gem::Version
|
|
125
|
+
hash: 3
|
|
126
|
+
segments:
|
|
127
|
+
- 0
|
|
100
128
|
version: "0"
|
|
101
|
-
version:
|
|
102
129
|
requirements: []
|
|
103
130
|
|
|
104
131
|
rubyforge_project: a_la_chart
|
|
105
|
-
rubygems_version: 1.3.
|
|
132
|
+
rubygems_version: 1.3.7
|
|
106
133
|
signing_key:
|
|
107
134
|
specification_version: 3
|
|
108
135
|
summary: a La Chart manages various types of charting implementations - from grabbing the data, to declaring how those values are mapped to the desired type of chart (pie, line, bar, etc).
|