fedipub 0.11.1 → 0.11.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8caaaf5871760f2d5ea12db27e6d41b0abb01519de50b92ae02b47b3211ea14f
4
- data.tar.gz: d765c7c71b545de84b50558ee7b37487acbc392677d138609cec4bf5fb35fe3a
3
+ metadata.gz: 7639af84b0fd94d17f78a71b632f49a4c427fa06b506080444f9a4aedfb11283
4
+ data.tar.gz: cc546207b7e42da12d0e48620ae7d2ca36450bb2d30ca506e34b3477355345b0
5
5
  SHA512:
6
- metadata.gz: 4a42bdd2b4aa0e4a8b9f7a22e45474c56a0f6494ae7e62b80f6b2bd169279a3073560549a7daa2fac307e0c7402f524825f9cfc6d156180977e1a536be30e46a
7
- data.tar.gz: d332cc8baebdcb6d213025dafb16c0a65a59f6168e82115d23a00b99b0861e213a9db1746f8940d24b78c794233bf360b6f4de37066b36879de95e450cdcc38f
6
+ metadata.gz: 1733d271950661a487f6bc2f18f53c9d43826fb970ce7fc1176f3a0309ef163019e52538506c1c69bdb4f662eb49cc871c17740e3d846ad7465d006c7ec358bd
7
+ data.tar.gz: 3e3215a5c83f758cf1a5907e68dd01565c953019e360b1d7397e60c2a2cbc8c3ebcf9eaf56828bc0e99a77d634dc4e4f42a0cf9834beeb49782680eeb3d9f27d
@@ -4,7 +4,7 @@ module Fedipub
4
4
  class ActorsController < Fedipub::Rails::ServerController
5
5
  include Fedipub::Rails::Server::RenderCollections
6
6
 
7
- before_action :set_actor, only: [:show, :followers, :following]
7
+ prepend_before_action :set_actor, only: [:show, :followers, :following]
8
8
 
9
9
  # GET /federation/actors/1
10
10
  # GET /federation/actors/1.json
@@ -19,7 +19,7 @@ module Fedipub
19
19
  private
20
20
 
21
21
  def verify_request_signature!
22
- Fediverse::Signature.verify!(request: request, require_signature: ServerController.require_signature?)
22
+ Fediverse::Signature.verify!(request: request, require_signature: ServerController.require_signature?) unless @actor&.application_actor?
23
23
  rescue Fedipub::Errors::BadSignature
24
24
  head :unauthorized
25
25
  end
@@ -16,7 +16,7 @@ json.endpoints do
16
16
  end
17
17
  json.followers actor.followers_url
18
18
  json.following actor.followings_url
19
- json.url actor.profile_url
19
+ json.url actor.application_actor? ? actor.federated_url : actor.profile_url
20
20
  if actor.public_key
21
21
  json.publicKey do
22
22
  json.id actor.key_id
@@ -1,3 +1,3 @@
1
1
  module Fedipub
2
- VERSION = '0.11.1'.freeze
2
+ VERSION = '0.11.2'.freeze
3
3
  end
@@ -47,7 +47,7 @@ module Fediverse
47
47
  rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordInvalid
48
48
  nil
49
49
  end
50
- rescue Errors::NotACollection
50
+ rescue Fedipub::Errors::NotACollection, Fedipub::Errors::UnhandledResponseStatus
51
51
  []
52
52
  end
53
53
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fedipub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manuel Tancoigne