Skip to content

Commit

Permalink
Merge pull request #39 from dftba-club/2024-09-23-1
Browse files Browse the repository at this point in the history
2024 09 23 1
  • Loading branch information
nomad-geek authored Sep 23, 2024
2 parents 49cde67 + a725690 commit 20353fe
Show file tree
Hide file tree
Showing 350 changed files with 2,717 additions and 2,532 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ gem 'color_diff', '~> 0.1'
gem 'csv', '~> 3.2'
gem 'discard', '~> 1.2'
gem 'doorkeeper', '~> 5.6'
gem 'ed25519', '~> 1.3'
gem 'fast_blank', '~> 1.0'
gem 'fastimage'
gem 'hiredis', '~> 0.6'
Expand Down
18 changes: 8 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,20 @@ GEM
attr_required (1.0.2)
awrence (1.2.1)
aws-eventstream (1.3.0)
aws-partitions (1.974.0)
aws-sdk-core (3.205.0)
aws-partitions (1.977.0)
aws-sdk-core (3.206.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.9)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.91.0)
aws-sdk-core (~> 3, >= 3.205.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.162.0)
aws-sdk-s3 (1.163.0)
aws-sdk-core (~> 3, >= 3.205.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.9.1)
aws-sigv4 (1.10.0)
aws-eventstream (~> 1, >= 1.0.2)
azure-storage-blob (2.0.3)
azure-storage-common (~> 2.0)
Expand Down Expand Up @@ -197,7 +197,7 @@ GEM
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
devise-two-factor (5.1.0)
devise-two-factor (6.0.0)
activesupport (~> 7.0)
devise (~> 4.0)
railties (~> 7.0)
Expand All @@ -212,9 +212,8 @@ GEM
domain_name (0.6.20240107)
doorkeeper (5.7.1)
railties (>= 5)
dotenv (3.1.2)
dotenv (3.1.4)
drb (2.2.1)
ed25519 (1.3.0)
elasticsearch (7.17.11)
elasticsearch-api (= 7.17.11)
elasticsearch-transport (= 7.17.11)
Expand Down Expand Up @@ -429,7 +428,7 @@ GEM
addressable (~> 2.5)
azure-storage-blob (~> 2.0.1)
hashie (~> 5.0)
memory_profiler (1.0.2)
memory_profiler (1.1.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0820)
Expand Down Expand Up @@ -610,7 +609,7 @@ GEM
psych (5.1.2)
stringio
public_suffix (6.0.1)
puma (6.4.2)
puma (6.4.3)
nio4r (~> 2.0)
pundit (2.4.0)
activesupport (>= 3.0.0)
Expand Down Expand Up @@ -937,7 +936,6 @@ DEPENDENCIES
discard (~> 1.2)
doorkeeper (~> 5.6)
dotenv
ed25519 (~> 1.3)
email_spec
fabrication (~> 2.30)
faker (~> 3.2)
Expand Down
18 changes: 0 additions & 18 deletions app/controllers/activitypub/claims_controller.rb

This file was deleted.

6 changes: 2 additions & 4 deletions app/controllers/activitypub/collections_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ def set_items
@items = @items.map { |item| item.distributable? ? item : ActivityPub::TagManager.instance.uri_for(item) }
when 'tags'
@items = for_signed_account { @account.featured_tags }
when 'devices'
@items = @account.devices
else
not_found
end
end

def set_size
case params[:id]
when 'featured', 'devices', 'tags'
when 'featured', 'tags'
@size = @items.size
else
not_found
Expand All @@ -42,7 +40,7 @@ def set_type
case params[:id]
when 'featured'
@type = :ordered
when 'devices', 'tags'
when 'tags'
@type = :unordered
else
not_found
Expand Down
10 changes: 1 addition & 9 deletions app/controllers/api/oembed_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Api::OEmbedController < Api::BaseController
before_action :require_public_status!

def show
render json: @status, serializer: OEmbedSerializer, width: maxwidth_or_default, height: maxheight_or_default
render json: @status, serializer: OEmbedSerializer, width: params[:maxwidth], height: params[:maxheight]
end

private
Expand All @@ -23,12 +23,4 @@ def require_public_status!
def status_finder
StatusFinder.new(params[:url])
end

def maxwidth_or_default
(params[:maxwidth].presence || 400).to_i
end

def maxheight_or_default
params[:maxheight].present? ? params[:maxheight].to_i : nil
end
end
30 changes: 0 additions & 30 deletions app/controllers/api/v1/crypto/deliveries_controller.rb

This file was deleted.

47 changes: 0 additions & 47 deletions app/controllers/api/v1/crypto/encrypted_messages_controller.rb

This file was deleted.

25 changes: 0 additions & 25 deletions app/controllers/api/v1/crypto/keys/claims_controller.rb

This file was deleted.

17 changes: 0 additions & 17 deletions app/controllers/api/v1/crypto/keys/counts_controller.rb

This file was deleted.

26 changes: 0 additions & 26 deletions app/controllers/api/v1/crypto/keys/queries_controller.rb

This file was deleted.

29 changes: 0 additions & 29 deletions app/controllers/api/v1/crypto/keys/uploads_controller.rb

This file was deleted.

6 changes: 4 additions & 2 deletions app/controllers/api/v1/peers/search_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class Api::V1::Peers::SearchController < Api::BaseController
skip_before_action :require_authenticated_user!, unless: :limited_federation_mode?
skip_around_action :set_locale

LIMIT = 10

vary_by ''

def index
Expand Down Expand Up @@ -35,10 +37,10 @@ def set_domains
field: 'accounts_count',
modifier: 'log2p',
},
}).limit(10).pluck(:domain)
}).limit(LIMIT).pluck(:domain)
else
domain = normalized_domain
@domains = Instance.searchable.domain_starts_with(domain).limit(10).pluck(:domain)
@domains = Instance.searchable.domain_starts_with(domain).limit(LIMIT).pluck(:domain)
end
rescue Addressable::URI::InvalidURIError
@domains = []
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/web/embeds_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def show
return not_found if @status.hidden?

if @status.local?
render json: @status, serializer: OEmbedSerializer, width: 400
render json: @status, serializer: OEmbedSerializer
else
return not_found unless user_signed_in?

Expand Down
10 changes: 5 additions & 5 deletions app/controllers/auth/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ class Auth::SessionsController < Devise::SessionsController
p.form_action(false)
end

def check_suspicious!
user = find_user
@login_is_suspicious = suspicious_sign_in?(user) unless user.nil?
end

def create
super do |resource|
# We only need to call this if this hasn't already been
Expand Down Expand Up @@ -101,6 +96,11 @@ def require_no_authentication

private

def check_suspicious!
user = find_user
@login_is_suspicious = suspicious_sign_in?(user) unless user.nil?
end

def home_paths(resource)
paths = [about_path, '/explore']

Expand Down
Loading

0 comments on commit 20353fe

Please sign in to comment.