forked from glitch-soc/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
11 changed files
with
120 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ def patch | |
end | ||
|
||
def default_prerelease | ||
'alpha.1' | ||
'alpha.2' | ||
end | ||
|
||
def prerelease | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
namespace :sidekiq_unique_jobs do | ||
task delete_all_locks: :environment do | ||
digests = SidekiqUniqueJobs::Digests.new | ||
digests.delete_by_pattern('*', count: digests.count) | ||
|
||
expiring_digests = SidekiqUniqueJobs::ExpiringDigests.new | ||
expiring_digests.delete_by_pattern('*', count: expiring_digests.count) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,16 +39,33 @@ | |
Fabricate(:user, email: '[email protected]') | ||
end | ||
|
||
it 'matches the existing user, creates an identity, and redirects to root path' do | ||
expect { subject } | ||
.to not_change(User, :count) | ||
.and change(Identity, :count) | ||
.by(1) | ||
.and change(LoginActivity, :count) | ||
.by(1) | ||
context 'when ALLOW_UNSAFE_AUTH_PROVIDER_REATTACH is set to true' do | ||
around do |example| | ||
ClimateControl.modify ALLOW_UNSAFE_AUTH_PROVIDER_REATTACH: 'true' do | ||
example.run | ||
end | ||
end | ||
|
||
it 'matches the existing user, creates an identity, and redirects to root path' do | ||
expect { subject } | ||
.to not_change(User, :count) | ||
.and change(Identity, :count) | ||
.by(1) | ||
.and change(LoginActivity, :count) | ||
.by(1) | ||
|
||
expect(Identity.find_by(user: User.last).uid).to eq('123') | ||
expect(response).to redirect_to(root_path) | ||
end | ||
end | ||
|
||
expect(Identity.find_by(user: User.last).uid).to eq('123') | ||
expect(response).to redirect_to(root_path) | ||
context 'when ALLOW_UNSAFE_AUTH_PROVIDER_REATTACH is not set to true' do | ||
it 'does not match the existing user or create an identity' do | ||
expect { subject } | ||
.to not_change(User, :count) | ||
.and not_change(Identity, :count) | ||
.and not_change(LoginActivity, :count) | ||
end | ||
end | ||
end | ||
|
||
|
@@ -96,7 +113,7 @@ | |
|
||
context 'when a user cannot be built' do | ||
before do | ||
allow(User).to receive(:find_for_oauth).and_return(User.new) | ||
allow(User).to receive(:find_for_omniauth).and_return(User.new) | ||
end | ||
|
||
it 'redirects to the new user signup page' do | ||
|