githubchart 1.0.0 → 1.0.1

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: 7c544b4f0fd66373cb38345f8f3fe6ac60e712df
4
- data.tar.gz: 196864183c529d0eb60803a7675dcb9820f757ba
3
+ metadata.gz: 395944f11ba570998b00d3277669cf9d6a5edf31
4
+ data.tar.gz: 343313a57889958fe83eee9ed1db4821ad60010d
5
5
  SHA512:
6
- metadata.gz: ce0ea0106dae1f8ea10d26fc02b735dcf466b65685fbe1b774c8132225535b93e8df63e56538f202d40625058a56fab5d6944181b6d8ec1f27ba876b52895c07
7
- data.tar.gz: 806bc1ce294658b869bf87a408ba74a582bdff50273d637032fc3418cade0cca42976bb187390915b2a86d5e1a83d1f518b4da414d493f9c1e8182feeb95f0ff
6
+ metadata.gz: c8d457b01d2190d65934c70b5b6fbd9ac5ad29b87958155cc76b6d55164f3ffe3c9c1258829ae34954aa12bd4e8c42cda355e91004b77bc1e27979a4b4689107
7
+ data.tar.gz: a0a89142e56486ae2555badee27b07adfe86a80e621c5879305c0fa7b017160891fbcd59abb558be3a6fa57545911b5461314b8a41c9b8d561d9ea00a1a1131b
data/.travis.yml CHANGED
@@ -2,8 +2,10 @@ language: ruby
2
2
  cache: bundler
3
3
  sudo: false
4
4
  rvm:
5
+ - 2.2.2
6
+ - 2.2.1
5
7
  - 2.2.0
6
- - 2.1.5
8
+ - 2.1.6
7
9
  - 2.0.0-p598
8
10
  - 1.9.3-p551
9
11
  notifications:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 1.0.1 / 2015-10-20
2
+
3
+ * [BUGFIX] Fix month labels for parity with GitHub
4
+ * [ENHANCEMENT] Link to @2016rshah's awesome service for hosted SVGs
5
+
1
6
  # 1.0.0 / 2015-01-25
2
7
 
3
8
  * [ENHANCEMENT] Stabilized API
data/README.md CHANGED
@@ -24,6 +24,10 @@ If you don't provide a file path, the resulting SVG will be printed to stdout.
24
24
 
25
25
  To modify the color scheme used, you can provide `-c SCHEME`. For example, `githubchart -c halloween` uses GitHub's halloween colors. Use `-s` to list the available schemes.
26
26
 
27
+ ### Hosted SVG
28
+
29
+ A hosted service for loading these SVGs was made by @2016rshah: http://ghchart.rshah.io/ ([source code](https://github.com/2016rshah/githubchart-api))
30
+
27
31
  ## Installation
28
32
 
29
33
  gem install githubchart
data/githubchart.gemspec CHANGED
@@ -16,13 +16,13 @@ Gem::Specification.new do |s|
16
16
  s.test_files = `git ls-files spec/*`.split
17
17
  s.executables = ['githubchart']
18
18
 
19
- s.add_runtime_dependency 'githubstats', '~> 0.2.16'
19
+ s.add_runtime_dependency 'githubstats', '~> 1.1.0'
20
20
  s.add_runtime_dependency 'svgplot', '~> 0.2.0'
21
21
 
22
- s.add_development_dependency 'rubocop', '~> 0.28.0'
22
+ s.add_development_dependency 'rubocop', '~> 0.34.0'
23
23
  s.add_development_dependency 'rake', '~> 10.4.0'
24
- s.add_development_dependency 'coveralls', '~> 0.7.1'
25
- s.add_development_dependency 'rspec', '~> 3.1.0'
24
+ s.add_development_dependency 'coveralls', '~> 0.8.0'
25
+ s.add_development_dependency 'rspec', '~> 3.3.0'
26
26
  s.add_development_dependency 'fuubar', '~> 2.0.0'
27
27
  end
28
28
 
@@ -23,6 +23,8 @@ module GithubChart
23
23
 
24
24
  private
25
25
 
26
+ # rubocop:disable Style/HashSyntax, Lint/UnneededDisable
27
+
26
28
  ##
27
29
  # Define style for weekday labels
28
30
 
@@ -53,6 +55,8 @@ module GithubChart
53
55
  }
54
56
  end
55
57
 
58
+ # rubocop:enable Style/HashSyntax, Lint/UnneededDisable
59
+
56
60
  def svg_add_points(grid, chart)
57
61
  grid.each_with_index do |point, y, x|
58
62
  next if point.score == -1
@@ -89,7 +93,7 @@ module GithubChart
89
93
 
90
94
  def svg_add_months(chart)
91
95
  offsets = svg_get_month_offsets
92
- offsets.shift if offsets.take(2).map(&:last) == [0, 1]
96
+ offsets.shift if [1, 2].include? offsets[1].last
93
97
  offsets.each do |month, offset|
94
98
  next if offset > 50
95
99
  chart.text(13 * offset + 14, 9, style: SVG_MONTH_STYLE) { raw month }
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Define the version
3
3
  module GithubChart
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.1'
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: 1.0.0
4
+ version: 1.0.1
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-25 00:00:00.000000000 Z
11
+ date: 2015-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: githubstats
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.16
19
+ version: 1.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.16
26
+ version: 1.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: svgplot
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.28.0
47
+ version: 0.34.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.28.0
54
+ version: 0.34.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -72,28 +72,28 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.7.1
75
+ version: 0.8.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.7.1
82
+ version: 0.8.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 3.1.0
89
+ version: 3.3.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 3.1.0
96
+ version: 3.3.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: fuubar
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  version: '0'
157
157
  requirements: []
158
158
  rubyforge_project:
159
- rubygems_version: 2.4.5
159
+ rubygems_version: 2.4.5.1
160
160
  signing_key:
161
161
  specification_version: 4
162
162
  summary: Generate an SVG of Github contributions data