volt-easypiechart 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +2 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +15 -0
- data/LICENSE.txt +22 -0
- data/README.md +67 -0
- data/Rakefile +1 -0
- data/app/easypiechart/assets/js/jquery.easypiechart.js +364 -0
- data/app/easypiechart/config/dependencies.rb +1 -0
- data/app/easypiechart/config/initializers/boot.rb +10 -0
- data/app/easypiechart/config/routes.rb +1 -0
- data/app/easypiechart/controllers/main_controller.rb +35 -0
- data/app/easypiechart/views/main/index.html +7 -0
- data/lib/volt/easypiechart/version.rb +5 -0
- data/lib/volt/easypiechart.rb +18 -0
- data/spec/dummy/.gitignore +9 -0
- data/spec/dummy/README.md +4 -0
- data/spec/dummy/app/main/assets/css/app.css.scss +1 -0
- data/spec/dummy/app/main/config/dependencies.rb +11 -0
- data/spec/dummy/app/main/config/initializers/boot.rb +10 -0
- data/spec/dummy/app/main/config/routes.rb +14 -0
- data/spec/dummy/app/main/controllers/main_controller.rb +27 -0
- data/spec/dummy/app/main/models/user.rb +12 -0
- data/spec/dummy/app/main/views/main/about.html +7 -0
- data/spec/dummy/app/main/views/main/index.html +6 -0
- data/spec/dummy/app/main/views/main/main.html +29 -0
- data/spec/dummy/config/app.rb +137 -0
- data/spec/dummy/config/base/index.html +15 -0
- data/spec/dummy/config/initializers/boot.rb +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/integration/sample_integration_spec.rb +11 -0
- data/spec/sample_spec.rb +7 -0
- data/spec/spec_helper.rb +18 -0
- data/volt-easypiechart.gemspec +41 -0
- metadata +292 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 74cf2018159bc9d46b3401860c447d400a7a90af
|
4
|
+
data.tar.gz: 54da1607ed4fd0ddf822bca18fb8803a7c4bd0d5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 590a59541310a639649d85b1a33852fec585ad8348c7c9d49df02540654703b4b3022a94d346664cbfd63da343ac3b42ab4302a21117bea2ef28609d4de0c3a7
|
7
|
+
data.tar.gz: 378611569f2a4466dbe8f54abe8bb1da1fc03535be0fe4261bea7c125b4f6dff8b7ec771e472be5562abb668e1ca6e6574a46757260a2f3e4750649d0f336158
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in volt-easypiechart.gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
# Optional Gems for testing/dev
|
7
|
+
|
8
|
+
# The implementation of ReadWriteLock in Volt uses concurrent ruby and ext helps performance.
|
9
|
+
gem 'concurrent-ruby-ext', '~> 0.8.0'
|
10
|
+
|
11
|
+
# For mongo (optional)
|
12
|
+
gem 'bson_ext', '~> 1.9.0'
|
13
|
+
|
14
|
+
# Gems you use for development should be added to the gemspec file as
|
15
|
+
# development dependencies.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Matt Hale
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Volt::Easypiechart
|
2
|
+
|
3
|
+
A simple Volt component to use the [EasyPieChart](http://rendro.github.io/easy-pie-chart/) JS library.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'volt-easypiechart'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install volt-easypiechart
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Doing something like this in your template:
|
22
|
+
|
23
|
+
```
|
24
|
+
<:easypiechart percent="{{ page._percent }}"
|
25
|
+
classes="sub-pie-1"
|
26
|
+
pie-title="Bounce Rate"
|
27
|
+
options='{"size": 95, "trackColor": "#eee", "scaleColor": "#ccc", "barColor": "#2196F3", "lineWidth": 4,
|
28
|
+
"lineCap": "butt"}'/>
|
29
|
+
```
|
30
|
+
|
31
|
+
will produce something like this in your final output:
|
32
|
+
```
|
33
|
+
<div id="id10089" class="easy-pie sub-pie-1" data-percent="54">
|
34
|
+
<div class="percent"><!-- $10090 -->54<!-- $/10090 --></div>
|
35
|
+
<!-- $10091 -->
|
36
|
+
<div class="pie-title"><!-- $10092 -->Bounce Rate<!-- $/10092 --></div>
|
37
|
+
<!-- $/10091 -->
|
38
|
+
<canvas height="95" width="95"></canvas>
|
39
|
+
</div>
|
40
|
+
```
|
41
|
+
|
42
|
+
See the EasyPieChart [repo](https://github.com/rendro/easy-pie-chart) for a full reference on usage. Here are the options available for quick reference:
|
43
|
+
|
44
|
+
Property (Type) | Default | Description
|
45
|
+
-------- | --------- | ----------
|
46
|
+
**barColor** | #ef1e25 | The color of the curcular bar. You can either pass a valid css color string, or a function that takes the current percentage as a value and returns a valid css color string.
|
47
|
+
**trackColor** | #f2f2f2 | The color of the track, or false to disable rendering. |
|
48
|
+
**scaleColor** | #dfe0e0 | The color of the scale lines, false to disable rendering. |
|
49
|
+
**scaleLength** | 5 | Length of the scale lines (reduces the radius of the chart). |
|
50
|
+
**lineCap** | round | Defines how the ending of the bar line looks like. Possible values are: `butt`, `round` and `square`. |
|
51
|
+
**lineWidth** | 3 | Width of the chart line in px. |
|
52
|
+
**size** | 110 | Size of the pie chart in px. It will always be a square. |
|
53
|
+
**rotate** | 0 | Rotation of the complete chart in degrees. |
|
54
|
+
**animate** | object | Object with time in milliseconds and boolean for an animation of the bar growing (`{ duration: 1000, enabled: true }`), or false to deactivate animations. |
|
55
|
+
**easing** | defaultEasing | Easing function or string with the name of a [jQuery easing function](http://gsgd.co.uk/sandbox/jquery/easing/) |
|
56
|
+
|
57
|
+
|
58
|
+
## Contributing
|
59
|
+
|
60
|
+
1. Fork it ( http://github.com/matthew342/volt-easypiechart/fork )
|
61
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
62
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
63
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
64
|
+
5. Create new Pull Request
|
65
|
+
|
66
|
+
## Attribution
|
67
|
+
EasyPieChart is copyright 2015 Robert Fleischmann, contributors. Find it on [Github](https://github.com/rendro/easy-pie-chart).
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,364 @@
|
|
1
|
+
/**!
|
2
|
+
* easy-pie-chart
|
3
|
+
* Lightweight plugin to render simple, animated and retina optimized pie charts
|
4
|
+
*
|
5
|
+
* @license
|
6
|
+
* @author Robert Fleischmann <rendro87@gmail.com> (http://robert-fleischmann.de)
|
7
|
+
* @version 2.1.7
|
8
|
+
**/
|
9
|
+
|
10
|
+
(function (root, factory) {
|
11
|
+
if (typeof define === 'function' && define.amd) {
|
12
|
+
// AMD. Register as an anonymous module unless amdModuleId is set
|
13
|
+
define(["jquery"], function (a0) {
|
14
|
+
return (factory(a0));
|
15
|
+
});
|
16
|
+
} else if (typeof exports === 'object') {
|
17
|
+
// Node. Does not work with strict CommonJS, but
|
18
|
+
// only CommonJS-like environments that support module.exports,
|
19
|
+
// like Node.
|
20
|
+
module.exports = factory(require("jquery"));
|
21
|
+
} else {
|
22
|
+
factory(jQuery);
|
23
|
+
}
|
24
|
+
}(this, function ($) {
|
25
|
+
|
26
|
+
/**
|
27
|
+
* Renderer to render the chart on a canvas object
|
28
|
+
* @param {DOMElement} el DOM element to host the canvas (root of the plugin)
|
29
|
+
* @param {object} options options object of the plugin
|
30
|
+
*/
|
31
|
+
var CanvasRenderer = function(el, options) {
|
32
|
+
var cachedBackground;
|
33
|
+
var canvas = document.createElement('canvas');
|
34
|
+
|
35
|
+
el.appendChild(canvas);
|
36
|
+
|
37
|
+
if (typeof(G_vmlCanvasManager) === 'object') {
|
38
|
+
G_vmlCanvasManager.initElement(canvas);
|
39
|
+
}
|
40
|
+
|
41
|
+
var ctx = canvas.getContext('2d');
|
42
|
+
|
43
|
+
canvas.width = canvas.height = options.size;
|
44
|
+
|
45
|
+
// canvas on retina devices
|
46
|
+
var scaleBy = 1;
|
47
|
+
if (window.devicePixelRatio > 1) {
|
48
|
+
scaleBy = window.devicePixelRatio;
|
49
|
+
canvas.style.width = canvas.style.height = [options.size, 'px'].join('');
|
50
|
+
canvas.width = canvas.height = options.size * scaleBy;
|
51
|
+
ctx.scale(scaleBy, scaleBy);
|
52
|
+
}
|
53
|
+
|
54
|
+
// move 0,0 coordinates to the center
|
55
|
+
ctx.translate(options.size / 2, options.size / 2);
|
56
|
+
|
57
|
+
// rotate canvas -90deg
|
58
|
+
ctx.rotate((-1 / 2 + options.rotate / 180) * Math.PI);
|
59
|
+
|
60
|
+
var radius = (options.size - options.lineWidth) / 2;
|
61
|
+
if (options.scaleColor && options.scaleLength) {
|
62
|
+
radius -= options.scaleLength + 2; // 2 is the distance between scale and bar
|
63
|
+
}
|
64
|
+
|
65
|
+
// IE polyfill for Date
|
66
|
+
Date.now = Date.now || function() {
|
67
|
+
return +(new Date());
|
68
|
+
};
|
69
|
+
|
70
|
+
/**
|
71
|
+
* Draw a circle around the center of the canvas
|
72
|
+
* @param {strong} color Valid CSS color string
|
73
|
+
* @param {number} lineWidth Width of the line in px
|
74
|
+
* @param {number} percent Percentage to draw (float between -1 and 1)
|
75
|
+
*/
|
76
|
+
var drawCircle = function(color, lineWidth, percent) {
|
77
|
+
percent = Math.min(Math.max(-1, percent || 0), 1);
|
78
|
+
var isNegative = percent <= 0 ? true : false;
|
79
|
+
|
80
|
+
ctx.beginPath();
|
81
|
+
ctx.arc(0, 0, radius, 0, Math.PI * 2 * percent, isNegative);
|
82
|
+
|
83
|
+
ctx.strokeStyle = color;
|
84
|
+
ctx.lineWidth = lineWidth;
|
85
|
+
|
86
|
+
ctx.stroke();
|
87
|
+
};
|
88
|
+
|
89
|
+
/**
|
90
|
+
* Draw the scale of the chart
|
91
|
+
*/
|
92
|
+
var drawScale = function() {
|
93
|
+
var offset;
|
94
|
+
var length;
|
95
|
+
|
96
|
+
ctx.lineWidth = 1;
|
97
|
+
ctx.fillStyle = options.scaleColor;
|
98
|
+
|
99
|
+
ctx.save();
|
100
|
+
for (var i = 24; i > 0; --i) {
|
101
|
+
if (i % 6 === 0) {
|
102
|
+
length = options.scaleLength;
|
103
|
+
offset = 0;
|
104
|
+
} else {
|
105
|
+
length = options.scaleLength * 0.6;
|
106
|
+
offset = options.scaleLength - length;
|
107
|
+
}
|
108
|
+
ctx.fillRect(-options.size/2 + offset, 0, length, 1);
|
109
|
+
ctx.rotate(Math.PI / 12);
|
110
|
+
}
|
111
|
+
ctx.restore();
|
112
|
+
};
|
113
|
+
|
114
|
+
/**
|
115
|
+
* Request animation frame wrapper with polyfill
|
116
|
+
* @return {function} Request animation frame method or timeout fallback
|
117
|
+
*/
|
118
|
+
var reqAnimationFrame = (function() {
|
119
|
+
return window.requestAnimationFrame ||
|
120
|
+
window.webkitRequestAnimationFrame ||
|
121
|
+
window.mozRequestAnimationFrame ||
|
122
|
+
function(callback) {
|
123
|
+
window.setTimeout(callback, 1000 / 60);
|
124
|
+
};
|
125
|
+
}());
|
126
|
+
|
127
|
+
/**
|
128
|
+
* Draw the background of the plugin including the scale and the track
|
129
|
+
*/
|
130
|
+
var drawBackground = function() {
|
131
|
+
if(options.scaleColor) drawScale();
|
132
|
+
if(options.trackColor) drawCircle(options.trackColor, options.trackWidth || options.lineWidth, 1);
|
133
|
+
};
|
134
|
+
|
135
|
+
/**
|
136
|
+
* Canvas accessor
|
137
|
+
*/
|
138
|
+
this.getCanvas = function() {
|
139
|
+
return canvas;
|
140
|
+
};
|
141
|
+
|
142
|
+
/**
|
143
|
+
* Canvas 2D context 'ctx' accessor
|
144
|
+
*/
|
145
|
+
this.getCtx = function() {
|
146
|
+
return ctx;
|
147
|
+
};
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Clear the complete canvas
|
151
|
+
*/
|
152
|
+
this.clear = function() {
|
153
|
+
ctx.clearRect(options.size / -2, options.size / -2, options.size, options.size);
|
154
|
+
};
|
155
|
+
|
156
|
+
/**
|
157
|
+
* Draw the complete chart
|
158
|
+
* @param {number} percent Percent shown by the chart between -100 and 100
|
159
|
+
*/
|
160
|
+
this.draw = function(percent) {
|
161
|
+
// do we need to render a background
|
162
|
+
if (!!options.scaleColor || !!options.trackColor) {
|
163
|
+
// getImageData and putImageData are supported
|
164
|
+
if (ctx.getImageData && ctx.putImageData) {
|
165
|
+
if (!cachedBackground) {
|
166
|
+
drawBackground();
|
167
|
+
cachedBackground = ctx.getImageData(0, 0, options.size * scaleBy, options.size * scaleBy);
|
168
|
+
} else {
|
169
|
+
ctx.putImageData(cachedBackground, 0, 0);
|
170
|
+
}
|
171
|
+
} else {
|
172
|
+
this.clear();
|
173
|
+
drawBackground();
|
174
|
+
}
|
175
|
+
} else {
|
176
|
+
this.clear();
|
177
|
+
}
|
178
|
+
|
179
|
+
ctx.lineCap = options.lineCap;
|
180
|
+
|
181
|
+
// if barcolor is a function execute it and pass the percent as a value
|
182
|
+
var color;
|
183
|
+
if (typeof(options.barColor) === 'function') {
|
184
|
+
color = options.barColor(percent);
|
185
|
+
} else {
|
186
|
+
color = options.barColor;
|
187
|
+
}
|
188
|
+
|
189
|
+
// draw bar
|
190
|
+
drawCircle(color, options.lineWidth, percent / 100);
|
191
|
+
}.bind(this);
|
192
|
+
|
193
|
+
/**
|
194
|
+
* Animate from some percent to some other percentage
|
195
|
+
* @param {number} from Starting percentage
|
196
|
+
* @param {number} to Final percentage
|
197
|
+
*/
|
198
|
+
this.animate = function(from, to) {
|
199
|
+
var startTime = Date.now();
|
200
|
+
options.onStart(from, to);
|
201
|
+
var animation = function() {
|
202
|
+
var process = Math.min(Date.now() - startTime, options.animate.duration);
|
203
|
+
var currentValue = options.easing(this, process, from, to - from, options.animate.duration);
|
204
|
+
this.draw(currentValue);
|
205
|
+
options.onStep(from, to, currentValue);
|
206
|
+
if (process >= options.animate.duration) {
|
207
|
+
options.onStop(from, to);
|
208
|
+
} else {
|
209
|
+
reqAnimationFrame(animation);
|
210
|
+
}
|
211
|
+
}.bind(this);
|
212
|
+
|
213
|
+
reqAnimationFrame(animation);
|
214
|
+
}.bind(this);
|
215
|
+
};
|
216
|
+
|
217
|
+
var EasyPieChart = function(el, opts) {
|
218
|
+
var defaultOptions = {
|
219
|
+
barColor: '#ef1e25',
|
220
|
+
trackColor: '#f9f9f9',
|
221
|
+
scaleColor: '#dfe0e0',
|
222
|
+
scaleLength: 5,
|
223
|
+
lineCap: 'round',
|
224
|
+
lineWidth: 3,
|
225
|
+
trackWidth: undefined,
|
226
|
+
size: 110,
|
227
|
+
rotate: 0,
|
228
|
+
animate: {
|
229
|
+
duration: 1000,
|
230
|
+
enabled: true
|
231
|
+
},
|
232
|
+
easing: function (x, t, b, c, d) { // more can be found here: http://gsgd.co.uk/sandbox/jquery/easing/
|
233
|
+
t = t / (d/2);
|
234
|
+
if (t < 1) {
|
235
|
+
return c / 2 * t * t + b;
|
236
|
+
}
|
237
|
+
return -c/2 * ((--t)*(t-2) - 1) + b;
|
238
|
+
},
|
239
|
+
onStart: function(from, to) {
|
240
|
+
return;
|
241
|
+
},
|
242
|
+
onStep: function(from, to, currentValue) {
|
243
|
+
return;
|
244
|
+
},
|
245
|
+
onStop: function(from, to) {
|
246
|
+
return;
|
247
|
+
}
|
248
|
+
};
|
249
|
+
|
250
|
+
// detect present renderer
|
251
|
+
if (typeof(CanvasRenderer) !== 'undefined') {
|
252
|
+
defaultOptions.renderer = CanvasRenderer;
|
253
|
+
} else if (typeof(SVGRenderer) !== 'undefined') {
|
254
|
+
defaultOptions.renderer = SVGRenderer;
|
255
|
+
} else {
|
256
|
+
throw new Error('Please load either the SVG- or the CanvasRenderer');
|
257
|
+
}
|
258
|
+
|
259
|
+
var options = {};
|
260
|
+
var currentValue = 0;
|
261
|
+
|
262
|
+
/**
|
263
|
+
* Initialize the plugin by creating the options object and initialize rendering
|
264
|
+
*/
|
265
|
+
var init = function() {
|
266
|
+
this.el = el;
|
267
|
+
this.options = options;
|
268
|
+
|
269
|
+
// merge user options into default options
|
270
|
+
for (var i in defaultOptions) {
|
271
|
+
if (defaultOptions.hasOwnProperty(i)) {
|
272
|
+
options[i] = opts && typeof(opts[i]) !== 'undefined' ? opts[i] : defaultOptions[i];
|
273
|
+
if (typeof(options[i]) === 'function') {
|
274
|
+
options[i] = options[i].bind(this);
|
275
|
+
}
|
276
|
+
}
|
277
|
+
}
|
278
|
+
|
279
|
+
// check for jQuery easing
|
280
|
+
if (typeof(options.easing) === 'string' && typeof(jQuery) !== 'undefined' && jQuery.isFunction(jQuery.easing[options.easing])) {
|
281
|
+
options.easing = jQuery.easing[options.easing];
|
282
|
+
} else {
|
283
|
+
options.easing = defaultOptions.easing;
|
284
|
+
}
|
285
|
+
|
286
|
+
// process earlier animate option to avoid bc breaks
|
287
|
+
if (typeof(options.animate) === 'number') {
|
288
|
+
options.animate = {
|
289
|
+
duration: options.animate,
|
290
|
+
enabled: true
|
291
|
+
};
|
292
|
+
}
|
293
|
+
|
294
|
+
if (typeof(options.animate) === 'boolean' && !options.animate) {
|
295
|
+
options.animate = {
|
296
|
+
duration: 1000,
|
297
|
+
enabled: options.animate
|
298
|
+
};
|
299
|
+
}
|
300
|
+
|
301
|
+
// create renderer
|
302
|
+
this.renderer = new options.renderer(el, options);
|
303
|
+
|
304
|
+
// initial draw
|
305
|
+
this.renderer.draw(currentValue);
|
306
|
+
|
307
|
+
// initial update
|
308
|
+
if (el.dataset && el.dataset.percent) {
|
309
|
+
this.update(parseFloat(el.dataset.percent));
|
310
|
+
} else if (el.getAttribute && el.getAttribute('data-percent')) {
|
311
|
+
this.update(parseFloat(el.getAttribute('data-percent')));
|
312
|
+
}
|
313
|
+
}.bind(this);
|
314
|
+
|
315
|
+
/**
|
316
|
+
* Update the value of the chart
|
317
|
+
* @param {number} newValue Number between 0 and 100
|
318
|
+
* @return {object} Instance of the plugin for method chaining
|
319
|
+
*/
|
320
|
+
this.update = function(newValue) {
|
321
|
+
newValue = parseFloat(newValue);
|
322
|
+
if (options.animate.enabled) {
|
323
|
+
this.renderer.animate(currentValue, newValue);
|
324
|
+
} else {
|
325
|
+
this.renderer.draw(newValue);
|
326
|
+
}
|
327
|
+
currentValue = newValue;
|
328
|
+
return this;
|
329
|
+
}.bind(this);
|
330
|
+
|
331
|
+
/**
|
332
|
+
* Disable animation
|
333
|
+
* @return {object} Instance of the plugin for method chaining
|
334
|
+
*/
|
335
|
+
this.disableAnimation = function() {
|
336
|
+
options.animate.enabled = false;
|
337
|
+
return this;
|
338
|
+
};
|
339
|
+
|
340
|
+
/**
|
341
|
+
* Enable animation
|
342
|
+
* @return {object} Instance of the plugin for method chaining
|
343
|
+
*/
|
344
|
+
this.enableAnimation = function() {
|
345
|
+
options.animate.enabled = true;
|
346
|
+
return this;
|
347
|
+
};
|
348
|
+
|
349
|
+
init();
|
350
|
+
};
|
351
|
+
|
352
|
+
$.fn.easyPieChart = function(options) {
|
353
|
+
return this.each(function() {
|
354
|
+
var instanceOptions;
|
355
|
+
|
356
|
+
if (!$.data(this, 'easyPieChart')) {
|
357
|
+
instanceOptions = $.extend({}, options, $(this).data());
|
358
|
+
$.data(this, 'easyPieChart', new EasyPieChart(this, instanceOptions));
|
359
|
+
}
|
360
|
+
});
|
361
|
+
};
|
362
|
+
|
363
|
+
|
364
|
+
}));
|
@@ -0,0 +1 @@
|
|
1
|
+
# Component dependencies
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Place any code you want to run when the component is included on the client
|
2
|
+
# or server.
|
3
|
+
|
4
|
+
# To include code only on the client use:
|
5
|
+
# if RUBY_PLATFORM == 'opal'
|
6
|
+
#
|
7
|
+
# To include code only on the server, use:
|
8
|
+
# unless RUBY_PLATFORM == 'opal'
|
9
|
+
# ^^ this will not send compile in code in the conditional to the client.
|
10
|
+
# ^^ this include code required in the conditional.
|
@@ -0,0 +1 @@
|
|
1
|
+
# Component routes
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Easypiechart
|
2
|
+
class MainController < Volt::ModelController
|
3
|
+
|
4
|
+
def index_ready
|
5
|
+
@watches = []
|
6
|
+
@elem = `$("#" + #{first_element}.id)`
|
7
|
+
if @elem
|
8
|
+
if attrs.options
|
9
|
+
begin
|
10
|
+
JSON.parse(attrs.options).each do |option, value|
|
11
|
+
`#{@elem}.data(#{option}, #{value})`
|
12
|
+
end
|
13
|
+
rescue Object => e
|
14
|
+
Volt.logger.error "'options' attribute passed to EasyPieChart must be a string that is valid, parsable JSON. Error was #{e}"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
`#{@elem}.easyPieChart();`
|
18
|
+
@watches << -> { update_value(attrs.percent) }.watch!
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def update_value
|
23
|
+
if @elem
|
24
|
+
`#{@elem}.data('easyPieChart').update(#{attrs.percent})`
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def before_index_remove
|
29
|
+
@watches.each do |watch|
|
30
|
+
watch.stop
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# If you need to require in code in the gem's app folder, keep in mind that
|
2
|
+
# the app is not on the load path when the gem is required. Use
|
3
|
+
# app/{gemname}/config/initializers/boot.rb to require in client or server
|
4
|
+
# code.
|
5
|
+
#
|
6
|
+
# Also, in volt apps, you typically use the lib folder in the
|
7
|
+
# app/{componentname} folder instead of this lib folder. This lib folder is
|
8
|
+
# for setting up gem code when Bundler.require is called. (or the gem is
|
9
|
+
# required.)
|
10
|
+
#
|
11
|
+
# If you need to configure volt in some way, you can add a Volt.configure block
|
12
|
+
# in this file.
|
13
|
+
|
14
|
+
module Volt
|
15
|
+
module Easypiechart
|
16
|
+
# Your code goes here...
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
// Place your apps css here
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Specify which components you wish to include when
|
2
|
+
# the "home" component loads.
|
3
|
+
|
4
|
+
# bootstrap css framework
|
5
|
+
component 'bootstrap'
|
6
|
+
|
7
|
+
# a default theme for the bootstrap framework
|
8
|
+
component 'bootstrap_jumbotron_theme'
|
9
|
+
|
10
|
+
# provides templates for login, signup, and logout
|
11
|
+
component 'user_templates'
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# Place any code you want to run when the component is included on the client
|
2
|
+
# or server.
|
3
|
+
|
4
|
+
# To include code only on the client use:
|
5
|
+
# if RUBY_PLATFORM == 'opal'
|
6
|
+
#
|
7
|
+
# To include code only on the server, use:
|
8
|
+
# unless RUBY_PLATFORM == 'opal'
|
9
|
+
# ^^ this will not send compile in code in the conditional to the client.
|
10
|
+
# ^^ this include code required in the conditional.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# See https://github.com/voltrb/volt#routes for more info on routes
|
2
|
+
|
3
|
+
client '/about', action: 'about'
|
4
|
+
|
5
|
+
# Routes for login and signup, provided by user_templates component gem
|
6
|
+
client '/signup', component: 'user_templates', controller: 'signup'
|
7
|
+
client '/login', component: 'user_templates', controller: 'login', action: 'index'
|
8
|
+
client '/password_reset', component: 'user_templates', controller: 'password_reset', action: 'index'
|
9
|
+
client '/forgot', component: 'user_templates', controller: 'login', action: 'forgot'
|
10
|
+
client '/account', component: 'user_templates', controller: 'account', action: 'index'
|
11
|
+
|
12
|
+
# The main route, this should be last. It will match any params not
|
13
|
+
# previously matched.
|
14
|
+
client '/', {}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# By default Volt generates this controller for your Main component
|
2
|
+
module Main
|
3
|
+
class MainController < Volt::ModelController
|
4
|
+
def index
|
5
|
+
# Add code for when the index view is loaded
|
6
|
+
end
|
7
|
+
|
8
|
+
def about
|
9
|
+
# Add code for when the about view is loaded
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
# The main template contains a #template binding that shows another
|
15
|
+
# template. This is the path to that template. It may change based
|
16
|
+
# on the params._component, params._controller, and params._action values.
|
17
|
+
def main_path
|
18
|
+
"#{params._component || 'main'}/#{params._controller || 'main'}/#{params._action || 'index'}"
|
19
|
+
end
|
20
|
+
|
21
|
+
# Determine if the current nav component is the active one by looking
|
22
|
+
# at the first part of the url against the href attribute.
|
23
|
+
def active_tab?
|
24
|
+
url.path.split('/')[1] == attrs.href.split('/')[1]
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# By default Volt generates this User model which inherits from Volt::User,
|
2
|
+
# you can rename this if you want.
|
3
|
+
class User < Volt::User
|
4
|
+
# login_field is set to :email by default and can be changed to :username
|
5
|
+
# in config/app.rb
|
6
|
+
field login_field
|
7
|
+
field :name
|
8
|
+
|
9
|
+
validate login_field, unique: true, length: 8
|
10
|
+
validate :email, email: true
|
11
|
+
|
12
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<:Title>
|
2
|
+
{{ view main_path, "title", {controller_group: 'main'} }}
|
3
|
+
|
4
|
+
<:Body>
|
5
|
+
<div class="container">
|
6
|
+
<div class="header">
|
7
|
+
<ul class="nav nav-pills pull-right">
|
8
|
+
<:nav href="/">Home</:nav>
|
9
|
+
<:nav href="/about">About</:nav>
|
10
|
+
<:user_templates:menu />
|
11
|
+
</ul>
|
12
|
+
<h3 class="text-muted">dummy</h3>
|
13
|
+
</div>
|
14
|
+
|
15
|
+
<:volt:notices />
|
16
|
+
|
17
|
+
{{ view main_path, 'body', {controller_group: 'main'} }}
|
18
|
+
|
19
|
+
<div class="footer">
|
20
|
+
<p>© Company {{ Time.now.year }}</p>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<:Nav>
|
26
|
+
<li class="{{ if active_tab? }}active{{ end }}">
|
27
|
+
<a href="{{ attrs.href }}">{{ yield }}</a>
|
28
|
+
</li>
|
29
|
+
|
@@ -0,0 +1,137 @@
|
|
1
|
+
# app.rb is used to configure your app. This code is only run on the server,
|
2
|
+
# then any config options in config.public are passed to the client as well.
|
3
|
+
|
4
|
+
Volt.configure do |config|
|
5
|
+
# Setup your global app config here.
|
6
|
+
|
7
|
+
#######################################
|
8
|
+
# Basic App Info (stuff you should set)
|
9
|
+
#######################################
|
10
|
+
config.domain = 'dummy.com'
|
11
|
+
config.app_name = 'Dummy'
|
12
|
+
config.mailer.from = 'Dummy <no-reply@dummy.com>'
|
13
|
+
|
14
|
+
############
|
15
|
+
# App Secret
|
16
|
+
############
|
17
|
+
# Your app secret is used for signing things like the user cookie so it can't
|
18
|
+
# be tampered with. A random value is generated on new projects that will work
|
19
|
+
# without the need to customize. Make sure this value doesn't leave your server.
|
20
|
+
#
|
21
|
+
# For added security we recommend moving the app secret into an environment. You can
|
22
|
+
# setup that like so:
|
23
|
+
#
|
24
|
+
# config.app_secret = ENV['APP_SECRET']
|
25
|
+
#
|
26
|
+
config.app_secret = 'cxli-_vXyPt0WjbDPVLUXxeDbPx9SbN1JYGWMOFjny4CD6sbAWNHCi0qNxjxYH8NLOQ'
|
27
|
+
|
28
|
+
###############
|
29
|
+
# Log Filtering
|
30
|
+
###############
|
31
|
+
# Data updates from the client come in via Tasks. The task dispatcher logs all calls to tasks.
|
32
|
+
# By default hashes in the arguments can be filtered based on keys. So any hash with a key of
|
33
|
+
# password will be filtered. You can add more fields to filter below:
|
34
|
+
config.filter_keys = [:password]
|
35
|
+
|
36
|
+
##########
|
37
|
+
# Database
|
38
|
+
##########
|
39
|
+
# Database config all start with db_ and can be set either in the config
|
40
|
+
# file or with an environment variable (DB_NAME for example).
|
41
|
+
|
42
|
+
# config.db_driver = 'mongo'
|
43
|
+
# config.db_name = (config.app_name + '_' + Volt.env.to_s)
|
44
|
+
# config.db_host = 'localhost'
|
45
|
+
# config.db_port = 27017
|
46
|
+
|
47
|
+
#####################
|
48
|
+
# Compression options
|
49
|
+
#####################
|
50
|
+
# If you are not running behind something like nginx in production, you can
|
51
|
+
# have rack deflate all files.
|
52
|
+
# config.deflate = true
|
53
|
+
|
54
|
+
#######################
|
55
|
+
# Public configurations
|
56
|
+
#######################
|
57
|
+
# Anything under config.public will be sent to the client as well as the server,
|
58
|
+
# so be sure no private data ends up under public
|
59
|
+
|
60
|
+
# Use username instead of email as the login
|
61
|
+
# config.public.auth.use_username = true
|
62
|
+
|
63
|
+
#####################
|
64
|
+
# Compression Options
|
65
|
+
#####################
|
66
|
+
# Disable or enable css/js/image compression. Default is to only run in production.
|
67
|
+
# if Volt.env.production?
|
68
|
+
# config.compress_javascript = true
|
69
|
+
# config.compress_css = true
|
70
|
+
# config.compress_images = true
|
71
|
+
# end
|
72
|
+
|
73
|
+
################
|
74
|
+
# Mailer options
|
75
|
+
################
|
76
|
+
# The volt-mailer gem uses pony (https://github.com/benprew/pony) to deliver e-mail. Any
|
77
|
+
# options you would pass to pony can be setup below.
|
78
|
+
# NOTE: The from address is setup at the top
|
79
|
+
|
80
|
+
# Normally pony uses /usr/sbin/sendmail if one is installed. You can specify smtp below:
|
81
|
+
# config.mailer.via = :smtp
|
82
|
+
# config.mailer.via_options = {
|
83
|
+
# :address => 'smtp.yourserver.com',
|
84
|
+
# :port => '25',
|
85
|
+
# :user_name => 'user',
|
86
|
+
# :password => 'password',
|
87
|
+
# :authentication => :plain, # :plain, :login, :cram_md5, no auth by default
|
88
|
+
# :domain => "localhost.localdomain" # the HELO domain provided by the client to the server
|
89
|
+
# }
|
90
|
+
|
91
|
+
#############
|
92
|
+
# Message Bus
|
93
|
+
#############
|
94
|
+
# Volt provides a "Message Bus" out of the box. The message bus provides
|
95
|
+
# a pub/sub service between any volt instance (server, client, runner, etc..)
|
96
|
+
# that share the same database. The message bus can be used by app code. It
|
97
|
+
# is also used internally to push data to any listening clients.
|
98
|
+
#
|
99
|
+
# The default message bus (called "peer_to_peer") uses the database to sync
|
100
|
+
# socket ip's/ports.
|
101
|
+
# config.message_bus.bus_name = 'peer_to_peer'
|
102
|
+
#
|
103
|
+
# Encrypt message bus - messages on the message bus are encrypted by default
|
104
|
+
# using rbnacl.
|
105
|
+
|
106
|
+
#
|
107
|
+
# For dummy apps, we disable_encryption, to simplify the gem requirements.
|
108
|
+
config.message_bus.disable_encryption = true
|
109
|
+
|
110
|
+
#
|
111
|
+
# ## MessageBus Server -- the message bus binds to a port and ip which the
|
112
|
+
# other volt instances need to be able to connect to. You can customize
|
113
|
+
# the server below:
|
114
|
+
#
|
115
|
+
# Port range - you can specify a range of ports that an instance can bind the
|
116
|
+
# message bus on. You can specify a range, an array of Integers, or an array
|
117
|
+
# of ranges.
|
118
|
+
# config.message_bus.bind_port_ranges = (58000..61000)
|
119
|
+
#
|
120
|
+
# Bind Ip - specifies the ip address the message bus server should bind on.
|
121
|
+
# config.message_bus.bind_ip = '127.0.0.1'
|
122
|
+
|
123
|
+
#############
|
124
|
+
# Concurrency
|
125
|
+
#############
|
126
|
+
# Volt provides a thread worker pool for incoming task requests (and all
|
127
|
+
# database requests, since those use tasks to do their work.) The following
|
128
|
+
# lets you control the size of the worker pool. Threads are only created as
|
129
|
+
# needed, and are removed after a certain amount of inactivity.
|
130
|
+
# config.min_worker_threads = 1
|
131
|
+
# config.max_worker_threads = 10
|
132
|
+
#
|
133
|
+
# You can also specify the amount of time a Task should run for before it
|
134
|
+
# timeout's. Setting this to short can cause unexpected results, currently
|
135
|
+
# we recomend it be at least 10 seconds.
|
136
|
+
# config.worker_timeout = 60
|
137
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<%# IMPORTANT: Please read before changing! %>
|
4
|
+
<%# This file is rendered on the server using ERB, so it does NOT use Volt's %>
|
5
|
+
<%# normal template system. You can add to it, but keep in mind the template %>
|
6
|
+
<%# language difference. This file handles auto-loading all JS/Opal and CSS. %>
|
7
|
+
<head>
|
8
|
+
<meta charset="UTF-8" />
|
9
|
+
<%= javascript_tags %>
|
10
|
+
<%= css_tags %>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
|
14
|
+
</body>
|
15
|
+
</html>
|
@@ -0,0 +1,4 @@
|
|
1
|
+
# Any ./config/initializers/*.rb files will when the app starts up on the server.
|
2
|
+
# To load code on the client (or client and server), you can use the
|
3
|
+
# config/initializers folder in a component in the app directory. This folder
|
4
|
+
# is only for things that are server only. (Usually for things like config)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'sample integration test', type: :feature do
|
4
|
+
# An example integration spec, this will only be run if ENV['BROWSER'] is
|
5
|
+
# specified. Current values for ENV['BROWSER'] are 'firefox' and 'phantom'
|
6
|
+
it 'should load the page' do
|
7
|
+
visit '/'
|
8
|
+
|
9
|
+
expect(page).to have_content('Home')
|
10
|
+
end
|
11
|
+
end
|
data/spec/sample_spec.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Volt sets up rspec and capybara for testing.
|
2
|
+
require 'volt/spec/setup'
|
3
|
+
|
4
|
+
# When testing Volt component gems, we boot up a dummy app first to run the
|
5
|
+
# test in, so we have access to Volt itself.
|
6
|
+
dummy_app_path = File.join(File.dirname(__FILE__), 'dummy')
|
7
|
+
Volt.spec_setup(dummy_app_path)
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.run_all_when_everything_filtered = true
|
11
|
+
config.filter_run :focus
|
12
|
+
|
13
|
+
# Run specs in random order to surface order dependencies. If you find an
|
14
|
+
# order dependency and want to debug it, you can fix the order by providing
|
15
|
+
# the seed, which is printed after each run.
|
16
|
+
# --seed 1234
|
17
|
+
config.order = 'random'
|
18
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'volt/easypiechart/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "volt-easypiechart"
|
8
|
+
spec.version = Volt::Easypiechart::VERSION
|
9
|
+
spec.authors = ["Matt Hale"]
|
10
|
+
spec.email = ["matt.hale.0@gmail.com"]
|
11
|
+
spec.summary = %q{Include the Easy Pie Chart JS library into your Volt project.}
|
12
|
+
spec.description = 'A Volt component to use the EasyPieChart jQuery plugin.'
|
13
|
+
spec.homepage = ''
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency 'volt-watch', '~> 0.1.0'
|
22
|
+
|
23
|
+
spec.add_development_dependency "volt", "~> 0.9.5"
|
24
|
+
spec.add_development_dependency "rake"
|
25
|
+
|
26
|
+
# Testing gems
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.2.0'
|
28
|
+
spec.add_development_dependency 'opal-rspec', '~> 0.4.2'
|
29
|
+
spec.add_development_dependency 'capybara', '~> 2.4.4'
|
30
|
+
spec.add_development_dependency 'selenium-webdriver', '~> 2.47.0'
|
31
|
+
spec.add_development_dependency 'chromedriver-helper', '~> 1.0.0'
|
32
|
+
spec.add_development_dependency 'poltergeist', '~> 1.6.0'
|
33
|
+
|
34
|
+
# Gems to run the dummy app
|
35
|
+
spec.add_development_dependency 'volt-mongo', '0.1.1'
|
36
|
+
spec.add_development_dependency 'volt-bootstrap', '~> 0.1.0'
|
37
|
+
spec.add_development_dependency 'volt-bootstrap_jumbotron_theme', '~> 0.1.0'
|
38
|
+
spec.add_development_dependency 'volt-user_templates', '~> 0.4.0'
|
39
|
+
spec.add_development_dependency 'thin', '~> 1.6.0'
|
40
|
+
|
41
|
+
end
|
metadata
ADDED
@@ -0,0 +1,292 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: volt-easypiechart
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matt Hale
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: volt-watch
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: volt
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.9.5
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.9.5
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 3.2.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 3.2.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: opal-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.4.2
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.4.2
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: capybara
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.4.4
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.4.4
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: selenium-webdriver
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.47.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.47.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: chromedriver-helper
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.0.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.0.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: poltergeist
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 1.6.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 1.6.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: volt-mongo
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - '='
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.1.1
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - '='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.1.1
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: volt-bootstrap
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: 0.1.0
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 0.1.0
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: volt-bootstrap_jumbotron_theme
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.1.0
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: 0.1.0
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: volt-user_templates
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: 0.4.0
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: 0.4.0
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: thin
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 1.6.0
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 1.6.0
|
209
|
+
description: A Volt component to use the EasyPieChart jQuery plugin.
|
210
|
+
email:
|
211
|
+
- matt.hale.0@gmail.com
|
212
|
+
executables: []
|
213
|
+
extensions: []
|
214
|
+
extra_rdoc_files: []
|
215
|
+
files:
|
216
|
+
- ".gitignore"
|
217
|
+
- ".rspec"
|
218
|
+
- CODE_OF_CONDUCT.md
|
219
|
+
- Gemfile
|
220
|
+
- LICENSE.txt
|
221
|
+
- README.md
|
222
|
+
- Rakefile
|
223
|
+
- app/easypiechart/assets/js/jquery.easypiechart.js
|
224
|
+
- app/easypiechart/config/dependencies.rb
|
225
|
+
- app/easypiechart/config/initializers/boot.rb
|
226
|
+
- app/easypiechart/config/routes.rb
|
227
|
+
- app/easypiechart/controllers/main_controller.rb
|
228
|
+
- app/easypiechart/views/main/index.html
|
229
|
+
- lib/volt/easypiechart.rb
|
230
|
+
- lib/volt/easypiechart/version.rb
|
231
|
+
- spec/dummy/.gitignore
|
232
|
+
- spec/dummy/README.md
|
233
|
+
- spec/dummy/app/main/assets/css/app.css.scss
|
234
|
+
- spec/dummy/app/main/config/dependencies.rb
|
235
|
+
- spec/dummy/app/main/config/initializers/boot.rb
|
236
|
+
- spec/dummy/app/main/config/routes.rb
|
237
|
+
- spec/dummy/app/main/controllers/main_controller.rb
|
238
|
+
- spec/dummy/app/main/models/user.rb
|
239
|
+
- spec/dummy/app/main/views/main/about.html
|
240
|
+
- spec/dummy/app/main/views/main/index.html
|
241
|
+
- spec/dummy/app/main/views/main/main.html
|
242
|
+
- spec/dummy/config.ru
|
243
|
+
- spec/dummy/config/app.rb
|
244
|
+
- spec/dummy/config/base/index.html
|
245
|
+
- spec/dummy/config/initializers/boot.rb
|
246
|
+
- spec/integration/sample_integration_spec.rb
|
247
|
+
- spec/sample_spec.rb
|
248
|
+
- spec/spec_helper.rb
|
249
|
+
- volt-easypiechart.gemspec
|
250
|
+
homepage: ''
|
251
|
+
licenses:
|
252
|
+
- MIT
|
253
|
+
metadata: {}
|
254
|
+
post_install_message:
|
255
|
+
rdoc_options: []
|
256
|
+
require_paths:
|
257
|
+
- lib
|
258
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
259
|
+
requirements:
|
260
|
+
- - ">="
|
261
|
+
- !ruby/object:Gem::Version
|
262
|
+
version: '0'
|
263
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
264
|
+
requirements:
|
265
|
+
- - ">="
|
266
|
+
- !ruby/object:Gem::Version
|
267
|
+
version: '0'
|
268
|
+
requirements: []
|
269
|
+
rubyforge_project:
|
270
|
+
rubygems_version: 2.4.5.1
|
271
|
+
signing_key:
|
272
|
+
specification_version: 4
|
273
|
+
summary: Include the Easy Pie Chart JS library into your Volt project.
|
274
|
+
test_files:
|
275
|
+
- spec/dummy/.gitignore
|
276
|
+
- spec/dummy/README.md
|
277
|
+
- spec/dummy/app/main/assets/css/app.css.scss
|
278
|
+
- spec/dummy/app/main/config/dependencies.rb
|
279
|
+
- spec/dummy/app/main/config/initializers/boot.rb
|
280
|
+
- spec/dummy/app/main/config/routes.rb
|
281
|
+
- spec/dummy/app/main/controllers/main_controller.rb
|
282
|
+
- spec/dummy/app/main/models/user.rb
|
283
|
+
- spec/dummy/app/main/views/main/about.html
|
284
|
+
- spec/dummy/app/main/views/main/index.html
|
285
|
+
- spec/dummy/app/main/views/main/main.html
|
286
|
+
- spec/dummy/config.ru
|
287
|
+
- spec/dummy/config/app.rb
|
288
|
+
- spec/dummy/config/base/index.html
|
289
|
+
- spec/dummy/config/initializers/boot.rb
|
290
|
+
- spec/integration/sample_integration_spec.rb
|
291
|
+
- spec/sample_spec.rb
|
292
|
+
- spec/spec_helper.rb
|