Skip to content

Commit

Permalink
merging pull
Browse files Browse the repository at this point in the history
  • Loading branch information
rdingwell committed Jan 31, 2012
2 parents f7cbebb + ae12365 commit daaedc1
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ log/*.log
tmp/
.sass-cache/
.idea
.rvmrc*
.rvmrc*
coverage*
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ group :test do
gem 'turn', :require => false
gem 'minitest'
gem 'feedzirra'
gem 'cover_me'
end

17 changes: 12 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
addressable (2.2.6)
ansi (1.4.1)
ansi (1.4.2)
arel (3.0.0)
bcrypt-ruby (3.0.1)
bson (1.5.2)
Expand All @@ -69,6 +69,11 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.2.0)
configatron (2.9.0)
yamler (>= 0.1.0)
cover_me (1.2.0)
configatron
hashie
curb (0.7.18)
daemons (1.1.6)
devise (2.0.0)
Expand All @@ -91,7 +96,7 @@ GEM
rdoc (~> 3.8)
sax-machine (~> 0.0.20)
hashie (1.2.0)
heroku (2.19.0)
heroku (2.19.1)
launchy (>= 0.3.2)
rest-client (~> 1.6.1)
rubyzip
Expand Down Expand Up @@ -120,7 +125,7 @@ GEM
minitest (2.11.0)
mongo (1.5.2)
bson (= 1.5.2)
mongoid (2.4.2)
mongoid (2.4.3)
activemodel (~> 3.1)
mongo (~> 1.3)
tzinfo (~> 0.3.22)
Expand All @@ -141,7 +146,7 @@ GEM
rack-openid (~> 1.3.1)
orm_adapter (0.0.6)
polyglot (0.3.3)
pry (0.9.8)
pry (0.9.8.1)
coderay (~> 1.0.5)
method_source (~> 0.7)
slop (>= 2.4.3, < 3)
Expand Down Expand Up @@ -204,13 +209,14 @@ GEM
turn (0.8.3)
ansi
tzinfo (0.3.31)
uglifier (1.2.2)
uglifier (1.2.3)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
uuid (2.3.5)
macaddr (~> 1.0)
warden (1.1.0)
rack (>= 1.0)
yamler (0.1.0)

PLATFORMS
ruby
Expand All @@ -219,6 +225,7 @@ DEPENDENCIES
bson_ext
capistrano
coffee-rails (~> 3.2.1)
cover_me
devise
feedzirra
health-data-standards!
Expand Down
16 changes: 13 additions & 3 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class ApplicationController < ActionController::Base
protect_from_forgery
#before_filter :audit_log, :find_record
before_filter :find_record


before_filter :find_record, :audit_log
private

def find_record
Expand All @@ -11,8 +11,18 @@ def find_record
##render file: "public/404.html", :status => :not_found unless @record
end


##
## Track each controller and method (action) call
def audit_log
AuditLog.create(:username => "gganley", :event => "doc read", :description => "this is a desc");
##
if params[:controller] && params[:action]
desc = params[:controller] + "|" + params[:action]
desc << "|id:#{params[:id]}" if params[:id]

AuditLog.create(:username => "tsmith", :event => "USER_ACTION", :description => desc)
end

end

end
17 changes: 17 additions & 0 deletions lib/tasks/cover_me.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace :cover_me do

desc "Generates and opens code coverage report."
task :report do
require 'cover_me'
CoverMe.complete!
end

end

task :test do
Rake::Task['cover_me:report'].invoke
end

task :spec do
Rake::Task['cover_me:report'].invoke
end
1 change: 1 addition & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ENV["RAILS_ENV"] = "test"
require 'cover_me'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'

Expand Down

0 comments on commit daaedc1

Please sign in to comment.