Merge branch 'master' of github.com:diaspora/diaspora

This commit is contained in:
danielvincent 2010-10-07 12:21:31 -07:00
commit 7e8bf40a87
65 changed files with 594 additions and 106 deletions

19
.gitignore vendored
View file

@ -1,22 +1,21 @@
.bundle .bundle
.DS_Store
.idea .idea
.rvmrc
*.swap *.swap
*.swp
*.swo *.swo
*.swp
*~ *~
.bundle bin/*
config/app_config.yml
config/fb_config.yml
config/initializers/secret_token.rb
db/*.sqlite3 db/*.sqlite3
log/* log/*
tmp/**/* nbproject
gpg/diaspora-development/*.gpg gpg/diaspora-development/*.gpg
gpg/diaspora-production/*.gpg gpg/diaspora-production/*.gpg
gpg/*/random_seed gpg/*/random_seed
public/uploads/* public/uploads/*
.rvmrc
.DS_Store
config/app_config.yml
bin/*
nbproject
config/initializers/secret_token.rb
public/source.tar public/source.tar
config/fb_config.yml tmp/**/*

View file

@ -18,6 +18,9 @@ instructions.
You are welcome to contribute, add to and extend Diaspora however you see fit. We You are welcome to contribute, add to and extend Diaspora however you see fit. We
will do our best to incorporate everything that meets our guidelines. will do our best to incorporate everything that meets our guidelines.
Please make your changes on a topic branch in your repo and submit your pull request
from there, so that commits you don't want to submit aren't included.
Please do not rebase our tree into yours. Please do not rebase our tree into yours.
See [here](http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html) See [here](http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html)
for when to rebase. for when to rebase.
@ -56,7 +59,7 @@ Ongoing discussion:
More general info and updates about the project can be found on: More general info and updates about the project can be found on:
[Our blog](http://joindiaspora.com), [Our blog](http://joindiaspora.com),
[and on Twitter](http://twitter.com/joindiaspora). [and on Twitter](http://twitter.com/joindiaspora).
Also, be sure to join the official [mailing list](http://http://eepurl.com/Vebk). Also, be sure to join the official [mailing list](http://eepurl.com/Vebk).
If you wish to contact us privately about any exploits in Diaspora you may If you wish to contact us privately about any exploits in Diaspora you may
find, you can email find, you can email

View file

@ -32,7 +32,7 @@ class AspectsController < ApplicationController
begin begin
current_user.drop_aspect @aspect current_user.drop_aspect @aspect
flash[:notice] = i18n.t 'aspects.destroy.success',:name => @aspect.name flash[:notice] = I18n.t 'aspects.destroy.success',:name => @aspect.name
rescue RuntimeError => e rescue RuntimeError => e
flash[:error] = e.message flash[:error] = e.message
end end
@ -67,7 +67,7 @@ class AspectsController < ApplicationController
data = clean_hash(params[:aspect]) data = clean_hash(params[:aspect])
@aspect.update_attributes( data ) @aspect.update_attributes( data )
flash[:notice] = i18n.t 'aspects.update.success',:name => @aspect.name flash[:notice] = I18n.t 'aspects.update.success',:name => @aspect.name
respond_with @aspect respond_with @aspect
end end
@ -75,13 +75,13 @@ class AspectsController < ApplicationController
params[:moves].each{ |move| params[:moves].each{ |move|
move = move[1] move = move[1]
unless current_user.move_friend(move) unless current_user.move_friend(move)
flash[:error] = i18n.t 'aspects.move_friends.failure', :real_name => Person.find_by_id( move[:friend_id] ).real_name flash[:error] = I18n.t 'aspects.move_friends.failure', :real_name => Person.find_by_id( move[:friend_id] ).real_name
redirect_to aspects_manage_path redirect_to aspects_manage_path
return return
end end
} }
flash[:notice] = i18n.t 'aspects.move_friends.success' flash[:notice] = I18n.t 'aspects.move_friends.success'
redirect_to aspects_manage_path redirect_to aspects_manage_path
end end

View file

@ -23,7 +23,7 @@ class StatusMessagesController < ApplicationController
end end
@status_message = current_user.post(:status_message, data) @status_message = current_user.post(:status_message, data)
respond_with @status_message render :nothing => true
end end
def destroy def destroy

View file

@ -142,7 +142,7 @@ namespace :db do
end end
task :backer_seed, :roles => :backer do task :backer_seed, :roles => :backer do
(0..10).each { |n| (0..2).each { |n|
run "curl -silent http://localhost/set_backer_number?number=#{n}", :only => {:number => n} run "curl -silent http://localhost/set_backer_number?number=#{n}", :only => {:number => n}
} }
run "cd #{current_path} && bundle exec rake db:seed:backer --trace RAILS_ENV=#{rails_env}" run "cd #{current_path} && bundle exec rake db:seed:backer --trace RAILS_ENV=#{rails_env}"

View file

@ -15,15 +15,15 @@ servers:
- username: 'jackson' - username: 'jackson'
given_name: 'Andrew' given_name: 'Andrew'
family_name: 'Jackson' family_name: 'Jackson'
number: 6 number: 0
pin: 8670 pin: 8670
- username: 'tyler' - username: 'tyler'
given_name: 'John' given_name: 'John'
family_name: 'Tyler' family_name: 'Tyler'
number: 9 number: 1
pin: 6431 pin: 6431
- username: 'polk' - username: 'polk'
given_name: 'James K.' given_name: 'James K.'
family_name: 'Polk' family_name: 'Polk'
number: 10 number: 2
pin: 1957 pin: 1957

View file

@ -2,13 +2,10 @@
# licensed under the Affero General Public License version 3. See # licensed under the Affero General Public License version 3. See
# the COPYRIGHT file. # the COPYRIGHT file.
if ENV['MONGOHQ_URL'] ENV['MONGODB_URL'] = ENV['MONGOHQ_URL'] || URI::Generic.build(:scheme => 'mongodb', :host => APP_CONFIG['mongo_host'], :port => APP_CONFIG['mongo_port'], :path => "/diaspora-#{Rails.env}").to_s
MongoMapper.config = {RAILS_ENV => {'uri' => ENV['MONGOHQ_URL']}}
else
MongoMapper.connection = Mongo::Connection.new(APP_CONFIG['mongo_host'], APP_CONFIG['mongo_port'])
end
MongoMapper.database = "diaspora-#{Rails.env}" MongoMapper.config = {RAILS_ENV => {'uri' => ENV['MONGODB_URL']}}
MongoMapper.connect RAILS_ENV
if defined?(PhusionPassenger) if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked| PhusionPassenger.on_event(:starting_worker_process) do |forked|
@ -16,4 +13,4 @@ if defined?(PhusionPassenger)
end end
end end
Magent.connection = Mongo::Connection.new(APP_CONFIG['mongo_host'], APP_CONFIG['mongo_port']) Magent.connection = MongoMapper.connection

View file

@ -0,0 +1,40 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
ar:
errors:
messages:
not_found: "لم يتم العثور على"
already_confirmed: "وقد أكد بالفعل"
not_locked: "لم يكن مغلق"
devise:
failure:
unauthenticated: ".تحتاج إلى تسجيل الدخول أو قم بالتسجيل قبل الشروع في الاستمرار"
unconfirmed: ".لديك لتأكيد الحساب الخاص بك قبل المتابعة"
locked: ".مؤمن حسابك"
invalid: ".بريد إلكتروني غير صالح أو كلمة المرور"
invalid_token: ".المصادقة غير صالح الرمز المميز"
timeout: ".انتهت الدورة الخاصة بك ، الرجاء تسجيل الدخول مرة أخرى للمتابعة"
inactive: ".ولم يتم تفعيل حسابك بعد"
sessions:
signed_in: ".وقعت في بنجاح"
signed_out: ".بتسجيل الخروج بنجاح"
passwords:
send_instructions: ".سوف تتلقى رسالة بريد إلكتروني مع تعليمات حول كيفية إعادة تعيين كلمة السر الخاصة بك في بضع دقائق"
updated: ".تم تغيير كلمة السر الخاصة بك بنجاح. وقعت الآن دخولك"
confirmations:
send_instructions: ".سوف تتلقى رسالة بريد إلكتروني مع تعليمات حول كيفية تأكيد الحساب الخاص بك في بضع دقائق"
confirmed: ".وأكد حسابك بنجاح. وقعت الآن دخولك"
registrations:
signed_up: ".لقد قمت بتسجيل بنجاح. إذا مكن، وجهت رسالة تأكيد إلى البريد الإلكتروني الخاص بك"
updated: ".قمت بتحديث حسابك بنجاح"
destroyed: ".وداعا! تم إلغاء حسابك بنجاح. ونأمل أن نراكم مرة أخرى قريبا"
unlocks:
send_instructions: ".سوف تتلقى رسالة بريد إلكتروني مع تعليمات حول كيفية فتح حساب في بضع دقائق"
unlocked: ".كان حسابك مقفلة بنجاح. وقعت الآن دخولك"
mailer:
confirmation_instructions: "تأكيد تعليمات"
reset_password_instructions: "تعليمات إعادة تعيين كلمة المرور"
unlock_instructions: "فتح التعليمات"

View file

@ -0,0 +1,40 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
no_NO:
errors:
messages:
not_found: "ble ikke funnet"
already_confirmed: "er allerede bekrefta"
not_locked: "er ikke låst"
devise:
failure:
unauthenticated: "Du må logge inn eller lage en bruker før du kan fortsette."
unconfirmed: "Du må bekrefte brukeren din før du kan fortsette."
locked: "Brukeren din er låst."
invalid: "Ugyldig e-postadresse eller passord."
invalid_token: "Ugyldig authentication token."
timeout: "Økta har løpt ut, logg inn igjen for å fortsette."
inactive: "Brukeren din er ikke aktivert ennå."
sessions:
signed_in: "Innlogginga var vellykka."
signed_out: "Utlogginga var vellykka."
passwords:
send_instructions: "Du vil få en e-post med instrukser om hvordan du tilbakestiller passordet ditt om kort tid."
updated: "Passordet ditt er nå endra, og du har logga inn."
confirmations:
send_instructions: "Du vil få en e-post med instrukser om hvordan du bekrefter brukeren din om kort tid."
confirmed: "Brukeren din er nå bekrefta, og du er logga inn."
registrations:
signed_up: "Du har nå laga en bruker. Hvis du valgte å få en e-post med bekreftelse på dette, er den nå sendt."
updated: "Du har oppdatert brukeren din."
destroyed: "Ha det! Brukeren din er nå sagt opp. Vi håper å se deg igjen snart."
unlocks:
send_instructions: "Du vil få en e-post med instrukser om hvordan du låser opp brukeren din om kort tid."
unlocked: "Brukeren din er nå låst opp, og du er logga in."
mailer:
confirmation_instructions: "Instrukser for bekreftelse"
reset_password_instructions: "Instrukser for tilbakestilling av passord"
unlock_instructions: "Instrukser for å låse opp"

View file

@ -0,0 +1,206 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# Sample localization file for Arabic.
ar:
hello: "مرحبا العالم"
application:
helper:
unknown_person: "غير معروف شخص"
new_requests: "طلبات جديدة"
dashboards:
helper:
home: "منزل"
error_messages:
helper:
invalid_fields: "الحقول غير صالحة"
correct_the_following_errors_and_try_again: ".تصحيح الأخطاء التالية وحاول مرة أخرى"
people:
helper:
results_for: "%{params} نتائج "
people_on_pod_are_aware_of: "الناس في جراب على علم "
layouts:
application:
edit_profile: "تعديل الملف الشخصي"
logout: "خروج"
shared:
aspect_nav:
all_aspects: "جميع الجوانب"
manage: "نجح"
manage_your_aspects: "إدارة جوانب الخاص"
sub_header:
all_aspects: "جميع الجوانب"
manage_aspects: "إدارة الجوانب"
publisher:
share: "تقاسم"
aspect_friends:
add_friends: "أضف أصدقاء"
albums:
album:
you: "أنت"
new_album:
create: "خلق"
add_a_new_album: "إضافة ألبوم جديد"
show:
edit_album: "تعديل الألبوم"
albums: "البومات"
updated: "تحديث"
by: "بواسطة"
edit:
editing: "التحرير"
updated: "تحديث"
are_you_sure: "هل أنت متأكد؟"
delete_album: "حذف ألبوم"
cancel: "إلغاء"
index:
home: "منزل"
new_album: "ألبوم جديد"
create:
success: ".ألبوما %{name} لقد قمت دعا"
update:
success: ".تحرير بنجاح %{name} الألبوم"
failure: ".%{name} فشلت في تحرير ألبوم"
destroy:
success: ".حذفها %{name} الألبوم"
helper:
friends_albums: "أصدقاء البومات"
your_albums: "البومات الخاص"
aspects:
index:
photos: "صور"
show:
photos: "صور"
manage:
add_a_new_aspect: "أضف جانبا جديدا"
add_a_new_friend: "إضافة صديق جديد"
show: "عرض"
update_aspects: "تحديث الجوانب"
requests: "طلبات"
ignore_remove: "تجاهل/إزالة"
new_aspect:
add_a_new_aspect: "أضف جانبا جديدا"
create: "خلق"
create:
success: ".الذي يمكن أن نرى الجانب الجديد الخاص بك Diaspora انقر على علامة الجمع على الجانب الأيسر لنقو"
failure: ".فشل إنشاء الجانب"
destroy:
success: ".%{name} وقد نجحت في إزالة"
update:
success: ".تحرير بنجاح ,%{name} ,وقد الجانب الخاص بك"
move_friends:
failure: ".%{real_name} فشل تحرير آسبكت لصدي"
success: ".جوانب الموضوع بنجاح"
move_friend:
failure: "%{inspect} لم تنجح"
success: ".أنت الآن عرض صديقك جانبا مختلفا من جوانب نفسك"
helper:
remove: "نزع"
aspect_not_empty: "الجانب يست فارغ"
users:
edit:
editing_profile: "تحرير الملف الشخصي"
profile:
cancel: "إلغاء"
update_profile: "تحديث الملف الشخصي"
home: "منزل"
diaspora_username: "اسم المستخدم DIASPORA"
info: "معلومات"
picture: "صورة"
editing_profile: "تحرير الملف الشخصي"
albums: "البومات"
you_dont_have_any_photos: "ليس لديك أي صوا! نتقل إلى"
page_to_upload_some: ".الصفحة لتحميل بعض"
comments:
comment:
ago: "منذ"
new_comment:
comment: "كيف"
photos:
show:
prev: "السابق"
full_size: "الحجم الكام"
next: "القادم"
edit_photo: "تحرير الصو"
delete_photo: "حذف الصو"
are_you_sure: "هل أنت متأكد؟"
comments: "تعليقات"
edit:
editing: "تصحيح"
are_you_sure: "هل أنت متأك؟"
delete_photo: "حذف الصو"
photo:
show_comments: "sعرض التعليقا"
posted_a_new_photo_to: "أرسلت صورة جديدة ل"
new:
new_photo: "جديد الصو"
back_to_list: "عودة إلى قائم"
post_it: "!بعد ذلك"
create:
runtime_error: "?فشل تحميل الصور. هل أنت متأكد من أن يتم ربط حزام الأمان"
integrity_error: "?فشل تحميل الصور. هل أنت متأكد من أن صورة"
type_error: "?فشل تحميل الصور. هل أنت متأكد من وأضيف صورة"
update:
notice: ".الصورة تحديثها بنجاح"
error: ".فشل لتحرير الصو"
destroy:
notice: ".الصور المحذوفة"
registrations:
new:
sign_up: "قم بالتسجي"
create:
success: "!Diaspora لقد انضممت"
status_messages:
new_status_message:
tell_me_something_good: "قل لي شيئا جيد"
oh_yeah: "!نعم"
status_message:
show_comments: "عرض التعليقا"
delete: "حذف"
are_you_sure: "هل أنت متأكد؟"
show:
status_message: "رسالة الحالة"
comments: "تعليقات"
are_you_sure: "هل أنت متأكد؟"
destroy: "هدم"
view_all: "عرض الك"
message: "رسالة"
owner: "مالك"
helper:
no_message_to_display: ".أي رسالة لعرضه"
people:
person:
add_friend: "أضف صدي"
pending_request: "في انتظار طلب"
index:
add_friend: "أضف صدي"
real_name: "اسمه الحقيقي"
diaspora_handle: "اسمك المستعار diaspora"
thats_you: "!هذا لك"
friend_request_pending: "طلب صديق معلقة"
you_have_a_friend_request_from_this_person: "لديك صديق طلب من هذا الشخص"
new:
new_person: "شخص جديد"
back_to_list: "عودة إلى قائمة"
show:
last_seen: "%{how_long_ago} :المشاهدة الأخيرة"
friends_since: "%{how_long_ago} :أصدقاء منذ"
save: "حفظ"
are_you_sure: "هل أنت متأكد؟"
remove_friend: "إزالة صديق"
requests:
new_request:
add_a_new_friend_to: "إضافة صديق جديد إلى"
enter_a_diaspora_username: ":Diaspora أدخل اسم مستخدم"
your_diaspora_username_is: "%{diaspora_handle} :هو Diaspora اسم المستخدم الخاص"
friends_username: "صديق اسم المستخدم"
destroy:
success: ".أنت الآن أصدقاء"
error: "!الرجاء اختيار جانبا"
ignore: ".صديق تجاهل الطلب"
create:
error: "!مع هذا البريد الإلكتروني diaspora لم يتم العثور على بذور"
already_friends: "!%{destination_url} كنت بالفعل مع أصدقاء"
success: ".%{destination_url} وأرسل طلب صداقة إلى"
horribly_wrong: ".ذهب شيء خاطئ"

View file

@ -0,0 +1,207 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# Sample localization file for English. Add more files in this directory for other locales.
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
hello: "Hallo, verden!"
application:
helper:
unknown_person: "ukjent person"
new_requests: "nye forespørsler"
dashboards:
helper:
home: "hjem"
error_messages:
helper:
invalid_fields: "Ugyldige felter"
correct_the_following_errors_and_try_again: "Rett opp de følgende feilene og prøv igjen."
people:
helper:
results_for: " resultater for %{params}"
people_on_pod_are_aware_of: " folk i belgen er oppmerksomme på"
layouts:
application:
edit_profile: "endre profil"
logout: "logg ut"
shared:
aspect_nav:
all_aspects: "Alle aspekter"
manage: "Organisere"
manage_your_aspects: "Organiser aspektene dine"
sub_header:
all_aspects: "Alle aspekter"
manage_aspects: "Organiser aspekter"
publisher:
share: "Del"
aspect_friends:
add_friends: "legg til venner"
albums:
album:
you: "deg"
new_album:
create: "Opprett"
add_a_new_album: "Legg til et nytt album"
show:
edit_album: "Endre album"
albums: "album"
updated: "oppdatert"
by: "av"
edit:
editing: "Redigerer"
updated: "oppdatert"
are_you_sure: "Er du sikker?"
delete_album: "Slett album"
cancel: "Avbryt"
index:
home: "hjem"
new_album: "Nytt album"
create:
success: "Du har oppretta albumet %{name}."
update:
success: "Albumet %{name} er endra."
failure: "Greide ikke å endre albumet %{name}."
destroy:
success: "Albumet %{name} er sletta."
helper:
friends_albums: "Venners album"
your_albums: "Dine album"
aspects:
index:
photos: "bilder"
show:
photos: "bilder"
manage:
add_a_new_aspect: "Legg til et nytt aspekt"
add_a_new_friend: "Legg til en ny venn"
show: "Vis"
update_aspects: "Oppdater aspekter"
requests: "Forespørsler"
ignore_remove: "Ignorer/fjern"
new_aspect:
add_a_new_aspect: "Legg til et nytt aspekt"
create: "Opprett"
create:
success: "Klikk på plusstegnet på venstre side for å fortelle Diaspora hvem som kan se det nye aspektet ditt."
failure: "Greide ikke å opprette aspektet."
destroy:
success: "%{name} har blitt fjerna."
update:
success: "Aspektet ditt, %{name}, har blitt endra."
move_friends:
failure: "Greide ikke å endre aspektet for vennen %{real_name}."
success: "Aspektene har blitt endra."
move_friend:
failure: "virka ikke %{inspect}"
success: "Vennen din ser nå et annet aspekt av deg."
helper:
remove: "fjern"
aspect_not_empty: "Aspektet er ikke tomt"
users:
edit:
editing_profile: "Redigerer profil"
profile:
cancel: "Avbryt"
update_profile: "Oppdater profil"
home: "Hjem"
diaspora_username: "DIASPORA-BRUKERNAVN"
info: "Informasjon"
picture: "Bilde"
editing_profile: "Redigerer profil"
albums: "Album"
you_dont_have_any_photos: "Du har ikke noen bilder! Gå til"
page_to_upload_some: "for å laste opp noen."
comments:
comment:
ago: "sia"
new_comment:
comment: "Kommenter"
photos:
show:
prev: "forrige"
full_size: "full størrelse"
next: "neste"
edit_photo: "Rediger bilde"
delete_photo: "Slett bilde"
are_you_sure: "Er du sikker?"
comments: "kommentarer"
edit:
editing: "Redigerer"
are_you_sure: "Er du sikker?"
delete_photo: "Slett bilde"
photo:
show_comments: "vis kommentarer"
posted_a_new_photo_to: "la til ett nytt bilde i"
new:
new_photo: "Nytt bilde"
back_to_list: "Tilbake til lista"
post_it: "legg ut!"
create:
runtime_error: "Greide ikke å laste opp bildet. Er du sikker på at setebeltet er festa?"
integrity_error: "Greide ikke å laste opp bildet. Er du sikker på at det var et bilde?"
type_error: "Greide ikke å laste opp bildet. Er du sikker på at et bilde ble lagt til?"
update:
notice: "Bildet er oppdatert."
error: "Greide ikke å endre bildet."
destroy:
notice: "Bildet er sletta."
registrations:
new:
sign_up: "Registrer deg"
create:
success: "Du er nå med i Diaspora!"
status_messages:
new_status_message:
tell_me_something_good: "Fortell noe tøft"
oh_yeah: "Ja da!"
status_message:
show_comments: "vis kommentarer"
delete: "Slett"
are_you_sure: "Er du sikker?"
show:
status_message: "Statusmelding"
comments: "kommentarer"
are_you_sure: "Er du sikker?"
destroy: "Utslett"
view_all: "Vis alle"
message: "Melding"
owner: "Eier"
helper:
no_message_to_display: "Ingen melding å vise."
people:
person:
add_friend: "legg til venn"
pending_request: "venter på svar"
index:
add_friend: "legg til venn"
real_name: "ekte navn"
diaspora_handle: "diaspora-bruker"
thats_you: "det er deg!"
friend_request_pending: "ubesvart venneforespørsel"
you_have_a_friend_request_from_this_person: "du har en venneforespørsel fra denne personen"
new:
new_person: "Ny person"
back_to_list: "Tilbake til lista"
show:
last_seen: "sist sett: %{how_long_ago}"
friends_since: "venner sia: %{how_long_ago}"
save: "lagre"
are_you_sure: "Er du sikker?"
remove_friend: "fjern venn"
requests:
new_request:
add_a_new_friend_to: "Legg til en ny venn i"
enter_a_diaspora_username: "Skriv en Diaspora-bruker:"
your_diaspora_username_is: "Din Diaspora-bruker er: %{diaspora_handle}"
friends_username: "Brukeren til vennen"
destroy:
success: "Dere er nå venner."
error: "Velg et aspekt først!"
ignore: "Ignorerte venneforespørsel"
create:
error: "Fant ingen diasporabruker med denne e-posten!"
already_friends: "Du er allerede venn med %{destination_url}!"
success: "Du sendte en venneforespørsel til %{destination_url}."
horribly_wrong: "Noe gikk forferdelig galt."

View file

@ -1,4 +1,4 @@
#!/usr/bin/env sprinkle -s #
# Copyright (c) 2010, Diaspora Inc. This file is # Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See # licensed under the Affero General Public License version 3. See
# the COPYRIGHT file. # the COPYRIGHT file.

View file

@ -38,7 +38,8 @@ module Diaspora
end end
def dispatch_friend_acceptance(request, requester) def dispatch_friend_acceptance(request, requester)
salmon request, :to => requester friend_acceptance = salmon(request)
push_to_person requester, friend_acceptance.xml_for(requester)
request.destroy unless request.callback_url.include? url request.destroy unless request.callback_url.include? url
end end

View file

@ -63,6 +63,7 @@ module Salmon
### Header ## ### Header ##
decrypted_header = user.decrypt(doc.search('encrypted_header').text) decrypted_header = user.decrypt(doc.search('encrypted_header').text)
header_doc = Nokogiri::XML(decrypted_header) header_doc = Nokogiri::XML(decrypted_header)
slap.author_email= header_doc.search('uri').text.split("acct:").last
slap.aes_key = header_doc.search('aes_key').text slap.aes_key = header_doc.search('aes_key').text
slap.iv = header_doc.search('iv').text slap.iv = header_doc.search('iv').text
@ -81,8 +82,6 @@ module Salmon
raise ArgumentError, "Magic Signature data must be signed with RSA-SHA256, was #{slap.magic_sig.alg}" unless 'RSA-SHA256' == slap.magic_sig.alg raise ArgumentError, "Magic Signature data must be signed with RSA-SHA256, was #{slap.magic_sig.alg}" unless 'RSA-SHA256' == slap.magic_sig.alg
uri = doc.search('uri').text
slap.author_email = uri.split("acct:").last
slap slap
end end
@ -91,10 +90,6 @@ module Salmon
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<entry xmlns='http://www.w3.org/2005/Atom'> <entry xmlns='http://www.w3.org/2005/Atom'>
<encrypted_header>#{person.encrypt(decrypted_header)}</encrypted_header> <encrypted_header>#{person.encrypt(decrypted_header)}</encrypted_header>
<author>
<name>#{@author.real_name}</name>
<uri>acct:#{@author.diaspora_handle}</uri>
</author>
#{@magic_sig.to_xml} #{@magic_sig.to_xml}
</entry> </entry>
ENTRY ENTRY

0
public/javascripts/fancybox/blank.gif Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

0
public/javascripts/fancybox/fancy_close.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

0
public/javascripts/fancybox/fancy_loading.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

0
public/javascripts/fancybox/fancy_nav_left.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
public/javascripts/fancybox/fancy_nav_right.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

0
public/javascripts/fancybox/fancy_shadow_e.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 107 B

After

Width:  |  Height:  |  Size: 107 B

0
public/javascripts/fancybox/fancy_shadow_n.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 106 B

After

Width:  |  Height:  |  Size: 106 B

0
public/javascripts/fancybox/fancy_shadow_ne.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 347 B

After

Width:  |  Height:  |  Size: 347 B

0
public/javascripts/fancybox/fancy_shadow_nw.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 324 B

After

Width:  |  Height:  |  Size: 324 B

0
public/javascripts/fancybox/fancy_shadow_s.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 111 B

0
public/javascripts/fancybox/fancy_shadow_se.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 352 B

0
public/javascripts/fancybox/fancy_shadow_sw.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 340 B

After

Width:  |  Height:  |  Size: 340 B

0
public/javascripts/fancybox/fancy_shadow_w.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 103 B

After

Width:  |  Height:  |  Size: 103 B

0
public/javascripts/fancybox/fancy_title_left.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 503 B

0
public/javascripts/fancybox/fancy_title_main.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 96 B

After

Width:  |  Height:  |  Size: 96 B

0
public/javascripts/fancybox/fancy_title_over.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 70 B

After

Width:  |  Height:  |  Size: 70 B

0
public/javascripts/fancybox/fancy_title_right.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 506 B

After

Width:  |  Height:  |  Size: 506 B

0
public/javascripts/fancybox/fancybox-x.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 203 B

0
public/javascripts/fancybox/fancybox-y.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 176 B

0
public/javascripts/fancybox/fancybox.png Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View file

View file

Before

Width:  |  Height:  |  Size: 655 B

After

Width:  |  Height:  |  Size: 655 B

View file

Before

Width:  |  Height:  |  Size: 455 B

After

Width:  |  Height:  |  Size: 455 B

View file

Before

Width:  |  Height:  |  Size: 537 B

After

Width:  |  Height:  |  Size: 537 B

View file

View file

View file

0
public/stylesheets/loading.gif Executable file → Normal file
View file

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB