From 1bcbae4a644dfdb910da76cd9c1bff7b8eb1334d Mon Sep 17 00:00:00 2001 From: Kennedy Oliveira Date: Fri, 2 Oct 2015 17:53:03 -0300 Subject: [PATCH 1/3] Documenting --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dbec1c0..e95f95f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,46 @@ -# github-basic-badges -Basic badges for github +# GitHub Basic Badges + +Basic badges for using with GitHub, and a service that you can deploy and create your own service to serve the GitHub badges. + +## Motivation + +I know there are alots of services that you can generate badges for GitHub, i just developed one more to play around with Ruby and Heroku. + +### Badges + +All the URL Patterns showed in the table bellow must be used as `\`. + +| URL Pattern | Description | Preview | +| ----------- | ----------- | ------- | +| `downloads///total.svg` | Sum of downloads of all artifacts in the latest release. | [![GitHub Download Count](https://github-basic-badges.herokuapp.com/downloads/kennedyoliveira/github-basic-badges/total.svg)]() | +| `downloads////total.svg` | Sum of downloads of all artifacts in the release with the `` | [![GitHub Download Count By Tag](https://github-basic-badges.herokuapp.com/downloads/kennedyoliveira/github-basic-badges/v1.0.0/total.svg)]() | +| `downloads///.svg` | Total downloads of the artifact named `` in the latest release. | [![GitHub Download Count By Artifact](https://github-basic-badges.herokuapp.com/downloads/kennedyoliveira/github-basic-badges/dummy.txt.svg)]() | +| `downloads////.svg` | Total downloads of an artifact named `` in the release with a tag name ``. | [![GitHub Download Count By Artifact and Release](https://github-basic-badges.herokuapp.com/downloads/kennedyoliveira/github-basic-badges/v1.0.0/dummy.txt.svg)]() | +| `release//.svg` | Latest release tag name. | [![GitHub Release](https://github-basic-badges.herokuapp.com/release/kennedyoliveira/github-basic-badges.svg)]() | +| `issues//.svg` | Total issues open. | [![GitHub Issues Open](https://github-basic-badges.herokuapp.com/issues/kennedyoliveira/github-basic-badges.svg)]() | +| `commits//.svg` | Total commits. | [![GitHub Commits](https://github-basic-badges.herokuapp.com/commits/kennedyoliveira/github-basic-badges.svg)]() | + +### Deploying on Heroku + +Install heroku toolbet and log to it after that, it's pretty straigth forward deploying on heroku, just do the following: + +```` +# Cloning the repository +git clone https://github.com/kennedyoliveira/github-basic-badges.git +cd github-basic-badges + +# Create a heroku app +heroku create + +# Push the code to heroku +git push heroku master + +# Open the app +heroku open +```` + +### Mine Heroku App + +My instance is running in the following url `https://github-basic-badges.herokuapp.com` you can use it to generate badges for your repos! + +If you have any question or suggestion, open an issue! From e489937c76e4494791237d0291bd40005af55060 Mon Sep 17 00:00:00 2001 From: Kennedy Oliveira Date: Fri, 2 Oct 2015 17:59:47 -0300 Subject: [PATCH 2/3] Update README.md --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index e95f95f..3ebc797 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # GitHub Basic Badges +[![GitHub Release](https://github-basic-badges.herokuapp.com/release/kennedyoliveira/github-basic-badges.svg)]() +[![GitHub Download Count](https://github-basic-badges.herokuapp.com/downloads/kennedyoliveira/github-basic-badges/total.svg)]() +[![GitHub Issues Open](https://github-basic-badges.herokuapp.com/issues/kennedyoliveira/github-basic-badges.svg)]() | + Basic badges for using with GitHub, and a service that you can deploy and create your own service to serve the GitHub badges. ## Motivation @@ -20,6 +24,19 @@ All the URL Patterns showed in the table bellow must be used as `\/.svg` | Total issues open. | [![GitHub Issues Open](https://github-basic-badges.herokuapp.com/issues/kennedyoliveira/github-basic-badges.svg)]() | | `commits//.svg` | Total commits. | [![GitHub Commits](https://github-basic-badges.herokuapp.com/commits/kennedyoliveira/github-basic-badges.svg)]() | +### Custom colors and text + +You can customize the colors and the text of the badges, just use `color` and `text` parameters in the url, like customizing the last release example, check below: + +[![GitHub Release Ex 1](https://github-basic-badges.herokuapp.com/release/kennedyoliveira/github-basic-badges.svg?color=blue&text=last--release)]() +[![GitHub Release Ex 2](https://github-basic-badges.herokuapp.com/release/kennedyoliveira/github-basic-badges.svg?color=orange)]() +[![GitHub Release Ex 3](https://github-basic-badges.herokuapp.com/release/kennedyoliveira/github-basic-badges.svg?text=final--release)]() +[![GitHub Release Ex 4](https://github-basic-badges.herokuapp.com/release/kennedyoliveira/github-basic-badges.svg?color=green)]() +[![GitHub Release Ex 5](https://github-basic-badges.herokuapp.com/release/kennedyoliveira/github-basic-badges.svg?color=yellow)]() +[![GitHub Release Ex 6](https://github-basic-badges.herokuapp.com/release/kennedyoliveira/github-basic-badges.svg?9900ff)]() + +For colors you can use any hex colors you want, and some basic already defined, check the file [badge.rb](https://github.com/kennedyoliveira/github-basic-badges/blob/master/badges/badge.rb) for some basic colors. + ### Deploying on Heroku Install heroku toolbet and log to it after that, it's pretty straigth forward deploying on heroku, just do the following: From ab94366619db729f9dd6b5be86b587b7a8af359f Mon Sep 17 00:00:00 2001 From: Kennedy Oliveira Date: Fri, 2 Oct 2015 18:00:26 -0300 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ebc797..a4f8d87 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![GitHub Release](https://github-basic-badges.herokuapp.com/release/kennedyoliveira/github-basic-badges.svg)]() [![GitHub Download Count](https://github-basic-badges.herokuapp.com/downloads/kennedyoliveira/github-basic-badges/total.svg)]() -[![GitHub Issues Open](https://github-basic-badges.herokuapp.com/issues/kennedyoliveira/github-basic-badges.svg)]() | +[![GitHub Issues Open](https://github-basic-badges.herokuapp.com/issues/kennedyoliveira/github-basic-badges.svg)]() Basic badges for using with GitHub, and a service that you can deploy and create your own service to serve the GitHub badges.