` 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:
-
+
-
+
# Contributing
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 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)
-The [actual site](http://ghchart.rshah.org)
+The [actual site](https://ghchart.rshah.org)
This [ruby gem](https://github.com/akerl/githubchart)
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
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy