Merging upstream changes

This commit is contained in:
Sarah Mei 2010-09-25 15:57:59 -07:00
commit 17757a2e2d
121 changed files with 304 additions and 319 deletions

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class ApplicationController < ActionController::Base
protect_from_forgery :except => :receive

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class AspectsController < ApplicationController
before_filter :authenticate_user!

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class CommentsController < ApplicationController
before_filter :authenticate_user!

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class DevUtilitiesController < ApplicationController
before_filter :authenticate_user!, :except => [:set_backer_number]
include ApplicationHelper
@ -57,7 +56,6 @@ class DevUtilitiesController < ApplicationController
current_user.raw_visible_posts << photo
current_user.save
current_user.update_profile(:image_url => photo.url(:thumb_medium))
current_user.save
end

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class PeopleController < ApplicationController
before_filter :authenticate_user!

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class PhotosController < ApplicationController
before_filter :authenticate_user!
@ -35,12 +34,10 @@ class PhotosController < ApplicationController
##############
params[:user_file] = file
data = clean_hash(params)
@photo = current_user.post(:photo, data)
respond_to do |format|
@ -103,7 +100,6 @@ class PhotosController < ApplicationController
end
end
private
def clean_hash(params)
if params[:photo]

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class PublicsController < ApplicationController
require File.expand_path('../../../lib/diaspora/parser', __FILE__)
include Diaspora::Parser

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class RequestsController < ApplicationController
before_filter :authenticate_user!
include RequestsHelper
@ -42,8 +41,6 @@ class RequestsController < ApplicationController
return
end
# rel_hash = {:friend => params[:friend_handle]}
Rails.logger.debug("Sending request: #{rel_hash}")

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class SocketsController < ApplicationController
include ApplicationHelper
include SocketsHelper

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class StatusMessagesController < ApplicationController
before_filter :authenticate_user!

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class UsersController < ApplicationController
before_filter :authenticate_user!, :except => [:new, :create]

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module AlbumsHelper
def friends_albums_link
if params[:friends]

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module ApplicationHelper
def current_aspect?(aspect)
!@aspect.is_a?(Symbol) && @aspect.id == aspect.id

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module AspectsHelper
def link_for_aspect( aspect )
link_to aspect.name, aspect

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module DashboardsHelper
def title_for_page
I18n.t('dashboards.helper.home')

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module ErrorMessagesHelper
# Render error messages for the given objects. The :message and :header_message options are allowed.
def error_messages_for(*objects)

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# These helper methods can be called in your template to set variables to be used in the layout
# This module should be included in all views globally,
# to do so you may need to add this line to your ApplicationController

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module PeopleHelper
def search_or_index

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module PhotosHelper
def linked_scaled_photo(photo, album)
link_to (image_tag photo.url(:scaled_full)), photo_path(album.next_photo(photo)), :rel => "prefetch"

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module PublicsHelper
def subscribe(opts = {})
subscriber = Subscriber.first(:url => opts[:callback], :topic => opts[:topic])

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module RequestsHelper
def subscription_mode(profile)
if diaspora?(profile)

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module SocketsHelper
include ApplicationHelper

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module StatusMessagesHelper
def my_latest_message
unless @latest_status_message.nil?

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class Album < Post
xml_reader :name
@ -17,7 +16,6 @@ class Album < Post
before_destroy :destroy_photos
def self.mine_or_friends(friend_param, current_user)
friend_param ? Album.find_all_by_person_id(current_user.friend_ids) : current_user.person.albums
end

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class Aspect
include MongoMapper::Document

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class Comment
include MongoMapper::Document
include ROXML
@ -19,7 +18,6 @@ class Comment
key :post_id, ObjectId
key :person_id, ObjectId
belongs_to :post, :class_name => "Post"
belongs_to :person, :class_name => "Person"

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.expand_path('../../../lib/hcard', __FILE__)
class Person

View file

