From 6b8e8a70a0051f89d38a34a38f94e627d9db28d3 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 27 Nov 2021 03:55:49 +0100 Subject: [PATCH] Remove URL from hcard, it's not used anymore --- lib/diaspora_federation/discovery/h_card.rb | 12 ------------ .../lib/diaspora_federation/discovery/h_card_spec.rb | 12 ++---------- 2 files changed, 2 insertions(+), 22 deletions(-) diff --git a/lib/diaspora_federation/discovery/h_card.rb b/lib/diaspora_federation/discovery/h_card.rb index 562979a..e75976d 100644 --- a/lib/diaspora_federation/discovery/h_card.rb +++ b/lib/diaspora_federation/discovery/h_card.rb @@ -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: " ") diff --git a/spec/lib/diaspora_federation/discovery/h_card_spec.rb b/spec/lib/diaspora_federation/discovery/h_card_spec.rb index 3c548c3..930876b 100644 --- a/spec/lib/diaspora_federation/discovery/h_card_spec.rb +++ b/spec/lib/diaspora_federation/discovery/h_card_spec.rb @@ -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 #{person.last_name} -
-
Url
-
- #{person.url} -
-
Photo
@@ -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