githubchart 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +6 -6
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/githubchart.gemspec +1 -1
- data/lib/githubchart/svg.rb +11 -6
- data/lib/githubchart/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c544b4f0fd66373cb38345f8f3fe6ac60e712df
|
4
|
+
data.tar.gz: 196864183c529d0eb60803a7675dcb9820f757ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce0ea0106dae1f8ea10d26fc02b735dcf466b65685fbe1b774c8132225535b93e8df63e56538f202d40625058a56fab5d6944181b6d8ec1f27ba876b52895c07
|
7
|
+
data.tar.gz: 806bc1ce294658b869bf87a408ba74a582bdff50273d637032fc3418cade0cca42976bb187390915b2a86d5e1a83d1f518b4da414d493f9c1e8182feeb95f0ff
|
data/.travis.yml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
language: ruby
|
2
2
|
cache: bundler
|
3
|
+
sudo: false
|
3
4
|
rvm:
|
4
|
-
- 2.
|
5
|
-
- 2.1.
|
6
|
-
- 2.
|
7
|
-
-
|
8
|
-
- 1.9.3
|
5
|
+
- 2.2.0
|
6
|
+
- 2.1.5
|
7
|
+
- 2.0.0-p598
|
8
|
+
- 1.9.3-p551
|
9
9
|
notifications:
|
10
10
|
email: false
|
11
11
|
irc:
|
12
12
|
template:
|
13
13
|
- "%{repository}/%{branch}/%{build_number}: %{message} -- %{build_url}"
|
14
14
|
channels:
|
15
|
-
-
|
15
|
+
- irc.oftc.net#akerl
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
@@ -30,5 +30,5 @@ To modify the color scheme used, you can provide `-c SCHEME`. For example, `gith
|
|
30
30
|
|
31
31
|
## License
|
32
32
|
|
33
|
-
|
33
|
+
githubchart is released under the MIT License. See the bundled LICENSE file for details.
|
34
34
|
|
data/githubchart.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.executables = ['githubchart']
|
18
18
|
|
19
19
|
s.add_runtime_dependency 'githubstats', '~> 0.2.16'
|
20
|
-
s.add_runtime_dependency 'svgplot', '~> 0.0
|
20
|
+
s.add_runtime_dependency 'svgplot', '~> 0.2.0'
|
21
21
|
|
22
22
|
s.add_development_dependency 'rubocop', '~> 0.28.0'
|
23
23
|
s.add_development_dependency 'rake', '~> 10.4.0'
|
data/lib/githubchart/svg.rb
CHANGED
@@ -46,15 +46,20 @@ module GithubChart
|
|
46
46
|
:display => 'block'
|
47
47
|
}
|
48
48
|
|
49
|
+
def svg_point_style(point)
|
50
|
+
{
|
51
|
+
fill: @colors[@stats.quartile(point.score)],
|
52
|
+
:'shape-rendering' => 'crispedges'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
49
56
|
def svg_add_points(grid, chart)
|
50
57
|
grid.each_with_index do |point, y, x|
|
51
58
|
next if point.score == -1
|
52
59
|
chart.rectangle(
|
53
60
|
(x * 13) + 14, (y * 13) + 14, 11, 11,
|
54
|
-
|
55
|
-
:
|
56
|
-
:'data-score' => point.score,
|
57
|
-
:'data-data' => point.date
|
61
|
+
data: { score: point.score, date: point.date },
|
62
|
+
style: svg_point_style(point)
|
58
63
|
)
|
59
64
|
end
|
60
65
|
end
|
@@ -64,7 +69,7 @@ module GithubChart
|
|
64
69
|
letter = point.date.strftime('%a')[0]
|
65
70
|
style = SVG_WEEKDAY_STYLE.clone
|
66
71
|
style[:display] = 'none' unless [1, 3, 5].include? index
|
67
|
-
chart.text(4, 13 * index + 23, style) { raw letter }
|
72
|
+
chart.text(4, 13 * index + 23, style: style) { raw letter }
|
68
73
|
end
|
69
74
|
|
70
75
|
def svg_add_weekdays(chart)
|
@@ -87,7 +92,7 @@ module GithubChart
|
|
87
92
|
offsets.shift if offsets.take(2).map(&:last) == [0, 1]
|
88
93
|
offsets.each do |month, offset|
|
89
94
|
next if offset > 50
|
90
|
-
chart.text(13 * offset + 14, 9, SVG_MONTH_STYLE) { raw month }
|
95
|
+
chart.text(13 * offset + 14, 9, style: SVG_MONTH_STYLE) { raw month }
|
91
96
|
end
|
92
97
|
end
|
93
98
|
end
|
data/lib/githubchart/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: githubchart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: githubstats
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.0
|
33
|
+
version: 0.2.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.0
|
40
|
+
version: 0.2.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubocop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,6 +120,7 @@ files:
|
|
120
120
|
- ".rspec"
|
121
121
|
- ".rubocop.yml"
|
122
122
|
- ".travis.yml"
|
123
|
+
- CHANGELOG.md
|
123
124
|
- Gemfile
|
124
125
|
- LICENSE
|
125
126
|
- README.md
|
@@ -155,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
155
156
|
version: '0'
|
156
157
|
requirements: []
|
157
158
|
rubyforge_project:
|
158
|
-
rubygems_version: 2.
|
159
|
+
rubygems_version: 2.4.5
|
159
160
|
signing_key:
|
160
161
|
specification_version: 4
|
161
162
|
summary: Generate an SVG of Github contributions data
|