@ -73,4 +73,3 @@ class Photo < Post
end
end

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class Post
require File.expand_path('../../../lib/encryptable', __FILE__)
require File.expand_path('../../../lib/diaspora/websocket', __FILE__)
@ -33,7 +32,6 @@ class Post
self.create params.to_hash
end
def as_json(opts={})
{
:post => {

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class Profile
include MongoMapper::EmbeddedDocument
require File.expand_path('../../../lib/diaspora/webhooks', __FILE__)

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class Request
require File.expand_path('../../../lib/diaspora/webhooks', __FILE__)
include MongoMapper::Document

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class Retraction
include ROXML
include Diaspora::Webhooks

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class StatusMessage < Post
xml_name :status_message
@ -11,7 +10,6 @@ class StatusMessage < Post
key :message, String
validates_presence_of :message
def to_activity
<<-XML
<entry>

View file

@ -71,7 +71,6 @@ class User
end
end
def move_friend( opts = {})
return true if opts[:to] == opts[:from]
friend = Person.first(:_id => opts[:friend_id])
@ -107,7 +106,6 @@ class User
intitial_post(class_name, aspect_ids, options)
end
def intitial_post(class_name, aspect_ids, options = {})
post = build_post(class_name, options)
post.socket_to_uid(id, :aspect_ids => aspect_ids) if post.respond_to?(:socket_to_uid)
@ -270,7 +268,6 @@ class User
username.downcase! if username
end
def as_json(opts={})
{
:user => {

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick

View file

@ -2,6 +2,5 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
Autotest.add_discovery { "rails" }
Autotest.add_discovery { "rspec2" }

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.expand_path('../boot', __FILE__)
require 'action_controller/railtie'

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require 'rubygems'
# Set up gems listed in the Gemfile.

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
config = YAML.load_file(File.dirname(__FILE__) + '/deploy_config.yml')
all = config['cross_server']
@ -108,7 +106,6 @@ namespace :deploy do
run 'gem install bundler'
end
task :migrate do
end
end
@ -152,7 +149,6 @@ namespace :db do
tom_seed
end
end
after "deploy:symlink", "deploy:symlink_images", "deploy:symlink_bundle", 'deploy:symlink_config'

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# Load the rails application
require File.expand_path('../application', __FILE__)
Haml::Template.options[:format] = :html5
@ -11,4 +9,3 @@ Haml::Template.options[:escape_html] = true
# Initialize the rails application
Diaspora::Application.initialize!

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.expand_path('../../../lib/mongo_mapper/clear_dev_memory', __FILE__)
Diaspora::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
Diaspora::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
Diaspora::Application.configure do
# Settings specified here will take precedence over those in config/environment.rb
@ -32,13 +31,11 @@ Diaspora::Application.configure do
config.active_support.deprecation = :stderr
config.threadsafe!
# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
begin
require 'database_cleaner'
DatabaseCleaner.strategy = :truncation

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
CarrierWave.configure do |config|
config.storage = :file
end

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# Use this hook to configure devise mailer, warden hooks and so forth. The first
# four configuration values can also be set straight in your models.
Devise.setup do |config|

View file

@ -2,5 +2,4 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
GIT_INFO = `git show --name-only`

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
I18n.default_locale = :en
I18n.default_locale = :en

View file

@ -2,6 +2,5 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
Rails.logger = Logger.new(
Rails.root.join("log",Rails.env + ".log"),3,5*1024*1024)

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
Diaspora::Application.configure do
config.generators do |g|
g.integration_tool :rspec

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# Be sure to restart your server when you modify this file.
# Your secret key for verifying the integrity of signed cookies.

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, :key => '_diaspora_session'

View file

@ -0,0 +1,41 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
en:
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,201 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
he:
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: "לחץ על הפלוס בצד ימין על מנת לקבוע מי רשאי לצפות באספקט."
destroy:
success: "%{name} הוסר בהצלחה."
update:
success: "האספקט שלך, %{name}, נערך בהצלחה."
move_friends:
failure: "עריכת אספקט נכשלה עבור %{real_name}."
success: "אספקטים נערכו בהצלחה."
move_friend:
failure: "לא עבד %{inspect}"
success: "אתה כעת מציג לחברך אספקט שונה שלך."
helper:
remove: "מחק"
aspect_not_empty: "אספקט לא ריק"
users:
edit:
cancel: "בטל"
update_profile: "עדכן פרופיל"
home: "בית"
diaspora_username: "שם משתמש בדיאספורה"
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: "הצג הערות"
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: "הצטרפת לדיאספורה!"
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: "כינוי בדיאספורה"
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: "הכנס שם משתמש בדיאספורה:"
your_diaspora_username_is: "שם המשתמש שלך בדיאספורה: %{diaspora_handle}"
friends_username: "שם המשתמש של חבר"
destroy:
success: "אתם כעת חברים."
error: "נא לבחור אספקט!"
ignore: "התעלמת מבקשת חברות."
create:
error: "לא נמצא זרע דיאספורה עם אימייל זה!"
already_friends: "את/ה כבר חבר של %{destination_url}!"
success: "בקשת חברות נשלחה ל%{destination_url}."
horribly_wrong: "משהו רע מאוד קרה."

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
Diaspora::Application.routes.draw do
resources :people, :only => [:index, :show, :destroy]
resources :users, :except => [:create, :new, :show]
@ -18,7 +16,6 @@ Diaspora::Application.routes.draw do
match 'aspects/manage', :to => 'aspects#manage'
resources :aspects, :except => [:edit]
match 'warzombie', :to => "dev_utilities#warzombie"
match 'zombiefriends', :to => "dev_utilities#zombiefriends"
match 'zombiefriendaccept', :to => "dev_utilities#zombiefriendaccept"

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
#package :mongo, :provides => :database do
# description 'Mongodb'
# version '1.4.3'

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
## Special package, anything that defines a 'source' package means build-essential should be installed for Ubuntu
package :build_essential do

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
## Defines available packages
package :ruby do

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
package :git, :provides => :scm do
description 'Git Distributed Version Control'
apt %w( git-core )

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
package :nginx, :provides=> :webserver do
description 'Nginx HTTP server'
version '0.7.67'

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
#Fix dreamhost
#

View file

@ -3,10 +3,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require '#{File.dirname(__FILE__)}/packages/essential'
require '#{File.dirname(__FILE__)}/packages/database'
require '#{File.dirname(__FILE__)}/packages/server'
@ -26,7 +22,6 @@ policy :diaspora, :roles => [:pivots] do
requires :nginx_conf
end
deployment do
# mechanism for deployment

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# This file is auto-generated from the current state of the database. Instead of editing this file,
# please use the migrations feature of Active Record to incrementally modify your database, and
# then regenerate this schema definition.

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
#
@ -16,7 +14,6 @@ require File.join(File.dirname(__FILE__), "..", "..", "config", "environment")
def create
config = YAML.load_file(File.join(File.dirname(__FILE__), "..", "..", "config", "deploy_config.yml"))
backer_info = config['servers']['backer']

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.join(File.dirname(__FILE__), "..", "..", "config", "environment")
def set_app_config username

View file

@ -2,7 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.join(File.dirname(__FILE__), "..", "..", "config", "environment")
def set_app_config username
@ -18,7 +17,6 @@ end
set_app_config "tom"
require 'config/initializers/_load_app_config.rb'
# Create seed user
user = User.instantiate!( :email => "tom@tom.joindiaspora.com",
:username => "tom",
@ -46,4 +44,3 @@ reversed_request = user2.accept_friend_request( request.id, user2.aspect(:name =
user.receive reversed_request.to_diaspora_xml
user.aspect(:name => "Presidents")

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module Rack
class ChromeFrame

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module Diaspora
autoload :Parser

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module Diaspora
module Parser
def self.owner_id_from_xml(xml)

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module Diaspora
module UserModules
module Friending
@ -29,7 +27,6 @@ module Diaspora
request
end
def accept_friend_request(friend_request_id, aspect_id)
request = Request.find_by_id(friend_request_id)
pending_requests.delete(request)

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module Diaspora
module UserModules
module Querying

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module Diaspora
module Webhooks
def self.included(klass)

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module Diaspora
module WebSocket
def self.queue_to_user(uid, data)

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module Encryptable
def signable_string
raise NotImplementedException("Override this in your encryptable class")

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module Encryptor
module Public
def encrypt cleartext
@ -60,6 +58,5 @@ module Encryptor
txt
end
end
end

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module HCard
def self.find url
doc = Nokogiri::HTML(Net::HTTP.get URI.parse(url))

View file

@ -2,11 +2,8 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class MessageHandler
NUM_TRIES = 3
TIMEOUT = 5 #seconds

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
class String
def to_id
BSON::ObjectId self

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
module MongoMapper
class ClearDevMemory
def initialize(app)

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
# Add URL safe Base64 support
module Base64
module_function
@ -51,8 +49,6 @@ module Salmon
sig_doc = doc.search('entry')
slap.magic_sig = MagicSigEnvelope.parse sig_doc
if 'base64url' == slap.magic_sig.encoding
slap.data = decode64url(slap.magic_sig.data)
slap.sig = slap.magic_sig.sig
@ -98,9 +94,6 @@ ENTRY
end
end
# Decode URL-safe-Base64. This implements
def self.decode64url(str)
# remove whitespace
@ -128,7 +121,6 @@ ENTRY
signature = Base64.urlsafe_decode64(self.magic_sig.sig)
signed_data = self.magic_sig.signable_string# Base64.urlsafe_decode64(self.magic_sig.signable_string)
public_key.verify(OpenSSL::Digest::SHA256.new, signature, signed_data )
end
@ -194,7 +186,6 @@ ENTRY
env.encoding = env.get_encoding
env.alg = env.get_alg
env.sig = Base64.urlsafe_encode64(
user.encryption_key.sign OpenSSL::Digest::SHA256.new, env.signable_string )

View file

@ -3,8 +3,13 @@ namespace :whitespace do
task :cleanup do
sh %{find . -name '*.rb' -exec sed -i '' 's/ *$//g' {} \\;}
end
desc 'Converts hard-tabs into two-space soft-tabs'
task :retab do
sh %{find . -name '*.rb' -exec sed -i '' 's/\t/ /g' {} \\;}
end
desc 'Remove consecutive blank lines'
task :scrub_gratuitous_newlines do
sh %{find . -name '*.rb' -exec sed -i '' '/./,/^$/!d' {} \\;}
end
end

View file

@ -2,9 +2,8 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require 'spec_helper'
require File.dirname(__FILE__) + '/../spec_helper'
include ApplicationHelper
describe AlbumsController do
render_views
before do

View file

@ -2,10 +2,8 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require 'spec_helper'
require File.dirname(__FILE__) + '/../spec_helper'
include ApplicationHelper
describe AspectsController do
render_views
before do

View file

@ -2,9 +2,7 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.dirname(__FILE__) + '/../spec_helper'
require 'spec_helper'
describe PeopleController do
render_views

View file

@ -2,9 +2,7 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.dirname(__FILE__) + '/../spec_helper'
require 'spec_helper'
describe PublicsController do
render_views

View file

@ -1,23 +0,0 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.dirname(__FILE__) + '/../spec_helper'
include ApplicationHelper
include RequestsHelper
describe RequestsController do
render_views
before do
@user = Factory.create :user
stub_success("tom@tom.joindiaspora.com")
@tom = Redfinger.finger('tom@tom.joindiaspora.com')
sign_in :user, @user
stub!(:current_user).and_return @user
end
it 'should return the correct tag and url for a given address' do
relationship_flow('tom@tom.joindiaspora.com')[:friend].receive_url.include?("receive/user").should == true
end
end

View file

@ -2,9 +2,7 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.dirname(__FILE__) + '/../spec_helper'
require 'spec_helper'
SocketsController.class_eval <<-EOT
def url_options

View file

@ -2,8 +2,6 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
#For Guidance
#http://github.com/thoughtbot/factory_girl
# http://railscasts.com/episodes/158-factories-not-fixtures
@ -55,7 +53,6 @@ Factory.define :blog do |b|
b.sequence(:body) {|n| "jimmy's huge #{n} whales"}
end
Factory.define :bookmark do |b|
b.link "http://www.yahooligans.com/"
end

View file

@ -2,18 +2,14 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require 'spec_helper'
require File.dirname(__FILE__) + '/../spec_helper'
include ApplicationHelper
describe ApplicationHelper do
before do
@user = Factory.create(:user)
@person = Factory.create(:person)
end
it "should provide a correct show path for a given person" do
person_url(@person).should == "/people/#{@person.id}"
end

View file

@ -2,11 +2,8 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require 'spec_helper'
require File.dirname(__FILE__) + '/../spec_helper'
include PublicsHelper
describe PublicsHelper do
before do
@user = Factory.create(:user)

View file

@ -2,16 +2,11 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.dirname(__FILE__) + '/../spec_helper'
include RequestsHelper
require 'spec_helper'
describe RequestsHelper do
before do
stub_success("tom@tom.joindiaspora.com")
stub_success("evan@status.net")
@tom = Redfinger.finger('tom@tom.joindiaspora.com')
@ -24,4 +19,16 @@ describe RequestsHelper do
subscription_mode(@evan).should == :none
end
end
describe "#relationship_flow" do
let(:tom){ Factory(:user, :email => 'tom@tom.joindiaspora.com') }
before do
stub!(:current_user).and_return(tom)
end
it 'should return the correct tag and url for a given address' do
relationship_flow('tom@tom.joindiaspora.com')[:friend].receive_url.should include("receive/user")
end
end
end

View file

@ -2,14 +2,7 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.dirname(__FILE__) + '/../spec_helper'
include ApplicationHelper
include Diaspora::Parser
require 'spec_helper'
describe Diaspora::Parser do
before do
@ -88,7 +81,6 @@ describe Diaspora::Parser do
original_person_id = @user2.person.id
xml = request.to_diaspora_xml
Person.all.count.should be person_count
@user.receive xml
Person.all.count.should be person_count
@ -121,7 +113,6 @@ describe Diaspora::Parser do
@user.friends.include?(new_person).should be true
end
it 'should process retraction for a person' do
person_count = Person.all.count
request = @user.send_friend_request_to( @user2.person, @aspect)
@ -140,7 +131,6 @@ describe Diaspora::Parser do
aspect_people_count = @aspect.people.size
#They are now friends
Person.count.should == person_count
@user.receive retraction_xml

View file

@ -2,9 +2,7 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.dirname(__FILE__) + '/../spec_helper'
require 'spec_helper'
require File.dirname(__FILE__) + '/../../lib/hcard'
describe HCard do

View file

@ -2,9 +2,7 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.dirname(__FILE__) + '/../spec_helper'
require 'spec_helper'
describe MessageHandler do
before do
@ -41,7 +39,6 @@ describe MessageHandler do
}
end
it 'should only retry a bad request three times ' do
request = FakeHttpRequest.new(:failure)
request.should_receive(:get).exactly(MessageHandler::NUM_TRIES).times.and_return(request)
@ -61,7 +58,6 @@ describe MessageHandler do
describe 'POST messages' do
it 'should be able to add a post message to the queue' do
EventMachine.run {
@handler.size.should ==0

View file

@ -2,9 +2,7 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.dirname(__FILE__) + '/../spec_helper'
require 'spec_helper'
describe Salmon do
before do
@ -23,7 +21,6 @@ describe Salmon do
@sent_salmon.magic_sig.sig.should == @parsed_salmon.magic_sig.sig
@sent_salmon.magic_sig.signable_string.should == @parsed_salmon.magic_sig.signable_string
@parsed_salmon.verified_for_key?(OpenSSL::PKey::RSA.new(@user.exported_key)).should be true
@sent_salmon.verified_for_key?(OpenSSL::PKey::RSA.new(@user.exported_key)).should be true
end

View file

@ -2,32 +2,25 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require 'spec_helper'
describe Diaspora::Webhooks do
before do
@user = Factory.create(:user)
@aspect = @user.aspect(:name => "losers")
@user2 = Factory.create(:user)
@aspect2 = @user2.aspect(:name => "losers")
friend_users(@user, @aspect, @user2, @aspect2)
end
require File.dirname(__FILE__) + '/../spec_helper'
include Diaspora
describe Diaspora do
describe Webhooks do
describe "body" do
before do
@user = Factory.create(:user)
@aspect = @user.aspect(:name => "losers")
@user2 = Factory.create(:user)
@aspect2 = @user2.aspect(:name => "losers")
friend_users(@user, @aspect, @user2, @aspect2)
@post = Factory.build(:status_message, :person => @user.person)
end
describe "body" do
before do
@post = Factory.build(:status_message, :person => @user.person)
end
it "should add the following methods to Post on inclusion" do
@post.respond_to?(:to_diaspora_xml).should be true
end
it "should add the following methods to Post on inclusion" do
@post.respond_to?(:to_diaspora_xml).should be true
end
end
end

View file

@ -2,7 +2,7 @@
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require File.dirname(__FILE__) + '/../spec_helper'
require 'spec_helper'
describe Diaspora::WebSocket do
before do

Some files were not shown because too many files have changed in this diff Show more