mirror of
https://github.com/diaspora/diaspora.git
synced 2026-04-29 03:01:03 -04:00
Hcards working
This commit is contained in:
@@ -97,15 +97,12 @@ class Person
|
||||
|
||||
new_person.email = identifier
|
||||
|
||||
puts profile.hcard.first[:href]
|
||||
|
||||
hcard = HCard.find profile.hcard.first[:href]
|
||||
|
||||
receive_url = profile.links.select{ |l| l.rel == 'http://joindiaspora.com/seed_location'}.first.href
|
||||
new_person.url = hcard[:url]
|
||||
puts new_person.url
|
||||
new_person.profile = Profile.new(:first_name => hcard[:given_name], :last_name => hcard[:family_name])
|
||||
if new_person.save!
|
||||
if new_person.save
|
||||
new_person
|
||||
else
|
||||
nil
|
||||
|
||||
@@ -7,7 +7,6 @@ describe HCard do
|
||||
hcard = HCard.find f.hcard.first[:href]
|
||||
hcard[:family_name].include?("Hamiltom").should be true
|
||||
hcard[:given_name].include?("Alex").should be true
|
||||
pp hcard
|
||||
(hcard[:url] == "http://tom.joindiaspora.com").should be true
|
||||
hcard[:url].should == "http://tom.joindiaspora.com/"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -147,7 +147,6 @@ describe Person do
|
||||
|
||||
it 'should create a stub for a remote user' do
|
||||
tom = Person.by_webfinger('tom@tom.joindiaspora.com')
|
||||
puts tom.real_name
|
||||
tom.real_name.include?("Hamiltom").should be true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user