Merge commit '377952703cf70f14008cc7938479558d8cca9903' into glitch-soc/merge-upstream
This commit is contained in:
commit
208b556c18
@ -59,7 +59,7 @@ body:
|
||||
Any additional technical details you may have, like logs or error traces
|
||||
value: |
|
||||
If this is happening on your own Mastodon server, please fill out those:
|
||||
- Ruby version: (from `ruby --version`, eg. v3.4.4)
|
||||
- Ruby version: (from `ruby --version`, eg. v3.4.9)
|
||||
- Node.js version: (from `node --version`, eg. v22.16.0)
|
||||
validations:
|
||||
required: false
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/3.troubleshooting.yml
vendored
2
.github/ISSUE_TEMPLATE/3.troubleshooting.yml
vendored
@ -60,7 +60,7 @@ body:
|
||||
value: |
|
||||
Please at least include those informations:
|
||||
- Operating system: (eg. Ubuntu 24.04.2)
|
||||
- Ruby version: (from `ruby --version`, eg. v3.4.4)
|
||||
- Ruby version: (from `ruby --version`, eg. v3.4.9)
|
||||
- Node.js version: (from `node --version`, eg. v22.16.0)
|
||||
validations:
|
||||
required: false
|
||||
|
||||
2
.github/actions/setup-ruby/action.yml
vendored
2
.github/actions/setup-ruby/action.yml
vendored
@ -17,7 +17,7 @@ runs:
|
||||
sudo apt-get install -y libicu-dev libidn11-dev libvips42 ${{ inputs.additional-system-dependencies }}
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1
|
||||
uses: ruby/setup-ruby@4eb9f110bac952a8b68ecf92e3b5c7a987594ba6 # v1
|
||||
with:
|
||||
ruby-version: ${{ inputs.ruby-version }}
|
||||
bundler-cache: true
|
||||
|
||||
2
.github/workflows/bundler-audit.yml
vendored
2
.github/workflows/bundler-audit.yml
vendored
@ -31,7 +31,7 @@ jobs:
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1
|
||||
uses: ruby/setup-ruby@4eb9f110bac952a8b68ecf92e3b5c7a987594ba6 # v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
|
||||
|
||||
2
.github/workflows/lint-haml.yml
vendored
2
.github/workflows/lint-haml.yml
vendored
@ -36,7 +36,7 @@ jobs:
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1
|
||||
uses: ruby/setup-ruby@4eb9f110bac952a8b68ecf92e3b5c7a987594ba6 # v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
|
||||
|
||||
2
.github/workflows/lint-ruby.yml
vendored
2
.github/workflows/lint-ruby.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@09a7688d3b55cf0e976497ff046b70949eeaccfd # v1
|
||||
uses: ruby/setup-ruby@4eb9f110bac952a8b68ecf92e3b5c7a987594ba6 # v1
|
||||
with:
|
||||
bundler-cache: true
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
3.4.8
|
||||
3.4.9
|
||||
|
||||
1152
CHANGELOG.md
1152
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@ ARG BASE_REGISTRY="docker.io"
|
||||
|
||||
# Ruby image to use for base image, change with [--build-arg RUBY_VERSION="3.4.x"]
|
||||
# renovate: datasource=docker depName=docker.io/ruby
|
||||
ARG RUBY_VERSION="3.4.8"
|
||||
ARG RUBY_VERSION="3.4.9"
|
||||
# # Node.js version to use in base image, change with [--build-arg NODE_MAJOR_VERSION="22"]
|
||||
# renovate: datasource=node-version depName=node
|
||||
ARG NODE_MAJOR_VERSION="24"
|
||||
|
||||
4
Gemfile
4
Gemfile
@ -102,10 +102,10 @@ gem 'rdf-normalize', '~> 0.5'
|
||||
|
||||
gem 'prometheus_exporter', '~> 2.2', require: false
|
||||
|
||||
gem 'opentelemetry-api', '~> 1.7.0'
|
||||
gem 'opentelemetry-api', '~> 1.8.0'
|
||||
|
||||
group :opentelemetry do
|
||||
gem 'opentelemetry-exporter-otlp', '~> 0.31.0', require: false
|
||||
gem 'opentelemetry-exporter-otlp', '~> 0.32.0', require: false
|
||||
gem 'opentelemetry-instrumentation-active_job', '~> 0.10.0', require: false
|
||||
gem 'opentelemetry-instrumentation-active_model_serializers', '~> 0.24.0', require: false
|
||||
gem 'opentelemetry-instrumentation-concurrent_ruby', '~> 0.24.0', require: false
|
||||
|
||||
11
Gemfile.lock
11
Gemfile.lock
@ -510,10 +510,11 @@ GEM
|
||||
openssl (4.0.1)
|
||||
openssl-signature_algorithm (1.3.0)
|
||||
openssl (> 2.0)
|
||||
opentelemetry-api (1.7.0)
|
||||
opentelemetry-api (1.8.0)
|
||||
logger
|
||||
opentelemetry-common (0.23.0)
|
||||
opentelemetry-api (~> 1.0)
|
||||
opentelemetry-exporter-otlp (0.31.1)
|
||||
opentelemetry-exporter-otlp (0.32.0)
|
||||
google-protobuf (>= 3.18)
|
||||
googleapis-common-protos-types (~> 1.3)
|
||||
opentelemetry-api (~> 1.1)
|
||||
@ -1020,8 +1021,8 @@ DEPENDENCIES
|
||||
omniauth-rails_csrf_protection (~> 2.0)
|
||||
omniauth-saml (~> 2.0)
|
||||
omniauth_openid_connect (~> 0.8.0)
|
||||
opentelemetry-api (~> 1.7.0)
|
||||
opentelemetry-exporter-otlp (~> 0.31.0)
|
||||
opentelemetry-api (~> 1.8.0)
|
||||
opentelemetry-exporter-otlp (~> 0.32.0)
|
||||
opentelemetry-instrumentation-active_job (~> 0.10.0)
|
||||
opentelemetry-instrumentation-active_model_serializers (~> 0.24.0)
|
||||
opentelemetry-instrumentation-concurrent_ruby (~> 0.24.0)
|
||||
@ -1097,7 +1098,7 @@ DEPENDENCIES
|
||||
xorcist (~> 1.1)
|
||||
|
||||
RUBY VERSION
|
||||
ruby 3.4.8
|
||||
ruby 3.4.9
|
||||
|
||||
BUNDLED WITH
|
||||
4.0.8
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::AcceptFeatureRequestSerializer < ActivityPub::Serializer
|
||||
include RoutingHelper
|
||||
|
||||
attributes :id, :type, :actor, :to, :result
|
||||
|
||||
has_one :virtual_object, key: :object
|
||||
|
||||
def id
|
||||
[ActivityPub::TagManager.instance.uri_for(object.account), '#accepts/feature_requests/', object.id].join
|
||||
end
|
||||
|
||||
def type
|
||||
'Accept'
|
||||
end
|
||||
|
||||
def actor
|
||||
ActivityPub::TagManager.instance.uri_for(object.account)
|
||||
end
|
||||
|
||||
def to
|
||||
ActivityPub::TagManager.instance.uri_for(object.collection.account)
|
||||
end
|
||||
|
||||
def virtual_object
|
||||
object.activity_uri
|
||||
end
|
||||
|
||||
def result
|
||||
ap_account_feature_authorization_url(object.account_id, object)
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,29 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ActivityPub::RejectFeatureRequestSerializer < ActivityPub::Serializer
|
||||
include RoutingHelper
|
||||
|
||||
attributes :id, :type, :actor, :to
|
||||
|
||||
has_one :virtual_object, key: :object
|
||||
|
||||
def id
|
||||
[ActivityPub::TagManager.instance.uri_for(object.account), '#rejects/feature_requests/', object.id].join
|
||||
end
|
||||
|
||||
def type
|
||||
'Reject'
|
||||
end
|
||||
|
||||
def actor
|
||||
ActivityPub::TagManager.instance.uri_for(object.account)
|
||||
end
|
||||
|
||||
def to
|
||||
ActivityPub::TagManager.instance.uri_for(object.collection.account)
|
||||
end
|
||||
|
||||
def virtual_object
|
||||
object.activity_uri
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,33 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ActivityPub::AcceptFeatureRequestSerializer do
|
||||
include RoutingHelper
|
||||
|
||||
subject { serialized_record_json(record, described_class, adapter: ActivityPub::Adapter) }
|
||||
|
||||
describe 'serializing an object' do
|
||||
let(:collection) { Fabricate(:remote_collection) }
|
||||
let(:record) do
|
||||
Fabricate(:collection_item,
|
||||
collection:,
|
||||
uri: 'https://example.com/featured_items/1',
|
||||
activity_uri: 'https://example.com/feature_requests/1',
|
||||
state: :accepted)
|
||||
end
|
||||
let(:tag_manager) { ActivityPub::TagManager.instance }
|
||||
|
||||
it 'returns expected attributes' do
|
||||
expect(subject)
|
||||
.to include(
|
||||
'id' => match("#accepts/feature_requests/#{record.id}"),
|
||||
'type' => 'Accept',
|
||||
'actor' => tag_manager.uri_for(record.account),
|
||||
'to' => tag_manager.uri_for(collection.account),
|
||||
'object' => 'https://example.com/feature_requests/1',
|
||||
'result' => ap_account_feature_authorization_url(record.account_id, record)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -0,0 +1,32 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe ActivityPub::RejectFeatureRequestSerializer do
|
||||
include RoutingHelper
|
||||
|
||||
subject { serialized_record_json(record, described_class, adapter: ActivityPub::Adapter) }
|
||||
|
||||
describe 'serializing an object' do
|
||||
let(:collection) { Fabricate(:remote_collection) }
|
||||
let(:record) do
|
||||
Fabricate(:collection_item,
|
||||
collection:,
|
||||
uri: 'https://example.com/featured_items/1',
|
||||
activity_uri: 'https://example.com/feature_requests/1',
|
||||
state: :rejected)
|
||||
end
|
||||
let(:tag_manager) { ActivityPub::TagManager.instance }
|
||||
|
||||
it 'returns expected attributes' do
|
||||
expect(subject)
|
||||
.to include(
|
||||
'id' => match("#rejects/feature_requests/#{record.id}"),
|
||||
'type' => 'Reject',
|
||||
'actor' => tag_manager.uri_for(record.account),
|
||||
'to' => tag_manager.uri_for(collection.account),
|
||||
'object' => 'https://example.com/feature_requests/1'
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user