Project

gitlang

0.0
No commit activity in last 3 years
No release in over 3 years
Simple gem for displaying information about the programming languages used by a GitHub organization.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 5.0
~> 10.0

Runtime

~> 0.0.1
~> 4.0
~> 0.20
 Project Readme

Gitlang

Build Status Maintainability

Simple gem for displaying information about the programming languages used by a GitHub organization.

Installation

Add this line to your application's Gemfile:

gem 'gitlang'

And then execute:

$ bundle

Or install it yourself as:

$ gem install gitlang

Setup

This gem makes several requests to the GitHub API. In order to avoid rate limit restrictions follow the instructions below:

  • Create a Personal Access Token as described in the Creating a token section here.
  • Open your terminal and run:
export GITHUB_TOKEN=[token]

Note that this command sets this variable only for the current session. If you want persistence you can set it in a configuration file, depending on your terminal.

Usage

Open your terminal and run:

gitlang relative_usage_per_language [organization_name]

# Returns a prettified json formatted string, the numbers are expressed as %.
# {
#   "organization": organization_name,
#   "languages": {
#       "language1": 40.0,
#       "language2": 60.0
#    }
# }

This gem can be used in conjuction with the redirection operators. For example, if you want to store the output in a file you can run:

gitlang relative_usage_per_language [organization_name] > [file_name]

Supported Ruby versions

This gem is tested against Ruby 2.3.

License

The gem is available as open source under the terms of the MIT License.