From 4078e8d953315e6e819256551e856df281cba4bb Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 23 Nov 2014 20:05:50 +0200 Subject: [PATCH] Add SimpleCov for code coverage analysis Also make sure Puma is used only in production --- .gitignore | 1 + Gemfile | 4 ++-- Gemfile.lock | 17 +++++++---------- spec/rails_helper.rb | 3 +++ 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 5045443..de6439a 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ /public/uploads/tmp/* /public/uploads/speaker_profile/* .sass-cache/ +/coverage/ diff --git a/Gemfile b/Gemfile index 3bf9f65..3cd2be4 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,6 @@ gem 'devise' gem 'devise-i18n' gem 'simple_form', '~> 3.1.0.rc2' -gem 'simple_form_fancy_uploads', github: 'apeacox/simple_form_fancy_uploads' # Phone validation gem 'phony_rails' @@ -33,7 +32,7 @@ gem 'capistrano' gem 'capistrano-rails' gem 'capistrano-rvm' -gem 'puma' +gem 'puma', group: :production gem 'globalize' @@ -65,4 +64,5 @@ group :development, :test do gem 'factory_girl_rails' gem 'faker' gem 'capybara' + gem 'simplecov' end diff --git a/Gemfile.lock b/Gemfile.lock index a269c29..447b701 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,3 @@ -GIT - remote: git://github.com/apeacox/simple_form_fancy_uploads.git - revision: 71a52b4060739c2dd0471cd07d3a57e7c957da1d - specs: - simple_form_fancy_uploads (0.1.1) - carrierwave - rails (>= 4.0.0) - simple_form (~> 3.0) - GIT remote: git://github.com/jetthoughts/yaml_db.git revision: fb4b6bd7e12de3cffa93e0a298a1e5253d7e92ba @@ -103,6 +94,7 @@ GEM warden (~> 1.2.3) devise-i18n (0.11.2) diff-lcs (1.2.5) + docile (1.1.5) erubis (2.7.0) execjs (2.2.2) factory_girl (4.5.0) @@ -242,6 +234,11 @@ GEM simple_form (3.1.0.rc2) actionpack (~> 4.0) activemodel (~> 4.0) + simplecov (0.9.1) + docile (~> 1.1.0) + multi_json (~> 1.0) + simplecov-html (~> 0.8.0) + simplecov-html (0.8.0) slim (2.1.0) temple (~> 0.6.9) tilt (>= 1.3.3, < 2.1) @@ -326,7 +323,7 @@ DEPENDENCIES rspec-rails sass-rails (~> 5.0.0.beta1) simple_form (~> 3.1.0.rc2) - simple_form_fancy_uploads! + simplecov slim-rails spring spring-commands-rspec diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 4d1d439..7cc703a 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,3 +1,6 @@ +require 'simplecov' +SimpleCov.start 'rails' + # This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require 'spec_helper'