From 34d3a80db17a33ac2df02a4c274fa2e5fce51559 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 25 Mar 2016 10:05:22 +0800 Subject: [PATCH] use new pundit-enabled snorlax --- Gemfile | 3 +-- Gemfile.lock | 18 ++++++++---------- app/controllers/api/restful_controller.rb | 1 - 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Gemfile b/Gemfile index bf5997af..eff6826f 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,6 @@ gem 'devise' gem 'redis' gem 'pg' gem 'pundit' -gem 'cancan' gem 'pundit_extra' gem 'formula' gem 'formtastic' @@ -17,7 +16,7 @@ gem 'best_in_place' #in-place editing gem 'kaminari' # pagination gem 'uservoice-ruby' gem 'dotenv' -gem 'snorlax', '~> 0.1.3' +gem 'snorlax' gem 'httparty' gem 'sequenced', '~> 2.0.0' gem 'active_model_serializers', '~> 0.8.1' diff --git a/Gemfile.lock b/Gemfile.lock index ff5c1317..6f4948ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -57,8 +57,6 @@ GEM debug_inspector (>= 0.0.1) builder (3.2.2) byebug (8.2.2) - cancan (1.6.10) - cancancan (1.10.1) climate_control (0.0.3) activesupport (>= 3.0) cocaine (0.5.8) @@ -123,10 +121,12 @@ GEM activesupport (>= 3.0.0) loofah (2.0.3) nokogiri (>= 1.5.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) + mail (2.6.4) + mime-types (>= 1.16, < 4) method_source (0.8.2) - mime-types (2.99.1) + mime-types (3.0) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0221) mimemagic (0.3.0) mini_portile2 (2.0.0) minitest (5.8.4) @@ -191,7 +191,7 @@ GEM activesupport (= 4.2.4) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (11.1.0) + rake (11.1.1) redis (3.2.2) responders (2.1.1) railties (>= 4.2.0, < 5.1) @@ -230,8 +230,7 @@ GEM simplecov-html (~> 0.10.0) simplecov-html (0.10.0) slop (3.6.0) - snorlax (0.1.4) - cancancan (~> 1.10.1) + snorlax (0.1.5) rails (> 4.1) sprockets (3.5.2) concurrent-ruby (~> 1.0) @@ -265,7 +264,6 @@ DEPENDENCIES best_in_place better_errors binding_of_caller - cancan coffee-rails delayed_job (~> 4.0.2) delayed_job_active_record (~> 4.0.1) @@ -297,7 +295,7 @@ DEPENDENCIES sequenced (~> 2.0.0) shoulda-matchers simplecov - snorlax (~> 0.1.3) + snorlax tunemygc uglifier uservoice-ruby diff --git a/app/controllers/api/restful_controller.rb b/app/controllers/api/restful_controller.rb index 06396e3d..5a603fa8 100644 --- a/app/controllers/api/restful_controller.rb +++ b/app/controllers/api/restful_controller.rb @@ -4,7 +4,6 @@ class API::RestfulController < ActionController::Base snorlax_used_rest! - rescue_from(Pundit::NotAuthorizedError) { |e| respond_with_standard_error e, 403 } load_and_authorize_resource only: [:show, :update, :destroy] def create