• Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 13 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Manage your git author accounts

Gas helps you manage your git authors. Do you have a personal and a work email and use the same computer to commit. Try gas to help you switch between the two. Do you pair program and want to reflect that it's not only you writing the code, try gas to switch between your pair user and your regular.

Gas is extensible and it's easy to extend with any functionality you may want.

Get it

The best way to install gas is with RubyGems:

$ [sudo] gem install gas

You can install from source:

$ cd gas/
$ bundle
$ rake install

Use it

Built-in commands

  • add NICKNAME NAME EMAIL - adds a new user to gas
  • delete NICKNAME - deletes a user from gas
  • import NICKNAME - imports the user from .gitconfig into NICKNAME
  • list - lists all users
  • plugins - lists all installed plugins
  • show - shows the current user
  • use NICKNAME - sets the user with NICKNAME as the current user

The default task is to list authors

$ gas

$ gas list

This lists the authors that are set up in the ~/.gas/gas.users file.

You can import your current user by giving it a nickname

$ gas import current_user

To add an author use, add

$ gas add walle "Fredrik Wallgren" [email protected]

And the main usage, use

$ gas use walle

To delete it again use, delete

$ gas delete walle

View the help using

$ gas -h

Extend it

Gas is built to be extendable, it uses the same way git does. Any executable in your PATH named gas-yourplugin is useable with gas. This means you can write extensions for gas in any language you want, the only thing you need to do is make it accessable by putting it in PATH.

To extend already existing commands make an executable with the name gas-yourplugin-existingcommand eg. gas-stats-use to do something when the original use command is executed. This makes it possible to extend plugins too eg. gas-myplugin-stats will extend the stats command, if installed.

An example plugin exists at https://github.com/walle/gas_stats it's written in ruby, and distributed with rubygems. But this is not a requirement. It extends gas both with adding functionality to built-in commands(counting statistics) and adding own functionality(gas-stats).

Plugins

Available plugins

gas_stats

Shows usage statistics for gas. Serves as a reference implementation of a plugin.

Code: https://github.com/walle/gas_stats

Installation: $ gem install gas_stats

Author: Fredrik Wallgren

gas_ssh

Adds ssh support for gas.

Work in progress right now.

Code: https://github.com/TheNotary/gas_ssh

Installation: $ gem install gas_ssh

Author: TheNotary

More Repositories

1

gimli

Utility for converting markup files to pdf files
Ruby
538
star
2

wiki

Command line tool to fetch summaries from MediaWiki wikis, like Wikipedia
Go
287
star
3

raycaster

A quick port of "A first-person engine in 265 lines" from JavaScript to Java using the libGDX framework.
Java
71
star
4

lll

Line length linter
Go
65
star
5

targz

Library for packaging/extracting folders in tar.gz archives.
Go
11
star
6

cfg

Simple read/write and commentable config files for go
Go
11
star
7

markdowneditor

Simple notepad like webapp/bookmarklet in three flavors. Used to scribble down notes in markdown and preview them.
11
star
8

textile2pdf

Simple utillity to convert textile to pdf files.
Ruby
7
star
9

postnummer

Ruby
7
star
10

git-cdd

Commit Driven Development in git
Shell
5
star
11

postnummer_api

Simple JSON API that gets data from https://github.com/walle/postnummer
Ruby
5
star
12

mdpdf

A small utility for converting markdown to PDF.
C
4
star
13

pgm

Dead simple tool for running migrations for postgresql
Go
4
star
14

guard-gimli

Guard gem for gimli
Ruby
4
star
15

one-word-story-game

Game where the github community creates a story one word at a time.
3
star
16

fval

Simple go library for validating file and directory existence
Go
3
star
17

cStack

A simple generic stack implementation in c
C
3
star
18

fabric-ui

Simple jquery plugin with ui for fabric.
JavaScript
3
star
19

mouseTracker

Mouse tracking image generator.
Java
2
star
20

gas_stats

Keep track of your gas usage
Ruby
2
star
21

jsular

Port of rubular.com for javascript
Ruby
2
star
22

pi2ascii

Quick test for converting the decimals of PI to ascii.
Ruby
2
star
23

dotfilesOld

My commonly used dotfiles
Shell
2
star
24

combine

Library and binary for concatenating files using a template that includes other files
Go
2
star
25

gimli-examples

A collection of example pages built with gimli
2
star
26

gypcms

A php cms that uses git, yaml and php as main components
PHP
2
star
27

lights-out

Simple game built with electron
JavaScript
1
star
28

md5calc

Old project in c# originally for windows, but compiles in monodevelop too, to calculate md5 hashes. Have functionality to save a list of words+hashes.
C#
1
star
29

todos

Ruby
1
star
30

postnummer_info

Information page for postnummer.info
JavaScript
1
star
31

dotvim

Vim setup
Vim Script
1
star
32

exoudus

Simple space shooter game
C++
1
star
33

tyda-api

App for getting JSON data from tyda.se. Outputs JSON on stdout as default.
Go
1
star
34

dotfiles

Vim Script
1
star
35

pc

Simple password generator
Ruby
1
star
36

pvm

Shell
1
star
37

htmlnote

Simple slideshow app in rails 3.1. Built to test out the new features in 3.1.
Ruby
1
star
38

passgen

Old project in c# originally for windows, but compiles in monodevelop too, to generate passwords based on two values.
C#
1
star
39

myleveleditor

My attempt to make a plugin based level editor. Project died out long ago.
C#
1
star
40

gobenchui-gui

A desktop application for gobenchui
JavaScript
1
star
41

phpSourceFormatter

Old project for formatting php code. Don't even remember how far I got.
PHP
1
star
42

tyda.pl

Simple command line tool to search tyda.se
Perl
1
star
43

minesweeper

Two minesweeper implementations using common library.
C++
1
star
44

ape

Simple project management application with wiki, tickets, milestones and scm integration.
Ruby
1
star