Skip to content
Extraits de code Groupes Projets
Valider fd61535e rédigé par Raphael's avatar Raphael
Parcourir les fichiers

Hcards working

parent 67f9d9da
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter