efueger / example-foobar

Example Ruby project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code Climate Lunch & Learn Example

Example files: https://gist.github.com/dblandin/589e70345774298e1622850349c31876

Setup

  1. Install the Code Climate browser extension
  2. Fork this project

Introduce some complexity

  1. Modify foo_bar.rb with this content from gist

  2. Push to fork and open PR against master

    git add foo_bar.rb
    git commit -m "Add FooBar"
    git push origin master
    hub pull-request # or using the GitHub UI
    

You should now see complexity issues reported by Code Climate as a commit status and via the browser extension. Test coverage reporting should also show uncovered lines via the browser extension and a drop in coverage via a commit status.

Add some test coverage

  1. Modify spec/foo_bar_spec.rb with this content from gist

  2. Commit and push to your fork PR branch

    git add spec/foo_bar_spec.rb
    git commit -m "Add FooBar specs"
    git push origin master
    

You should now see green annotations which mean those lines are now covered by

Introduce some duplication

  1. Modify duplication.rb and duplication_2.rb with these files

  2. Commit and push to your fork PR branch

    git add duplication.rb duplication_2.rb
    git commit -m "Add duplication"
    git push origin master
    

You should now see duplication issues reported by Code Climate.

About

Example Ruby project


Languages

Language:Ruby 100.0%