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

Run whitespace:cleanup

parent 0831812e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 36 ajouts et 36 suppressions
......@@ -18,7 +18,7 @@ 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 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 +56,7 @@ class AspectsController < ApplicationController
respond_with @aspect
end
def manage
@aspect = :manage
@remote_requests = Request.for_user(current_user).all
......
......@@ -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,11 +12,11 @@ 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]})
......
......@@ -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'
......@@ -193,7 +193,7 @@ ar:
new_request:
add_a_new_friend_to: "إضافة صديق جديد إلى"
enter_a_diaspora_username: ":Diaspora أدخل اسم مستخدم"
your_diaspora_username_is: "%{diaspora_handle} :هو Diaspora اسم المستخدم الخاص"
your_diaspora_username_is: "%{diaspora_handle} :هو Diaspora اسم المستخدم الخاص"
friends_username: "صديق اسم المستخدم"
destroy:
success: ".أنت الآن أصدقاء"
......
......@@ -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: "תאריך העדכון"
......
......@@ -9,7 +9,7 @@ Diaspora::Application.routes.draw do
resources :requests, :except => [:edit, :update]
resources :photos, :except => [:index]
resources :albums
# added public route to user
match 'public/:username', :to => 'users#public'
resources :users, :except => [:create, :new, :show]
......
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
......@@ -191,7 +191,7 @@ Then /^the "([^"]*)" checkbox(?: within "([^"]*)")? should not be checked$/ do |
end
end
end
Then /^(?:|I )should be on (.+)$/ do |page_name|
current_path = URI.parse(current_url).path
if current_path.respond_to? :should
......@@ -205,8 +205,8 @@ Then /^(?:|I )should have the following query string:$/ do |expected_pairs|
query = URI.parse(current_url).query
actual_params = query ? CGI.parse(query) : {}
expected_params = {}
expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
expected_pairs.rows_hash.each_pair{|k,v| expected_params[k] = v.split(',')}
if actual_params.respond_to? :should
actual_params.should == expected_params
else
......
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
......@@ -24,7 +24,7 @@ Capybara.default_selector = :css
WebMock.disable_net_connect!(:allow_localhost => true)
# If you set this to false, any error raised from within your app will bubble
# If you set this to false, any error raised from within your app will bubble
# up to your step definition and out to cucumber unless you catch it somewhere
# on the way. You can make Rails rescue errors and render error pages on a
# per-scenario basis by tagging a scenario or feature with the @allow-rescue tag.
......
......@@ -62,9 +62,9 @@ module Diaspora
@user.visible_posts(:person_id => @user.person.id, :public=>true).inject("") do |xml,curr|
if curr.respond_to?(:to_activity)
unless xml
curr.to_activity
curr.to_activity
else
xml + curr.to_activity
xml + curr.to_activity
end
end
end
......
......@@ -53,7 +53,7 @@ module Salmon
salmon.magic_sig = MagicSigEnvelope.create(user , user.person.aes_encrypt(activity, aes_key_hash))
salmon
end
def self.parse(xml, user)
slap = self.new
doc = Nokogiri::XML(xml)
......
# IMPORTANT: This file is generated by cucumber-rails - edit at your own peril.
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# It is recommended to regenerate this file in the future when you upgrade to a
# newer version of cucumber-rails. Consider adding your own code to a new file
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
# files.
......
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