This project comes with:
- Administration panel for users
- Rspec tests
- Code quality tools
- Exception Tracking (Exception Hunter https://github.com/rootstrap/exception_hunter)
- Clone this repo
- Install PostgreSQL in case you don't have it
- Create
.envfile with env variables anddatabase.yml - Create DB tables and seed data
rake db:createrake db:migraterake db:seed - Install dependencies:
yarnornpm install rspecand make sure all tests passrails s
IMPORTANT: At the moment of running the tests
- You will need to have redis installed.
On Mac:
brew install redis
brew services start redis
- You'll need SUPERUSER permissions on postgresql for the defined user.
Either assign superuser permissions to postgres or update the env vars: GITHUB_ANALYZER_USERNAME and GITHUB_ANALYZER_PASSWORD
rake code_climate:linkis run only to update repositories' Code Climate repository ids.
code_owners_listruns at 23:00 on every day-of-week from Monday through Friday.external_contributions_processorruns at 05:00 on every day-of-week from Monday through Friday.jira_defect_metrics_updaterruns at 06:00 on every day-of-week from Monday through Friday.open_source_metrics_updateruns at 06:00.organization_members_updaterruns at 05:00 on every day-of-week from Monday through Friday.send_open_source_notificationruns at 10:00 every Friday.repositories_updateruns at 05:40 every Saturday.
- Department
- In order to change Department Success Rates time limit setting, create a new
Settingwith key prefixsuccess_rate, followed by the department name and the metric name. - Example:
Setting.create!(key: 'success_rate_backend_merge_time', value: '12')Possible values: 12 | 24 (default) | 36 | 48 | 60 | 72
- In order to change Department Success Rates time limit setting, create a new
- Repository
- In order to change Repository Success Rates time limit setting, create a new
Settingwith key prefixsuccess_rate_, followed by the repository name and the metric name. - Example:
Setting.create!(key: 'success_rate_rs-code-review-metrics_merge_time', value: '12')Possible values: 12 | 24 (default) | 36 | 48 | 60 | 72
- In order to change Repository Success Rates time limit setting, create a new
Possible values: true | false (default)
enabled_users_sectionenables Users section at Development Metrics sidebar.enabled_department_per_tech_graphenables Department per technology detail graph.enabled_repository_codeowners_sectionenables Repository codeowners section.enabled_repository_per_user_graphenables Repository per-user detail graphs.
With rake code_analysis you can run the code analysis tool, you can omit rules with:
- Rubocop Edit
.rubocop.yml - Reek Edit
config.reek - Rails Best Practices Edit
config/rails_best_practices.yml - Brakeman Run
brakeman -Ito generateconfig/brakeman.ignore - Bullet You can add exceptions to a bullet initializer or in the controller
Run open coverage/index.html in terminal to see coverage values
Home Page url: http://engineering-metrics.herokuapp.com/ Exception Hunter dashboard: https://engineering-metrics.herokuapp.com/exception_hunter/errors Admin: https://engineering-metrics.herokuapp.com/admin