Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bborn committed Mar 14, 2016
1 parent 3caf109 commit 96eaf35
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,25 @@ namespace :test do
t.libs << "lib"
t.libs << "test"
t.pattern = 'test/functional/**/*_test.rb'
t.verbose = true
t.verbose = false
t.warning = false
end

Rake::TestTask.new(:units) do |t|
t.libs << "lib"
t.libs << "test"
t.pattern = 'test/unit/**/*_test.rb'
t.verbose = true
end

t.verbose = false
t.warning = false
end

end


task :build do
system "gem build community_engine.gemspec"
end

task :release => :build do
system "gem push community_engine-#{CommunityEngine::Version::STRING}.gem"
end
3 changes: 3 additions & 0 deletions app/controllers/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class BaseController < ApplicationController

caches_action :site_index, :footer_content, :if => Proc.new{|c| c.cache_action? }

rescue_from Pundit::NotAuthorizedError, with: :access_denied

def cache_action?
!logged_in? && controller_name.eql?('base') && params[:format].blank?
end
Expand Down Expand Up @@ -61,6 +63,7 @@ def advertise
end

private

def admin_required
current_user && current_user.admin? ? true : access_denied
end
Expand Down

0 comments on commit 96eaf35

Please sign in to comment.