= Gorgeous Code (beta)
Most relevant entities overview:
Models
- Project: has the git information about each project
- Report: represents a full report with RBP analysis and Model Diagram analysis. Stores the commit hash, branch and the gc_config for each report.
- Rails BestPractices Analysis: belongs to one report and has the score and nbp_report for the analysis.
- Model Diagram Analysis: has the json_data attribute for the analysed project, representing the model diagram.
Services
- Create Project: Creates new project and deals with github hooks.
- Start Report: Creates new report and associated ModelDiagram and RBP analyses.
Jobs
- Create Report Job: Just to pass the HooksController to the StartReport service.
- Perform Analyses
Modules/lib:
- VM Connection: Acts as an abstraction, for what could be in fact a Virtual Machine or Docker container where a GitHub project would be downloaded and analyzed. At the moment is just creating folders and playing with RVM and Gemsets to achieve this abstraction. Establishes new VM connection, prepares repository and gemsets, runs commands, generates DOT and JSON files. All around badass.
Installation and other notes
- If you have errors with the gem
eventmachine
maybe this solution helps https://stackoverflow.com/questions/30818391/gem-eventmachine-fatal-error-openssl-ssl-h-file-not-found - Check if you "/usr/locpsql -U postgres -h localhost" works, the gc.yml from the projects will probably create databases