Skip to content
Extraits de code Groupes Projets
Valider 8352a7cf rédigé par ilya's avatar ilya
Parcourir les fichiers

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

Conflicts:
	config/routes.rb
parents 7ecc94d7 7e8bf40a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 334 ajouts et 49 suppressions
.bundle
.DS_Store
.idea
.rvmrc
*.swap
*.swp
*.swo
*.swp
*~
.bundle
bin/*
config/app_config.yml
config/fb_config.yml
config/initializers/secret_token.rb
db/*.sqlite3
log/*
tmp/**/*
nbproject
gpg/diaspora-development/*.gpg
gpg/diaspora-production/*.gpg
gpg/*/random_seed
public/uploads/*
.rvmrc
.DS_Store
config/app_config.yml
bin/*
nbproject
config/initializers/secret_token.rb
public/source.tar
config/fb_config.yml
tmp/**/*
......@@ -18,7 +18,10 @@ instructions.
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.
Please do not rebase our tree into yours.
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.
See [here](http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html)
for when to rebase.
......@@ -56,7 +59,7 @@ Ongoing discussion:
More general info and updates about the project can be found on:
[Our blog](http://joindiaspora.com),
[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
find, you can email
......
......@@ -32,8 +32,8 @@ class AspectsController < ApplicationController
begin
current_user.drop_aspect @aspect
flash[:notice] = i18n.t 'aspects.destroy.success',:name => @aspect.name
rescue RuntimeError => e
flash[:notice] = I18n.t 'aspects.destroy.success',:name => @aspect.name
rescue RuntimeError => e
flash[:error] = e.message
end
......@@ -56,7 +56,7 @@ class AspectsController < ApplicationController
respond_with @aspect
end
def manage
@aspect = :manage
@remote_requests = Request.for_user(current_user).all
......@@ -67,7 +67,7 @@ class AspectsController < ApplicationController
data = clean_hash(params[:aspect])
@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
end
......@@ -75,13 +75,13 @@ class AspectsController < ApplicationController
params[:moves].each{ |move|
move = move[1]
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
return
end
}
flash[:notice] = i18n.t 'aspects.move_friends.success'
flash[:notice] = I18n.t 'aspects.move_friends.success'
redirect_to aspects_manage_path
end
......
......@@ -30,7 +30,7 @@ class PublicsController < ApplicationController
def hub
if params['hub.mode'] == 'subscribe' || params['hub.mode'] == 'unsubscribe'
render :text => params['hub.challenge'], :status => 202, :layout => false
render :text => params['hub.challenge'], :status => 202, :layout => false
end
end
......
......@@ -12,18 +12,18 @@ class StatusMessagesController < ApplicationController
params[:status_message][:to] = params[:aspect_ids]
data = clean_hash params[:status_message]
if @logged_in && params[:status_message][:public] == 'true'
id = 'me'
type = 'feed'
Rails.logger.info("Sending a message: #{params[:status_message][:message]} to Facebook")
@res = MiniFB.post(@access_token, id, :type=>type,
:metadata=>true, :params=>{:message => params[:status_message][:message]})
end
@status_message = current_user.post(:status_message, data)
respond_with @status_message
render :nothing => true
end
def destroy
......
......@@ -27,16 +27,16 @@ class UsersController < ApplicationController
params[:user].delete(:password) if params[:user][:password].blank?
params[:user].delete(:password_confirmation) if params[:user][:password].blank? and params[:user][:password_confirmation].blank?
if params[:user][:password] && params[:user][:password_confirmation]
if @user.update_attributes(:password => params[:user][:password], :password_confirmation => params[:user][:password_confirmation])
flash[:notice] = "Password Changed"
else
flash[:error] = "Password Change Failed"
end
end
@user.update_profile data
redirect_to edit_user_path(@user)
......
......@@ -3,14 +3,14 @@
# the COPYRIGHT file.
class FbStatus
class FbStatus
include MongoMapper::Document
key :graph_id, String
key :author_id, String
key :author_name, String
key :message, String
key :updated_time, Time
key :updated_time, Time
timestamps!
......@@ -18,7 +18,7 @@ class FbStatus
def self.from_api(hash)
#just keeping them in memory for now
self.new(
self.new(
:graph_id => hash['id'],
:author_id => hash['from']['id'],
:author_name => hash['from']['name'],
......@@ -26,6 +26,6 @@ class FbStatus
:updated_time => Time.parse(hash['updated_time'])
)
end
end
......@@ -254,7 +254,7 @@ class User
def self.instantiate!( opts = {} )
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{APP_CONFIG[:terse_pod_url]}"
opts[:person][:url] = APP_CONFIG[:pod_url]
opts[:serialized_private_key] = generate_key
opts[:person][:serialized_public_key] = opts[:serialized_private_key].public_key
User.create(opts)
......@@ -288,7 +288,7 @@ class User
def self.generate_key
OpenSSL::PKey::RSA::generate 4096
end
def encryption_key
OpenSSL::PKey::RSA.new( serialized_private_key )
end
......
......@@ -12,7 +12,7 @@
- content_for :publish do
- if @logged_in
= render "shared/publisher", :aspect_ids => :public
- else
- else
= render "shared/publisher", :aspect_ids => :all
%ul#stream
......
......@@ -8,8 +8,8 @@
= person_image_link(friend)
- if @logged_in && (@aspect == :public)
%h3 Facebook Friends
- @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
- @fb_friends[:data].each do |friend|
- @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
- @fb_friends[:data].each do |friend|
= image_tag( "http://graph.facebook.com/#{friend[:id]}/picture" )
-unless (@aspect == :all) || (@aspect == :public)
= link_to (image_tag('add_friend_button.png', :height => "50px", :width => "50px")), "#add_request_pane", :id => 'add_request_button'
......
......@@ -10,7 +10,7 @@
%p
- if @logged_in
= connected_fb_as(@access_token)
%p
- @fb_friends = MiniFB.get(@access_token, 'me', :type => "friends")
- @fb_friends[:data].each do |friend|
......
......@@ -26,5 +26,5 @@
#services.settings_pane
= render 'users/services'
......@@ -142,7 +142,7 @@ namespace :db do
end
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 "cd #{current_path} && bundle exec rake db:seed:backer --trace RAILS_ENV=#{rails_env}"
......
......@@ -15,15 +15,15 @@ servers:
- username: 'jackson'
given_name: 'Andrew'
family_name: 'Jackson'
number: 6
number: 0
pin: 8670
- username: 'tyler'
given_name: 'John'
family_name: 'Tyler'
number: 9
number: 1
pin: 6431
- username: 'polk'
given_name: 'James K.'
family_name: 'Polk'
number: 10
number: 2
pin: 1957
......@@ -2,13 +2,10 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
if ENV['MONGOHQ_URL']
MongoMapper.config = {RAILS_ENV => {'uri' => ENV['MONGOHQ_URL']}}
else
MongoMapper.connection = Mongo::Connection.new(APP_CONFIG['mongo_host'], APP_CONFIG['mongo_port'])
end
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.database = "diaspora-#{Rails.env}"
MongoMapper.config = {RAILS_ENV => {'uri' => ENV['MONGODB_URL']}}
MongoMapper.connect RAILS_ENV
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
......@@ -16,4 +13,4 @@ if defined?(PhusionPassenger)
end
end
Magent.connection = Mongo::Connection.new(APP_CONFIG['mongo_host'], APP_CONFIG['mongo_port'])
Magent.connection = MongoMapper.connection
# 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: "فتح التعليمات"
# 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 logge inn eller lage en bruker før du kan fortsette."
unconfirmed: "Du 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 en e-post med instrukser om hvordan du tilbakestiller passordet ditt om kort tid."
updated: "Passordet ditt er endra, og du har logga inn."
confirmations:
send_instructions: "Du vil en e-post med instrukser om hvordan du bekrefter brukeren din om kort tid."
confirmed: "Brukeren din er bekrefta, og du er logga inn."
registrations:
signed_up: "Du har laga en bruker. Hvis du valgte å en e-post med bekreftelse dette, er den sendt."
updated: "Du har oppdatert brukeren din."
destroyed: "Ha det! Brukeren din er sagt opp. Vi håper å se deg igjen snart."
unlocks:
send_instructions: "Du vil en e-post med instrukser om hvordan du låser opp brukeren din om kort tid."
unlocked: "Brukeren din er 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"
# 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: ".ذهب شيء خاطئ"
......@@ -57,7 +57,7 @@ cs:
new_album:
create: "vytvořit"
add_a_new_album: "Přidat nové album"
show:
show:
edit_album: "Upravit album"
albums: "alba"
updated: "aktualizované"
......
......@@ -46,7 +46,7 @@ he:
new_album:
create: "יצירה"
add_a_new_album: "הוספת אלבום חדש"
show:
show:
edit_album: "עריכת אלבום"
albums: "אלבומים"
updated: "תאריך העדכון"
......
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