diaspora_federation-rails 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +28 -0
- data/README.md +2 -1
- data/app/controllers/diaspora_federation/application_controller.rb +1 -1
- data/app/controllers/diaspora_federation/fetch_controller.rb +2 -2
- data/app/controllers/diaspora_federation/h_card_controller.rb +4 -2
- data/app/controllers/diaspora_federation/receive_controller.rb +4 -4
- data/app/controllers/diaspora_federation/webfinger_controller.rb +4 -4
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07debe6c60e4f4451c9a5299d2be175ed24a2a28
|
4
|
+
data.tar.gz: 146e7ce9151f9ec30d369a062dd0e11de9b576d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15f3f2245c89c62cd623872d98d24d759f4dd33ee0c25c27fe93f1f16411523092e554f476fcfa932b2bbd8ce2e3bb481bd38c939bdc68a15d508b7bbff2656a
|
7
|
+
data.tar.gz: 11fc960091e6199ecc2d49025d563ae5d39fccc26278ac05b0acad47d87156026c49691abef912eb0a3d03654d109d540535560c4198279b413806f5a2690127
|
data/Changelog.md
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# 0.1.2
|
2
|
+
|
3
|
+
## Refactor
|
4
|
+
|
5
|
+
* Improve code documentation [#38](https://github.com/diaspora/diaspora_federation/pull/38)
|
6
|
+
* Improve validation [9b32315](https://github.com/diaspora/diaspora_federation/commit/9b3231583d85e6007bf43cedc4480f043c8bde15) [eb8cdef](https://github.com/diaspora/diaspora_federation/commit/eb8cdef604cc8fe71e8455f36a317d80657f1582) [0980294](https://github.com/diaspora/diaspora_federation/commit/0980294a0d259cba1fa2a2a655163b3fa844d239)
|
7
|
+
* Photo: `status_message_guid` is optional [4136fb9](https://github.com/diaspora/diaspora_federation/commit/4136fb973e7ad27158ef605df12727f4e959c3a3)
|
8
|
+
* A GUID is at most 255 chars long [f7d269c](https://github.com/diaspora/diaspora_federation/commit/f7d269cd6a4c1b48a7b34083f5fea04ac0835a48)
|
9
|
+
* hCard: `nickname` is optional [4b94949](https://github.com/diaspora/diaspora_federation/commit/4b949491df3a16b30f6e27113d6fa95c165c1edc)
|
10
|
+
* StatusMessage: Rename `raw_message` to `text` [2aaff56](https://github.com/diaspora/diaspora_federation/commit/2aaff56e147b505626a615d60564fbbf22c2f452) [#29](https://github.com/diaspora/diaspora_federation/issues/29)
|
11
|
+
|
12
|
+
## Bug fixes
|
13
|
+
|
14
|
+
* Do not reuse cURL sockets to avoid issues caused by too many simultaneous connections [#37](https://github.com/diaspora/diaspora_federation/pull/37)
|
15
|
+
* Handle empty xml-elements for nested entities [26b7991](https://github.com/diaspora/diaspora_federation/commit/26b7991defe1d84d10c1186a151676076946b26f)
|
16
|
+
* Gracefully handle missing xml elements of relayables [9097097](https://github.com/diaspora/diaspora_federation/commit/90970973a58cbc3d897d21a43c0a6c93a30605be)
|
17
|
+
|
18
|
+
# 0.1.1
|
19
|
+
|
20
|
+
## Features
|
21
|
+
|
22
|
+
* Fetch root posts for reshares [9b090a3](https://github.com/diaspora/diaspora_federation/commit/9b090a39501705f00403f124e215e78866039f1e)
|
23
|
+
|
24
|
+
# 0.1.0
|
25
|
+
|
26
|
+
## Features
|
27
|
+
|
28
|
+
* Added Salmon support
|
data/README.md
CHANGED
@@ -10,7 +10,8 @@
|
|
10
10
|
[![Inline docs](https://inch-ci.org/github/diaspora/diaspora_federation.svg?branch=master)](https://inch-ci.org/github/diaspora/diaspora_federation)
|
11
11
|
[![Gem Version](https://badge.fury.io/rb/diaspora_federation.svg)](https://badge.fury.io/rb/diaspora_federation)
|
12
12
|
|
13
|
-
[Documentation](http://www.rubydoc.info/gems/diaspora_federation/) |
|
13
|
+
[Gem Documentation](http://www.rubydoc.info/gems/diaspora_federation/) |
|
14
|
+
[Protocol Documentation](http://diaspora.github.io/diaspora_federation/) |
|
14
15
|
[Bugtracker](https://github.com/diaspora/diaspora_federation/issues)
|
15
16
|
|
16
17
|
This repository contains two gems:
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require_dependency "diaspora_federation/application_controller"
|
2
2
|
|
3
3
|
module DiasporaFederation
|
4
|
-
#
|
4
|
+
# This controller processes fetch requests.
|
5
5
|
class FetchController < ApplicationController
|
6
|
-
#
|
6
|
+
# Returns the fetched entity or a redirect
|
7
7
|
#
|
8
8
|
# GET /fetch/:type/:guid
|
9
9
|
def fetch
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require_dependency "diaspora_federation/application_controller"
|
2
2
|
|
3
3
|
module DiasporaFederation
|
4
|
-
#
|
4
|
+
# This controller generates the hcard.
|
5
5
|
class HCardController < ApplicationController
|
6
|
-
#
|
6
|
+
# Returns the hcard of the user
|
7
7
|
#
|
8
8
|
# GET /hcard/users/:guid
|
9
9
|
def hcard
|
@@ -13,7 +13,9 @@ module DiasporaFederation
|
|
13
13
|
render nothing: true, status: 404
|
14
14
|
else
|
15
15
|
logger.info "hcard profile request for: #{person_hcard.nickname}:#{person_hcard.guid}"
|
16
|
+
# rubocop:disable Rails/OutputSafety
|
16
17
|
render html: person_hcard.to_html.html_safe
|
18
|
+
# rubocop:enable Rails/OutputSafety
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
require_dependency "diaspora_federation/application_controller"
|
2
2
|
|
3
3
|
module DiasporaFederation
|
4
|
-
#
|
4
|
+
# This controller processes receiving messages.
|
5
5
|
class ReceiveController < ApplicationController
|
6
6
|
before_action :check_for_xml
|
7
7
|
|
8
|
-
#
|
8
|
+
# Receives public messages
|
9
9
|
#
|
10
10
|
# POST /receive/public
|
11
11
|
def public
|
@@ -19,7 +19,7 @@ module DiasporaFederation
|
|
19
19
|
render nothing: true, status: 202
|
20
20
|
end
|
21
21
|
|
22
|
-
#
|
22
|
+
# Receives private messages for a user
|
23
23
|
#
|
24
24
|
# POST /receive/users/:guid
|
25
25
|
def private
|
@@ -35,7 +35,7 @@ module DiasporaFederation
|
|
35
35
|
|
36
36
|
private
|
37
37
|
|
38
|
-
#
|
38
|
+
# Checks the xml parameter for legacy salmon slaps
|
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"
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require_dependency "diaspora_federation/application_controller"
|
2
2
|
|
3
3
|
module DiasporaFederation
|
4
|
-
#
|
4
|
+
# This controller handles all webfinger-specific requests.
|
5
5
|
class WebfingerController < ApplicationController
|
6
|
-
#
|
6
|
+
# Returns the host-meta xml
|
7
7
|
#
|
8
8
|
# example:
|
9
9
|
# <?xml version="1.0" encoding="UTF-8"?>
|
@@ -16,7 +16,7 @@ module DiasporaFederation
|
|
16
16
|
render xml: WebfingerController.host_meta_xml, content_type: "application/xrd+xml"
|
17
17
|
end
|
18
18
|
|
19
|
-
# @deprecated
|
19
|
+
# @deprecated This is the pre RFC 7033 webfinger.
|
20
20
|
#
|
21
21
|
# example:
|
22
22
|
# <?xml version="1.0" encoding="UTF-8"?>
|
@@ -45,7 +45,7 @@ module DiasporaFederation
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
#
|
48
|
+
# Creates the host-meta xml with the configured server_uri and caches it
|
49
49
|
# @return [String] XML string
|
50
50
|
def self.host_meta_xml
|
51
51
|
@host_meta_xml ||= Discovery::HostMeta.from_base_url(DiasporaFederation.server_uri.to_s).to_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
|
+
version: 0.1.2
|
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-
|
11
|
+
date: 2016-07-14 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.
|
33
|
+
version: 0.1.2
|
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.
|
40
|
+
version: 0.1.2
|
41
41
|
description: A rails engine that adds the diaspora* federation protocol to a rails
|
42
42
|
app
|
43
43
|
email:
|
@@ -46,6 +46,7 @@ executables: []
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
+
- Changelog.md
|
49
50
|
- LICENSE
|
50
51
|
- README.md
|
51
52
|
- app/controllers/diaspora_federation/application_controller.rb
|