Remove dependency on OStatus2 gem (#12822)
parent
6ecc16de91
commit
57e2833f6a
1
Gemfile
1
Gemfile
|
@ -68,7 +68,6 @@ gem 'nilsimsa', git: 'https://github.com/witgo/nilsimsa', ref: 'fd184883048b922b
|
||||||
gem 'nokogiri', '~> 1.10'
|
gem 'nokogiri', '~> 1.10'
|
||||||
gem 'nsa', '~> 0.2'
|
gem 'nsa', '~> 0.2'
|
||||||
gem 'oj', '~> 3.10'
|
gem 'oj', '~> 3.10'
|
||||||
gem 'ostatus2', '~> 2.0'
|
|
||||||
gem 'ox', '~> 2.11'
|
gem 'ox', '~> 2.11'
|
||||||
gem 'parslet'
|
gem 'parslet'
|
||||||
gem 'parallel', '~> 1.19'
|
gem 'parallel', '~> 1.19'
|
||||||
|
|
|
@ -409,10 +409,6 @@ GEM
|
||||||
omniauth (~> 1.3, >= 1.3.2)
|
omniauth (~> 1.3, >= 1.3.2)
|
||||||
ruby-saml (~> 1.7)
|
ruby-saml (~> 1.7)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
ostatus2 (2.0.3)
|
|
||||||
addressable (~> 2.5)
|
|
||||||
http (~> 3.0)
|
|
||||||
nokogiri (~> 1.8)
|
|
||||||
ox (2.11.0)
|
ox (2.11.0)
|
||||||
paperclip (6.0.0)
|
paperclip (6.0.0)
|
||||||
activemodel (>= 4.2.0)
|
activemodel (>= 4.2.0)
|
||||||
|
|
|
@ -314,10 +314,6 @@ class Account < ApplicationRecord
|
||||||
self.fields = tmp
|
self.fields = tmp
|
||||||
end
|
end
|
||||||
|
|
||||||
def subscription(webhook_url)
|
|
||||||
@subscription ||= OStatus2::Subscription.new(remote_url, secret: secret, webhook: webhook_url, hub: hub_url)
|
|
||||||
end
|
|
||||||
|
|
||||||
def save_with_optional_media!
|
def save_with_optional_media!
|
||||||
save!
|
save!
|
||||||
rescue ActiveRecord::RecordInvalid
|
rescue ActiveRecord::RecordInvalid
|
||||||
|
|
|
@ -215,13 +215,6 @@ RSpec.describe Account, type: :model do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#subscription' do
|
|
||||||
it 'returns an OStatus subscription' do
|
|
||||||
account = Fabricate(:account)
|
|
||||||
expect(account.subscription('')).to be_instance_of OStatus2::Subscription
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe '#object_type' do
|
describe '#object_type' do
|
||||||
it 'is always a person' do
|
it 'is always a person' do
|
||||||
account = Fabricate(:account)
|
account = Fabricate(:account)
|
||||||
|
|
Loading…
Reference in New Issue