jekyll-activity-pub 0.2.7 → 0.2.9

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: e5dbbab91a509e4edbb918ef90128a03415c702d3ff517c4d6466a3f38f183d1
4
- data.tar.gz: 0c99c1dd59dfdf75144ba48a8a1b820aa5ad2adec542edb3aebca4a05b1cebea
3
+ metadata.gz: 7b0f6f6119fa44051c64bd08a383c53abfa24e14becf78d7b3864024095f908f
4
+ data.tar.gz: b6b7f3d104dc9b02b4116f6f19a3b2ebbbf7644343842af0d90e2d271c060f86
5
5
  SHA512:
6
- metadata.gz: ed1203e6aac6abd5aaa2130c6bf6ed7d47130a18a4c3866ee078cee1d7c963e5d71e9285a6dbadfe8a096ca32ebadf215747edc33fde40a2f694457a829ed991
7
- data.tar.gz: 4d5e3a40dcd8d3fc8e64110c88d26319188d2ea43899c455b110c1cf154841114182033da31fd6fe0f02b67bfaaaf4c12567a896d7e5f28a4ab693f027dc0faa
6
+ metadata.gz: 5e48160e0d713f7c3cd9cbdafe8f60bc1d0fbeb55d369585d34b498ffa33065f0d5870bef2182364abff7b86813c2f4b4c5648dd995d9f0b938df0bf6a928bab
7
+ data.tar.gz: 4425e4ec5ddcd7cc9c0a283fbe72570016dd6c3d0089946b497a9dcc1372544807982a7eae9ade1d2045f30d73f2b63b7a5d50f8f571d372241a5537c1b8ffa4
@@ -127,14 +127,9 @@ module Jekyll
127
127
 
128
128
  actor_object = object_for(site.in_dest_dir(actor_url.sub(site.config['url'], '')))
129
129
 
130
- # Create inbox
131
- #
132
- # @todo Updating/Key rotation seems broken for now
133
- # @see {https://github.com/hyphacoop/social.distributed.press/issues/51}
134
- unless inbox.get.ok?
135
- unless (response = inbox.create(actor_url, announce?)).ok?
136
- raise NotificationError, "Couldn't create/update inbox (#{response.code}: #{response.message})"
137
- end
130
+ # Create/Update inbox
131
+ unless (response = inbox.create(actor_url, announce?)).ok?
132
+ raise NotificationError, "Couldn't create/update inbox (#{response.code}: #{response.message})"
138
133
  end
139
134
 
140
135
  # Remove notifications already performed and notify
@@ -11,7 +11,7 @@
11
11
  # activity generation but before write.
12
12
  require_relative 'jekyll-activity-pub-fep-fffd'
13
13
 
14
- Jekyll::Hooks.register %i[actor activity], :post_init, priority: 8 do |page|
14
+ Jekyll::Hooks.register %i[actor activity outbox following create update delete], :pre_render, priority: 8 do |page|
15
15
  Jekyll.logger.info 'FEP 1042:', 'Generating'
16
16
 
17
17
  site = page.site
@@ -72,8 +72,10 @@ Jekyll::Hooks.register %i[actor activity], :post_init, priority: 8 do |page|
72
72
  uri = Addressable::URI.parse(page.data['id'])
73
73
  add_protocol_to_uri(uri, protocol)
74
74
 
75
- formats.each do |format|
76
- url << Jekyll::ActivityPub::Link.new(site, uri.to_s, 'alternate', format)
75
+ if url
76
+ formats.each do |format|
77
+ url << Jekyll::ActivityPub::Link.new(site, uri.to_s, 'alternate', format)
78
+ end
77
79
  end
78
80
  end
79
81
 
@@ -84,7 +86,7 @@ Jekyll::Hooks.register %i[actor activity], :post_init, priority: 8 do |page|
84
86
  Jekyll.logger.debug 'FEP 1042:', "Generating #{uri.path} (#{protocol})"
85
87
 
86
88
  json = convert_uris(data, site.config['url'], protocol)
87
- json['url'] = url
89
+ json['url'] = url if url
88
90
  json['id'] = uri.to_s
89
91
 
90
92
  # XXX: Only works on forward slash OSes
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.7
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sutty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-05 00:00:00.000000000 Z
11
+ date: 2024-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: distributed-press-api-client