diff --git a/.gitignore b/.gitignore index fef3086..c58b054 100755 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ .elasticbeanstalk/ .DS_Store /public/data -*.png \ No newline at end of file +*.png +coverage \ No newline at end of file diff --git a/Gemfile b/Gemfile index c3836db..131581f 100755 --- a/Gemfile +++ b/Gemfile @@ -26,6 +26,8 @@ end gem 'gauntlt' +gem 'simplecov', '0.8.0.pre2', :require => false, :group => :test + group :development, :test do gem 'launchy' gem 'capybara' diff --git a/Gemfile.lock b/Gemfile.lock index 92d0f04..1d59a8b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -82,6 +82,7 @@ GEM database_cleaner (1.0.1) debug_inspector (0.0.2) diff-lcs (1.2.4) + docile (1.1.0) dotenv (0.9.0) em-websocket (0.5.0) eventmachine (>= 0.12.9) @@ -139,6 +140,7 @@ GEM celluloid (>= 0.15.2) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9) + lockfile (2.1.0) mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) @@ -218,6 +220,12 @@ GEM sass (>= 3.1.10) tilt (~> 1.3) sexp_processor (4.4.0) + simplecov (0.8.0.pre2) + docile (~> 1.1.0) + lockfile (>= 2.1.0) + multi_json + simplecov-html (~> 0.7.1) + simplecov-html (0.7.1) slim (2.0.1) temple (~> 0.6.6) tilt (>= 1.3.3, < 2.1) @@ -285,6 +293,7 @@ DEPENDENCIES rb-fsevent rspec-rails sass-rails + simplecov (= 0.8.0.pre2) sqlite3 therubyracer travis-lint diff --git a/app/models/benefits.rb b/app/models/benefits.rb index 35d0444..c423a38 100644 --- a/app/models/benefits.rb +++ b/app/models/benefits.rb @@ -12,7 +12,7 @@ class Benefits < ActiveRecord::Base def self.make_backup(file, data_path, full_file_name) if File.exists?(full_file_name) - system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}") + system("cp #{full_file_name} #{data_path}/bak#{Time.now.to_i}_#{file.original_filename}") end rescue end diff --git a/public/docs/| dir b/public/docs/| dir new file mode 100644 index 0000000..fc8617d --- /dev/null +++ b/public/docs/| dir @@ -0,0 +1 @@ +# Logfile created on 2013-10-24 00:32:47 -0500 by logger.rb/31641 diff --git a/public/docs/| ls b/public/docs/| ls new file mode 100644 index 0000000..21ebb9f --- /dev/null +++ b/public/docs/| ls @@ -0,0 +1 @@ +# Logfile created on 2013-10-24 00:32:37 -0500 by logger.rb/31641 diff --git a/public/secre b/public/secre new file mode 100755 index 0000000..1d9d83c --- /dev/null +++ b/public/secre @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +Railsgoat::Application.config.secret_token = '2f1d90a26236c3245d96f5606c201a780dc9ca687e5ed82b45e211bb5dc84c1870f61ca9e002dad5dd8a149c9792d8f07f31a9575065cca064bd6af44f8750e4' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 417153f..e025086 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,10 @@ # This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' + +# To use simplecov, do this: COVERAGE=true rake +require 'simplecov' +SimpleCov.start if ENV["COVERAGE"] + require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' require 'rspec/autorun' @@ -50,4 +55,4 @@ end Capybara.javascript_driver = :poltergeist -DatabaseCleaner.strategy = :truncation \ No newline at end of file +DatabaseCleaner.strategy = :truncation diff --git a/test/test_helper.rb b/test/test_helper.rb index 8bf1192..b757019 100755 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,4 +1,9 @@ ENV["RAILS_ENV"] = "test" + +# To use simplecov, do this: COVERAGE=true rake +require 'simplecov' +SimpleCov.start if ENV["COVERAGE"] + require File.expand_path('../../config/environment', __FILE__) require 'rails/test_help'