locat 0.1.0
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/.ruby +48 -0
- data/COPYING.rdoc +33 -0
- data/README.rdoc +55 -0
- data/bin/locat +3 -0
- data/lib/locat.rb +14 -0
- data/lib/locat/command.rb +129 -0
- data/lib/locat/counter.rb +155 -0
- data/lib/locat/gitloc.rb +139 -0
- data/lib/locat/matcher.rb +39 -0
- data/lib/locat/template.rb +104 -0
- data/lib/locat/template/graphael.rhtml +257 -0
- data/lib/locat/template/highchart.rhtml +249 -0
- data/lib/locat/template/javascript.js +55 -0
- metadata +102 -0
@@ -0,0 +1,55 @@
|
|
1
|
+
|
2
|
+
function create_chart(chart_id, chart_table, chart_type){
|
3
|
+
options = chart_options(chart_id, chart_table, chart_type);
|
4
|
+
return(new Highcharts.Chart(options));
|
5
|
+
};
|
6
|
+
|
7
|
+
function chart_options(chart_id, chart_table, chart_type){
|
8
|
+
options = {
|
9
|
+
chart: {
|
10
|
+
renderTo: 'container-' + chart_id,
|
11
|
+
type: chart_type
|
12
|
+
},
|
13
|
+
title: {
|
14
|
+
text: chart_id
|
15
|
+
},
|
16
|
+
tooltip: {
|
17
|
+
enable: true
|
18
|
+
},
|
19
|
+
xAxis: {
|
20
|
+
categories: []
|
21
|
+
},
|
22
|
+
yAxis: {
|
23
|
+
title: {
|
24
|
+
text: '' //chart_id
|
25
|
+
}
|
26
|
+
},
|
27
|
+
series: []
|
28
|
+
};
|
29
|
+
|
30
|
+
$.each(chart_table, function(lineNo, line) {
|
31
|
+
// header line containes categories
|
32
|
+
if (lineNo == 0) {
|
33
|
+
$.each(line, function(itemNo, item) {
|
34
|
+
if (itemNo > 0) options.xAxis.categories.push(item);
|
35
|
+
});
|
36
|
+
}
|
37
|
+
// the rest of the lines contain data with their name in the first position
|
38
|
+
else {
|
39
|
+
var series = {
|
40
|
+
data: []
|
41
|
+
};
|
42
|
+
$.each(line, function(itemNo, item) {
|
43
|
+
if (itemNo == 0) {
|
44
|
+
series.name = item;
|
45
|
+
//series.type = chart_type;
|
46
|
+
} else {
|
47
|
+
series.data.push(parseFloat(item));
|
48
|
+
}
|
49
|
+
});
|
50
|
+
options.series.push(series);
|
51
|
+
}
|
52
|
+
});
|
53
|
+
return(options);
|
54
|
+
};
|
55
|
+
|
metadata
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: locat
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 0.1.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Thomas Sawyer
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-07-08 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: ansi
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
type: :runtime
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: detroit
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "0"
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: qed
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: "0"
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id003
|
48
|
+
description: LOCat is a customizable Line-Of-Code metric system. LOC might not be the most useful metric in the universe but it still provide useful inforamtion and can be a lot of fun.
|
49
|
+
email: transfire@gmail.com
|
50
|
+
executables:
|
51
|
+
- locat
|
52
|
+
extensions: []
|
53
|
+
|
54
|
+
extra_rdoc_files:
|
55
|
+
- README.rdoc
|
56
|
+
files:
|
57
|
+
- .ruby
|
58
|
+
- bin/locat
|
59
|
+
- lib/locat/command.rb
|
60
|
+
- lib/locat/counter.rb
|
61
|
+
- lib/locat/gitloc.rb
|
62
|
+
- lib/locat/matcher.rb
|
63
|
+
- lib/locat/template/graphael.rhtml
|
64
|
+
- lib/locat/template/highchart.rhtml
|
65
|
+
- lib/locat/template/javascript.js
|
66
|
+
- lib/locat/template.rb
|
67
|
+
- lib/locat.rb
|
68
|
+
- README.rdoc
|
69
|
+
- COPYING.rdoc
|
70
|
+
homepage: http://rubyworks.github.com/locat
|
71
|
+
licenses:
|
72
|
+
- BSD-2-Clause
|
73
|
+
- BSD-2-Clause
|
74
|
+
post_install_message:
|
75
|
+
rdoc_options:
|
76
|
+
- --title
|
77
|
+
- LOCat API
|
78
|
+
- --main
|
79
|
+
- README.rdoc
|
80
|
+
require_paths:
|
81
|
+
- lib
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: "0"
|
88
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: "0"
|
94
|
+
requirements: []
|
95
|
+
|
96
|
+
rubyforge_project: locat
|
97
|
+
rubygems_version: 1.8.2
|
98
|
+
signing_key:
|
99
|
+
specification_version: 3
|
100
|
+
summary: Lines of Code Attache
|
101
|
+
test_files: []
|
102
|
+
|