Example base for ruby apps integrated with Rspec, travis-CI and codeclimate for quick, clean development.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.ruby-version
.travis.yml
Gemfile
Gemfile.lock
README.md
Rakefile
app.rb

README.md

Ruby, Rspec & Travis-CI

Build Status Code Climate Test Coverage


Set Up

Clone Repo

$ git clone repo_name $ bundle install

Remove .git

$ rm -rf .git

Create your repo

https://github.com

Add this project to your repo

$ git init $ git add —all $ git commit -m ‘Initial commit’ $ git remote add origin {remote_url} $ git remote -v $ git push -u origin master

_Commit changes to your clean app

$ git status $ git add —all $ git commit -m ‘initial commit’ $ git push

Travis

https://travis-ci.org/

  • Sign in with Github
  • Add your repo

CodeClimate

https://codeclimate.com/

  • Sign in with Github
  • Add you repo
  • Get the token and add it to your .travis.yml project > settings > test coverage > test reporter id

README

Update the README with your new badges

  • Build Status Image
[![Build Status](https://travis-ci.org/{your_github_name}/{your_repo_name}.png)](https://travis-ci.org/{your_github_name}/{your_repo_name})
  • Code climate Image
[![Code Climate](https://codeclimate.com/github/{your_github_name}/{your_repo_name}/badges/gpa.svg)](https://codeclimate.com/github/{your_github_name}/{your_repo_name})
  • Test coverage Image
[![Test Coverage](https://codeclimate.com/github/{your_github_name}/{your_repo_name}/coverage.svg)](https://codeclimate.com/github/{your_github_name}/{your_repo_name}/coverage)

Write your app

Now you’re set up with a blank ruby project to test builds, code quality and coverage throughout development!

Entry point

app.rb

Source files

/lib/main.rb

Test files

spec/main_spec.rb

Usage

To run the app

$ ruby app.rb

Testing

To run tests before committing changes

$ rake spec

When committing changes to master branch, your code will automatically build with Travis-CI and CodeClimate and update the badges in your repo’s README.