https://github.com/freesteph/rubingo
https://github.com/freesteph/rubingo
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/freesteph/rubingo
- Owner: freesteph
- Created: 2024-11-13T18:35:37.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-15T12:19:14.000Z (over 1 year ago)
- Last Synced: 2025-06-08T00:41:14.756Z (about 1 year ago)
- Language: Ruby
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
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]].