Coder Social home page Coder Social logo

isabella232 / codestats Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wolox/codestats

0.0 0.0 0.0 9.28 MB

Self-hosted open source app to control metrics of your code

License: MIT License

Shell 1.72% Ruby 64.22% CoffeeScript 3.45% CSS 6.75% HTML 23.86%

codestats's Introduction

Code Stats

Circle CI Code Climate Test Coverage

Self-hosted open source app to control metrics of your code. Code Stats lets to control the quality of your code by integrating your Github pull requests with any metric you want.

How does it work?

By including the Code Stats Metrics Reporter gem in your app and setting up the .codestats.yml file, your Continous Integration will run certains scripts that will let Code Stats list all the metrics you want and run custom checks whenever you create a Github Pull Request

Badge

You can add a Code Stats badge to you README by adding the following:

[![Codestats](http://your-codestats-url/organizations/an-organization/projects/a-project/badge)]((http://your-codestats-url/organizations/an-organization/projects/a-project/badge)

it will look something like this:

code stats error badge code stats failed badge code stats success badge

Screenshots

Pull Request Integration Success Metric Failed Metric

Running local server

1- Installing Ruby

  • Clone the repository by running git clone [email protected]:Wolox/codestats.git
  • Go to the project root by running cd codestats
  • Download and install Rbenv.
  • Download and install Ruby-Build.
  • Install the appropriate Ruby version by running rbenv install [version] where version is the one located in .ruby-version

2- Installing Rails gems

  • Install Bundler.
  • Install basic dependencies if you are using Ubuntu:
  sudo apt-get install build-essential libpq-dev nodejs
  • Install all the gems included in the project.
  gem install bundler --no-ri --no-rdoc
  rbenv rehash
  bundle -j 20

Database Setup

Run in terminal:

  sudo -u postgres psql
  CREATE ROLE "codestats" LOGIN CREATEDB PASSWORD 'codestats';

Log out from postgres and run:

  bundle exec rake db:create db:migrate

Your server is ready to run. You can do this by executing rails server and going to http://localhost:3000. Happy coding!

Deploy Guide

Heroku

If you want to deploy your app using Heroku you need to do the following:

  • Add the Heroku Git URL
  • Push to heroku
  • Run migrations
  git remote add heroku-prod your-git-url
  git push heroku-prod your-branch:master

AWS

The gems and files needed to make a deploy to AWS with Capistrano are included in this repo but commented. Feel free to use them.

Rollbar Configuration

Rollbar is used for exception errors report. To complete this configuration setup the following environment variables in your server:

  • ROLLBAR_ACCESS_TOKEN with the credentials located in the rollbar application.
  • ROLLBAR_ENVIRONMENT with the environment name you want to be shown in Rollbar. This is usefull if you have different servers running in Production mode and you want to identify them in Rollbar.

Google Analyitics

Set the GOOGLE_ANALYTICS_TOKEN environment variable in your server.

Credentials

You can use either environment variables or the secrets.yml. If you want to set environment variables in development you can add them to .env.local (you can find an example in the .env.local.example file.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Run rspec tests (bundle exec rspec spec -fd)
  5. Run rubocop lint (bundle exec rubocop app spec -R)
  6. Push your branch (git push origin my-new-feature)
  7. Create a new Pull Request

Feel free to add a new Issue by clicking here if you find a bug, idea of improvement, etc.

About

This project is maintained by:

and it is written by Wolox under the LICENSE license.

Wolox

codestats's People

Contributors

epintos avatar mdesanti avatar skolz avatar mishuagopian avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.