{"id":20235615,"url":"https://github.com/gueils/belugas-ruby","last_synced_at":"2025-04-10T18:54:49.268Z","repository":{"id":92720481,"uuid":"77645822","full_name":"Gueils/belugas-ruby","owner":"Gueils","description":":whale: A Ruby analyzer feature detector","archived":false,"fork":false,"pushed_at":"2017-09-29T15:50:43.000Z","size":187,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-24T16:42:01.553Z","etag":null,"topics":["belugas","docker-compose","dockerfile","dockerization","ruby","whales"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gueils.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-29T23:22:20.000Z","updated_at":"2025-01-15T21:24:59.000Z","dependencies_parsed_at":"2023-04-20T21:33:22.659Z","dependency_job_id":null,"html_url":"https://github.com/Gueils/belugas-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gueils%2Fbelugas-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gueils%2Fbelugas-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gueils%2Fbelugas-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gueils%2Fbelugas-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gueils","download_url":"https://codeload.github.com/Gueils/belugas-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248275648,"owners_count":21076638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["belugas","docker-compose","dockerfile","dockerization","ruby","whales"],"created_at":"2024-11-14T08:17:01.567Z","updated_at":"2025-04-10T18:54:49.258Z","avatar_url":"https://github.com/Gueils.png","language":"Ruby","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"belugas.png\" height=\"300px\" alt=\"Belugas Ruby\"/\u003e\n\u003c/p\u003e\n\n![Made with Love by Icalia Labs](https://img.shields.io/badge/With%20love%20by-Icalia%20Labs-ff3434.svg)\n\n## Overview\n\n`belugas-ruby` is an engine for detecting application [features](#what-is-a-feature) for Ruby projects based on static analysis, in other words `belugas-ruby` engine can detect the language, framework, database \u0026 dependencies your Ruby application is using.\n\nThis engine works as command line interface on your local machine of a Docker container:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"http://i.imgur.com/Rj691Cs.gif\"\u003e\n\u003c/p\u003e\n\n## Table of contents\n\n- [Why?](#why)\n- [What is a feature?](#what-is-a-feature)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [Credits](#credits)\n\n## Why?\n\n`belugas-ruby` is part of the [Whales](https://github.com/gueils/whales) ecosystem: A set of tools to automatically dockerize your applications.\n\n## What is a feature?\n\nA feature is an application attribute detected during the static analysis. This analysis is the act of derivating data from code such as programming language, frameworks, service dependencies and so on. See [here](#supported-features) for a list of attributes this engine currently supports.\n\nA feature has the following format:\n\n```\n{\n  \"type\":\"feature\",\n  \"name\":\"Ruby\",\n  \"version\":\"2.4\",\n  \"description\":\"The application uses Ruby code\",\n  \"content\":\"\",\n  \"categories\":[\"Language\"],\n  \"cue_locations\":[\"\"],\n  \"engines\":[\"belugas\",\"belugas-ruby\"]\n}\n```\n\nWhere:\n\n- **type**: Will always be a _feature_.\n- **name**: This is the name of the language, framework or database that is being used in the application.\n- **version**: The detected version of the feature. This one is optional\n- **description**: A string explaining the feature that was detected.\n- **content**: A markdown snippet describing the feature, including deeper explanations and links to other resources. This one is optional\n- **categories**: Features are associated with one or more of the following categories: Language, Framework, Database, Library \u0026 Service.\n- **cue_locations**: An array of Location objects representing the places in the source code that provide evidence of the detected feature. This one is optional\n- **engines**: An array of engine names that detected the feature, or refined the data detected by the previous engines.\n\n### Supported Features\n\nCurrently `belugas-ruby` can detect the following frameworks, databases, libraries and services:\n\nFrameworks:\n\n- Rails\n- Sinatra\n- Middleman\n\nDatabases:\n\n- MySQL\n- PostgreSQL\n- Mongoid\n\nLibraries \u0026 Services:\n\n- Webkit\n- Rmagick\n- Sidekiq\n\n\n## Installation\n\n### Prerequisites\n\nThe Belugas Ruby CLI is distributed and run as a [Docker](https://hub.docker.com/r/gueils/belugas-ruby/) image, so you only need to have Docker [installed](https://docs.docker.com/engine/installation/) and running on your machine.\n\n### Setup\n\nFire up your terminal and run:\n\n```console\ndocker pull gueils/belugas-ruby:development\n```\n\nAnd that's it!\n\n## Usage\n\nHere's where the magic begins, first of all in your terminal go to the project directory you want to analyze:\n\n```console\ncd code/path_to_project/\n```\n\nAnd then just execute the following command:\n\n```console\ndocker run \\\n  --interactive --tty --rm \\\n  --volume \"$PWD\":/code \\\n  gueils/belugas-ruby:development\n```\n\nAnd voilá! The terminal will stream a json output for each of the features detected in the following format:\n\n```\n{\n  \"type\":\"feature\",\n  \"name\":\"Ruby\",\n  \"version\":\"2.3.1\",\n  \"description\":\"The application uses Ruby code\",\n  \"categories\":[\"Language\"],\n  \"engines\":[\"belugas\",\"belugas-ruby\"]\n}\n{\n  \"type\":\"feature\",\n  \"name\":\"rails\",\n  \"version\":\"4.2.6\",\n  \"description\":\"The application uses rails\",\n  \"content\":\"\",\n  \"categories\":[\"Framework\"],\n  \"cue_locations\":[\"\"],\n  \"engines\":[\"belugas\",\"belugas-ruby\"]\n}\n{\n  \"type\":\"feature\",\n  \"name\":\"postgresql\",\n  \"version\":\"9.5.6\",\n  \"description\":\"The application uses postgresql\",\n  \"content\":\"\",\n  \"categories\":[\"Database\"],\n  \"cue_locations\":[\"\"],\n  \"engines\":[\"belugas\",\"belugas-ruby\"]\n}\n{\n  \"type\":\"feature\",\n  \"name\":\"sidekiq\",\n  \"version\":\"0\",\n  \"description\":\"The application uses sidekiq\",\n  \"content\":\"\",\n  \"categories\":[\"Service\"],\n  \"cue_locations\":[\"\"],\n  \"engines\":[\"belugas\",\"belugas-ruby\"]\n}\n```\n\n## Contributing\n\nEveryone is freely to collaborate, just make sure you follow our [code of conduct](https://github.com/gueils/belugas-ruby/blob/master/CODE_OF_CONDUCT.md). Thank you [contributors](https://github.com/gueils/belugas-ruby/graphs/contributors)!\n\n### Create an Issue\n\nFind a bug and don't know how to fix it? Have trouble following the documentation or have a question about the project? Then by all means, please [create an issue](https://github.com/gueils/belugas-ruby/issues/new).\n\nJust please make sure you check [existing issues](https://github.com/gueils/belugas-ruby/issues) to see if what you're running into has been addressed already.\n\n### Submit a Pull Request\n\nThat's great! Just follow this steps:\n\n1. Create a separate branch for your edits\n2. Make sure your changes doesn't break the project by running your changes against current specs. **We love tests!** so it'll be even better if you create new ones when needed\n3. Open your pull request against `master`\n\nOnce you've created a pull request, mainteners will chime in to review your proposed changes and to merged it if everything is right :tada:\n\n### I want to contribute but don't know where to start\n\nThat's great also! We already have some [open issues](https://github.com/gueils/belugas-ruby/issues) for you to dive in.\n\n## Copyright\n\nSee [LICENSE](https://github.com/gueils/belugas-ruby/blob/master/LICENSE.txt)\n\n![Icalia Labs](https://raw.githubusercontent.com/icalialabs/kaishi/master/logo.png)\n\nBelugas-Ruby is maintained by [Icalia Labs](http://www.icalialabs.com/team)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgueils%2Fbelugas-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgueils%2Fbelugas-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgueils%2Fbelugas-ruby/lists"}