From 6c30b85451fd8160d39bd59c9712879e9de4f1b5 Mon Sep 17 00:00:00 2001 From: Nicola Genesin Date: Thu, 27 Feb 2020 00:31:07 +0000 Subject: [PATCH 1/8] Make src https to avoid Mixed Content warnings on https websites --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 733eeb2..9f8d332 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# [Github Chart API](http://ghchart.rshah.org) +# [Github Chart API](https://ghchart.rshah.org) Make this: -![2016rshah's Github chart](http://ghchart.rshah.org/2016rshah) +![2016rshah's Github chart](https://ghchart.rshah.org/2016rshah) with this: - 2016rshah's Github chart + 2016rshah's Github chart Of course you can replace `2016rshah` with your own github username. @@ -14,15 +14,15 @@ Of course you can replace `2016rshah` with your own github username. Being able to look back through the year and see how productive you've been is a great feeling, and that little green calendar is honestly one of my favorite data visualizations. But there's no reason it should be constrained to only living on the github website, you should be able to put it anywhere you want! -For example, I personally think it would really spiff up a [personal website](http://www.rshah.org/). +For example, I personally think it would really spiff up a [personal website](https://www.rshah.org/). # Color Schemes We also support custom color schemes! You can provide any base color and we will make shades for the chart. Just visit `http://ghchart.rshah.org//2016rshah` and replace `` with your hex color code, not including the leading hashtag. For example if you want a blue-themed chart that is based around the hex color `#409ba5`, you can visit the following route: - 2016rshah's Blue Github Chart + 2016rshah's Blue Github Chart -![2016rshah's Blue Github Chart](http://ghchart.rshah.org/409ba5/2016rshah) +![2016rshah's Blue Github Chart](https://ghchart.rshah.org/409ba5/2016rshah) # Contributing @@ -32,7 +32,7 @@ If you see anything that can be improved send in an issue/PR. # See also The [github repo](https://github.com/2016rshah/githubchart-api) -The [actual site](http://ghchart.rshah.org) +The [actual site](https://ghchart.rshah.org) This [ruby gem](https://github.com/akerl/githubchart) From 5c3acdff3dd35fceda2929d278c957202ec37774 Mon Sep 17 00:00:00 2001 From: Nicola Genesin Date: Thu, 27 Feb 2020 00:32:52 +0000 Subject: [PATCH 2/8] Missing change from prev commit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9f8d332..72aacb2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ For example, I personally think it would really spiff up a [personal website](ht # Color Schemes -We also support custom color schemes! You can provide any base color and we will make shades for the chart. Just visit `http://ghchart.rshah.org//2016rshah` and replace `` with your hex color code, not including the leading hashtag. For example if you want a blue-themed chart that is based around the hex color `#409ba5`, you can visit the following route: +We also support custom color schemes! You can provide any base color and we will make shades for the chart. Just visit `https://ghchart.rshah.org//2016rshah` and replace `` with your hex color code, not including the leading hashtag. For example if you want a blue-themed chart that is based around the hex color `#409ba5`, you can visit the following route: 2016rshah's Blue Github Chart From 9903b415e93cd79d119f53b87b3b85db237a5734 Mon Sep 17 00:00:00 2001 From: Rushi Shah <2016rshah@gmail.com> Date: Sat, 6 Feb 2021 17:12:32 -0500 Subject: [PATCH 3/8] Updated ruby version to get latest gems --- Gemfile | 6 +++--- Gemfile.lock | 29 +++++++++++++++-------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/Gemfile b/Gemfile index 9b5052f..746ce0d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source 'https://rubygems.org' +source 'http://rubygems.org' +ruby "2.6.6" gem 'sinatra' - -gem 'githubchart' +gem 'githubchart', '>= 3.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index b1b69d8..634e04d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,18 +1,16 @@ GEM - remote: https://rubygems.org/ + remote: http://rubygems.org/ specs: basiccache (1.0.0) - curb (0.8.8) - githubchart (1.0.1) - githubstats (~> 1.1.0) - svgplot (~> 0.2.0) - githubstats (1.1.0) + githubchart (3.2.0) + githubstats (~> 3.1.0) + svgplot (~> 1.0.0) + githubstats (3.1.0) basiccache (~> 1.0.0) - curb (~> 0.8.6) - nokogiri (~> 1.6.5) - mini_portile (0.6.2) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) + nokogiri (~> 1.10.8) + mini_portile2 (2.4.0) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) rack (1.6.4) rack-protection (1.5.3) rack @@ -20,15 +18,18 @@ GEM rack (~> 1.4) rack-protection (~> 1.4) tilt (>= 1.3, < 3) - svgplot (0.2.0) + svgplot (1.0.0) tilt (2.0.1) PLATFORMS ruby DEPENDENCIES - githubchart + githubchart (>= 3.2.0) sinatra +RUBY VERSION + ruby 2.6.6p146 + BUNDLED WITH - 1.10.6 + 1.17.3 From c9b06792f806027a016af032de7a583acd9e518d Mon Sep 17 00:00:00 2001 From: Rushi Shah <2016rshah@gmail.com> Date: Sun, 7 Feb 2021 00:26:59 -0500 Subject: [PATCH 4/8] Updated code to reflect latest gem interface --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- app.rb | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 746ce0d..d9a33ec 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'http://rubygems.org' ruby "2.6.6" gem 'sinatra' -gem 'githubchart', '>= 3.2.0' +gem 'githubchart', '>= 3.3.1' diff --git a/Gemfile.lock b/Gemfile.lock index 634e04d..5f0f96a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,10 +2,10 @@ GEM remote: http://rubygems.org/ specs: basiccache (1.0.0) - githubchart (3.2.0) - githubstats (~> 3.1.0) + githubchart (3.3.1) + githubstats (~> 3.2.0) svgplot (~> 1.0.0) - githubstats (3.1.0) + githubstats (3.2.0) basiccache (~> 1.0.0) nokogiri (~> 1.10.8) mini_portile2 (2.4.0) @@ -25,7 +25,7 @@ PLATFORMS ruby DEPENDENCIES - githubchart (>= 3.2.0) + githubchart (>= 3.3.1) sinatra RUBY VERSION diff --git a/app.rb b/app.rb index 84b9f0c..dd7fbdd 100644 --- a/app.rb +++ b/app.rb @@ -18,7 +18,7 @@ headers 'Cache-Control' => "max-age=#{60*60*24}" username = params[:username].chomp('.svg') #Chomp off the .svg extension to be backwards compatible - svg = GithubChart.new(user: username).svg + svg = GithubChart.new(user: username).render('svg') stream do |out| out << svg end @@ -39,7 +39,7 @@ scheme = ['#EEEEEE', lighten_color(base_color, 0.3), lighten_color(base_color, 0.2), base_color, darken_color(base_color, 0.8)] end - svg = GithubChart.new(user: username, colors: scheme).svg + svg = GithubChart.new(user: username, colors: scheme).render('svg') stream do |out| out << svg end From 1d80c2f6b600c3fd8f0350d814e4e7185a0224bf Mon Sep 17 00:00:00 2001 From: Rushi Shah <2016rshah@gmail.com> Date: Sun, 8 Jan 2023 16:39:28 -0500 Subject: [PATCH 5/8] Updated dependencies to fix how we scrape github's new HTML --- Gemfile | 2 +- Gemfile.lock | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index d9a33ec..78ad5bb 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'http://rubygems.org' ruby "2.6.6" gem 'sinatra' -gem 'githubchart', '>= 3.3.1' +gem 'githubchart', '>= 3.4.0' diff --git a/Gemfile.lock b/Gemfile.lock index 5f0f96a..7f90e37 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,15 +2,19 @@ GEM remote: http://rubygems.org/ specs: basiccache (1.0.0) - githubchart (3.3.1) - githubstats (~> 3.2.0) + githubchart (3.4.0) + githubstats (~> 3.3.0) + matrix (~> 0.4.2) svgplot (~> 1.0.0) - githubstats (3.2.0) + githubstats (3.3.0) basiccache (~> 1.0.0) - nokogiri (~> 1.10.8) - mini_portile2 (2.4.0) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) + nokogiri (~> 1.13.10) + matrix (0.4.2) + mini_portile2 (2.8.1) + nokogiri (1.13.10) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) + racc (1.6.2) rack (1.6.4) rack-protection (1.5.3) rack @@ -25,7 +29,7 @@ PLATFORMS ruby DEPENDENCIES - githubchart (>= 3.3.1) + githubchart (>= 3.4.0) sinatra RUBY VERSION From 6c10536bc48ef1f9b827bf8404bf13c6f9102dd3 Mon Sep 17 00:00:00 2001 From: Rushi Shah <2016rshah@gmail.com> Date: Sun, 8 Jan 2023 16:45:54 -0500 Subject: [PATCH 6/8] Reminding myself the commands needed for future reference --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 72aacb2..d23003d 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ We also support custom color schemes! You can provide any base color and we will If you see anything that can be improved send in an issue/PR. +To get the code up and running, make sure ruby, etc. is properly installed, then run `bundle install`, then run `ruby app.rb` and visit `localhost:4567` in your browser. + # See also The [github repo](https://github.com/2016rshah/githubchart-api) From 3f35561f8278dbb82f287c889c567258a2e2224e Mon Sep 17 00:00:00 2001 From: Rushi Shah <2016rshah@gmail.com> Date: Wed, 19 Jul 2023 22:53:26 -0800 Subject: [PATCH 7/8] Lot of time reinstalling stuff for new laptop, but it should work now --- .ruby-version | 1 + Gemfile | 7 ++++--- Gemfile.lock | 22 ++++++++++++---------- README.md | 4 +++- 4 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..ef538c2 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.2 diff --git a/Gemfile b/Gemfile index 78ad5bb..d724e31 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,5 @@ source 'http://rubygems.org' -ruby "2.6.6" -gem 'sinatra' -gem 'githubchart', '>= 3.4.0' +ruby ">= 2.6.6" +gem 'sinatra', '~> 1.4.6' +gem 'githubchart', '>= 4.0.0' +gem 'webrick' diff --git a/Gemfile.lock b/Gemfile.lock index 7f90e37..88f8585 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,19 +2,19 @@ GEM remote: http://rubygems.org/ specs: basiccache (1.0.0) - githubchart (3.4.0) - githubstats (~> 3.3.0) + githubchart (4.0.0) + githubstats (~> 4.0.1) matrix (~> 0.4.2) svgplot (~> 1.0.0) - githubstats (3.3.0) + githubstats (4.0.1) basiccache (~> 1.0.0) - nokogiri (~> 1.13.10) + nokogiri (~> 1.15.3) matrix (0.4.2) - mini_portile2 (2.8.1) - nokogiri (1.13.10) - mini_portile2 (~> 2.8.0) + mini_portile2 (2.8.4) + nokogiri (1.15.3) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - racc (1.6.2) + racc (1.7.1) rack (1.6.4) rack-protection (1.5.3) rack @@ -24,13 +24,15 @@ GEM tilt (>= 1.3, < 3) svgplot (1.0.0) tilt (2.0.1) + webrick (1.8.1) PLATFORMS ruby DEPENDENCIES - githubchart (>= 3.4.0) - sinatra + githubchart (>= 4.0.0) + sinatra (~> 1.4.6) + webrick RUBY VERSION ruby 2.6.6p146 diff --git a/README.md b/README.md index d23003d..ecb300a 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ We also support custom color schemes! You can provide any base color and we will If you see anything that can be improved send in an issue/PR. -To get the code up and running, make sure ruby, etc. is properly installed, then run `bundle install`, then run `ruby app.rb` and visit `localhost:4567` in your browser. +To get the code up and running, make sure ruby, etc. is properly installed, then run `bundle install`, then run `ruby app.rb` and visit `localhost:4567` in your browser. + +To deploy, make sure heroku cli is installed, login, add the heroku remote, and run `git push heroku master`. # See also The [github repo](https://github.com/2016rshah/githubchart-api) From 639b3ff4570126d128c287a53ab79c652f012072 Mon Sep 17 00:00:00 2001 From: Rushi Shah <2016rshah@gmail.com> Date: Wed, 19 Jul 2023 22:57:59 -0800 Subject: [PATCH 8/8] Heroku needed a later version of ruby --- Gemfile | 2 +- Gemfile.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index d724e31..25fd24c 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'http://rubygems.org' -ruby ">= 2.6.6" +ruby ">= 2.7" gem 'sinatra', '~> 1.4.6' gem 'githubchart', '>= 4.0.0' gem 'webrick' diff --git a/Gemfile.lock b/Gemfile.lock index 88f8585..449b903 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -35,7 +35,7 @@ DEPENDENCIES webrick RUBY VERSION - ruby 2.6.6p146 + ruby 3.1.2p20 BUNDLED WITH 1.17.3