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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ecd87617b3f21634b56adb1e6c14d51f94e9758
4
- data.tar.gz: d72dd7dd0549cafb640d544904f124a87b4dae99
3
+ metadata.gz: 7c544b4f0fd66373cb38345f8f3fe6ac60e712df
4
+ data.tar.gz: 196864183c529d0eb60803a7675dcb9820f757ba
5
5
  SHA512:
6
- metadata.gz: 2b44d82bb9fc2755ef2fd41e0441198b4201ee91f395d220705d1df337aef0f14f9d5994ee8b0b0a7ec88ee8df219a7a96e8ec7b48de80eedbeb952f4ac052bb
7
- data.tar.gz: 83bc6d54cdad7cdb3c353eda70baa18fb29d0dc241d3430d04d4a176e638a8ed43cfb591ed4808ff10884ac03bc9afd0aaade90d047d1adb42c28d2ba96b2d1c
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.1.2
5
- - 2.1.1
6
- - 2.1.0
7
- - 2.0.0
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
- - secure: dAnGdlErIXwcMIH0duRVahvVoVHwXHsF2I/SUhtu2ON4bibBqWV3hO0cqBl10Nt1+yjsEtp7J25GROGC1cokMaAdwSid4JH6IS3eAwgE/UjHrbp0ROsT+OfL/OUjNoCgC1HkGWnLk1qE0VKZkkhmMgTCqprIvpAXgVYelKL9/Q4=
15
+ - irc.oftc.net#akerl
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # 1.0.0 / 2015-01-25
2
+
3
+ * [ENHANCEMENT] Stabilized API
4
+
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
- GithubChart is released under the MIT License. See the bundled LICENSE file for details.
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.3'
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'
@@ -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
- fill: @colors[@stats.quartile(point.score)],
55
- :'shape-rendering' => 'crispedges',
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
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Define the version
3
3
  module GithubChart
4
- VERSION = '0.1.1'
4
+ VERSION = '1.0.0'
5
5
  end
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.1.1
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-04 00:00:00.000000000 Z
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.3
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.3
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.2.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