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

https://github.com/freesteph/rubingo


https://github.com/freesteph/rubingo

Last synced: 12 months ago
JSON representation

Awesome Lists containing this project

README

          

* Rubingo : a Ruby wrapper around the Scalingo API

** Description

This simple Ruby script started as a wrap around the Scalingo API to
investigate and report on build times.

The native Scalingo CLI also provides duration data but in ASCII
format which requires serious grep/awk skills to parse. It's also a
lot more fun in Ruby.

** Getting started

1. [[https://dashboard.scalingo.com/account/tokens][get yourself a Scalingo API token]];
2. put it into a ~SCALINGO_API_TOKEN~ environment variable;
3. use ~./bin/rubingo token~ to get an exchange token;
3. explore ~./bin/rubingo --help~.

** Example

#+begin_src sh
export SCALINGO_API_TOKEN=my token

./bin/rubingo token # grab and write an exchange token in .env

./bin/rubingo repl betagouv-site # explore the betagouv-site resources

# if you app is hosted in the Secnum zone:
./bin/rubingo repl betagouv-prod --secnum
#+end_src

the above will drop you into a Ruby prompt with an ~api~ object
instantiated with the right app:

#+begin_src ruby
api.deployments.last(10).map(&:duration)

api.collaborators.map(&:email)
#+end_src

** Ressources available

- ~deployments~ ;
- ~collaborators~.

PS: feel free to add new ones, it's [[https://github.com/freesteph/rubingo/commit/a021c3e95e57be6cd54816ddc47c0a25bd791723][that easy]].