Remove URL from hcard, it's not used anymore

This commit is contained in:
Benjamin Neff 2021-11-27 03:55:49 +01:00
parent d5107f5678
commit 6b8e8a70a0
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
2 changed files with 2 additions and 22 deletions

View file

@ -56,14 +56,6 @@ module DiasporaFederation
# @return [String] display name of the user
property :full_name, :string
# @!attribute [r] url
# @deprecated should be changed to the profile url. The pod url is in
# the WebFinger (see {WebFinger#seed_url}, will affect older diaspora*
# installations).
#
# @return [String] link to the pod
property :url, :string, optional: true
# @!attribute [r] public_key
# When a user is created on the pod, the pod MUST generate a pgp keypair
# for them. This key is used for signing messages. The format is a
@ -145,10 +137,6 @@ module DiasporaFederation
add_simple_property(content, :family_name, "family_name", @last_name)
#######################################
add_property(content, :url) do |html|
html.a(@url.to_s, id: "pod_location", class: "url", rel: "me", href: @url.to_s)
end
add_photos(content)
builder.doc.to_xhtml(indent: 2, indent_text: " ")

View file

@ -12,7 +12,6 @@ module DiasporaFederation
guid: person.guid,
nickname: person.nickname,
full_name: person.full_name,
url: person.url,
photo_large_url: photo_large_url,
photo_medium_url: photo_medium_url,
photo_small_url: photo_small_url,
@ -77,12 +76,6 @@ module DiasporaFederation
<span class="family_name">#{person.last_name}</span>
</dd>
</dl>
<dl class="entity_url">
<dt>Url</dt>
<dd>
<a id="pod_location" class="url" rel="me" href="#{person.url}">#{person.url}</a>
</dd>
</dl>
<dl class="entity_photo">
<dt>Photo</dt>
<dd>
@ -111,14 +104,14 @@ module DiasporaFederation
it_behaves_like "an Entity subclass"
context "generation" do
context "when generating" do
it "creates an instance from a data hash" do
hcard = Discovery::HCard.new(data)
expect(hcard.to_html).to eq(html)
end
end
context "parsing" do
context "when parsing" do
it "reads its own output" do
hcard = Discovery::HCard.from_html(html)
expect(hcard.guid).to eq(person.guid)
@ -221,7 +214,6 @@ module DiasporaFederation
expect(hcard.last_name).to eq(person.last_name)
expect(hcard.nickname).to be_nil
expect(hcard.url).to be_nil
end
it "is frozen after parsing" do