jekyll-activity-pub 0.2.10 → 0.3.0rc0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7c8c48c9feaf8a6694f65b9ed392a1934ccb492105b701681ee1048c73dbfce
4
- data.tar.gz: 7a3520277e1c376e3bf03c0f8c1bb7639185b1a0d61e8ec0759aba9f775b8628
3
+ metadata.gz: b080ff169e0ffc7f1fd426bb430184dd6bdc31892e7e6e2e9c04743120da2d12
4
+ data.tar.gz: c204a966b5a1d13de4b16b1702abf04dd8534619eeea8c1fb306fdd22b576f42
5
5
  SHA512:
6
- metadata.gz: b8a2b458cf7785d417a7140086dd946242c945ab19fd484d01b843c4c01e860e64562246f46255842838728021b899b138db1a2bcb0d7d4897ae11ce03fcaee5
7
- data.tar.gz: 0cd9c974e382de6afc6e38d507a199ce41d5f7d356ea61a3304339cf9732cac7c771a9924332c6d8ccdacc5d2f803a7d4085d1809ebfc78c6716b77454afef35
6
+ metadata.gz: 1c30c6370c280c624afede374d625d54ed28013ca8e054979ba8a28272bf0ff010d4db0280a8368597a3e04d3dbe49590e5ea60430e0d84a851cc3a164461a87
7
+ data.tar.gz: a0c722700b32111c2d4cbad2806dee25155f3dbce9981844215fbb7d4a0bbb484188b3ed400d37847873dc1d87de9f2c4858af541c985e04e9b35f1efe9a6cca
@@ -70,7 +70,7 @@ module Jekyll
70
70
  },
71
71
  'attachment' => attachments,
72
72
  'tag' => [],
73
- 'replies' => []
73
+ 'replies' => Notifier.client.absolute_url(Notifier.replies(absolute_url(url)).endpoint)
74
74
  }
75
75
 
76
76
  nil
@@ -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]
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.2.10
4
+ version: 0.3.0rc0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sutty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-29 00:00:00.000000000 Z
11
+ date: 2024-06-14 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.4.2
19
+ version: 0.5.0rc1
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.4.2
26
+ version: 0.5.0rc1
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: '0'
210
+ version: 1.3.1
211
211
  requirements: []
212
212
  rubygems_version: 3.3.26
213
213
  signing_key: