githubchart 3.3.1 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +46 -0
- data/CHANGELOG.md +4 -0
- data/LICENSE +1 -1
- data/README.md +1 -2
- data/Rakefile +1 -1
- data/githubchart.gemspec +5 -10
- data/lib/githubchart/svg.rb +6 -6
- data/lib/githubchart/version.rb +1 -1
- data/spec/spec_helper.rb +0 -9
- metadata +22 -69
- data/.circle-ruby +0 -4
- data/.prospectus +0 -11
- data/.travis.yml +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a38d6c19bc55d161fd785701d9580bdff7e8b80596b18d0f48ec91fe261ca440
|
4
|
+
data.tar.gz: 485df1ef783421cb9efd765c314e676f194b59a08ec77b4b6d50a0e198e17011
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37d1f4e76a675936202808bd286d048a6a19fa1c4859f3cf036e9beedb5cd4b7cd7b410fbb6c4f035b521c52dd509a01e77c5f596040faa5db558e60755aa8d1
|
7
|
+
data.tar.gz: eb58e9dee76e7f219954c36e0d6de5aa0ceec207ddf69c1833d19bb81c0eb9e34e76cf4101283833c22db5ecfaadc2bd5cf41b1ff4fb0c9201bf0f6a487196d7
|
@@ -0,0 +1,46 @@
|
|
1
|
+
name: Build
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
push:
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
name: Build
|
8
|
+
runs-on: ubuntu-22.04
|
9
|
+
permissions:
|
10
|
+
contents: write
|
11
|
+
steps:
|
12
|
+
- name: Checkout
|
13
|
+
uses: actions/checkout@v3
|
14
|
+
with:
|
15
|
+
submodules: recursive
|
16
|
+
- uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: '3.1'
|
19
|
+
bundler-cache: true
|
20
|
+
- name: Build
|
21
|
+
run: bundle exec rake
|
22
|
+
- name: Release
|
23
|
+
if: github.ref_type == 'tag'
|
24
|
+
run: bundle exec rake release
|
25
|
+
env:
|
26
|
+
GEM_HOST_API_KEY: ${{ secrets.GEM_HOST_API_KEY }}
|
27
|
+
- name: Post to a Slack channel
|
28
|
+
if: ${{ failure() }}
|
29
|
+
uses: slackapi/slack-github-action@v1.23.0
|
30
|
+
env:
|
31
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
32
|
+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
|
33
|
+
with:
|
34
|
+
payload: |
|
35
|
+
{
|
36
|
+
"text": "*${{ github.repository }}*\nBuild failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
|
37
|
+
"blocks": [
|
38
|
+
{
|
39
|
+
"type": "section",
|
40
|
+
"text": {
|
41
|
+
"type": "mrkdwn",
|
42
|
+
"text": "*${{ github.repository }}*\nBuild failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
43
|
+
}
|
44
|
+
}
|
45
|
+
]
|
46
|
+
}
|
data/CHANGELOG.md
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -2,8 +2,7 @@ GithubChart
|
|
2
2
|
============
|
3
3
|
|
4
4
|
[![Gem Version](https://img.shields.io/gem/v/githubchart.svg)](https://rubygems.org/gems/githubchart)
|
5
|
-
[![
|
6
|
-
[![Coverage Status](https://img.shields.io/codecov/c/github/akerl/githubchart.svg)](https://codecov.io/github/akerl/githubchart)
|
5
|
+
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/akerl/githubchart/build.yml?branch=main)](https://github.com/akerl/githubchart/actions)
|
7
6
|
[![MIT Licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)
|
8
7
|
|
9
8
|
Generates an SVG of your Github contributions:
|
data/Rakefile
CHANGED
data/githubchart.gemspec
CHANGED
@@ -5,25 +5,20 @@ require 'githubchart/version'
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = 'githubchart'
|
7
7
|
s.version = GithubChart::VERSION
|
8
|
-
s.date = Time.now.strftime("%Y-%m-%d")
|
9
8
|
s.summary = 'Generate an SVG of Github contributions data'
|
10
|
-
s.description =
|
9
|
+
s.description = 'Uses GithubStats to grab Github contributions scores and converts that into an SVG'
|
11
10
|
s.authors = ['Les Aker']
|
12
11
|
s.email = 'me@lesaker.org'
|
13
12
|
s.homepage = 'https://github.com/akerl/githubchart'
|
14
13
|
s.license = 'MIT'
|
15
14
|
|
16
15
|
s.files = `git ls-files`.split
|
17
|
-
s.test_files = `git ls-files spec/*`.split
|
18
16
|
s.executables = ['githubchart']
|
19
17
|
|
20
|
-
s.add_runtime_dependency 'githubstats', '~> 3.
|
18
|
+
s.add_runtime_dependency 'githubstats', '~> 3.3.0'
|
19
|
+
s.add_runtime_dependency 'matrix', '~> 0.4.2'
|
21
20
|
s.add_runtime_dependency 'svgplot', '~> 1.0.0'
|
22
21
|
|
23
|
-
s.add_development_dependency 'goodcop', '~> 0.9.
|
24
|
-
s.
|
25
|
-
s.add_development_dependency 'codecov', '~> 0.1.1'
|
26
|
-
s.add_development_dependency 'rspec', '~> 3.9.0'
|
27
|
-
s.add_development_dependency 'fuubar', '~> 2.5.0'
|
22
|
+
s.add_development_dependency 'goodcop', '~> 0.9.7'
|
23
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
28
24
|
end
|
29
|
-
|
data/lib/githubchart/svg.rb
CHANGED
@@ -20,8 +20,8 @@ module GithubChart
|
|
20
20
|
|
21
21
|
def render_svg
|
22
22
|
grid = matrix
|
23
|
-
chart = SVGPlot.new(width: CUBE_SIZE * grid.column_size + X_PAD,
|
24
|
-
height: CUBE_SIZE * grid.row_size + Y_PAD)
|
23
|
+
chart = SVGPlot.new(width: (CUBE_SIZE * grid.column_size) + X_PAD,
|
24
|
+
height: (CUBE_SIZE * grid.row_size) + Y_PAD)
|
25
25
|
svg_add_points grid, chart
|
26
26
|
svg_add_weekdays chart
|
27
27
|
svg_add_months chart
|
@@ -30,8 +30,8 @@ module GithubChart
|
|
30
30
|
|
31
31
|
def render_svg_square
|
32
32
|
grid = matrix.minor(0, 7, -7, 7)
|
33
|
-
chart = SVGPlot.new(width: CUBE_SIZE * grid.column_size - 2,
|
34
|
-
height: CUBE_SIZE * grid.row_size - 2)
|
33
|
+
chart = SVGPlot.new(width: (CUBE_SIZE * grid.column_size) - 2,
|
34
|
+
height: (CUBE_SIZE * grid.row_size) - 2)
|
35
35
|
svg_add_points grid, chart, 0, 0
|
36
36
|
chart.to_s
|
37
37
|
end
|
@@ -81,7 +81,7 @@ module GithubChart
|
|
81
81
|
style = SVG_WEEKDAY_STYLE.dup
|
82
82
|
style[:display] = 'none' unless [1, 3, 5].include? index
|
83
83
|
shift = index > 3 ? 29 : 28
|
84
|
-
chart.text(0, CUBE_SIZE * index + shift, style: style) { raw letter }
|
84
|
+
chart.text(0, (CUBE_SIZE * index) + shift, style: style) { raw letter }
|
85
85
|
end
|
86
86
|
|
87
87
|
def svg_add_weekdays(chart)
|
@@ -104,7 +104,7 @@ module GithubChart
|
|
104
104
|
offsets.shift if [1, 2].include? offsets[1].last
|
105
105
|
offsets.each do |month, offset|
|
106
106
|
next if offset > 50
|
107
|
-
x = CUBE_SIZE * offset + X_PAD
|
107
|
+
x = (CUBE_SIZE * offset) + X_PAD
|
108
108
|
chart.text(x, 10, style: SVG_MONTH_STYLE) { raw month }
|
109
109
|
end
|
110
110
|
end
|
data/lib/githubchart/version.rb
CHANGED
data/spec/spec_helper.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: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: githubstats
|
@@ -16,98 +16,56 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.3.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: 3.
|
26
|
+
version: 3.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: matrix
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 0.4.2
|
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:
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: goodcop
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 0.9.3
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 0.9.3
|
40
|
+
version: 0.4.2
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 13.0.0
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 13.0.0
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: codecov
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 0.1.1
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.1.1
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rspec
|
42
|
+
name: svgplot
|
85
43
|
requirement: !ruby/object:Gem::Requirement
|
86
44
|
requirements:
|
87
45
|
- - "~>"
|
88
46
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
90
|
-
type: :
|
47
|
+
version: 1.0.0
|
48
|
+
type: :runtime
|
91
49
|
prerelease: false
|
92
50
|
version_requirements: !ruby/object:Gem::Requirement
|
93
51
|
requirements:
|
94
52
|
- - "~>"
|
95
53
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
54
|
+
version: 1.0.0
|
97
55
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
56
|
+
name: goodcop
|
99
57
|
requirement: !ruby/object:Gem::Requirement
|
100
58
|
requirements:
|
101
59
|
- - "~>"
|
102
60
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
61
|
+
version: 0.9.7
|
104
62
|
type: :development
|
105
63
|
prerelease: false
|
106
64
|
version_requirements: !ruby/object:Gem::Requirement
|
107
65
|
requirements:
|
108
66
|
- - "~>"
|
109
67
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
68
|
+
version: 0.9.7
|
111
69
|
description: Uses GithubStats to grab Github contributions scores and converts that
|
112
70
|
into an SVG
|
113
71
|
email: me@lesaker.org
|
@@ -116,12 +74,10 @@ executables:
|
|
116
74
|
extensions: []
|
117
75
|
extra_rdoc_files: []
|
118
76
|
files:
|
119
|
-
- ".
|
77
|
+
- ".github/workflows/build.yml"
|
120
78
|
- ".gitignore"
|
121
|
-
- ".prospectus"
|
122
79
|
- ".rspec"
|
123
80
|
- ".rubocop.yml"
|
124
|
-
- ".travis.yml"
|
125
81
|
- CHANGELOG.md
|
126
82
|
- Gemfile
|
127
83
|
- LICENSE
|
@@ -141,8 +97,9 @@ files:
|
|
141
97
|
homepage: https://github.com/akerl/githubchart
|
142
98
|
licenses:
|
143
99
|
- MIT
|
144
|
-
metadata:
|
145
|
-
|
100
|
+
metadata:
|
101
|
+
rubygems_mfa_required: 'true'
|
102
|
+
post_install_message:
|
146
103
|
rdoc_options: []
|
147
104
|
require_paths:
|
148
105
|
- lib
|
@@ -157,12 +114,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
114
|
- !ruby/object:Gem::Version
|
158
115
|
version: '0'
|
159
116
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
161
|
-
signing_key:
|
117
|
+
rubygems_version: 3.3.26
|
118
|
+
signing_key:
|
162
119
|
specification_version: 4
|
163
120
|
summary: Generate an SVG of Github contributions data
|
164
|
-
test_files:
|
165
|
-
- spec/examples/input.json
|
166
|
-
- spec/githubchart/svg_spec.rb
|
167
|
-
- spec/githubchart_spec.rb
|
168
|
-
- spec/spec_helper.rb
|
121
|
+
test_files: []
|
data/.circle-ruby
DELETED
data/.prospectus
DELETED
data/.travis.yml
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
dist: xenial
|
2
|
-
install:
|
3
|
-
- for i in $(cat .circle-ruby) ; do rvm install $i || exit 1 ; done
|
4
|
-
- for i in $(cat .circle-ruby) ; do rvm-exec $i bundle install || exit 1 ; done
|
5
|
-
script:
|
6
|
-
- for i in $(cat .circle-ruby) ; do rvm-exec $i bundle exec rake || exit 1 ; done
|
7
|
-
notifications:
|
8
|
-
email: false
|
9
|
-
slack:
|
10
|
-
secure: XOIlpE54Yq450PGd3VI7atmVplX+WRmz+karIxlC+PEWgEbE3G9lCuIKez8OvJ+bS357KEsyF9k2ZhmaxJvQXKtMgQn6I7zBmjBRPm9xAb/ynFujquGsjW+OMAiP/3elq8DS6yvVYUDWBDgRv6SxHF/rLKliuSh4S8NrnuTyfokoWx4i/dIBQyujU6kmRW+2DIfkSY1wTyyb7Qo9HFH3ekOeJrYg+bK2Sm5HSLK+ATKpJ8nWvLirK8KIsQbCSj+Hkt61yBC+3pst51EUI5CwlHF1qxLy9T/eezY+bnUD/0WwcJX10co6K62+qykvN/4pKqYubfSsnYVmU3sZgk0FfRfBNOaYwai6mbZxxcFn4kIUOYoGTML/NTe7bu9dbtbHAM751x/V/tFM1V4m6xap451WQoommuMIcOuGS/OgzeOkc12VQ0X5nXM0DA20MOZKlMUJR+XlYu6derwIvOEOPlazZq8Ta4LQNrMaqax5IzJVyNsSqXMsEkpXDVSpvkwdXeBMy6X02ozNQOrcefoGGLhAtrnewyJnchDxhIy/aG2TUYx6qMGi/zxGr+yKyev2Op3Qwg8FAhJ2Nk3Noa+Tm9ZErcfKhVykowGFYdBurD0M+9eouz4LRQP+JOfvUjmdduEZ9H+uzTou3OCr3pCj+6PLltQRT7C7hNz1YCzocUc=
|