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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f916b6d266bd3d1b619294f386a48854bc949481199c16368bf528e6b4e84887
4
- data.tar.gz: 5b5db4f3cede61d0f236ed7919e5811f6cb3748c0ef128e3aa0d95a9503224c2
3
+ metadata.gz: a38d6c19bc55d161fd785701d9580bdff7e8b80596b18d0f48ec91fe261ca440
4
+ data.tar.gz: 485df1ef783421cb9efd765c314e676f194b59a08ec77b4b6d50a0e198e17011
5
5
  SHA512:
6
- metadata.gz: 1f570ebc5fb4044ded6e41650cf86c25b0151e1ca99baed85d6b36e9eea268be457226b73980822f898c8629e425089b0ce65ff076c0b22a3ebbebf431251b44
7
- data.tar.gz: d6c65f73a2416454da45619311da7459a36965a8d2d00f237867dd61dd839526bec97828b32fc320123c4790d9d09b4c7e1b73b8e460fe03e534e25999d85af7
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
@@ -1,3 +1,7 @@
1
+ # 3.4.0 / 2023-01-08
2
+
3
+ * [ENHANCEMENT] Update GithubStats dep
4
+
1
5
  # 3.3.1 / 2021-02-06
2
6
 
3
7
  * [BUGFIX] Actually bump githubstats dep
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2014 Les Aker
3
+ Copyright (c) 2023 Les Aker
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
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
- [![Build Status](https://img.shields.io/travis/com/akerl/githubchart.svg)](https://travis-ci.com/akerl/githubchart)
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
@@ -11,4 +11,4 @@ RuboCop::RakeTask.new(:rubocop) do |task|
11
11
  task.fail_on_error = true
12
12
  end
13
13
 
14
- task default: [:spec, :rubocop, :build, :install]
14
+ task default: %i[spec rubocop build install]
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 = "Uses GithubStats to grab Github contributions scores and converts that into an SVG"
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.2.0'
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.3'
24
- s.add_development_dependency 'rake', '~> 13.0.0'
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
-
@@ -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
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Define the version
3
3
  module GithubChart
4
- VERSION = '3.3.1'.freeze
4
+ VERSION = '3.4.0'.freeze
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -1,11 +1,2 @@
1
- if ENV['CI'] == 'true'
2
- require 'simplecov'
3
- require 'codecov'
4
- SimpleCov.formatter = SimpleCov::Formatter::Codecov
5
- SimpleCov.start do
6
- add_filter '/spec/'
7
- end
8
- end
9
-
10
1
  require 'rspec'
11
2
  require 'githubchart'
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.3.1
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: 2021-02-06 00:00:00.000000000 Z
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.2.0
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.2.0
26
+ version: 3.3.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: svgplot
28
+ name: matrix
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0
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: 1.0.0
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: rake
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: 3.9.0
90
- type: :development
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: 3.9.0
54
+ version: 1.0.0
97
55
  - !ruby/object:Gem::Dependency
98
- name: fuubar
56
+ name: goodcop
99
57
  requirement: !ruby/object:Gem::Requirement
100
58
  requirements:
101
59
  - - "~>"
102
60
  - !ruby/object:Gem::Version
103
- version: 2.5.0
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: 2.5.0
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
- - ".circle-ruby"
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
- post_install_message:
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.1.2
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
@@ -1,4 +0,0 @@
1
- 2.6.1
2
- 2.5.3
3
- 2.4.5
4
- 2.3.8
data/.prospectus DELETED
@@ -1,11 +0,0 @@
1
- my_slug = 'akerl/githubchart'
2
-
3
- Prospectus.extra_dep('file', 'prospectus_travis')
4
- Prospectus.extra_dep('file', 'prospectus_gems')
5
-
6
- item do
7
- noop
8
-
9
- extend ProspectusGems::Gemspec.new
10
- extend ProspectusTravis::Build.new(my_slug)
11
- end
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=