jekyll-activity-pub 0.2.10 → 0.3.0rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jekyll/activity_pub/activity.rb +1 -1
- data/lib/jekyll/activity_pub/actor.rb +15 -1
- data/lib/jekyll/activity_pub/notifier.rb +27 -17
- data/lib/jekyll/activity_pub.rb +7 -6
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc3d5ad9feb4285713b031126cad8a1ab749c259c15071251e87397fff4b54f4
|
4
|
+
data.tar.gz: 52e8e472231b4d8cc8cdaaf527ccdfed8729fe1e953f7d9650570840fbf05cbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c02f3cb2df7a0471dbcf677baa0b91dccc8c5071b89705b1f0daa88ebb5f36deb711f148b7ee1dd8d1279e49ab77ae2ad2d375bcaf5d34a7e2019f0cff40497
|
7
|
+
data.tar.gz: 518e62f93b295c7baaa9ac54f7a835154987e05fa4d253e60520ce638ae52e3389e87694752713f30951bea882baaf3bab5ccb742bb0fd22b3972d688c1f23ee
|
@@ -40,7 +40,8 @@ module Jekyll
|
|
40
40
|
'@language' => locale,
|
41
41
|
'schema' => 'http://schema.org#',
|
42
42
|
'PropertyValue' => 'schema:PropertyValue',
|
43
|
-
'value' => 'schema:value'
|
43
|
+
'value' => 'schema:value',
|
44
|
+
'manuallyApprovesFollowers' => 'as:manuallyApprovesFollowers',
|
44
45
|
}
|
45
46
|
],
|
46
47
|
'type' => 'Person',
|
@@ -58,6 +59,7 @@ module Jekyll
|
|
58
59
|
'publicKey' => nil,
|
59
60
|
'published' => published.xmlschema,
|
60
61
|
'updated' => updated.xmlschema,
|
62
|
+
'manuallyApprovesFollowers' => manually_approves_followers?,
|
61
63
|
'attachment' => [
|
62
64
|
PropertyValue.new(website_name, website_link)
|
63
65
|
]
|
@@ -71,6 +73,18 @@ module Jekyll
|
|
71
73
|
|
72
74
|
private
|
73
75
|
|
76
|
+
# By default all followers are moderated
|
77
|
+
#
|
78
|
+
# @return [Boolean]
|
79
|
+
def manually_approves_followers?
|
80
|
+
@manually_approves_followers ||=
|
81
|
+
begin
|
82
|
+
config = site.config.dig('activity_pub', 'manually_approves_followers')
|
83
|
+
|
84
|
+
config.nil? ? true : config
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
74
88
|
# @return [Time]
|
75
89
|
def updated
|
76
90
|
@updated ||= site.config.dig('activity_pub', 'updated') || site.time
|
@@ -6,6 +6,7 @@ require 'distributed_press/version'
|
|
6
6
|
require 'distributed_press/v1/social/client'
|
7
7
|
require 'distributed_press/v1/social/inbox'
|
8
8
|
require 'distributed_press/v1/social/outbox'
|
9
|
+
require 'distributed_press/v1/social/replies'
|
9
10
|
require_relative 'errors'
|
10
11
|
require_relative 'create'
|
11
12
|
require_relative 'update'
|
@@ -273,6 +274,32 @@ module Jekyll
|
|
273
274
|
@@relative_path ||= Pathname.new(path).relative_path_from(site.source).to_s
|
274
275
|
end
|
275
276
|
|
277
|
+
def client
|
278
|
+
@@client ||= DistributedPress::V1::Social::Client.new(
|
279
|
+
private_key_pem: private_key,
|
280
|
+
url: url,
|
281
|
+
public_key_url: public_key_url,
|
282
|
+
logger: Jekyll.logger
|
283
|
+
)
|
284
|
+
end
|
285
|
+
|
286
|
+
def inbox
|
287
|
+
@@inbox ||= DistributedPress::V1::Social::Inbox.new(client: client, actor: actor)
|
288
|
+
end
|
289
|
+
|
290
|
+
def outbox
|
291
|
+
@@outbox ||= DistributedPress::V1::Social::Outbox.new(client: client, actor: actor)
|
292
|
+
end
|
293
|
+
|
294
|
+
# Generates a Replies client per activity
|
295
|
+
#
|
296
|
+
# @param activity [String] Activity ID
|
297
|
+
# @return [DistributedPress::V1::Social::Replies]
|
298
|
+
def replies(activity)
|
299
|
+
@@replies ||= {}
|
300
|
+
@@replies[activity] ||= DistributedPress::V1::Social::Replies.new(client: client, actor: actor, activity: activity)
|
301
|
+
end
|
302
|
+
|
276
303
|
private
|
277
304
|
|
278
305
|
# Finds the private key path on config
|
@@ -298,23 +325,6 @@ module Jekyll
|
|
298
325
|
@@config ||= site.config['activity_pub'] || {}
|
299
326
|
end
|
300
327
|
|
301
|
-
def client
|
302
|
-
@@client ||= DistributedPress::V1::Social::Client.new(
|
303
|
-
private_key_pem: private_key,
|
304
|
-
url: url,
|
305
|
-
public_key_url: public_key_url,
|
306
|
-
logger: Jekyll.logger
|
307
|
-
)
|
308
|
-
end
|
309
|
-
|
310
|
-
def inbox
|
311
|
-
@@inbox ||= DistributedPress::V1::Social::Inbox.new(client: client, actor: actor)
|
312
|
-
end
|
313
|
-
|
314
|
-
def outbox
|
315
|
-
@@outbox ||= DistributedPress::V1::Social::Outbox.new(client: client, actor: actor)
|
316
|
-
end
|
317
|
-
|
318
328
|
# Run action
|
319
329
|
#
|
320
330
|
# @param :path [String]
|
data/lib/jekyll/activity_pub.rb
CHANGED
@@ -4,16 +4,17 @@ require_relative 'activity_pub/webfinger'
|
|
4
4
|
require_relative 'activity_pub/actor'
|
5
5
|
require_relative 'activity_pub/activity'
|
6
6
|
require_relative 'activity_pub/outbox'
|
7
|
-
require_relative 'activity_pub/host_meta'
|
8
7
|
require_relative 'activity_pub/create'
|
9
|
-
require_relative 'activity_pub/
|
10
|
-
require_relative 'activity_pub/
|
8
|
+
require_relative 'activity_pub/followers'
|
9
|
+
require_relative 'activity_pub/following'
|
10
|
+
require_relative 'activity_pub/host_meta'
|
11
|
+
require_relative 'activity_pub/instance_v1'
|
12
|
+
require_relative 'activity_pub/instance_v2'
|
11
13
|
require_relative 'activity_pub/nodeinfo'
|
12
14
|
require_relative 'activity_pub/nodeinfo_20'
|
13
15
|
require_relative 'activity_pub/nodeinfo_21'
|
14
|
-
require_relative 'activity_pub/
|
15
|
-
require_relative 'activity_pub/
|
16
|
-
require_relative 'activity_pub/following'
|
16
|
+
require_relative 'activity_pub/public_key'
|
17
|
+
require_relative 'activity_pub/update'
|
17
18
|
|
18
19
|
module Jekyll
|
19
20
|
# ActivityPub
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-activity-pub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sutty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: distributed-press-api-client
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.5.0rc2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.5.0rc2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: jekyll
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -205,9 +205,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
205
205
|
version: '2.7'
|
206
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
207
207
|
requirements:
|
208
|
-
- - "
|
208
|
+
- - ">"
|
209
209
|
- !ruby/object:Gem::Version
|
210
|
-
version:
|
210
|
+
version: 1.3.1
|
211
211
|
requirements: []
|
212
212
|
rubygems_version: 3.3.26
|
213
213
|
signing_key:
|