An open API service indexing awesome lists of open source software.

https://github.com/fteem/ghstatus

Get GitHub's API status/messages as Ruby objects or via command line.
https://github.com/fteem/ghstatus

Last synced: 28 days ago
JSON representation

Get GitHub's API status/messages as Ruby objects or via command line.

Awesome Lists containing this project

README

          

# Gst

Easily get Github's Status as Ruby objects or use the command line tool.

## Motivation

I used to get these very often:

```
➜ repo-name git:(master) git push origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
```

And often I didn't know if it's my internet connection's fault, or GitHub's APIs had problems.
And I am too lazy to open the browser and check status.github.com everytime I see the message above.

## Installation

Add this line to your application's Gemfile:

gem 'gst'

And then execute:

$ bundle

Or install it yourself as:

$ gem install gst

## Usage

### In Ruby

To get the current Github Status:
```ruby
GST::Status.current
```

To get the last Github Status message:
```ruby
GST::Message.last
```

To get most recent Github Status messages:
```ruby
GST::Message.recent
```

### Via command line

The current API status:
```bash
ghstatus
```

Last API status as a human readable message:
```bash
ghstatus last
```

Last few API statuses as a human readable messages:
```bash
ghstatus recent
```

Help:
```bash
ghstatus help
```

## Contributing

1. Fork it ( http://github.com//gst/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request