Skip to content

Commit

Permalink
Upgrade doorkepeer
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Apr 8, 2015
1 parent 7c5d57e commit 1a5a677
Show file tree
Hide file tree
Showing 6 changed files with 160 additions and 154 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -10,7 +10,7 @@ gem "canable", "~>0.1"
gem "carrierwave", "~>0.10"
gem "devise", "~>3.3"
gem "diff_match_patch", github: "nono/diff_match_patch-ruby", require: "diff_match_patch"
gem "doorkeeper", "~>1.4"
gem "doorkeeper", "~>2.1"
gem "french_rails", "~>0.3"
gem "friendly_id", "~>5.1"
gem "haml", "~>4.0"
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Expand Up @@ -113,8 +113,8 @@ GEM
thread_safe (~> 0.1)
warden (~> 1.2.3)
diff-lcs (1.2.5)
doorkeeper (1.4.2)
railties (>= 3.1)
doorkeeper (2.1.4)
railties (>= 3.2)
elasticsearch (1.0.8)
elasticsearch-api (= 1.0.7)
elasticsearch-transport (= 1.0.7)
Expand Down Expand Up @@ -371,7 +371,7 @@ DEPENDENCIES
desi
devise (~> 3.3)
diff_match_patch!
doorkeeper (~> 1.4)
doorkeeper (~> 2.1)
elasticsearch-model (~> 0.1)
elasticsearch-transport (~> 1.0)
factory_girl_rails (~> 1.6)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/accounts_controller.rb
@@ -1,5 +1,5 @@
class Api::V1::AccountsController < Api::V1::ApiController
doorkeeper_for :all, scopes: [:account]
before_action -> { doorkeeper_authorize! :account }

def me
render json: current_resource_owner.as_json
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/board_controller.rb
@@ -1,5 +1,5 @@
class Api::V1::BoardController < Api::V1::ApiController
doorkeeper_for :all, scopes: [:board]
before_action -> { doorkeeper_authorize! :board }
after_action :expire_cache, only: [:create]

def create
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20150408104037_add_scopes_to_oauth_applications.rb
@@ -0,0 +1,5 @@
class AddScopesToOauthApplications < ActiveRecord::Migration
def change
add_column :oauth_applications, :scopes, :string, null: false, default: ''
end
end

0 comments on commit 1a5a677

Please sign in to comment.