Permalink
Browse files

Update clearance dependency to version 1.1.0

  • Loading branch information...
1 parent 60fe1ec commit 9272defb7a78ebba85959f7245b606c011687780 @sferik sferik committed Nov 29, 2013
View
@@ -58,7 +58,7 @@ end
# For some reason, including these gems in the maintenance environment enables
# maintenance mode
group :development, :test, :staging, :production do
- gem 'clearance', '~> 1.0.1'
+ gem 'clearance', '~> 1.1'
gem 'daemons'
gem 'delayed_job'
gem 'delayed_job_active_record'
View
@@ -45,7 +45,7 @@ GEM
rack-test (>= 0.5.4)
xpath (~> 2.0)
choice (0.1.6)
- clearance (1.0.1)
+ clearance (1.1.0)
bcrypt-ruby
email_validator (~> 1.4)
rails (>= 3.1)
@@ -238,7 +238,7 @@ DEPENDENCIES
bluepill
builder
capybara
- clearance (~> 1.0.1)
+ clearance (~> 1.1)
cucumber-rails
daemons
dalli
@@ -4,7 +4,7 @@ class Api::V1::ApiKeysController < Api::BaseController
def show
authenticate_or_request_with_http_basic do |username, password|
- self.current_user = User.authenticate(username, password)
+ sign_in User.authenticate(username, password)
if current_user
respond_to do |format|
format.any(:all) { render :text => current_user.api_key }
@@ -26,7 +26,7 @@ def redirect_to_root
def authenticate_with_api_key
api_key = request.headers["Authorization"] || params[:api_key]
- self.current_user = User.find_by_api_key(api_key)
+ sign_in User.find_by_api_key(api_key)
end
def verify_authenticated_user
Binary file not shown.
Binary file not shown.

0 comments on commit 9272def

Please sign in to comment.