From d2826cdcfbd2fb0a79d050a098bd6a93923ee29d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 May 2020 00:22:35 +0900 Subject: Bump pastel from 0.7.3 to 0.7.4 (#13732) Bumps [pastel](https://github.com/piotrmurach/pastel) from 0.7.3 to 0.7.4. - [Release notes](https://github.com/piotrmurach/pastel/releases) - [Changelog](https://github.com/piotrmurach/pastel/blob/master/CHANGELOG.md) - [Commits](https://github.com/piotrmurach/pastel/compare/v0.7.3...v0.7.4) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gemfile.lock') diff --git a/Gemfile.lock b/Gemfile.lock index 3484253bb..b185a6c3a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -410,7 +410,7 @@ GEM parser (2.7.1.2) ast (~> 2.4.0) parslet (2.0.0) - pastel (0.7.3) + pastel (0.7.4) equatable (~> 0.6) tty-color (~> 0.5) pg (1.2.3) -- cgit From 746005b2baab99cc21479c0760d689ac597be50c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 May 2020 00:52:40 +0900 Subject: Bump rspec-expectations from 3.9.1 to 3.9.2 (#13734) Bumps [rspec-expectations](https://github.com/rspec/rspec-expectations) from 3.9.1 to 3.9.2. - [Release notes](https://github.com/rspec/rspec-expectations/releases) - [Changelog](https://github.com/rspec/rspec-expectations/blob/master/Changelog.md) - [Commits](https://github.com/rspec/rspec-expectations/compare/v3.9.1...v3.9.2) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gemfile.lock') diff --git a/Gemfile.lock b/Gemfile.lock index b185a6c3a..0df323fc5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -524,7 +524,7 @@ GEM rqrcode_core (0.1.2) rspec-core (3.9.2) rspec-support (~> 3.9.3) - rspec-expectations (3.9.1) + rspec-expectations (3.9.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-mocks (3.9.1) -- cgit From fd15f8dde7a1d2d688ff4c02f6189bd62f8ac692 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 May 2020 00:54:59 +0900 Subject: Bump strong_migrations from 0.6.5 to 0.6.6 (#13731) Bumps [strong_migrations](https://github.com/ankane/strong_migrations) from 0.6.5 to 0.6.6. - [Release notes](https://github.com/ankane/strong_migrations/releases) - [Changelog](https://github.com/ankane/strong_migrations/blob/master/CHANGELOG.md) - [Commits](https://github.com/ankane/strong_migrations/compare/v0.6.5...v0.6.6) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gemfile.lock') diff --git a/Gemfile.lock b/Gemfile.lock index 0df323fc5..1e9b3148e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -609,7 +609,7 @@ GEM stoplight (2.2.0) streamio-ffmpeg (3.0.2) multi_json (~> 1.8) - strong_migrations (0.6.5) + strong_migrations (0.6.6) activerecord (>= 5) temple (0.8.2) terminal-table (1.8.0) -- cgit From 7f1d5fc0fe0064baee1fb1fffa11e400732e7d94 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 May 2020 00:55:21 +0900 Subject: Bump aws-partitions from 1.311.0 to 1.312.0 (#13735) Bumps [aws-partitions](https://github.com/aws/aws-sdk-ruby) from 1.311.0 to 1.312.0. - [Release notes](https://github.com/aws/aws-sdk-ruby/releases) - [Changelog](https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-partitions/CHANGELOG.md) - [Commits](https://github.com/aws/aws-sdk-ruby/commits) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gemfile.lock') diff --git a/Gemfile.lock b/Gemfile.lock index 1e9b3148e..fed0efc0e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,7 +92,7 @@ GEM av (0.9.0) cocaine (~> 0.5.3) aws-eventstream (1.1.0) - aws-partitions (1.311.0) + aws-partitions (1.312.0) aws-sdk-core (3.95.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) -- cgit From 989f67c52b8b26802aecf269a5b99705acb37b4b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 May 2020 00:57:21 +0900 Subject: Bump browser from 4.0.0 to 4.1.0 (#13737) Bumps [browser](https://github.com/fnando/browser) from 4.0.0 to 4.1.0. - [Release notes](https://github.com/fnando/browser/releases) - [Changelog](https://github.com/fnando/browser/blob/master/CHANGELOG.md) - [Commits](https://github.com/fnando/browser/compare/v4.0.0...v4.1.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gemfile.lock') diff --git a/Gemfile.lock b/Gemfile.lock index fed0efc0e..e69eceb6c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -119,7 +119,7 @@ GEM bootsnap (1.4.6) msgpack (~> 1.0) brakeman (4.8.1) - browser (4.0.0) + browser (4.1.0) builder (3.2.4) bullet (6.1.0) activesupport (>= 3.0.0) -- cgit From 7e97ef1eb097d105ad70d3a13a6e107ca3221c69 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 May 2020 01:10:02 +0900 Subject: Bump raabro from 1.1.6 to 1.3.1 (#13738) Bumps [raabro](https://github.com/floraison/raabro) from 1.1.6 to 1.3.1. - [Release notes](https://github.com/floraison/raabro/releases) - [Changelog](https://github.com/floraison/raabro/blob/master/CHANGELOG.md) - [Commits](https://github.com/floraison/raabro/compare/v1.1.6...v1.3.1) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gemfile.lock') diff --git a/Gemfile.lock b/Gemfile.lock index e69eceb6c..895fa4c7b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -438,7 +438,7 @@ GEM nio4r (~> 2.0) pundit (2.1.0) activesupport (>= 3.0.0) - raabro (1.1.6) + raabro (1.3.1) rack (2.2.2) rack-attack (6.3.0) rack (>= 1.0, < 3) -- cgit From 4939eb40b359621eab9583e02eb51707842c4ea5 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 May 2020 01:10:24 +0900 Subject: Bump public_suffix from 4.0.4 to 4.0.5 (#13736) Bumps [public_suffix](https://github.com/weppos/publicsuffix-ruby) from 4.0.4 to 4.0.5. - [Release notes](https://github.com/weppos/publicsuffix-ruby/releases) - [Changelog](https://github.com/weppos/publicsuffix-ruby/blob/master/CHANGELOG.md) - [Commits](https://github.com/weppos/publicsuffix-ruby/compare/v4.0.4...v4.0.5) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Gemfile.lock') diff --git a/Gemfile.lock b/Gemfile.lock index 895fa4c7b..899624064 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -433,7 +433,7 @@ GEM pry (~> 0.13.0) pry-rails (0.3.9) pry (>= 0.10.4) - public_suffix (4.0.4) + public_suffix (4.0.5) puma (4.3.3) nio4r (~> 2.0) pundit (2.1.0) -- cgit From 78202e9138bd605c76d19d5b9d7121d1ae6b5e06 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 12 May 2020 15:25:33 +0200 Subject: Bump doorkeeper from 5.3.3 to 5.4.0 (#13733) * Bump doorkeeper from 5.3.3 to 5.4.0 Bumps [doorkeeper](https://github.com/doorkeeper-gem/doorkeeper) from 5.3.3 to 5.4.0. - [Release notes](https://github.com/doorkeeper-gem/doorkeeper/releases) - [Changelog](https://github.com/doorkeeper-gem/doorkeeper/blob/master/CHANGELOG.md) - [Commits](https://github.com/doorkeeper-gem/doorkeeper/compare/v5.3.3...v5.4.0) Signed-off-by: dependabot-preview[bot] * Fix tests * Fix use of Doorkeeper::AccessToken.find_or_create_for * Fix tests? Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Thibaut Girka --- Gemfile | 2 +- Gemfile.lock | 4 ++-- app/models/web/push_subscription.rb | 10 +++++----- spec/controllers/api/v1/accounts_controller_spec.rb | 2 +- spec/controllers/oauth/authorizations_controller_spec.rb | 10 +++++----- spec/controllers/oauth/tokens_controller_spec.rb | 5 +++-- 6 files changed, 17 insertions(+), 16 deletions(-) (limited to 'Gemfile.lock') diff --git a/Gemfile b/Gemfile index 890b0ee97..3150c368d 100644 --- a/Gemfile +++ b/Gemfile @@ -49,7 +49,7 @@ gem 'omniauth-saml', '~> 1.10' gem 'omniauth', '~> 1.9' gem 'discard', '~> 1.2' -gem 'doorkeeper', '~> 5.3' +gem 'doorkeeper', '~> 5.4' gem 'fast_blank', '~> 1.0' gem 'fastimage' gem 'goldfinger', '~> 2.1' diff --git a/Gemfile.lock b/Gemfile.lock index 899624064..accac821b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -194,7 +194,7 @@ GEM docile (1.3.2) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) - doorkeeper (5.3.3) + doorkeeper (5.4.0) railties (>= 5) dotenv (2.7.5) dotenv-rails (2.7.5) @@ -697,7 +697,7 @@ DEPENDENCIES devise-two-factor (~> 3.1) devise_pam_authenticatable2 (~> 9.2) discard (~> 1.2) - doorkeeper (~> 5.3) + doorkeeper (~> 5.4) dotenv-rails (~> 2.7) e2mmap (~> 0.1.0) fabrication (~> 2.21) diff --git a/app/models/web/push_subscription.rb b/app/models/web/push_subscription.rb index c5dbb58ba..c407a7789 100644 --- a/app/models/web/push_subscription.rb +++ b/app/models/web/push_subscription.rb @@ -94,11 +94,11 @@ class Web::PushSubscription < ApplicationRecord def find_or_create_access_token Doorkeeper::AccessToken.find_or_create_for( - Doorkeeper::Application.find_by(superapp: true), - session_activation.user_id, - Doorkeeper::OAuth::Scopes.from_string('read write follow push'), - Doorkeeper.configuration.access_token_expires_in, - Doorkeeper.configuration.refresh_token_enabled? + application: Doorkeeper::Application.find_by(superapp: true), + resource_owner: session_activation.user_id, + scopes: Doorkeeper::OAuth::Scopes.from_string('read write follow push'), + expires_in: Doorkeeper.configuration.access_token_expires_in, + use_refresh_token: Doorkeeper.configuration.refresh_token_enabled? ) end end diff --git a/spec/controllers/api/v1/accounts_controller_spec.rb b/spec/controllers/api/v1/accounts_controller_spec.rb index f5f65c000..024409dab 100644 --- a/spec/controllers/api/v1/accounts_controller_spec.rb +++ b/spec/controllers/api/v1/accounts_controller_spec.rb @@ -21,7 +21,7 @@ RSpec.describe Api::V1::AccountsController, type: :controller do describe 'POST #create' do let(:app) { Fabricate(:application) } - let(:token) { Doorkeeper::AccessToken.find_or_create_for(app, nil, 'read write', nil, false) } + let(:token) { Doorkeeper::AccessToken.find_or_create_for(application: app, resource_owner: nil, scopes: 'read write', use_refresh_token: false) } let(:agreement) { nil } before do diff --git a/spec/controllers/oauth/authorizations_controller_spec.rb b/spec/controllers/oauth/authorizations_controller_spec.rb index a84260a54..c5eeea397 100644 --- a/spec/controllers/oauth/authorizations_controller_spec.rb +++ b/spec/controllers/oauth/authorizations_controller_spec.rb @@ -41,11 +41,11 @@ RSpec.describe Oauth::AuthorizationsController, type: :controller do context 'when app is already authorized' do before do Doorkeeper::AccessToken.find_or_create_for( - app, - user.id, - app.scopes, - Doorkeeper.configuration.access_token_expires_in, - Doorkeeper.configuration.refresh_token_enabled? + application: app, + resource_owner: user.id, + scopes: app.scopes, + expires_in: Doorkeeper.configuration.access_token_expires_in, + use_refresh_token: Doorkeeper.configuration.refresh_token_enabled? ) end diff --git a/spec/controllers/oauth/tokens_controller_spec.rb b/spec/controllers/oauth/tokens_controller_spec.rb index ba8e367a6..3804e035b 100644 --- a/spec/controllers/oauth/tokens_controller_spec.rb +++ b/spec/controllers/oauth/tokens_controller_spec.rb @@ -5,11 +5,12 @@ require 'rails_helper' RSpec.describe Oauth::TokensController, type: :controller do describe 'POST #revoke' do let!(:user) { Fabricate(:user) } - let!(:access_token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } + let!(:application) { Fabricate(:application, confidential: false) } + let!(:access_token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, application: application) } let!(:web_push_subscription) { Fabricate(:web_push_subscription, user: user, access_token: access_token) } before do - post :revoke, params: { token: access_token.token } + post :revoke, params: { client_id: application.uid, token: access_token.token } end it 'revokes the token' do -- cgit