0.0
No commit activity in last 3 years
No release in over 3 years
Gem that allows You to check your code quality with CodeClimate and integrate it with your CI scripts
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 0.10
~> 10.3
~> 3.0
~> 0.25
~> 1.18

Runtime

~> 0.13
~> 0.19
 Project Readme

Code Climate CI

Code Climate Test Coverage Gem Version

The main idea of the Code Climate CI gem is that you can implement it to your CI script.

Gem will compare code quality in current branch with master branch through CodeClimate API and if code in your branch become worse then ci script will be interrupted.

You can also compare code quality in your branch using this gem right from your console.

Installation

Add this line to your application's Gemfile:

gem 'codeclimate_ci'

And then execute:

bundle

Or install it yourself as:

gem install codeclimate_ci

Usage

Just type in your console:

codeclimate_ci --codeclimate-api-token CODECLIMATE_API_TOKEN --repo-id REPOSITORY_ID --branch_name BRANCH
  • For codeclimate api token you need to go to codeclimate account settings in Integrations tab and there you can see API Token.
  • For repo id you need to go to your private repo and then you'll see it in you address string.

Response examples

If you entered wrong api-token or repo-id response will be:

Invalid credentials given. Please check your codeclimate_api_token and repo_id.

If GPA in your branch became worse than in master response will be:

Code in your branch became worse on %diff_point% points

If GPA in your branch became better than in master response will be:

Gpa score has improved to %diff_point% points. Go on...

Quality tools

  • bin/quality based on RuboCop
  • .rubocop.yml describes active checks

Development

  • bin/bootstrap install gems
  • bin/build check your specs and runs quality tools

Contributing

  1. Fork it ( https://github.com/[my-github-username]/codeclimate_ci/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Credits

Code Climate CI is maintained by Ildar Safin. It was written by Flatstack with the help of our contributors.

Flatstack