diaspora_federation-rails 0.1.4 → 0.1.5

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
  SHA1:
3
- metadata.gz: f55a0cdec4f63090a6132d416babd80064dee0fd
4
- data.tar.gz: 821476c44c89f514d0729824bd27d1fbb1f21abc
3
+ metadata.gz: 47fae5a4726c434f8ce0b77c6a6bbf06c641872b
4
+ data.tar.gz: a262a98fe5a2aa21f1a5d6990e4eef7194e5fdbc
5
5
  SHA512:
6
- metadata.gz: bf12bd1213e5c7794734bc74d0494a3f7045ae0991d7956b3d0f7de4ee2ca8cfc36acd7f9628c95531fd91d49b97481e714b9416e16adb2952a67f390375e15a
7
- data.tar.gz: cc7261afab64e2f4a4b2aded0e4d1c74bf07a646bcff4254ab86c770ad735c5ccd93029485cc5a72b577b73061e2c0889755603b9407bc56342d0e0524acf15d
6
+ metadata.gz: ebff723766c7bd4fbd0625c07efd8c303f60691acb7933745ec34d09dc974b5df765a29720332ea591cd89a3097314a3f43c72300c82599d28cc81d3d22beb14
7
+ data.tar.gz: 13d3822cc913032f07650f70e91da4ced5dc5f6805ead668c005d5eb2dc962830109e6b7db95ffa820eb8dee939c9a71d7f246b4f459f41dc19fbdf766383fcc
data/Changelog.md CHANGED
@@ -1,3 +1,14 @@
1
+ # 0.1.5
2
+
3
+ ## Refactor
4
+
5
+ * Use `head` method instead of `:nothing` option [44f6527](https://github.com/diaspora/diaspora_federation/commit/44f6527d64489c212c0f6b050ad343ea0e53e964)
6
+ * Add `sender` parameter to `:receive_entity` callback [fb60f83](https://github.com/diaspora/diaspora_federation/commit/fb60f8392698f49b9291f3461e7a68ec84def9e2)
7
+
8
+ ## Bug fixes
9
+
10
+ * HydraWrapper: Validate hostname after redirect [d18e623](https://github.com/diaspora/diaspora_federation/commit/d18e623082ac620a89e0542ceb97a9f2501c16bf)
11
+
1
12
  # 0.1.4
2
13
 
3
14
  ## Refactor
@@ -17,7 +17,7 @@ module DiasporaFederation
17
17
  entity.author, "/fetch/#{params[:type]}/#{params[:guid]}")
18
18
  end
19
19
  else
20
- render nothing: true, status: 404
20
+ head :not_found
21
21
  end
22
22
  end
23
23
 
@@ -10,7 +10,7 @@ module DiasporaFederation
10
10
  person_hcard = DiasporaFederation.callbacks.trigger(:fetch_person_for_hcard, params[:guid])
11
11
 
12
12
  if person_hcard.nil?
13
- render nothing: true, status: 404
13
+ head :not_found
14
14
  else
15
15
  logger.info "hcard profile request for: #{person_hcard.nickname}:#{person_hcard.guid}"
16
16
  # rubocop:disable Rails/OutputSafety
@@ -16,7 +16,7 @@ module DiasporaFederation
16
16
 
17
17
  DiasporaFederation.callbacks.trigger(:queue_public_receive, data, legacy)
18
18
 
19
- render nothing: true, status: 202
19
+ head :accepted
20
20
  end
21
21
 
22
22
  # Receives private messages for a user
@@ -30,7 +30,7 @@ module DiasporaFederation
30
30
 
31
31
  success = DiasporaFederation.callbacks.trigger(:queue_private_receive, params[:guid], data, legacy)
32
32
 
33
- render nothing: true, status: success ? 202 : 404
33
+ head success ? :accepted : :not_found
34
34
  end
35
35
 
36
36
  private
@@ -39,7 +39,7 @@ module DiasporaFederation
39
39
  # @deprecated
40
40
  def check_for_xml
41
41
  legacy_request = request.content_type.nil? || request.content_type == "application/x-www-form-urlencoded"
42
- render nothing: true, status: 422 if params[:xml].nil? && legacy_request
42
+ head :unprocessable_entity if params[:xml].nil? && legacy_request
43
43
  end
44
44
 
45
45
  def data_for_public_message(legacy)
@@ -38,7 +38,7 @@ module DiasporaFederation
38
38
  person_wf = find_person_webfinger(params[:q]) if params[:q]
39
39
 
40
40
  if person_wf.nil?
41
- render nothing: true, status: 404
41
+ head :not_found
42
42
  else
43
43
  logger.info "webfinger profile request for: #{person_wf.acct_uri}"
44
44
  render xml: person_wf.to_xml, content_type: "application/xrd+xml"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diaspora_federation-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Neff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-21 00:00:00.000000000 Z
11
+ date: 2016-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.4
33
+ version: 0.1.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 0.1.4
40
+ version: 0.1.5
41
41
  description: A rails engine that adds the diaspora* federation protocol to a rails
42
42
  app
43
43
  email: