diaspora_federation 0.0.5 → 0.0.6
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 +4 -4
- data/lib/diaspora_federation/validators.rb +1 -1
- data/lib/diaspora_federation/validators/h_card_validator.rb +3 -3
- data/lib/diaspora_federation/validators/person_validator.rb +1 -1
- data/lib/diaspora_federation/validators/profile_validator.rb +6 -7
- data/lib/diaspora_federation/validators/web_finger_validator.rb +6 -6
- data/lib/diaspora_federation/version.rb +1 -1
- metadata +4 -5
- data/lib/diaspora_federation/validators/rules/nilable_uri.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6fb6d319c4da3c247e0215f53e4cbc01be44bab
|
4
|
+
data.tar.gz: c1b7abc5e4ee6c7ab0304f0e31cab3c3b1c7e498
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9307f19b1d29a5428115101edf46849c3f0a992beb2ca294cf216c07018414cb1e27e300ea7505a37c777378188019d1a5d6151f699d78a2c9c2be47f5da913
|
7
|
+
data.tar.gz: 5e1efb1c1551e1b1716455337044507ad77223368e6b0e16381a1a6f421acec0a4c9ddf50e739f205d9f207c7acc3afb7d1bce2617633428da16c3b64d9c6072
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "validation"
|
2
2
|
require "validation/rule/regular_expression"
|
3
|
+
require "validation/rule/length"
|
3
4
|
require "validation/rule/not_empty"
|
4
5
|
require "validation/rule/uri"
|
5
6
|
|
@@ -18,7 +19,6 @@ require "diaspora_federation/validators/rules/birthday"
|
|
18
19
|
require "diaspora_federation/validators/rules/boolean"
|
19
20
|
require "diaspora_federation/validators/rules/diaspora_id"
|
20
21
|
require "diaspora_federation/validators/rules/guid"
|
21
|
-
require "diaspora_federation/validators/rules/nilable_uri"
|
22
22
|
require "diaspora_federation/validators/rules/not_nil"
|
23
23
|
require "diaspora_federation/validators/rules/public_key"
|
24
24
|
require "diaspora_federation/validators/rules/tag_count"
|
@@ -18,9 +18,9 @@ module DiasporaFederation
|
|
18
18
|
rule :last_name, regular_expression: {regex: /\A[^;]{,32}\z/}
|
19
19
|
|
20
20
|
# this urls can be relative
|
21
|
-
rule :photo_large_url, [:not_nil,
|
22
|
-
rule :photo_medium_url, [:not_nil,
|
23
|
-
rule :photo_small_url, [:not_nil,
|
21
|
+
rule :photo_large_url, [:not_nil, URI: [:path]]
|
22
|
+
rule :photo_medium_url, [:not_nil, URI: [:path]]
|
23
|
+
rule :photo_small_url, [:not_nil, URI: [:path]]
|
24
24
|
|
25
25
|
# rule :exported_key, :public_key
|
26
26
|
|
@@ -12,16 +12,15 @@ module DiasporaFederation
|
|
12
12
|
rule :last_name, regular_expression: {regex: /\A[^;]{,32}\z/}
|
13
13
|
|
14
14
|
# this urls can be relative
|
15
|
-
rule :image_url,
|
16
|
-
rule :image_url_medium,
|
17
|
-
rule :image_url_small,
|
15
|
+
rule :image_url, URI: [:path]
|
16
|
+
rule :image_url_medium, URI: [:path]
|
17
|
+
rule :image_url_small, URI: [:path]
|
18
18
|
|
19
19
|
rule :birthday, :birthday
|
20
20
|
|
21
|
-
|
22
|
-
rule :
|
23
|
-
rule :
|
24
|
-
rule :location, regular_expression: {regex: /\A.{,255}\z/}
|
21
|
+
rule :gender, length: {maximum: 255}
|
22
|
+
rule :bio, length: {maximum: 65_535}
|
23
|
+
rule :location, length: {maximum: 255}
|
25
24
|
|
26
25
|
rule :searchable, :boolean
|
27
26
|
|
@@ -9,12 +9,12 @@ module DiasporaFederation
|
|
9
9
|
|
10
10
|
rule :acct_uri, :not_empty
|
11
11
|
|
12
|
-
rule :alias_url, [:not_nil,
|
13
|
-
rule :hcard_url, [:not_nil,
|
14
|
-
rule :seed_url, %i(not_nil
|
15
|
-
rule :profile_url, [:not_nil,
|
16
|
-
rule :atom_url, [:not_nil,
|
17
|
-
rule :salmon_url, [:not_nil,
|
12
|
+
rule :alias_url, [:not_nil, URI: %i(host path)]
|
13
|
+
rule :hcard_url, [:not_nil, URI: %i(host path)]
|
14
|
+
rule :seed_url, %i(not_nil URI)
|
15
|
+
rule :profile_url, [:not_nil, URI: %i(host path)]
|
16
|
+
rule :atom_url, [:not_nil, URI: %i(host path)]
|
17
|
+
rule :salmon_url, [:not_nil, URI: %i(host path)]
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diaspora_federation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benjamin Neff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 0.
|
81
|
+
version: 1.0.0
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 0.
|
88
|
+
version: 1.0.0
|
89
89
|
description: This gem provides the functionality for de-/serialization and de-/encryption
|
90
90
|
of Entities in the protocols used for communication among the various installations
|
91
91
|
of Diaspora*
|
@@ -121,7 +121,6 @@ files:
|
|
121
121
|
- lib/diaspora_federation/validators/rules/boolean.rb
|
122
122
|
- lib/diaspora_federation/validators/rules/diaspora_id.rb
|
123
123
|
- lib/diaspora_federation/validators/rules/guid.rb
|
124
|
-
- lib/diaspora_federation/validators/rules/nilable_uri.rb
|
125
124
|
- lib/diaspora_federation/validators/rules/not_nil.rb
|
126
125
|
- lib/diaspora_federation/validators/rules/public_key.rb
|
127
126
|
- lib/diaspora_federation/validators/rules/tag_count.rb
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Validation
|
2
|
-
module Rule
|
3
|
-
# URI validation rule
|
4
|
-
|
5
|
-
# It allows +nil+, so maybe add an additional {Rule::NotNil} rule.
|
6
|
-
class NilableURI < Validation::Rule::URI
|
7
|
-
# The error key for this rule
|
8
|
-
# @return [Symbol] error key
|
9
|
-
def error_key
|
10
|
-
:nilableURI
|
11
|
-
end
|
12
|
-
|
13
|
-
# Determines if value is a valid URI
|
14
|
-
def valid_value?(uri_string)
|
15
|
-
uri_string.nil? || super
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|