Merge branch 'master' into HEAD

Conflicts:
	lib/diaspora/user/receiving.rb
	pkg/ubuntu/dist
This commit is contained in:
Raphael 2010-11-02 10:54:37 -07:00
commit c031416ca8
126 changed files with 1668 additions and 1020 deletions

View file

@ -60,7 +60,7 @@ group :test do
gem 'rspec-rails', '>= 2.0.0'
gem 'mocha'
gem 'database_cleaner', '0.5.2'
gem 'webmock'
gem 'webmock', :require => false
gem 'jasmine', :path => 'vendor/gems/jasmine', :require => false
gem 'mongrel', :require => false if RUBY_VERSION.include? "1.8"
end

View file

@ -35,7 +35,6 @@ class ApplicationController < ActionController::Base
end
def set_locale
I18n.default_locale = DEFAULT_LANGUAGE
if current_user
I18n.locale = current_user.language
else

View file

@ -18,13 +18,13 @@ class AspectsController < ApplicationController
end
def create
@aspect = current_user.aspect(params[:aspect])
@aspect = current_user.aspects.create(params[:aspect])
if @aspect.valid?
flash[:notice] = I18n.t('aspects.create.success')
respond_with @aspect
else
flash[:error] = I18n.t('aspects.create.failure')
redirect_to aspects_manage_path
redirect_to :back
end
end

View file

@ -56,7 +56,7 @@ class PeopleController < ApplicationController
end
# upload and set new profile photo
if params[:person][:profile][:image]
if params[:person][:profile][:image].present?
raw_image = params[:person][:profile].delete(:image)
params[:profile_image_hash] = { :user_file => raw_image, :to => "all" }

View file

@ -13,9 +13,7 @@ class StatusMessagesController < ApplicationController
public_flag.to_s.match(/(true)/) ? public_flag = true : public_flag = false
params[:status_message][:public] = public_flag
data = clean_hash params[:status_message]
message = params[:status_message][:message]
status_message = current_user.post(:status_message, data)
status_message = current_user.post(:status_message, params[:status_message])
render :nothing => true
end
@ -29,13 +27,4 @@ class StatusMessagesController < ApplicationController
@status_message = current_user.find_visible_post_by_id params[:id]
respond_with @status_message
end
private
def clean_hash(params)
return {
:message => params[:message],
:to => params[:to],
:public => params[:public]
}
end
end

View file

@ -79,6 +79,11 @@ class UsersController < ApplicationController
@step = ((params[:step].to_i>0)&&(params[:step].to_i<5)) ? params[:step].to_i : 1
@step ||= 1
if @step == 4
@user.getting_started = false
@user.save
end
render "users/getting_started"
end

View file

@ -34,7 +34,7 @@ module ApplicationHelper
end
def how_long_ago(obj)
"#{time_ago_in_words(obj.created_at)} ago"
"#{time_ago_in_words(obj.created_at)} #{t('ago')}"
end
def person_url(person)

View file

@ -21,12 +21,9 @@ module SocketsHelper
action_hash.merge! opts
if object.is_a? Photo
action_hash[:photo_hash] = object.thumb_hash
elsif object.is_a? StatusMessage
action_hash[:status_message_hash] = object.latest_hash
action_hash[:status_message_hash][:mine?] = true if object.person.owner_id == uid
end
if object.person.owner_id == uid
if object.person && object.person.owner_id == uid
action_hash[:mine?] = true
end

View file

@ -29,11 +29,6 @@ class Aspect
name
end
def posts_by_person_id( id )
id = id.to_id
posts.detect{|x| x.person.id == id }
end
def person_objects
person_ids = people.map{|x| x.person_id}
Person.all(:id.in => person_ids)

View file

@ -23,6 +23,7 @@ class Person
one :profile, :class_name => 'Profile'
validates_associated :profile
delegate :first_name, :last_name, :to => :profile
before_save :downcase_diaspora_handle
def downcase_diaspora_handle

View file

@ -29,9 +29,9 @@ class Photo < Post
validates_with PhotoAlbumValidator
before_destroy :ensure_user_picture
attr_accessible :caption
attr_protected :person
before_destroy :ensure_user_picture
def self.instantiate(params = {})
image_file = params.delete(:user_file)

View file

@ -32,11 +32,12 @@ class Post
before_destroy :propogate_retraction
after_destroy :destroy_comments
attr_accessible :user_refs
def self.instantiate params
new_post = self.new params.to_hash
new_post.person = params[:person]
new_post.public = params[:public]
new_post.save
new_post.diaspora_handle = new_post.person.diaspora_handle
new_post
end

View file

@ -8,13 +8,13 @@ class Profile
include Diaspora::Webhooks
include ROXML
xml_reader :person_id
xml_reader :first_name
xml_reader :last_name
xml_reader :image_url
xml_reader :birthday
xml_reader :gender
xml_reader :bio
xml_accessor :diaspora_handle
key :first_name, String
key :last_name, String
@ -22,19 +22,23 @@ class Profile
key :birthday, Date
key :gender, String
key :bio, String
key :diaspora_handle, String
after_validation :strip_names
validates_length_of :first_name, :maximum => 32
validates_length_of :last_name, :maximum => 32
before_save :strip_names
def person_id
self._parent_document.id
end
def person
self._parent_document
end
def diaspora_handle
#get the parent diaspora handle, unless we want to access a profile without a person
(self._parent_document) ? self.person.diaspora_handle : self[:diaspora_handle]
end
protected
def strip_names

View file

@ -9,18 +9,18 @@ class Request
include Diaspora::Webhooks
include ROXML
xml_accessor :_id
xml_accessor :person, :as => Person
xml_accessor :destination_url
xml_accessor :callback_url
xml_accessor :exported_key, :cdata => true
xml_reader :_id
xml_reader :diaspora_handle
xml_reader :destination_url
xml_reader :callback_url
key :person_id, ObjectId
key :aspect_id, ObjectId
key :aspect_id, ObjectId
key :destination_url, String
key :callback_url, String
key :exported_key, String
key :diaspora_handle, String
belongs_to :person
validates_presence_of :destination_url, :callback_url
@ -30,15 +30,13 @@ class Request
person = options[:from]
self.new(:destination_url => options[:to],
:callback_url => person.receive_url,
:person => person,
:exported_key => person.exported_key,
:aspect_id => options[:into])
:diaspora_handle => person.diaspora_handle,
:aspect_id => options[:into])
end
def reverse_for accepting_user
self.person = accepting_user.person
self.exported_key = accepting_user.exported_key
self.destination_url = self.callback_url
self.diaspora_handle = accepting_user.diaspora_handle
self.destination_url = self.callback_url
self.save
end

View file

@ -7,12 +7,13 @@ class Retraction
include Diaspora::Webhooks
xml_accessor :post_id
xml_accessor :person_id
xml_accessor :diaspora_handle
xml_accessor :type
attr_accessor :post_id
attr_accessor :person_id
attr_accessor :diaspora_handle
attr_accessor :type
attr_accessor :person
def self.for(object)
retraction = self.new
@ -23,12 +24,16 @@ class Retraction
retraction.post_id = object.id
retraction.type = object.class.to_s
end
retraction.person_id = person_id_from(object)
retraction.diaspora_handle = object.diaspora_handle
retraction
end
def perform receiving_user_id
Rails.logger.debug "Performing retraction for #{post_id}"
unless Post.first(:diaspora_handle => person.diaspora_handle, :id => post_id)
raise "#{person.inspect} is trying to retract a post they do not own"
end
begin
Rails.logger.debug("Retracting #{self.type} id: #{self.post_id}")
target = self.type.constantize.first(:id => self.post_id)
@ -38,13 +43,4 @@ class Retraction
Rails.logger.info("Retraction for unknown type recieved.")
end
end
def self.person_id_from(object)
object.is_a?(Person) ? object.id : object.person.id
end
def person
Person.find_by_id(self.person_id)
end
end

View file

@ -11,6 +11,8 @@ class StatusMessage < Post
key :message, String
validates_presence_of :message
attr_accessible :message
def to_activity
<<-XML
<entry>
@ -24,9 +26,5 @@ class StatusMessage < Post
</entry>
XML
end
def latest_hash
{ :text => message}
end
end

View file

@ -40,8 +40,11 @@ class User
validates_presence_of :username
validates_uniqueness_of :username, :case_sensitive => false
validates_format_of :username, :with => /\A[A-Za-z0-9_.]+\z/
validates_presence_of :person, :unless => proc {|user| user.invitation_token.present?}
validates_length_of :username, :maximum => 32
validates_inclusion_of :language, :in => AVAILABLE_LANGUAGE_CODES
validates_presence_of :person, :unless => proc {|user| user.invitation_token.present?}
validates_associated :person
one :person, :class_name => 'Person', :foreign_key => :owner_id
@ -85,13 +88,6 @@ class User
end
######### Aspects ######################
def aspect(opts = {})
aspect = Aspect.new(opts)
aspect.user = self
aspect.save
aspect
end
def drop_aspect(aspect)
if aspect.people.size == 0
aspect.destroy
@ -149,6 +145,7 @@ class User
aspect_ids = validate_aspect_permissions(aspect_ids)
post = build_post(class_name, options)
post.socket_to_uid(id, :aspect_ids => aspect_ids) if post.respond_to?(:socket_to_uid)
push_to_aspects(post, aspect_ids)
@ -205,9 +202,11 @@ class User
model_class = class_name.to_s.camelize.constantize
post = model_class.instantiate(options)
post.save
self.raw_visible_posts << post
self.save
if post.save
raise 'MongoMapper failed to catch a failed save' unless post.id
self.raw_visible_posts << post
self.save
end
post
end
@ -417,8 +416,8 @@ class User
end
def seed_aspects
aspect(:name => "Family")
aspect(:name => "Work")
self.aspects.create(:name => "Family")
self.aspects.create(:name => "Work")
end
def diaspora_handle

View file

@ -16,10 +16,10 @@
.photo_edit_block= image_tag photo.url(:thumb_medium)
.submit_block
= link_to t('.cancel'), root_path
= link_to t('cancel'), root_path
or
= album.submit t('.update_album')
.button.delete
= link_to t('.delete_album'), @album, :confirm => t('.are_you_sure'), :method => :delete
= link_to t('.delete_album'), @album, :confirm => t('are_you_sure'), :method => :delete

View file

@ -42,5 +42,5 @@
.album_id{:id => @album_id, :style => "display:hidden;"}
-unless current_user.person.id == @person.id
%h4= "#{t('.by')} #{@person.real_name}"
%h4= "#{t('by')} #{@person.real_name}"

View file

@ -9,4 +9,4 @@
= link_to post.person.real_name, post.person
= post.text
%div.time
= "#{time_ago_in_words(post.updated_at)} #{t('.ago')}"
= "#{time_ago_in_words(post.updated_at)} #{t('ago')}"

View file

@ -4,7 +4,7 @@
= form_for Comment.new, :remote => true do |comment|
%p
= label_tag "comment_text_on_#{post.id}", "Comment"
= label_tag "comment_text_on_#{post.id}", t('.comment')
= comment.text_area :text, :rows => 1, :id => "comment_text_on_#{post.id}", :class => "comment_box"
= comment.hidden_field :post_id, :value => post.id

View file

@ -5,13 +5,13 @@
= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
#user
%p.username
= f.label :username , t('.username')
= f.label :username , t('username')
= f.text_field :username
%p.user_network
="@#{APP_CONFIG[:terse_pod_url]}"
%p
= f.label :password , t('.password')
= f.label :password , t('password')
= f.password_field :password
/%p
/- if devise_mapping.rememberable?

View file

@ -1,20 +1,23 @@
.span-12.last
.modal_title_bar
%h4 Invite someone to join Diaspora!
%h4
= t('.invite_someone_to_join')
%i if they accept, they will be added to the aspect you invited them
%i
= t('.if_they_accept_info')
= form_for User.new, :url => invitation_path(User) do |invite|
%p
= invite.label :email
= invite.label :email , t('email')
= invite.text_field :email
To
= t('.to')
- unless @aspect.is_a? Aspect
= invite.select(:aspects, @aspects_dropdown_array)
- else
= invite.select(:aspects, @aspects_dropdown_array, :selected => @aspect.id)
Message:
= t('.message')
= invite.text_area :invite_messages, :value => ""
%p= invite.submit "Send an invitation"
%p= invite.submit t('.send_an_invitation')

View file

@ -1,8 +1,9 @@
%h2 Send invitation
%h2
= t('.send_invitation')
= form_for User.new, :url => invitation_path(User) do |f|
= devise_error_messages!
%p
= f.label :email
= f.label :email , t('email')
= f.text_field :email
%p= f.submit "Send an invitation"
%p= f.submit t('.send_an_invitation')
/= link_to "Home", after_sign_in_path_for(resource_name)

View file

@ -44,7 +44,7 @@
%header
.container{:style => "position:relative;"}
#diaspora_text{:href => root_path}
= link_to "DIASPORA*", (current_user ? root_path : new_user_session_path)
= link_to "DIASPORA", (current_user ? root_path : new_user_session_path)
%span.sub_text
PREVIEW

View file

@ -5,18 +5,18 @@
#section_header
%h2
= t('.settings')
= t('settings')
%ul#settings_nav
%li=link_to t('.profile'), edit_person_path(current_user.person)
%li=link_to t('.account'), edit_user_path(current_user)
%li=link_to t('.services'), services_path
%li=link_to t('profile'), edit_person_path(current_user.person)
%li=link_to t('account'), edit_user_path(current_user)
%li=link_to t('services'), services_path
.span-19.prepend-5.last
= form_for @person, :html => { :multipart => true } do |person|
%h3
= t('.your_profile')
.description
This info will be available to whomever you connect with on Diaspora.
=t('.info_available_to')
= person.error_messages
@ -45,6 +45,6 @@
= render 'people/profile_photo_upload', :form => profile
.submit_block
= link_to t('.cancel'), edit_user_path(current_user)
= t('.or')
= link_to t('cancel'), edit_user_path(current_user)
= t('or')
= person.submit t('.update_profile')

View file

@ -28,11 +28,11 @@
%li= link_to aspect.name, aspect
- if @person != current_user.person && @contact
= link_to t('.remove_friend'), @person, :confirm => t('.are_you_sure'), :method => :delete, :class => "button"
= link_to t('.remove_friend'), @person, :confirm => t('are_you_sure'), :method => :delete, :class => "button"
- if @person == current_user.person
%b
= link_to "Edit my profile", edit_person_path(@person)
= link_to t('.edit_my_profile'), edit_person_path(@person)
%br
%br

View file

@ -20,7 +20,7 @@
- if current_user.owns?(post)
.right
= link_to t('.delete'), photo_path(post), :confirm => t('.are_you_sure'), :method => :delete, :remote => true, :class => "delete"
= link_to t('delete'), photo_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete"
- if !post.album_id.nil?
=t('.posted_a_new_photo_to')

View file

@ -19,5 +19,5 @@
= link_to "⇧ #{@album.name}", album_path(@album)
-if current_user.owns? @album
.button.right
= link_to t('.delete_photo'), @photo, :confirm => t('.are_you_sure'), :method => :delete
= link_to t('.delete_photo'), @photo, :confirm => t('are_you_sure'), :method => :delete

View file

@ -24,5 +24,5 @@
= f.submit t('.update')
%h3 t('.cancel_my_account')
%p
Unhappy? #{link_to t('.cancel_my_account'), registration_path(resource_name), :confirm => t('.are_you_sure'), :method => :delete}.
Unhappy? #{link_to t('.cancel_my_account'), registration_path(resource_name), :confirm => t('are_you_sure'), :method => :delete}.
= link_to t('.back'), :back

View file

@ -5,16 +5,16 @@
= image_tag "http://needcoffee.cachefly.net/needcoffee/uploads/2009/02/predator-arnold-schwarzenegger.jpg"
= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
%p
= f.label :username , t('.username')
= f.label :username , t('username')
= f.text_field :username
%p
= f.label :email , t('.email')
= f.label :email , t('email')
= f.text_field :email
%p
= f.label :password , t('.password')
= f.label :password , t('password')
= f.password_field :password
%p
= f.label :password_confirmation , t('.password_confirmation')
= f.label :password_confirmation , t('password_confirmation')
= f.password_field :password_confirmation
= f.submit t('.sign_up')

View file

@ -4,15 +4,15 @@
#section_header
%h2
= t('.settings')
= t('settings')
%ul#settings_nav
%li=link_to t('.profile'), edit_person_path(current_user.person)
%li=link_to t('.account'), edit_user_path(current_user)
%li=link_to t('.services'), services_path
%li=link_to t('profile'), edit_person_path(current_user.person)
%li=link_to t('account'), edit_user_path(current_user)
%li=link_to t('services'), services_path
.span-19.prepend-5.last
%h2
= t('.services')
= t('services')
%ul
- for service in @services

View file

@ -1,6 +1,7 @@
%h4 Invites
= link_to "Invite a friend", "#invite_user_pane", :class => "invite_user_button", :title => "Invite a friend"
= "(#{invites} left)"
%h4
= t('.invites')
= link_to t('.invite_a_friend'), "#invite_user_pane", :class => "invite_user_button", :title => "Invite a friend"
= t('.invitations_left', :count => invites)
%br
.yo{ :style => "display:none;"}
#invite_user_pane

View file

@ -26,7 +26,7 @@
= form_for StatusMessage.new, :remote => true do |status|
= status.error_messages
%p
= status.label :message, "Post a message to #{aspect}"
= status.label :message, t('.post_a_message_to', :aspect => aspect)
= status.text_area :message, :rows => 2, :value => params[:prefill]
= status.hidden_field :to, :value => (aspect == :all ? aspect : aspect.id)
@ -35,7 +35,7 @@
- if aspect == :all
.public_toggle
= status.check_box( :public, {}, true, false )
make public
= t('.make_public')
= link_to '(?)', "#question_mark_pane", :class => 'question_mark'
.fancybox_content
@ -48,7 +48,7 @@
= status.submit t('.share'), :title => "Share with #{aspect}"
#publisher_photo_upload
or
= t('or')
= render 'photos/new_photo', :aspect_id => (aspect == :all ? aspect : aspect.id), :album_id => nil

View file

@ -5,7 +5,7 @@
- unless current_user.aspects.size == current_user.aspects_with_post(post.id).size
.reshare_pane
%span.reshare_button
= link_to "Reshare", "#"
= link_to t('.reshare'), "#"
%ul.reshare_box
- for aspect in current_user.aspects
@ -14,4 +14,4 @@
- else
.reshare_pane
%span.reshare_button
= link_to "Reshare", "#", :class => "inactive"
= link_to t('.reshare'), "#", :class => "inactive"

View file

@ -21,7 +21,7 @@
- if current_user.owns?(post)
.right
= render "shared/reshare", :post => post, :current_user => current_user
= link_to t('.delete'), status_message_path(post), :confirm => t('.are_you_sure'), :method => :delete, :remote => true, :class => "delete"
= link_to t('delete'), status_message_path(post), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete"
= make_links(post.message)

View file

@ -13,7 +13,7 @@
- if current_user.owns? @status_message
%p
= link_to t('.destroy'), @status_message, :confirm => t('.are_you_sure'), :method => :delete
= link_to t('.destroy'), @status_message, :confirm => t('are_you_sure'), :method => :delete
.span-9.last
#stream.show

View file

@ -14,15 +14,15 @@
#section_header
%h2
= t('.settings')
= t('settings')
%ul#settings_nav
%li=link_to t('.profile'), edit_person_path(current_user.person)
%li=link_to t('.account'), edit_user_path(current_user)
%li=link_to t('.services'), services_path
%li=link_to t('profile'), edit_person_path(current_user.person)
%li=link_to t('account'), edit_user_path(current_user)
%li=link_to t('services'), services_path
.span-19.prepend-5.last
%h2
= t('.account')
= t('account')
= link_to t('.invite_friends'), new_user_invitation_path(current_user)
@ -39,12 +39,12 @@
= f.label :password, t('.new_password')
= f.password_field :password
%p
= f.label :password_confirmation, t('.password_confirmation')
= f.label :password_confirmation, t('password_confirmation')
= f.password_field :password_confirmation
.submit_block
= link_to t('.cancel'), edit_user_path(current_user)
or
= link_to t('cancel'), edit_user_path(current_user)
= t('or')
= f.submit t('.change_password')
%h3
@ -70,5 +70,5 @@
%h3
= t('.close_account')
= link_to t('.close_account'), current_user,
:confirm => t('.are_you_sure'), :method => :delete,
:confirm => t('are_you_sure'), :method => :delete,
:class => "button"

View file

@ -30,7 +30,7 @@
%h1{:style => "text-align:right;"}
= "Welcome to Diaspora!"
.description
Do the stuff below to further complete some things.
=t('.signup_steps')
%h3{:style => "text-align:right;"}
= link_to "Edit your profile", getting_started_path(:step => 1)

View file

@ -10,7 +10,7 @@
%h4
Aspect name
- form_for Aspect.new, :remote => true, :format => :json do |aspect|
= form_for Aspect.new, :remote => true, :format => :json do |aspect|
= aspect.text_field :name, :style => "display:inline;"
= aspect.submit "Add"

View file

@ -3,14 +3,6 @@
-# the COPYRIGHT file.
- if current_user.getting_started == true
:javascript
$.ajax({
type: "PUT",
url: "/users/#{current_user.id}",
data: {"user":{"getting_started":'false'}}
})
%h1
= "You're all set up, #{current_user.person.profile.first_name}!"
.description

View file

@ -6,4 +6,20 @@ execute "nokogiri deps" do
end
execute "eventmachine deps" do
command "yum install -y gcc-c++"
end
end
def harden_ruby(ruby_string)
Dir.glob("/usr/local/rvm/wrappers/#{ruby_string}/*").each do |file|
link "/usr/local/bin/#{file.split('/').last}" do
to file
end
end
Dir.glob("/usr/local/rvm/gems/#{ruby_string}/bin/*").each do |file|
link "/usr/local/bin/#{file.split('/').last}" do
to file
end
end
end
harden_ruby("ruby-1.8.7-p302")

View file

@ -23,4 +23,4 @@ end
APP_CONFIG[:terse_pod_url] = APP_CONFIG[:pod_url].gsub(/(https?:|www\.)\/\//, '')
APP_CONFIG[:terse_pod_url].chop! if APP_CONFIG[:terse_pod_url][-1, 1] == '/'
puts "WARNING: Please modify your app_config.yml to have a proper pod_url!" if APP_CONFIG[:terse_pod_url] == "example.org" && Rails.env != :test
puts "WARNING: Please modify your app_config.yml to have a proper pod_url!" if APP_CONFIG[:terse_pod_url] == "example.org" && Rails.env != "test"

View file

@ -4,4 +4,8 @@
# 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 = DEFAULT_LANGUAGE
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
AVAILABLE_LANGUAGE_CODES.each do |c|
I18n.fallbacks[c.to_sym] = [c.to_sym, DEFAULT_LANGUAGE.to_sym, :en]
end

View file

@ -15,6 +15,11 @@ fr:
timeout: 'Votre session a expiré, veuillez vous connecter de nouveau afin de continuer.'
inactive: 'Votre compte na pas encore été activé.'
sessions:
new:
login: 'Se connecter'
username: "Nom d'utilisateur"
password: 'Mot de passe'
sign_in: 'Connexion'
signed_in: 'Connecté avec succès.'
signed_out: 'Déconnecté avec succès.'
passwords:
@ -43,4 +48,9 @@ fr:
subject: 'Instructions de déverrouillage'
invitation:
subject: 'Un ami souhaite que vous rejoigniez Diaspora !'
shared:
links:
sign_in: 'Connexion'
sign_up: 'Inscription'
forgot_your_password: 'Mot de passe oublié ?'

View file

@ -8,6 +8,7 @@ sv:
errors:
messages:
not_found: "kan ej hitta"
already_confirmed: "är redan bekräftad"
not_locked: "var ej låst"
devise:
@ -15,11 +16,16 @@ sv:
unauthenticated: 'Du måste logga in innan du kan fortsätta.'
unconfirmed: 'Du måste verifiera ditt konto innan du kan fortsätta.'
locked: 'Ditt konto är låst.'
invalid: 'Felaktig användare eller lösenord.'
invalid: 'Felaktigt användarnamn eller lösenord.'
invalid_token: 'Ogiltig identifiering.'
timeout: 'Din session är avslutad, var vänlig logga in igen.'
inactive: 'Ditt konto är inte aktiverat.'
sessions:
new:
login: 'Logga in'
username: 'Användarnamn'
password: 'Lösenord'
sign_in: 'Logga in'
signed_in: 'Inloggning ok.'
signed_out: 'Utloggning ok.'
passwords:
@ -40,6 +46,16 @@ sv:
invitation_token_invalid: 'Denna inbjudan är ej giltig!'
updated: 'Ditt lösenord är nu inställt och du är inloggad.'
mailer:
confirmation_instructions: 'Instruktioner för att verifiera ditt konto.'
reset_password_instructions: 'Instruktioner för att återställa ditt lösenord.'
unlock_instructions: 'Instruktioner för att låsa upp ditt konto.'
confirmation_instructions:
subject: 'Instruktioner för att verifiera ditt konto.'
reset_password_instructions:
subject: 'Instruktioner för att återställa ditt lösenord.'
unlock_instructions:
subject: 'Instruktioner för att låsa upp ditt konto.'
invitation:
subject: 'En vän vill att du ska gå med i Diaspora!'
shared:
links:
sign_in: 'Logga in'
sign_up: 'Registrera dig'
forgot_your_password: 'Glömt ditt lösenord?'

View file

@ -5,18 +5,18 @@
# Sample localization file for Arabic.
ar:
hello: "مرحبا العالم"
hello: "مرحبا"
application:
helper:
unknown_person: "غير معروف شخص"
unknown_person: "شخص غير معروف"
new_requests: "طلبات جديدة"
dashboards:
helper:
home: "منزل"
home: "الرئيسية"
error_messages:
helper:
invalid_fields: "الحقول غير صالحة"
correct_the_following_errors_and_try_again: ".تصحيح الأخطاء التالية وحاول مرة أخرى"
invalid_fields: "مدخلات غير صحيحة"
correct_the_following_errors_and_try_again: ".صحح الأخطاء التالية وحاول مرة أخرى"
people:
helper:
results_for: "%{params} نتائج "
@ -34,39 +34,39 @@ ar:
all_aspects: "جميع الجوانب"
manage_aspects: "إدارة الجوانب"
publisher:
share: "تقاسم"
share: "مشاركة"
aspect_friends:
add_friends: "أضف أصدقاء"
albums:
album:
you: "أنت"
new_album:
create: "خلق"
add_a_new_album: "إضافة ألبوم جديد"
create: "جديد"
add_a_new_album: "أضف ألبوم جديد"
show:
edit_album: "تعديل الألبوم"
albums: "البومات"
updated: "تحديث"
by: "بواسطة"
edit:
editing: "التحرير"
updated: "تحديث"
editing: "تحرير"
updated: "محدث"
are_you_sure: "هل أنت متأكد؟"
delete_album: "حذف ألبوم"
cancel: "إلغاء"
index:
home: "منزل"
home: "الرئيسية"
new_album: "ألبوم جديد"
create:
success: ".ألبوما %{name} لقد قمت دعا"
success: " .%{name} لقد قمت بإنشاء ألبوم بإسم"
update:
success: ".تحرير بنجاح %{name} الألبوم"
success: ".بنجاح %{name} تم تحرير ألبوم"
failure: ".%{name} فشلت في تحرير ألبوم"
destroy:
success: ".حذفها %{name} الألبوم"
success: ".%{name} تم حذف ألبوم"
helper:
friends_albums: صدقاء البومات"
your_albums: "البومات الخاص"
friends_albums: لبومات الأصدقاء"
your_albums: "البوماتك"
aspects:
index:
photos: "صور"
@ -81,23 +81,23 @@ ar:
ignore_remove: "تجاهل/إزالة"
new_aspect:
add_a_new_aspect: "أضف جانبا جديدا"
create: "خلق"
create: "جديد"
create:
success: ".الذي يمكن أن نرى الجانب الجديد الخاص بك Diaspora انقر على علامة الجمع على الجانب الأيسر لنقو"
success: ".من الذي يمكنه مشاهدة مظهرك الجديد Diaspora انقر على علامة الزائد على الجانب الأيسر لتقول ل"
failure: ".فشل إنشاء الجانب"
destroy:
success: ".%{name} وقد نجحت في إزالة"
success: ".بنجاح %{name} تم إزالة"
update:
success: ".تحرير بنجاح ,%{name} ,وقد الجانب الخاص بك"
success: ".بنجاح %{name} تم تعديل"
move_friends:
failure: ".%{real_name} فشل تحرير آسبكت لصدي"
success: ".جوانب الموضوع بنجاح"
move_friend:
failure: "%{inspect} لم تنجح"
success: ".أنت الآن عرض صديقك جانبا مختلفا من جوانب نفسك"
success: ".تم إضافة صديقك بنجاح"
helper:
remove: "نزع"
aspect_not_empty: "الجانب يست فارغ"
remove: "حذف"
aspect_not_empty: "الجانب ليس فارغ"
users:
edit:
editing_profile: "تحرير الملف الشخصي"
@ -110,82 +110,82 @@ ar:
picture: "صورة"
editing_profile: "تحرير الملف الشخصي"
albums: "البومات"
you_dont_have_any_photos: "ليس لديك أي صوا! نتقل إلى"
page_to_upload_some: ".الصفحة لتحميل بعض"
you_dont_have_any_photos: "ليس لديك أي صور! انتقل إلى"
page_to_upload_some: ".صفحة تحميل بعض"
comments:
comment:
ago: "منذ"
new_comment:
comment: "كيف"
comment: "تعليق"
photos:
show:
prev: "السابق"
full_size: "الحجم الكام"
full_size: "الحجم اﻷصلي"
next: "القادم"
edit_photo: "تحرير الصو"
delete_photo: "حذف الصو"
edit_photo: "تحرير الصورة"
delete_photo: "حذف الصورة"
are_you_sure: "هل أنت متأكد؟"
comments: "تعليقات"
edit:
editing: صحيح"
are_you_sure: "هل أنت متأك؟"
delete_photo: "حذف الصو"
editing: حرير"
are_you_sure: "هل أنت متأكد؟"
delete_photo: "حذف الصورة"
photo:
show_comments: "sعرض التعليقا"
posted_a_new_photo_to: رسلت صورة جديدة ل"
show_comments: "عرض التعليقات"
posted_a_new_photo_to: ضفت صورة جديدة ل"
new:
new_photo: "جديد الصو"
back_to_list: "عودة إلى قائم"
post_it: "!بعد ذلك"
new_photo: "صورة جديدة"
back_to_list: "عودة إلى القائمة"
post_it: "!ألصقها"
create:
runtime_error: "?فشل تحميل الصور. هل أنت متأكد من أن يتم ربط حزام الأمان"
integrity_error: "?فشل تحميل الصور. هل أنت متأكد من أن صورة"
type_error: "?فشل تحميل الصور. هل أنت متأكد من وأضيف صورة"
runtime_error: "فشل تحميل الصور. هل ربطت حزام الأمان؟"
integrity_error: "فشل تحميل الصور. هل ملفك صورة؟"
type_error: "فشل تحميل الصور. هل أنت متأكد أنك أضفت صورة؟"
update:
notice: ".الصورة تحديثها بنجاح"
error: ".فشل لتحرير الصو"
notice: "تم تحديث الصورة بنجاح"
error: "فشل تحرير الصورة."
destroy:
notice: ".الصور المحذوفة"
notice: "تم حذف الصورة"
registrations:
new:
sign_up: "قم بالتسجي"
sign_up: "التسجيل"
create:
success: "!Diaspora لقد انضممت"
success: "!Diaspora سجل في"
status_messages:
new_status_message:
tell_me_something_good: "قل لي شيئا جيد"
oh_yeah: "!نعم"
tell_me_something_good: "قل لي شيئا جيداً"
oh_yeah: "!يا سلااام"
status_message:
show_comments: "عرض التعليقا"
show_comments: "عرض التعليقات"
delete: "حذف"
are_you_sure: "هل أنت متأكد؟"
show:
status_message: "رسالة الحالة"
status_message: "الحالة"
comments: "تعليقات"
are_you_sure: "هل أنت متأكد؟"
destroy: "هدم"
view_all: "عرض الك"
destroy: "إزالة"
view_all: "عرض الكل"
message: "رسالة"
owner: "مالك"
helper:
no_message_to_display: ".أي رسالة لعرضه"
no_message_to_display: "لا يوجد رسالة لعرضها"
people:
person:
add_friend: "أضف صدي"
pending_request: "في انتظار طلب"
add_friend: "أضف صديق"
pending_request: "طلبات معلقة"
index:
add_friend: "أضف صدي"
real_name: "اسمه الحقيقي"
add_friend: "أضف صديق"
real_name: "الاسم الحقيقي"
diaspora_handle: "اسمك المستعار diaspora"
thats_you: "!هذا لك"
friend_request_pending: "طلب صديق معلقة"
you_have_a_friend_request_from_this_person: "لديك صديق طلب من هذا الشخص"
thats_you: "!هذا أنت"
friend_request_pending: "طلبات صداقة معلقة"
you_have_a_friend_request_from_this_person: "لديك طلب صداقة من هذا الشخص"
new:
new_person: "شخص جديد"
back_to_list: "عودة إلى قائمة"
back_to_list: "عودة إلى القائمة"
show:
last_seen: "%{how_long_ago} :المشاهدة الأخيرة"
friends_since: "%{how_long_ago} :أصدقاء منذ"
last_seen: "%{how_long_ago} :آخر مشاهدة"
friends_since: "%{how_long_ago} :صديق منذ"
save: "حفظ"
are_you_sure: "هل أنت متأكد؟"
remove_friend: "إزالة صديق"
@ -194,13 +194,13 @@ ar:
add_a_new_friend_to: "إضافة صديق جديد إلى"
enter_a_diaspora_username: ":Diaspora أدخل اسم مستخدم"
your_diaspora_username_is: "%{diaspora_handle} :هو Diaspora اسم المستخدم الخاص"
friends_username: "صديق اسم المستخدم"
friends_username: "اسم مستخدم الصديق"
destroy:
success: ".أنت الآن أصدقاء"
error: "!الرجاء اختيار جانبا"
ignore: ".صديق تجاهل الطلب"
success: ".أنتم الآن أصدقاء"
error: "!الرجاء اختيار جانب"
ignore: ". تجاهل طلب الصداقة"
create:
error: "!مع هذا البريد الإلكتروني diaspora لم يتم العثور على بذور"
already_friends: "!%{destination_url} كنت بالفعل مع أصدقاء"
success: ".%{destination_url} وأرسل طلب صداقة إلى"
horribly_wrong: ".ذهب شيء خاطئ"
error: "!في هذا البريد الإلكتروني diaspora لم يتم العثور على بذور"
already_friends: "!من قبل %{destination_url} أنت صديق مع"
success: ".%{destination_url} تم إرسال طلب صداقة ل"
horribly_wrong: ".فيه بلوى كبيرة حصلت"

View file

@ -6,6 +6,23 @@
# See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en:
settings: "Settings"
profile: "Profile"
account: "Account"
services: "Services"
cancel: "Cancel"
delete: "Delete"
or: "or"
by: "by"
ago: "ago"
username: "Username"
email: "Email"
home: "Home"
password: "Password"
password_confirmation: "Password confirmation"
are_you_sure: "Are you sure?"
activemodel:
errors:
models:
@ -26,9 +43,6 @@ en:
helper:
unknown_person: "unknown person"
new_requests: "new requests"
dashboards:
helper:
home: "home"
error_messages:
helper:
invalid_fields: "Invalid Fields"
@ -54,9 +68,19 @@ en:
manage_aspects: "Manage Aspects"
publisher:
share: "Share"
post_a_message_to: "Post a message to %{aspect}"
make_public: "make public"
aspect_friends:
add_friends: "add friends"
photos: "photos"
invitations:
invites: 'Invites'
invite_a_friend: 'Invite a friend'
invitations_left: '(%{count} left)'
reshare:
reshare: 'Reshare'
author_info:
view_profile: 'View profile'
albums:
album:
you: "you"
@ -67,17 +91,13 @@ en:
edit_album: "Edit Album"
albums: "albums"
updated: "updated"
by: "by"
edit:
album_name: "Album name"
editing: "Editing"
updated: "updated"
update_album: "Update album"
are_you_sure: "Are you sure?"
delete_album: "Delete Album"
cancel: "Cancel"
index:
home: "home"
new_album: "New Album"
create:
success: "You've created an album called %{name}."
@ -91,7 +111,7 @@ en:
your_albums: "Your Albums"
aspects:
no_friends_message:
nobody: "We know you have friends, bring them to Diaspora!"
nobody: "We know you have friends bring them to Diaspora!"
nobody_in_aspect: "Your aspect '%{aspect_name}' is empty."
add_friend: "Add a friend"
add_friend_to: "Add someone to %{aspect_name}"
@ -129,28 +149,19 @@ en:
edit:
editing_profile: "Editing profile"
invite_friends: "Invite friends"
are_you_sure: "Are you sure?"
export_data: "Export Data"
close_account: "Close Account"
change_language: "Change Language"
change_password: "Change Password"
new_password: "New Password"
password_confirmation: "Password confirmation"
settings: "Settings"
profile: "Profile"
account: "Account"
services: "Services"
cancel: "Cancel"
destroy: "Account successfully closed."
getting_started:
signup_steps: "Complete your sign-up by doing these things:"
'step_1':
albums: "Albums"
you_dont_have_any_photos: "You don't have any photos! Go to the"
page_to_upload_some: "page to upload some."
or: "or"
comments:
comment:
ago: "ago"
new_comment:
comment: "Comment"
photos:
@ -160,17 +171,13 @@ en:
next: "next"
edit_photo: "Edit Photo"
delete_photo: "Delete Photo"
are_you_sure: "Are you sure?"
comments: "comments"
edit:
editing: "Editing"
are_you_sure: "Are you sure?"
delete_photo: "Delete Photo"
photo:
show_comments: "show comments"
posted_a_new_photo_to: "posted a new photo to"
delete: "Delete"
are_you_sure: "Are you sure?"
new:
new_photo: "New Photo"
back_to_list: "Back to List"
@ -190,10 +197,6 @@ en:
sign_up_for_diaspora: "Sign up for Diaspora"
upload_existing_account: "Upload an existing Diaspora account"
upload: "Upload"
username: "Username"
email: "Email"
password: "Password"
password_confirmation: "Password confirmation"
create:
success: "You've joined Diaspora!"
invitations:
@ -204,19 +207,22 @@ en:
already_friends: 'You are already friends with this person'
invitation_token_invalid: 'The invitation token provided is not valid!'
updated: 'Your password was set successfully. You are now signed in.'
new:
invite_someone_to_join: 'Invite someone to join Diaspora!'
if_they_accept_info: 'if they accept, they will be added to the aspect you invited them'
to: 'To'
message: 'Message:'
send_an_invitation: 'Send an invitation'
send_invitation: 'Send invitation'
status_messages:
new_status_message:
tell_me_something_good: "tell me something good"
oh_yeah: "oh yeah!"
status_message:
show_comments: "show comments"
delete: "Delete"
are_you_sure: "Are you sure?"
show:
status_message: "Status Message"
comments: "comments"
are_you_sure: "Are you sure?"
destroy: "Destroy"
view_all: "View All"
message: "Message"
@ -241,12 +247,12 @@ en:
last_seen: "last seen: %{how_long_ago}"
friends_since: "friends since: %{how_long_ago}"
save: "save"
are_you_sure: "Are you sure?"
remove_friend: "remove friend"
no_posts: "no posts to display!"
add_friend: "add friend"
edit_my_profile: "Edit my profile"
edit:
settings: "Settings"
info_available_to: "This info will be available to whomever you connect with on Diaspora."
your_profile: "Your profile"
your_name: "Your name"
first_name: "First name"
@ -256,12 +262,7 @@ en:
your_bio: "Your bio"
fill_me_out: "Fill me out"
your_photo: "Your photo"
profile: "Profile"
account: "Account"
services: "Services"
cancel: "Cancel"
update_profile: "Update Profile"
home: "Home"
diaspora_username: "DIASPORA USERNAME"
info: "Info"
picture: "Picture"
@ -269,7 +270,6 @@ en:
albums: "Albums"
you_dont_have_any_photos: "You don't have any photos! Go to the"
page_to_upload_some: "page to upload some."
or: "or"
requests:
new_request:
add_a_new_friend_to: "Add a new friend to"
@ -289,9 +289,3 @@ en:
already_friends: "You are already friends with %{destination_url}!"
success: "A friend request was sent to %{destination_url}."
horribly_wrong: "Something went horribly wrong."
services:
index:
settings: "Settings"
profile: "Profile"
account: "Account"
services: "Services"

View file

@ -11,6 +11,8 @@ fr:
models:
user:
attributes:
person:
invalid: "est invalide"
username:
taken: "est déjà pris"
email:
@ -37,7 +39,10 @@ fr:
people_on_pod_are_aware_of: " personnes agissant comme des automates sont au courant"
layouts:
application:
view_profile: "voir le profil"
edit_profile: "éditer le profil"
account_settings: "options du compte"
search: "Rechercher"
logout: "déconnexion"
shared:
aspect_nav:
@ -64,8 +69,10 @@ fr:
updated: "mis à jour"
by: "par"
edit:
album_name: "Nom de l'album"
editing: "Édition"
updated: "mis à jour"
update_album: "Mettre à jour l'album"
are_you_sure: "Êtes-vous sûr(e) ?"
delete_album: "Supprimer lalbum"
cancel: "Annuler"
@ -100,6 +107,7 @@ fr:
ignore_remove: "Ignorer/Supprimer"
new_aspect:
add_a_new_aspect: "Ajouter un nouvel aspect"
name: "Nom"
create: "Créer"
create:
success: "Cliquez sur le symbole plus situé sur le côté gauche afin que Diaspora détermine qui peut voir votre nouvel aspect."
@ -120,19 +128,26 @@ fr:
users:
edit:
editing_profile: "Édition du profil"
profile:
invite_friends: "Inviter des amis"
are_you_sure: "Êtes-vous sûr(e) ?"
export_data: "Exporter des données"
close_account: "Clôre le compte"
change_language: "Changer la langue"
change_password: "Changer le mot de passe"
new_password: "Noveau mot de passe"
password_confirmation: "Confirmation du mot de passe"
settings: "Options"
profile: "Profil"
account: "Compte"
services: "Services"
cancel: "Annuler"
update_profile: "Mettre à jour le profil"
home: "Accueil"
diaspora_username: "NOM DUTILISATEUR DIASPORA"
info: "Informations"
picture: "Image"
editing_profile: "Édition du profil"
albums: "Albums"
you_dont_have_any_photos: "Vous navez aucune photo ! Rendez-vous sur la page"
page_to_upload_some: "afin den transférer quelques-unes."
or: "ou"
destroy: "Compte clôturé avec succès."
getting_started:
'step_1':
albums: "Albums"
you_dont_have_any_photos: "Vous n'avez aucune photos ! Rendez-vous sur la page"
page_to_upload_some: "afin d'en transférer quelques une."
or: "ou"
comments:
comment:
ago: "il y a"
@ -172,6 +187,13 @@ fr:
registrations:
new:
sign_up: "Inscription"
sign_up_for_diaspora: "Inscription à Diaspora"
upload_existing_account: "Télécharger un compte Diaspora existant"
upload: "Télécharger"
username: "Nom d'utilisateur"
email: "Courriel"
password: "Mot de passe"
password_confirmation: "Confirmation du mot de passe"
create:
success: "Vous avez rejoint Diaspora !"
invitations:
@ -222,12 +244,39 @@ fr:
are_you_sure: "Êtes-vous sûr(e) ?"
remove_friend: "supprimer de mes amis"
no_posts: "aucun message à afficher !"
add_friend: "ajouter un ami"
edit:
settings: "Options"
your_profile: "Votre profil"
your_name: "Votre nom"
first_name: "Votre prénom"
last_name: "Votre nom de famille"
your_gender: "Votre sexe"
your_birthday: "Votre anniversaire"
your_bio: "Votre bio"
fill_me_out: "Remplissez-moi"
your_photo: "Votre photo"
profile: "Profil"
account: "Compte"
services: "Services"
cancel: "Annuler"
update_profile: "Mettre à jour le profil"
home: "Accueil"
diaspora_username: "NOM D'UTILISATEUR DIASPORA"
info: "Info"
picture: "Image"
editing_profile: "Edition du profil"
albums: "Albums"
you_dont_have_any_photos: "Vous n'aver aucune photo ! Rendez-vous sur la page"
page_to_upload_some: "afin d'en transférer quelques une."
or: "ou"
requests:
new_request:
add_a_new_friend_to: "Ajouter un nouvel ami à"
enter_a_diaspora_username: "Saisissez un nom dutilisateur Diaspora :"
your_diaspora_username_is: "Votre nom dutilisateur Diaspora est : %{diaspora_handle}"
friends_username: "Nom dutilisateur de lami"
create_request: "Créer une requête"
destroy:
success: "Vous êtes à présent amis."
error: "Veuillez sélectionner un aspect !"
@ -240,3 +289,184 @@ fr:
already_friends: "Vous êtes déjà ami avec %{destination_url}!"
success: "Une requête dami a été envoyée à %{destination_url}."
horribly_wrong: "Quelque chose dhorrible sest produit."
services:
index:
settings: "Options"
profile: "Profil"
account: "Compte"
services: "Services"
# From http://github.com/svenfuchs/rails-i18n/blob/master/rails/locale/fr.yml
date:
formats:
default: "%d/%m/%Y"
short: "%e %b"
long: "%e %B %Y"
day_names: [lundi, mardi, mercredi, jeudi, vendredi, samedi, dimanche]
abbr_day_names: [lun, mar, mer, jeu, ven, sam, dim]
month_names: [~, janvier, février, mars, avril, mai, juin, juillet, août, septembre, octobre, novembre, décembre]
abbr_month_names: [~, jan., fév., mar., avr., mai, juin, juil., août, sept., oct., nov., déc.]
order: [ :day, :month, :year ]
time:
formats:
default: "%d %B %Y %H:%M:%S"
short: "%d %b %H:%M"
long: "%A %d %B %Y %H:%M"
am: 'am'
pm: 'pm'
datetime:
distance_in_words:
half_a_minute: "une demi-minute"
less_than_x_seconds:
zero: "moins d'une seconde"
one: "moins d'une seconde"
other: "moins de %{count} secondes"
x_seconds:
one: "1 seconde"
other: "%{count} secondes"
less_than_x_minutes:
zero: "moins d'une minute"
one: "moins d'une minute"
other: "moins de %{count} minutes"
x_minutes:
one: "1 minute"
other: "%{count} minutes"
about_x_hours:
one: "environ une heure"
other: "environ %{count} heures"
x_days:
one: "1 jour"
other: "%{count} jours"
about_x_months:
one: "environ un mois"
other: "environ %{count} mois"
x_months:
one: "1 mois"
other: "%{count} mois"
about_x_years:
one: "environ un an"
other: "environ %{count} ans"
over_x_years:
one: "plus d'un an"
other: "plus de %{count} ans"
almost_x_years:
one: "presqu'un an"
other: "presque %{count} ans"
prompts:
year: "Année"
month: "Mois"
day: "Jour"
hour: "Heure"
minute: "Minute"
second: "Seconde"
number:
format:
separator: ","
delimiter: " "
precision: 3
significant: false
strip_insignificant_zeros: false
currency:
format:
format: "%n %u"
unit: "€"
separator: ","
delimiter: " "
precision: 2
significant: false
strip_insignificant_zeros: false
percentage:
format:
delimiter: ""
precision:
format:
delimiter: ""
human:
format:
delimiter: ""
precision: 2
significant: true
strip_insignificant_zeros: true
storage_units:
format: "%n %u"
units:
byte:
one: "Octet"
other: "Octets"
kb: "ko"
mb: "Mo"
gb: "Go"
tb: "To"
decimal_units:
format: "%n %u"
units:
unit: ""
thousand: "Millier"
million: "Million"
billion: "Milliard"
trillion: "Mille milliard"
quadrillion: "Million de milliard"
support:
array:
words_connector: ", "
two_words_connector: " et "
last_word_connector: " et "
select:
prompt: "Veuillez sélectionner"
helpers:
select:
prompt: "Veuillez sélectionner"
submit:
create: "Créer un %{model}"
update: "Modifier ce %{model}"
submit: "Enregistrer ce %{model}"
errors:
template: &errors_template
header:
one: "Impossible d'enregistrer ce %{model} : 1 erreur"
other: "Impossible d'enregistrer ce %{model} : %{count} erreurs"
body: "Veuillez vérifier les champs suivants : "
attributes:
created_at: "Créé le"
updated_at: "Modifié le"
errors:
format: "Le %{attribute} %{message}"
messages: &errors_messages
inclusion: "n'est pas inclus(e) dans la liste"
exclusion: "n'est pas disponible"
invalid: "n'est pas valide"
confirmation: "ne concorde pas avec la confirmation"
accepted: "doit être accepté(e)"
empty: "doit être rempli(e)"
blank: "doit être rempli(e)"
too_long: "est trop long (pas plus de %{count} caractères)"
too_short: "est trop court (au moins %{count} caractères)"
wrong_length: "ne fait pas la bonne longueur (doit comporter %{count} caractères)"
not_a_number: "n'est pas un nombre"
not_an_integer: "doit être un nombre entier"
greater_than: "doit être supérieur à %{count}"
greater_than_or_equal_to: "doit être supérieur ou égal à %{count}"
equal_to: "doit être égal à %{count}"
less_than: "doit être inférieur à %{count}"
less_than_or_equal_to: "doit être inférieur ou égal à %{count}"
odd: "doit être impair"
even: "doit être pair"
activerecord:
errors:
messages:
taken: "n'est pas disponible"
record_invalid: "La validation a échoué : %{errors}"
<<: *errors_messages
template:
<<: *errors_template
full_messages:
format: "%{attribute} %{message}"

View file

@ -27,6 +27,8 @@ sv:
models:
user:
attributes:
person:
invalid: "är ogiltigt"
username:
taken: "är redan taget"
email:
@ -35,7 +37,6 @@ sv:
attributes:
diaspora_handle:
taken: "är redan taget"
hello: "Hej världen!"
application:
helper:
@ -54,7 +55,10 @@ sv:
people_on_pod_are_aware_of: " personer på denna plats är medvetna om att"
layouts:
application:
view_profile: "visa profil"
edit_profile: "ändra profil"
account_settings: "kontoinstallningar"
search: "Sök ..."
logout: "logga ut"
shared:
aspect_nav:
@ -81,8 +85,10 @@ sv:
updated: "uppdaterad"
by: "av"
edit:
album_name: "Namn på fotoalbum"
editing: "Ändrar"
updated: "uppdaterad"
update_album: "Uppdatera fotoalbum"
are_you_sure: "Är du säker?"
delete_album: "Ta bort fotoalbum"
cancel: "Avbryt"
@ -117,6 +123,7 @@ sv:
ignore_remove: "Ignorera/Ta bort"
new_aspect:
add_a_new_aspect: "Lägg till ny sida"
name: "Namn"
create: "Skapa"
create:
success: "Klicka på plustecknet till höger för att välja vilka som kan se din nya sida."
@ -137,19 +144,26 @@ sv:
users:
edit:
editing_profile: "Ändrar profil"
profile:
invite_friends: "Bjud in en vän"
are_you_sure: "Är du säker?"
export_data: "Exportera data"
close_account: "Stäng kontot"
change_language: "Ändra språk"
change_password: "Ändra lösenord"
new_password: "Nytt lösenord"
password_confirmation: "Bekräfta lösenord"
settings: "Inställningar"
profile: "Profil"
account: "Konto"
services: "Tjänster"
cancel: "Avbryt"
update_profile: "Uppdatera Profil"
home: "Hem"
diaspora_username: "Diaspora-användarnamn:"
info: "Info"
picture: "Profilbild"
editing_profile: "Ändrar profil"
albums: "Album"
you_dont_have_any_photos: "Du har inga foton! Gå till"
page_to_upload_some: "sidan för att ladda upp några."
or: "eller"
destroy: "Ditt konto är nu stängt."
getting_started:
'step_1':
albums: "Fotoalbum"
you_dont_have_any_photos: "Du har inga foton! Gå till"
page_to_upload_some: "sidan för att ladda upp några."
or: "eller"
comments:
comment:
ago: "sedan"
@ -189,6 +203,13 @@ sv:
registrations:
new:
sign_up: "Registrera dig"
sign_up_for_diaspora: "Gå med i Diaspora"
upload_existing_account: "Ladda upp ett befintligt Diaspora-konto"
upload: "Ladda upp"
username: "Användarnamn"
email: "E-post address"
password: "Lösenord"
password_confirmation: "Bekräfta lösenord"
create:
success: "Du har nu gått med i Diaspora!"
invitations:
@ -232,10 +253,6 @@ sv:
new:
new_person: "Ny person"
back_to_list: "Tillbaka till listan"
edit:
cancel: "Avbryt"
or: "eller"
update_profile: "Uppdatera profil"
show:
last_seen: "senast sedd: %{how_long_ago}"
friends_since: "vänner sedan: %{how_long_ago}"
@ -243,12 +260,39 @@ sv:
are_you_sure: "Är du säker?"
remove_friend: "ta bort vän"
no_posts: "ingenting att visa!"
add_friend: "lägg till en vän"
edit:
settings: "Inställningar"
your_profile: "Din profil"
your_name: "Ditt namn"
first_name: "Förnamn"
last_name: "Efternamn"
your_gender: "Ditt kön"
your_birthday: "Din födelsedag"
your_bio: "Din biografi"
fill_me_out: "Fyll i mig"
your_photo: "Ditt foto"
profile: "Profil"
account: "Konto"
services: "Tjänster"
cancel: "Avbryt"
update_profile: "Uppdatera profil"
home: "Hem"
diaspora_username: "Användarnamn:"
info: "Info"
picture: "Foto"
editing_profile: "Ändrar profil"
albums: "Fotoalbum"
you_dont_have_any_photos: "Du har inga foton! Gå till"
page_to_upload_some: "sidan för att ladda upp några."
or: "eller"
requests:
new_request:
add_a_new_friend_to: "Lägg till en vän till"
enter_a_diaspora_username: "Ange ett användarnamn:"
your_diaspora_username_is: "Din Diaspora-adress är: %{diaspora_handle}"
friends_username: "Vännens Diaspora-adress"
create_request: "Skapa förfrågan"
destroy:
success: "Ni är nu vänner."
error: "Var god välj en aspekt!"
@ -261,6 +305,12 @@ sv:
already_friends: "Du är redan vän med %{destination_url}!"
success: "En vänförfrågan har skickats till %{destination_url}."
horribly_wrong: "Nu gick något rejält fel här."
services:
index:
settings: "Inställningar"
profile: "Profil"
account: "Konto"
services: "Tjänster"
# The following is from the rails-i18n project at http://github.com/svenfuchs/rails-i18n

View file

@ -32,7 +32,7 @@ def create
user.save
user.person.save!
user.aspect(:name => "Presidents")
user.aspects.create(:name => "Presidents")
end
def set_app_config username

View file

@ -46,8 +46,8 @@ user2.save
user2.person.save!
user2.seed_aspects
# friending users
aspect = user.aspect(:name => "other dudes")
aspect2 = user2.aspect(:name => "presidents")
aspect = user.aspects.create(:name => "other dudes")
aspect2 = user2.aspects.create(:name => "presidents")
friend_users(user, aspect, user2, aspect2)
user.aspect(:name => "Presidents")
user.aspects.create(:name => "Presidents")

View file

@ -42,8 +42,8 @@ user2.save!
user2.seed_aspects
user2.person.save!
# friending users
aspect = user.aspect(:name => "other dudes")
aspect2 = user2.aspect(:name => "presidents")
aspect = user.aspects.create(:name => "other dudes")
aspect2 = user2.aspects.create(:name => "presidents")
friend_users(user, aspect, user2, aspect2)
user.aspect(:name => "Presidents")
user.aspects.create(:name => "Presidents")

View file

@ -0,0 +1,16 @@
Feature: user authentication
Scenario: user logs in
Given a user with username "ohai" and password "secret"
When I go to the new user session page
And I fill in "Username" with "ohai"
And I fill in "Password" with "secret"
And I press "Sign in"
Then I should be on the home page
@javascript
Scenario: user logs out
Given I am signed in
And I click on my name in the header
And I follow "logout"
Then I should be on the new user session page

View file

@ -0,0 +1,14 @@
@aspects @javascript
Feature: User manages aspects
In order to share with a limited group
As a User
I want to create new aspects
Scenario: creating an aspect
Given I am signed in
When I follow "Manage" in the header
And I follow "Add a new aspect"
And I fill in "Name" with "Dorm Mates" in the modal window
And I press "Create" in the modal window
Then I should see "Dorm Mates" in the header
And I should see "Your aspect 'Dorm Mates' is empty."

40
features/signs_up.feature Normal file
View file

@ -0,0 +1,40 @@
@javascript
Feature: new user registration
Background:
When I go to the new user registration page
And I fill in "Username" with "ohai"
And I fill in "Email" with "ohai@example.com"
And I fill in "user_password" with "secret"
And I fill in "Password confirmation" with "secret"
And I press "Sign up"
Then I should be on the getting started page
And I should see "Welcome to Diaspora!"
Scenario: new user goes through the setup wizard
When I fill in "person_profile_first_name" with "O"
And I fill in "person_profile_last_name" with "Hai"
And I press "Save and continue"
Then I should see "Profile updated"
And I should see "Your aspects"
# Not working with selenium - it thinks the aspect name field is hidden
# When I fill in "Aspect name" with "cheez friends"
# And I press "Add"
# And show me the page
# Then I should see "cheez friends"
When I follow "Save and continue"
Then I should see "Your services"
When I follow "Save and continue"
Then I should see "You're all set up, O!"
When I follow "Continue on to your everyone page, an overview of all of your aspects."
Then I should be on the home page
And I should see "bring them to Diaspora!"
Scenario: new user skips the setup wizard
When I follow "skip getting started"
And I wait for the home page to load
Then I should be on the home page
And I should see "bring them to Diaspora!"

View file

@ -20,4 +20,8 @@ Then /^I should see "([^\"]*)" in the main content area$/ do |stuff|
within("#stream") do
Then "I should see #{stuff}"
end
end
When /^I wait for the home page to load$/ do
wait_until { current_path == root_path }
end

View file

@ -0,0 +1,8 @@
Given /^a user with username "([^\"]*)" and password "([^\"]*)"$/ do |username, password|
Factory(:user, :username => username, :password => password,
:password_confirmation => password, :getting_started => false)
end
When /^I click on my name$/ do
click_link("#{@me.first_name} #{@me.last_name}")
end

View file

@ -22,8 +22,6 @@ require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links wi
# steps to use the XPath syntax.
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
# 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

View file

@ -1,6 +1,8 @@
module NavigationHelpers
def path_to(page_name)
case page_name
when /^the home page$/
root_path
when /^its ([\w ]+) page$/
send("#{$1.gsub(/\W+/, '_')}_path", @it)
when /^the ([\w ]+) page$/

View file

@ -1,21 +0,0 @@
@aspects @javascript
Feature: User creates an aspect
In order to share with a limited group
As a User
I want to create a new aspect
Background:
Given I am signed in
And I follow "Manage" in the header
And I follow "Add a new aspect"
Scenario: success
Given I fill in "Name" with "Dorm Mates" in the modal window
When I press "Create" in the modal window
Then I should see "Dorm Mates" in the header
And I should see "Your aspect 'Dorm Mates' is empty."
Scenario: I omit the name
Given I fill in "Name" with "" in the modal window
When I press "Create" in the modal window
Then I should see "Aspect creation failed."

View file

@ -17,12 +17,12 @@ module PhotoMover
current_photo_location = "#{Rails.root}/public/uploads/images/#{photo.image_filename}"
new_photo_location = "#{album_dir}/#{photo.image_filename}"
`cp #{current_photo_location} #{new_photo_location}`
FileUtils::cp current_photo_location new_photo_location
end
end
`tar cf #{user.id}.tar #{user.id}`
`rm -r #{user.id}`
system("tar", "cf #{user.id}.tar #{user.id}")
FileUtils::rm_r user.id, :secure => true, :force => true
"#{Rails.root}/#{temp_dir}.tar"
end

View file

@ -4,22 +4,7 @@
module Diaspora
module Parser
def self.owner_id_from_xml(xml)
doc = Nokogiri::XML(xml) { |cfg| cfg.noblanks }
id = doc.xpath("//person_id").text.to_s
Person.first(:id => id)
end
def self.parse_or_find_person_from_xml(xml)
doc = Nokogiri::XML(xml) { |cfg| cfg.noblanks }
person_xml = doc.xpath("//person").to_s
person_id = doc.xpath("//person/_id").text.to_s
person = Person.first(:_id => person_id)
person ? person : Person.from_xml( person_xml)
end
def self.from_xml(xml)
doc = Nokogiri::XML(xml) { |cfg| cfg.noblanks }
return unless body = doc.xpath("/XML/post").children.first

View file

@ -140,7 +140,7 @@ module Diaspora
end
def requests_for_me
pending_requests.select{|req| req.person != self.person }
pending_requests.select{|req| req.destination_url == self.person.receive_url}
end
end
end

View file

@ -18,73 +18,53 @@ module Diaspora
def receive xml, salmon_author
object = Diaspora::Parser.from_xml(xml)
Rails.logger.debug("Receiving object for #{self.real_name}:\n#{object.inspect}")
Rails.logger.debug("From: #{object.person.inspect}") if object.person
Rails.logger.debug("From: #{object.diaspora_handle}")
if object.is_a?(Comment)
xml_author = (owns?(object.post))? object.diaspora_handle : object.post.person.diaspora_handle
else
xml_author = object.diaspora_handle
end
if object.is_a?(Comment) || object.is_a?(Post)
if (salmon_author.diaspora_handle != xml_author)
raise "Malicious Post, #{salmon_author.real_name} with id #{salmon_author.id} is sending a #{object.class} as #{xml_author} "
end
if object.is_a?(Comment) || object.is_a?(Post)|| object.is_a?(Request) || object.is_a?(Retraction) || object.is_a?(Profile)
e = EMWebfinger.new(object.diaspora_handle)
e.on_person { |person|
if person.class == Person
sender_in_xml = sender(object, xml, person)
if (salmon_author != sender_in_xml)
raise "Malicious Post, #{salmon_author.real_name} with id #{salmon_author.id} is sending a #{object.class} as #{sender_in_xml.real_name} with id #{sender_in_xml.id} "
object.person = person if object.respond_to? :person=
if object.is_a? Request
return receive_request object, person
end
raise "Not friends with that person" unless self.contact_for(salmon_author)
if object.is_a?(Comment)
receive_comment object, xml
elsif object.is_a?(Retraction)
receive_retraction object, xml
elsif object.is_a?(Profile)
receive_profile object, person
else
receive_post object, xml
end
end
}
else
sender_in_xml = sender(object, xml)
if (salmon_author != sender_in_xml)
raise "Malicious Post, #{salmon_author.real_name} with id #{salmon_author.id} is sending a #{object.class} as #{sender_in_xml.real_name} with id #{sender_in_xml.id} "
end
if object.is_a? Request
return receive_request object, sender_in_xml
end
raise "Not friends with that person" unless self.contact_for(salmon_author)
if object.is_a? Retraction
receive_retraction object, xml
elsif object.is_a? Profile
receive_profile object, xml
else
receive_post object, xml
end
raise "you messed up"
end
end
def sender(object, xml, webfingered_person = nil)
if object.is_a? Retraction
sender = object.person
elsif object.is_a? Request
sender = object.person
elsif object.is_a? Profile
sender = Diaspora::Parser.owner_id_from_xml xml
else
object.person = webfingered_person
if object.is_a?(Comment)
sender = (owns?(object.post))? object.person : object.post.person
else
sender = object.person
end
end
sender
end
def receive_retraction retraction, xml
if retraction.type == 'Person'
unless retraction.person.id.to_s == retraction.post_id.to_s
raise "#{retraction.diaspora_handle} trying to unfriend #{retraction.post_id} from #{self.id}"
end
Rails.logger.info( "the person id is #{retraction.post_id} the friend found is #{visible_person_by_id(retraction.post_id).inspect}")
unfriended_by visible_person_by_id(retraction.post_id)
else
@ -97,18 +77,16 @@ module Diaspora
end
def receive_request request, person
person.serialized_public_key ||= request.exported_key
request.person = person
request.person.save
old_request = Request.first(:id => request.id)
request.person.save!
old_request = Request.find(request.id)
Rails.logger.info("I got a reqest_id #{request.id} with old request #{old_request.inspect}")
request.aspect_id = old_request.aspect_id if old_request
request.save
receive_friend_request(request)
end
def receive_profile profile, xml
person = Diaspora::Parser.owner_id_from_xml xml
def receive_profile profile, person
person.profile = profile
person.save
end

2
pkg/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
dist
*.log

15
pkg/README.md Normal file
View file

@ -0,0 +1,15 @@
## Diaspora install and packaging tools
This directory contains stuff to install and run diaspora.
- ubuntu-setup.bash: script which installs all of Diasporas
dependencies and starts the server.
- bootstrap-fedora-diaspora.sh. does the same for Fedora.
- source: stuff to package Diaspora into traditional tarballs
which can be installed.
- ubuntu: Scripts and tools to install generic tarballs on Ubuntu
- fedora: Scripts and tools to create fedora RPMS:s from tarballs

View file

@ -1,48 +1,127 @@
#!/bin/bash
#
# Install diaspora, its dependencies and start.
#
# Usage: pkg/bootstrap-fedora-diaspora.sh [external hostname]
#
# Synopsis, install:
# $ git clone git@github.com:diaspora/diaspora.git
# $ cd diaspora
# $ sudo pkg/bootstrap-fedora-diaspora.sh
#
# New start:
# $ sudo su - diaspora
# $ cd diaspora
# $ script/server
#
# Unless already existing, the diaspora user is created.
# The directory the scripts is invoked from is copied to
# diasporas's home dir, populated and configured and finally
# acts as a base for running diaspora servers.
#
# Script is designed not to make any changes in invoking
# caller's environment.
#
# Must run as root
export DIASPORADIR=`pwd`
GIT_REPO='git@github.com:leamas/diaspora.git'
DIASPORA_HOSTNAME=${1:-'mumin.dnsalias.net'}
echo "####"
echo "Installing build deps ..."
echo "####"
sleep 3
su -c "yum install git bison svn autoconf sqlite-devel gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel ImageMagick git rubygems libxslt libxslt-devel libxml2 libxml2-devel openssl-devel"
test $UID = "0" || {
echo "You need to be root to do this, giving up"
exit 2
}
echo "####"
echo "Installing RVM ..."
echo "####"
sleep 3
[[ -d config && -d script ]] || {
echo Error: "this is not a diaspora base directory"
exit 3
}
yum install -y git bison sqlite-devel gcc-c++ patch \
readline-devel zlib-devel libyaml-devel libffi-devel \
ImageMagick libxslt-devel libxml2-devel \
openssl-devel mongodb-server wget \
make autoconf automake
mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install
getent group diaspora >/dev/null || groupadd diaspora
getent passwd diaspora >/dev/null || {
useradd -g diaspora -s /bin/bash -m diaspora
echo "Created user diaspora"
}
echo "####"
echo "Installing RVM into bashrc and sourcing bash ..."
echo "####"
sleep 3
home=$( getent passwd diaspora | cut -d: -f6)
[ -e $home/diaspora ] && {
echo "Moving existing $home/diaspora out of the way"
mv $home/diaspora $home/diaspora.$$
}
mkdir $home/diaspora
cp -ar * $home/diaspora
chown -R diaspora $home/diaspora
if [[ `grep -l "rvm/scripts/rvm" $HOME/.bashrc | wc -l` -eq 0 ]]; then
echo 'if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" ; fi' >> $HOME/.bashrc
service mongod start
su - diaspora << EOF
#set -x
cd diaspora
[ -e "\$HOME/.rvm/scripts/rvm" ] || {
echo '#### Installing rvm ####'
wget http://rvm.beginrescueend.com/releases/rvm-install-head
bash < rvm-install-head && rm rvm-install-head
if [[ -s "\$HOME/.rvm/scripts/rvm" ]]; then
. "\$HOME/.rvm/scripts/rvm"
else
echo "Error: rvm installation failed";
exit 1;
fi
touch \$HOME/.bashrc
grep -q "rvm/scripts/rvm" \$HOME/.bashrc || {
echo '[[ -s "\$HOME/.rvm/scripts/rvm" ]] && \
source "\$HOME/.rvm/scripts/rvm"' \
>> \$HOME/.bashrc
}
}
source \$HOME/.bashrc
ruby=\$(which ruby) || ruby=""
if [[ -z "\$ruby" || ("\${ruby:0:4}" == "/usr") ]]; then
echo '#### Installing ruby (will take forever) ... ####'
rvm install ruby-1.8.7-p302
rvm --default ruby-1.8.7
echo "#### Installing bundler ... ####"
gem install bundler
fi
source $HOME/.bashrc
echo "####"
echo "Installing ruby (will take forever) ..."
echo "####"
sleep 3
bundle install
rvm install ruby-1.8.7-p302
rvm --default ruby-1.8.7
#Configure diaspora
cp config/app_config.yml.example config/app_config.yml
source pkg/source/funcs.sh
init_appconfig config/app_config.yml "$DIASPORA_HOSTNAME"
echo "####"
echo "Installing bundler ..."
echo "####"
sleep 3
gem install bundler
echo "Setting up DB..."
if bundle exec rake db:seed:dev ; then
cat <<- EOM
DB ready. Login -> tom and password -> evankorth.
More details ./diaspora/db/seeds/tom.rb. and ./diaspora/db/seeds/dev.rb.
EOM
else
cat <<- EOM
Database config failed. You might want to remove all db files with
'rm -rf /var/lib/mongodb/*' and/or reset the config file by
'cp config/app_config.yml.example config/app_config.yml' before
making a new try. Also, make sure the mongodb server is running
e. g., by running 'service mongodb status'.
EOM
fi
echo "Starting server"
script/server
EOF
echo "####"
echo "Installing deps with bundle ..."
echo "####"
sleep 3
pushd $DIASPORADIR && bundle install && popd

View file

@ -1,13 +1,12 @@
## Diaspora RPM tools
Creates diaspora source tarballs and RPM packages
Create RPM packages
An alternative to the capistrano system, providing classic, binary RPM
packages for deployment on Fedora 13 and OS-independent source tarballs
aimed for packaging purposes.
packages for deployment on Fedora.
#### Fedora RPM synopsis
#### Synopsis
Prerequisites:
@ -18,16 +17,20 @@ Prerequisites:
- A personal environment to build RPM:s, also described in
[RPM installation Fedora](http://github.com/diaspora/diaspora/wiki/Rpm-installation-on-fedora)
Install g++ (unnecessary?):
Install g++ and gcc:
% yum install gcc-c++
Create source tarballs like dist/diaspora-0.0-1010041233_fade4231.tar.gz
and dist/diaspora-bundle-0.0-1010041233_fade4231.tar.gz:
% ./make-dist.sh source
% ./make-dist.sh bundle
Bootstrap the distribution from git:
% sudo apt-get install git-core
% git clone git://github.com/diaspora/diaspora.git
% cd diaspora/pkg/ubuntu
Setup links to tarballs from RPM source directory and create spec files:
% ./make-dist.sh prepare
Create and install the diaspora bundle and application in
diaspora/pkg/source according to
[source README](http://github.com/diaspora/diaspora/tree/master/pkg/source/)
Setup links from tarballs to RPM source directory and create spec files:
% ./prepare-rpm.sh
Build rpms:
rpmbuild -ba dist/diaspora.spec
@ -51,75 +54,21 @@ apache/passenger setup. After configuration, start with:
/sbin/service diaspora-wsd start
/sbin/service httpd restart
#### Generic source synopsis
Generate source tarball:
% ./make-dist.sh source
Using repo: http://github.com/diaspora/diaspora.git
Commit id: 1010092232_b313272
Source: dist/diaspora-0.0-1010092232_b313272.tar.gz
Required bundle: 1010081636_d1a4ee0
%
The source tarball could be used as-is, by unpacking add making a
*bundle install*. An alternative is to generate a canned bundle like:
% ./make-dist.sh bundle
[ lot's of output...]
Bundle: dist/diaspora-bundle-0.0-1010081636_d1a4ee0.tar.gz
%
This file can be installed anywhere. To use it, add a symlink from vendor/bundle
to the bundle's bundle directory. Reasonable defaults are to install
diaspora in /usr/share/diaspora and bundle in /usr/lib/diaspora-bundle. With these,
the link is
% rm -rf /usr/share/diaspora/master/vendor/bundle
% ln -sf /usr/lib/diaspora-bundle/vendor/bundle \
> /usr/share/diaspora/master/vendor
%
The directories tmp, log, and public/uploads needs to be writable. If using
apache passenger, read the docs on uid used and file ownership.
Note that the bundle version required is printed each time a new source
is generated.
prepare-rpm.sh prepare creates links also for all files listed in SOURCES.
Typically, this is secondary sources. *make-dist.sh source*
#### Notes
The source tarball is as retrieved from diaspora with following differences:
prepare-rpm.sh prepare creates links also for all files listed in SOURCES.
Typically, this is secondary sources.
- The .git directories are removed (freeing more than 50% of the size).
- A new file /master/config/gitversion is created.
- The file public/source.tar.gz is generated.
- The file .bundle/config is patched. Remove before doing
*bundle install*
The bundle is basically the output from 'bundle package'. The git-based
gems are also added into vendor/git.
./make-dist.sh bundle|source occasionally fails on bad Gemfile.lock. The
root cause is a bad Gemfile in the git repo. Possible fixes includes
using a older version known to work:
% ./make-dist.sh -c c818885b6 bundle
% ./make-dist.sh -c c818885b6 source
or forcing a complete update of Gemfile.lock using 'bundle update' (a
potentially problematic operation):
% ./make-dist.sh -f bundle
*make-dist prepare* creates links also for all files listed in SOURCES.
Typically, this is secondary sources. *make-dist.sh sources*
applies all patches named *.patch in this directory after checking out
source from git.
The spec-files in dist/ are patched by *./make-dist.sh prepare* to reference
correct versions of diaspora and diaspora-bundle. The diaspora-bundle
is only updated if Gemfile is updated, upgrading diaspora doesn't
always require a new diaspora-bundle. Editing spec files should be done
in this directory, changes in dist/ are lost when doing *./make-dist prepare*.
The spec-files in dist/ are patched by *./prepare-rpm.sh to reference
correct versions of diaspora and diaspora-bundle. Editing spec files should be
done in this directory, changes in dist/ are lost when doing *./prepare-rpm.sh *.
The topmost comment's version is patched to reflect the complete version
of current specfile by *make-dist source*. Write the comment in this
directory, copy-paste previous version nr. It will be updated.
of current specfile . Write the comment in this directory, copy-paste
previous version nr. It will be updated.
This has been confirmed to start up and provide basic functionality both using
the thin webserver and apache passenger, on 32/64 bit systems and in the
@ -128,17 +77,6 @@ at [ftp://mumin.dnsalias.net/pub/leamas/diaspora/builds](ftp://mumin.dnsalias.ne
#### Implementation
'make-dist.sh source' script checks out latest version of diaspora into the
dist/diaspora directory. This content is, after some patches, the diaspora package.
'make-dir.sh bundle' makes a *bundle package* in the diaspora dir.
The resulting bundle is stored in vendor/bundle. This is, after some more
patches, the content of diaspora-bundle tarball. Target systems makes a
*bundle install --local* to use it.
Here is also support for running the diaspora websocket service as a system
service through /sbin/service and some install scripts.
Diaspora files are stored in /usr/share/diaspora, and owned by root. The
bundle, containing some C extensions, is architecture-dependent and lives
in /usr/lib[64]/diaspora. Log files are in /var/log/diaspora. Symlinks in
@ -154,6 +92,9 @@ diaspora app. This is more or less as mandated by LSB and Fedora packaging rule
#### Discussion
The 1.8.7 rebuild is a pain. However, in Fedora 14 1.8.7 is the default
ruby version.
For better or worse, this installation differs from the procedure outlined
in the original README.md:

169
pkg/fedora/prepare-rpm.sh Executable file
View file

@ -0,0 +1,169 @@
#!/bin/bash
# Create RPM spec files matching diaspora tarballs
#
# Usage: See function usage() at bottom.
#
GIT_REPO='http://github.com/diaspora/diaspora.git'
VERSION='0.0'
RELEASE='1'
. ../source/funcs.sh
function fix_alphatag()
# Patch version on top comment first id line:
# Usage: fix_alphatag <file> <version> <commit_id> <release>
# Patches:\
# * Fri Sep 24 2010 name surname <email@com> 1.20100925_faf23207
{
local dist=$(rpm --eval %dist)
awk -v dist="$dist" -v version="$2" -v commit="$3" -v release="$4" \
' BEGIN { done = 0 }
/^[*]/ { if (done)
print
else
{
s = sprintf( "-%s.%s%s\n", release, commit, dist)
gsub( "-[0-9][.][^ ]*$", s)
done = 1
# add new gsub for version...
print
}
next
}
{ print }' < $1 > $1.tmp && mv -f $1.tmp $1
}
function fix_bundle_deps
# usage: fix_bundle_deps <specfile> <version> <commit>
# Patches: Requires: diaspora-bundle = 0.0-20101021-aefsf323148
{
awk -v vers="$2-$3" \
' /Requires:/ { if ($2 == "diaspora-bundle")
printf( "%s %s = %s\n", $1,$2,vers)
else
print
next
}
{ print}' \
< $1 > $1.tmp && mv -f $1.tmp $1
}
function patch()
# Patch spec-files with current version-release
# Usage: patch <version> <commit> <release>
{
sed -e "/^%define/s|HEAD|$2|" \
-e '/^Version:/s|.*|Version: '$1'|' \
<diaspora.spec >dist/diaspora.spec
fix_alphatag dist/diaspora.spec $1 $2 $3
local bundle_id=$(git_id dist/diaspora/Gemfile)
local dist_tag=$(rpm --eval %dist)
fix_bundle_deps dist/diaspora.spec $1 "$RELEASE.${bundle_id}$dist_tag"
sed -e "/^%define/s|HEAD|$bundle_id|" \
-e '/^Version:/s|.*|Version: '$1'|' \
< diaspora-bundle.spec > dist/diaspora-bundle.spec
cp dist/diaspora.spec dist/diaspora/diaspora.spec
}
function prepare_rpm()
# Usage: prepare_rpm < commit>
{
local dest=$(rpm --eval %_sourcedir)
test -z "$dest" && {
echo "Can't find RPM source directory, giving up."
exit 2
}
local commit=$( checkout $1)
echo "Release: $RELEASE.$commit"
echo "Rpm source dir: $dest"
patch $VERSION $commit $RELEASE
local src="dist/diaspora-$VERSION-$commit.tar.gz"
test -e $src ||
cat <<- EOF
Warning: $src does not exist
(last version not built?)
EOF
ln -sf $PWD/$src $dest
local bundle_commit=$( git_id dist/diaspora/Gemfile)
local bundle="dist/diaspora-bundle-$VERSION-$bundle_commit.tar.gz"
test -e $bundle ||
cat <<- EOF
Warning: $bundle does not exist
(last version not built?)
EOF
ln -sf $PWD/$bundle $dest
local file
for file in $( grep -v '^#' SOURCES); do
if [ -e "$file" ]; then
ln -sf $PWD/$file $dest/$file
else
echo "Warning: $file (listed in SOURCES) does not exist"
fi
done
( cd $dest; find . -type l -not -readable -exec rm {} \;)
echo "Source specfile: dist/diaspora.spec"
echo "Bundle specfile: dist/diaspora-bundle.spec"
}
function usage()
{
cat <<- EOF
Usage: prepare-rpm [options]
Options:
-h Print this message.
-r release For prepare, mark with release nr, defaults to 1.
-u uri Git repository URI, defaults to
$GIT_REPO.
Symlink bundle and source tarballs to rpm source dir, create
patched rpm spec files.
All results are stored in dist/
EOF
}
commit='HEAD'
BUNDLE_FIX='no'
while getopts ":r:u:h" opt
do
case $opt in
r) RELEASE="$OPTARG:"
;;
h) usage
exit 0
;;
u) GIT_REPO="$OPTARG"
;;
*) usage
exit 2
;;
esac
done
shift $(($OPTIND - 1))
typeset -r GIT_REPO RELEASE BUNDLE_FIX
export LANG=C
test $# -gt 0 && {
usage;
exit 2;
}
prepare_rpm

74
pkg/source/README.md Normal file
View file

@ -0,0 +1,74 @@
## Diaspora source tarball generation
Creates diaspora source tarballs.
#### Generic source synopsis
Generate source tarball:
% ./make-dist.sh source
Using repo: http://github.com/diaspora/diaspora.git
Commit id: 1010092232_b313272
Source: dist/diaspora-0.0-1010092232_b313272.tar.gz
Required bundle: 1010081636_d1a4ee0
%
The source tarball could be used as-is, by unpacking add making a
*bundle install*. An alternative is to generate a canned bundle like:
% ./make-dist.sh bundle
[ lot's of output...]
Bundle: dist/diaspora-bundle-0.0-1010081636_d1a4ee0.tar.gz
%
This file can be installed anywhere. To use it, add a symlinks from app
to the bundle'. Reasonable defaults are to install diaspora in
/usr/share/diaspora and bundle in /usr/lib/diaspora-bundle. With these,
the link setups is
% cd /usr/share/diaspora/master
% rm -rf vendor
% ln -sf /usr/lib/diaspora-bundle/vendor vendor
% ln -sf /usr/lib/diaspora-bundle/Gemfile .
% ln -sf /usr/lib/diaspora-bundle/Gemfile.lock .
The directories tmp, log, and public/uploads needs to be writable. If using
apache passenger, read the docs on uid used and file ownership.
Note that the bundle version required is printed each time a new source
is generated.
#### Notes
The source tarball is as retrieved from diaspora with following differences:
- The .git directories are removed (freeing more than 50% of the size).
- A new file /master/config/gitversion is created.
- The file public/source.tar.gz is generated.
- The file .bundle/config is patched. Remove before doing
*bundle install*
The bundle is basically the output from 'bundle package'. The git-based
gems are also added into git-gems. Bundle also houses the two files
Gemfile and Gemfile.lock
*make-dist.sh source* applies all patches named *.patch in this directory
after checking out source from git.
./make-dist.sh bundle|source occasionally fails on bad Gemfile.lock. The
root cause is a bad Gemfile in the git repo. Possible fixes includes
using a older version known to work:
% ./make-dist.sh -c c818885b6 bundle
% ./make-dist.sh -c c818885b6 source
or forcing a complete update of Gemfile.lock using 'bundle update' (a
potentially problematic operation):
% ./make-dist.sh -f bundle
#### Implementation
'make-dist.sh source' script checks out latest version of diaspora into the
dist/diaspora directory. This content is, after some patches, the diaspora package.
'make-dir.sh bundle' makes a *bundle package* in the diaspora dir.
The resulting bundle is stored in vendor/bundle. This is, after some more
patches, the content of diaspora-bundle tarball. Target systems makes a
*bundle install --local* to use it.

108
pkg/source/funcs.sh Normal file
View file

@ -0,0 +1,108 @@
#
# Common stuff for pkg scripts
#
function git_id
#
# Echo package-friendly source id.
#
# Usage: git_id [-n] [file or directory]
#
{
local nl="\n"
local file_or_dir="$PWD"
test "$1" = '-n' && { nl=""; shift; }
test -n "$1" && file_or_dir="$1"
if [ -d $file_or_dir ]; then
local file=""
local dir=$file_or_dir
else
local file=$(basename $file_or_dir)
local dir=$(dirname $file_or_dir)
fi
(
cd $dir
git log -1 --abbrev-commit --date=iso $file |
awk -v nl="$nl" \
' BEGIN { commit = ""; d[1] = "" }
/^commit/ { if ( commit == "") commit = $2 }
/^Date:/ { if (d[1] == "") {
split( $2, d, "-")
split( $3, t, ":")
}
}
END { printf( "%s%s%s%s%s_%s%s",
substr( d[1],3), d[2], d[3],
t[1], t[2],
commit, nl)
}'
)
}
function checkout()
# Checkout last version of diaspora unless it's already there.
# Uses global GIT_REPO to determine repo url
# Usage: checkout [commit id, defaults to HEAD]
# Returns: commit for current branch's HEAD.
{
mkdir dist &>/dev/null || :
(
local last_repo=''
cd dist
test -e '.last-repo' &&
last_repo=$( cat '.last-repo')
test "$last_repo" != $GIT_REPO &&
rm -rf diaspora
test -d diaspora || {
git clone --quiet $GIT_REPO;
(
cd diaspora;
git checkout Gemfile Gemfile.lock
git remote add upstream \
git://github.com/diaspora/diaspora.git
for p in ../../*.patch; do
git apply --whitespace=fix $p > /dev/null
done &> /dev/null || :
)
}
echo -n "$GIT_REPO" > '.last-repo'
cd diaspora;
git fetch --quiet upstream
git merge --quiet upstream/master
[ -n "$1" ] && git reset --hard --quiet $1
git_id -n
)
}
function init_appconfig
# Edit pod_url in hostname
# Silently uses argumetn if present, else run dialog.
# Usage: init_appconfig <app_config.yml> [hostname]
{
config=$1
arg_hostname="$2"
hostname=$( awk '/pod_url:/ { print $2; exit }' <$config )
if [ -n "$arg_hostname" ]; then
sed -i "/pod_url:/s|$hostname|$arg_hostname|g" $config && \
echo "config/app_config.yml updated."
return 0
else
while : ; do
echo "Current hostname is \"$hostname\""
echo -n "Enter new hostname [$hostname] :"
read new_hostname garbage
echo -n "Use \"$new_hostname\" as pod_url (Yes/No) [Yes]? :"
read yesno garbage
[ "${yesno:0:1}" = 'y' -o "${yesno:0:1}" = 'Y' -o -z "$yesno" ] && {
sed -i "/pod_url:/s|$hostname|$new_hostname|g" $config &&
echo "config/app_config.yml updated."
break
}
done
fi
}

View file

@ -1,180 +1,13 @@
#!/bin/bash
# Create a diaspora distribution
# Create diaspora distribution tarballs.
#
# Usage: See function usage() at bottom.
#
GIT_REPO='http://github.com/diaspora/diaspora.git'
VERSION='0.0'
RELEASE='1'
function git_id
#
# Echo package-friendly source id.
#
# Usage: git_id [-n] [file or directory]
#
{
local nl="\n"
local file_or_dir="$PWD"
test "$1" = '-n' && { nl=""; shift; }
test -n "$1" && file_or_dir="$1"
if [ -d $file_or_dir ]; then
local file=""
local dir=$file_or_dir
else
local file=$(basename $file_or_dir)
local dir=$(dirname $file_or_dir)
fi
(
cd $dir
git log -1 --abbrev-commit --date=iso $file |
awk -v nl="$nl" \
' BEGIN { commit = ""; d[1] = "" }
/^commit/ { if ( commit == "") commit = $2 }
/^Date:/ { if (d[1] == "") {
split( $2, d, "-")
split( $3, t, ":")
}
}
END { printf( "%s%s%s%s%s_%s%s",
substr( d[1],3), d[2], d[3],
t[1], t[2],
commit, nl)
}'
)
}
function fix_alphatag()
# Patch version on top comment first id line:
# Usage: fix_alphatag <file> <version> <commit_id> <release>
# Patches:\
# * Fri Sep 24 2010 name surname <email@com> 1.20100925_faf23207
{
local dist=$(rpm --eval %dist)
awk -v dist="$dist" -v version="$2" -v commit="$3" -v release="$4" \
' BEGIN { done = 0 }
/^[*]/ { if (done)
print
else
{
s = sprintf( "-%s.%s%s\n", release, commit, dist)
gsub( "-[0-9][.][^ ]*$", s)
done = 1
# add new gsub for version...
print
}
next
}
{ print }' < $1 > $1.tmp && mv -f $1.tmp $1
}
function fix_bundle_deps
# usage: fix_bundle_deps <specfile> <version> <commit>
# Patches: Requires: diaspora-bundle = 0.0-20101021-aefsf323148
{
awk -v vers="$2-$3" \
' /Requires:/ { if ($2 == "diaspora-bundle")
printf( "%s %s = %s\n", $1,$2,vers)
else
print
next
}
{ print}' \
< $1 > $1.tmp && mv -f $1.tmp $1
}
function patch()
# Patch spec-files with current version-release
# Usage: patch <version> <commit> <release>
{
sed -e "/^%define/s|HEAD|$2|" \
-e '/^Version:/s|.*|Version: '$1'|' \
<diaspora.spec >dist/diaspora.spec
fix_alphatag dist/diaspora.spec $1 $2 $3
local bundle_id=$(git_id dist/diaspora/Gemfile)
local dist_tag=$(rpm --eval %dist)
fix_bundle_deps dist/diaspora.spec $1 "$RELEASE.${bundle_id}$dist_tag"
sed -e "/^%define/s|HEAD|$bundle_id|" \
-e '/^Version:/s|.*|Version: '$1'|' \
< diaspora-bundle.spec > dist/diaspora-bundle.spec
cp dist/diaspora.spec dist/diaspora/diaspora.spec
}
function checkout()
# Checkout last version of diaspora unless it's already there.
# Usage: checkout [commit id, defaults to HEAD]
# Returns: commit for current branch's HEAD.
{
mkdir dist &>/dev/null || :
(
local last_repo=''
cd dist
test -e '.last-repo' &&
last_repo=$( cat '.last-repo')
test "$last_repo" != $GIT_REPO &&
rm -rf diaspora
test -d diaspora || {
git clone --quiet $GIT_REPO;
(
cd diaspora;
git remote add upstream \
git://github.com/diaspora/diaspora.git
for p in ../../*.patch; do
git apply --whitespace=fix $p > /dev/null
done &> /dev/null || :
)
}
echo -n "$GIT_REPO" > '.last-repo'
cd diaspora;
git fetch --quiet upstream
git merge --quiet upstream/master
[ -n "$1" ] && git reset --hard --quiet $1
git_id -n
)
}
function make_src
# Create a distribution tarball
# Usage: make src <commit>
{
echo "Using repo: $GIT_REPO"
commit=$(checkout ${1:-'HEAD'})
echo "Commit id: $commit"
RELEASE_DIR="diaspora-$VERSION-$commit"
rm -rf dist/${RELEASE_DIR}
mkdir dist/${RELEASE_DIR}
cd dist
mkdir ${RELEASE_DIR}/master
cp -ar diaspora/* diaspora/.git* ${RELEASE_DIR}/master
(
cd ${RELEASE_DIR}/master
rm -rf vendor/bundle/* vendor/git/* vendor/cache/* gem-tmp
git show --name-only > config/gitversion
tar czf public/source.tar.gz \
--exclude='source.tar.gz' -X .gitignore *
find $PWD -name .git\* | xargs rm -rf
rm -rf .bundle
/usr/bin/patch -p1 -s <../../../add-bundle.diff
)
tar czf ${RELEASE_DIR}.tar.gz ${RELEASE_DIR} && \
rm -rf ${RELEASE_DIR}
cd ..
echo "Source: dist/${RELEASE_DIR}.tar.gz"
echo "Required bundle: $(git_id dist/diaspora/Gemfile)"
}
. ./funcs.sh
function build_git_gems()
# Usage: build_git_gems <Gemfile> <tmpdir> <gemdir>
@ -213,6 +46,38 @@ function build_git_gems()
# rm -rf gem-tmp
}
function make_src
# Create a distribution tarball
# Usage: make src <commit>
{
echo "Using repo: $GIT_REPO"
commit=$(checkout ${1:-'HEAD'})
echo "Commit id: $commit"
RELEASE_DIR="diaspora-$VERSION-$commit"
rm -rf dist/${RELEASE_DIR}
mkdir dist/${RELEASE_DIR}
cd dist
mkdir ${RELEASE_DIR}/master
cp -ar diaspora/* diaspora/.git* ${RELEASE_DIR}/master
(
cd ${RELEASE_DIR}/master
rm -rf vendor/bundle/* vendor/git/* vendor/cache/* gem-tmp
git show --name-only > config/gitversion
tar czf public/source.tar.gz \
--exclude='source.tar.gz' -X .gitignore *
find $PWD -name .git\* | xargs rm -rf
rm -rf .bundle
/usr/bin/patch -p1 -s <../../../add-bundle.diff
)
tar czf ${RELEASE_DIR}.tar.gz ${RELEASE_DIR} && \
rm -rf ${RELEASE_DIR}
cd ..
echo "Source: dist/${RELEASE_DIR}.tar.gz"
echo "Required bundle: $(git_id dist/diaspora/Gemfile)"
}
function make_docs()
{
local gems=$1
@ -238,6 +103,7 @@ function make_docs()
}
function make_bundle()
# Create the bundle tarball
# Usage: make_bundle [ commit, defaults to HEAD]
@ -280,6 +146,7 @@ function make_bundle()
mv vendor/cache ../$bundle_name/vendor
mv vendor/gems ../$bundle_name/vendor
mv git-repos ../$bundle_name
git checkout Gemfile
cd ..
tar czf $bundle_name.tar.gz $bundle_name
mv $bundle_name/vendor/cache diaspora/vendor/cache
@ -289,65 +156,16 @@ function make_bundle()
echo "Bundle: dist/$bundle_name.tar.gz"
}
function prepare_rpm()
# Usage: prepare_rpm < commit>
{
local dest=$(rpm --eval %_sourcedir)
test -z "$dest" && {
echo "Can't find RPM source directory, giving up."
exit 2
}
local commit=$( checkout $1)
echo "Release: $RELEASE.$commit"
echo "Rpm source dir: $dest"
patch $VERSION $commit $RELEASE
local src="dist/diaspora-$VERSION-$commit.tar.gz"
test -e $src ||
cat <<- EOF
Warning: $src does not exist
(last version not built?)
EOF
ln -sf $PWD/$src $dest
local bundle_commit=$( git_id dist/diaspora/Gemfile)
local bundle="dist/diaspora-bundle-$VERSION-$bundle_commit.tar.gz"
test -e $bundle ||
cat <<- EOF
Warning: $bundle does not exist
(last version not built?)
EOF
ln -sf $PWD/$bundle $dest
local file
for file in $( grep -v '^#' SOURCES); do
if [ -e "$file" ]; then
ln -sf $PWD/$file $dest/$file
else
echo "Warning: $file (listed in SOURCES) does not exist"
fi
done
( cd $dest; find . -type l -not -readable -exec rm {} \;)
echo "Source specfile: dist/diaspora.spec"
echo "Bundle specfile: dist/diaspora-bundle.spec"
}
function usage()
{
cat <<- EOF
Usage: make-dist [options] <dist|bundle|prepare>
Usage: make-dist [options] <dist|bundle>
Options:
-h Print this message.
-c commit Use a given commit, defaults to last checked in.
-r release For prepare, mark with release nr, defaults to 1.
-u uri Git repository URI, defaults to
$GIT_REPO.
-f For bundle, fix dependencies by running 'bundle update'
@ -355,8 +173,6 @@ function usage()
source Build a diaspora application tarball.
bundle Build a bundler(1) bundle for diaspora.
prepare Symlink bundle and source tarballs to rpm source dir,
create patched rpm spec files.
All results are stored in dist/
@ -366,15 +182,13 @@ function usage()
commit='HEAD'
BUNDLE_FIX='no'
while getopts ":r:c:u:fh" opt
while getopts ":c:u:fh" opt
do
case $opt in
u) GIT_REPO="$OPTARG"
;;
c) commit="${OPTARG:0:7}"
;;
r) RELEASE="$OPTARG:"
;;
f) BUNDLE_FIX='yes'
;;
h) usage
@ -387,7 +201,7 @@ do
done
shift $(($OPTIND - 1))
typeset -r GIT_REPO RELEASE BUNDLE_FIX
typeset -r GIT_REPO BUNDLE_FIX
export LANG=C
test $# -gt 1 -o $# -eq 0 && {
@ -401,8 +215,6 @@ case $1 in
;;
'source') make_src $commit
;;
'prepare') prepare_rpm $commit $release
;;
*) usage
exit 1
;;

View file

@ -5,23 +5,20 @@ work as a first step towards packaging, but should be usable as is.
### Synopsis
Bootstrap the distribution from git:
% sudo apt-get install git-core
% git clone git://github.com/diaspora/diaspora.git
% cd diaspora/pkg/ubuntu
Create and install the diaspora bundle and application in
diaspora/pkg/source according to
[source README](http://github.com/diaspora/diaspora/tree/master/pkg/source/)
Install the dependencies (a good time for a coffe break):
% sudo ./diaspora-install-deps
Create and install the diaspora bundle and application:
% ./make-dist.sh bundle
% sudo ./diaspora-bundle-install dist/diaspora-bundle-*.tar.gz
% ./make-dist.sh source
% sudo ./diaspora-install dist/diaspora-0.0*.tar.gz
Initiate and start the server;
Install, initiate and start the server;
% sudo ./diaspora-install
% sudo ./diaspora-setup
% sudo su - diaspora
% cd /usr/share/diaspora/master

View file

@ -1,11 +0,0 @@
diff --git a/.bundle/config b/.bundle/config
new file mode 100644
index 0000000..1c3e2ce
--- /dev/null
+++ b/.bundle/config
@@ -0,0 +1,5 @@
+---
+BUNDLE_FROZEN: "1"
+BUNDLE_DISABLE_SHARED_GEMS: "1"
+BUNDLE_WITHOUT: test:rdoc
+BUNDLE_PATH: vendor/bundle

View file

@ -43,12 +43,20 @@ mkdir -p /var/lib/diaspora/tmp
mkdir -p /var/run/diaspora
mkdir -p /etc/diaspora
bundle='/usr/lib/diaspora-bundle'
[ "$(arch | tr -d '\n')" = 'x86_64' ] && \
bundle='/usr/lib64/diaspora-bundle'
ln -sf /var/log/diaspora ./master/log
cp master/config/app_config.yml.example /etc/diaspora/app_config.yml
ln -sf /etc/diaspora/app_config.yml master/config/app_config.yml
ln -sf /var/lib/diaspora/uploads master/public/
ln -sf /var/lib/diaspora/tmp master
ln -sf /usr/lib/diaspora-bundle/vendor/bundle master/vendor
rm -rf master/vendor
ln -sf $bundle/vendor master/vendor
ln -sf $bundle/Gemfile master/Gemfile
ln -sf $bundle/Gemfile.lock master/Gemfile.lock
rm -rf /usr/share/doc/diaspora
mkdir -p /usr/share/doc/diaspora

1
pkg/ubuntu/dist Symbolic link
View file

@ -0,0 +1 @@
../source/dist/

View file

View file

@ -1 +0,0 @@
../fedora/make-dist.sh

View file

@ -24,8 +24,8 @@ $(function() {
$("ul .person").draggable({
revert: true,
start: function(event,ui){
$(this).children("img").animate({'height':80, 'width':80, 'opacity':0.8},200);
$(this).children("img").tipsy("hide");
$(this).children("img").animate({'height':80, 'width':80, 'opacity':0.8},200)
.tipsy("hide");
$(".draggable_info").fadeIn(100);
},
drag: function(event,ui){
@ -67,7 +67,7 @@ $(function() {
}});
}
$(this).closest("ul").append(person);
dropzone.closest("ul").append(person);
}
});
@ -96,8 +96,6 @@ $(function() {
}
}
});
});
@ -107,7 +105,6 @@ $(".delete").live("click", function() {
var person = $(this).closest("li.person");
if (person.hasClass('request')){
if( confirm("Ignore request?") ){
var request_id = person.attr("data-guid");
@ -121,7 +118,6 @@ $(".delete").live("click", function() {
}
} else {
if( confirm("Remove this person from all aspects?") ){
var person_id = $(this).closest("li.person").attr('data-guid');

View file

@ -2,16 +2,15 @@
* licensed under the Affero General Public License version 3 or later. See
* the COPYRIGHT file.
*/
$(document).ready( function() {
$(document).ready(function() {
$('div#image_picker div.small_photo').click( function() {
$('#image_url_field').val($(this).attr('id'));
var $this = $(this);
document.getElementById("image_url_field").value = this.id;
$('div#image_picker div.small_photo').removeClass('selected');
$("div#image_picker div.small_photo input[type='checkbox']").attr("checked", false);
$('div#image_picker div.small_photo.selected').removeClass('selected')
.children("input[type='checkbox']").attr("checked", false);
$(this).addClass('selected');
$(this).children("input[type='checkbox']").attr("checked", true);
$this.addClass('selected')
.children("input[type='checkbox']").attr("checked", true);
});
});

View file

@ -20,6 +20,8 @@ $(document).keydown(function(e){
});
$(document).ready(function(){
var $edit_photo = $(".edit_photo");
//add a clas to verify if a textarea has focus
$("textarea").live('focus',function(){
$(this).addClass("hasfocus");
@ -34,13 +36,13 @@ $(document).ready(function(){
});
//Add a description with ajax request
$("#photo_submit").click(function(evenet){
$("#photo_submit").click(function(event){
event.preventDefault();
var method = $(".edit_photo").attr("method");
var url = $(".edit_photo").attr("action");
var data = $(".edit_photo").serialize();
var method = $edit_photo.attr("method");
var url = $edit_photo.attr("action");
var data = $edit_photo.serialize();
$(".description").text($("#photo_caption").val());
$(".edit_photo").toggle();
$edit_photo.toggle();
$.ajax({
type: method,

View file

@ -5,7 +5,7 @@
$(document).ready(function(){
var $stream = $("#stream");
// expand all comments on page load
$("#stream:not('.show')").find('.comments').each(function(index) {
var comments = $(this);
@ -16,17 +16,17 @@ $(document).ready(function(){
});
// comment toggle action
$("#stream:not('.show')").delegate("a.show_post_comments", "click", function(evt) {
$stream.not(".show").delegate("a.show_post_comments", "click", function(evt) {
evt.preventDefault();
expandComments($(this));
});
// comment submit action
$("#stream").delegate("a.comment_submit", "click", function(evt){
$stream.delegate("a.comment_submit", "click", function(evt){
$(this).closest("form").children(".comment_box").attr("rows", 1);
});
$("#stream").delegate("textarea.comment_box", "focus", function(evt){
$stream.delegate("textarea.comment_box", "focus", function(evt){
var commentBox = $(this);
commentBox.attr("rows", 2)
.closest("form").find(".comment_submit").fadeIn(200);
@ -41,11 +41,14 @@ $(document).ready(function(){
});
// reshare button action
$("#stream").delegate(".reshare_button", "click", function(evt){
$stream.delegate(".reshare_button", "click", function(evt){
evt.preventDefault();
var button = $(this);
button.closest(".reshare_pane").children(".reshare_box").show();
button.addClass("active");
button = $(this)
box = button.siblings(".reshare_box");
if(box.length > 0){
button.toggleClass("active");
box.toggle();
}
});
});//end document ready

View file

@ -5,10 +5,9 @@
$(document).ready(function(){
$('#debug_info').click(function() {
$('#debug_more').toggle('fast');
});
$('#debug_info').click(function() {
$('#debug_more').toggle('fast');
});
$("label").inFieldLabels();
@ -26,12 +25,12 @@ $(document).ready(function(){
});
//buttons//////
$(".add_aspect_button").fancybox({ 'titleShow' : false , 'hideOnOverlayClick' : false });
$(".add_request_button").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false });
$(".invite_user_button").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false });
$(".add_photo_button").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false });
$(".remove_person_button").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false });
$(".question_mark").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false });
$(".add_aspect_button," +
".add_request_button," +
".invite_user_button," +
".add_photo_button," +
".remove_person_button," +
".question_mark").fancybox({ 'titleShow': false , 'hideOnOverlayClick' : false });
$("input[type='submit']").addClass("button");
@ -49,13 +48,13 @@ $(document).ready(function(){
);
$("#publisher").find("textarea").keydown( function(e) {
if (e.keyCode == 13) {
if (e.keyCode === 13) {
$(this).closest("form").submit();
}
});
$("#stream").delegate("textarea.comment_box", "keydown", function(e){
if (e.keyCode == 13) {
if (e.keyCode === 13) {
$(this).closest("form").submit();
}
});
@ -65,17 +64,15 @@ $(document).ready(function(){
});
$('body').click( function(event){
if(!$(event.target).closest('#user_menu').length){
var target = $(event.target);
if(!target.closest('#user_menu').length){
$("#user_menu").removeClass("active");
};
if(!$(event.target).closest('.reshare_box').length){
if(!target.closest('.reshare_pane').length){
$(".reshare_button").removeClass("active");
$(".reshare_box").hide();
};
});
//$("#slider").easySlider({speed:400});
$("img", "#left_pane").tipsy({live:true});
$(".add_aspect_button", "#aspect_nav").tipsy({gravity:'w'});
@ -104,26 +101,29 @@ $.fn.clearForm = function() {
var video_active_container = null;
function openVideo(type, videoid, link) {
var container = document.createElement('div');
var container = document.createElement('div'),
$container = $(container);
if(type == 'youtube.com') {
container.innerHTML = '<a href="http://www.youtube.com/watch?v='+videoid+'" target="_blank">Watch this video on Youtube</a><br><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/'+videoid+'?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+videoid+'?fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>';
$container.html('<a href="http://www.youtube.com/watch?v='+videoid+'" target="_blank">Watch this video on Youtube</a><br><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/'+videoid+'?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/'+videoid+'?fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>');
} else {
container.innerHTML = 'Invalid videotype <i>'+type+'</i> (ID: '+videoid+')';
$container.html('Invalid videotype <i>'+type+'</i> (ID: '+videoid+')');
}
if(video_active_container != null) {
video_active_container.parentNode.removeChild(video_active_container);
}
video_active_container = container;
$(container).hide();
$container.hide();
link.parentNode.insertBefore(container, this.nextSibling);
$(container).slideDown('fast', function() { });
link.onclick = function() { $(container).slideToggle('fast', function() { } ); }
$container.slideDown('fast', function() { });
link.onclick = function() { $container.slideToggle('fast', function() { } ); }
}
$(".make_profile_photo").live("click", function(){
var user_id = $(this).closest(".controls").attr('data-actor');
person_id = $(this).closest(".controls").attr('data-actor_person');
photo_url = $(this).closest(".controls").attr('data-image_url');
var $this = $(this),
$controls = $this.closest(".controls"),
user_id = $controls.attr('data-actor');
person_id = $controls.attr('data-actor_person');
photo_url = $controls(".controls").attr('data-image_url');
$.ajax({
type: "PUT",
@ -131,7 +131,7 @@ $(".make_profile_photo").live("click", function(){
data: {"person":{"profile":{ "image_url": photo_url }}},
success: function(){
$("img[data-person_id='"+ person_id +"']").each( function() {
$(this).attr('src', photo_url);
this.src = photo_url;
});
}
});

View file

@ -50,7 +50,6 @@ h3
:padding 1em
:box-shadow 0 1px 2px #333
:-moz-box-shadow 0 1px 2px #333
:-webkit-box-shadow 0 1px 2px #333
@ -206,10 +205,16 @@ header
:display inline
.avatar
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
img
:-webkit-box-shadow 0 1px 2px #666
:-moz-box-shadow 0 1px 2px #666
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
@ -262,7 +267,9 @@ header
:position absolute
:top 7px
:left 0
:-webkit-box-shadow 0 1px 2px #666
:-moz-box-shadow 0 1px 2px #666
h2
:margin
@ -276,6 +283,8 @@ header
:size 14px
.avatar
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
li.message
@ -337,7 +346,11 @@ li.message
&.active
:background
:color #333
:-webkit-border-radius 5px 5px 0 0
:-moz-border-radius 5px 5px 0 0
:border-radius 5px 5px 0 0
a
:color #fff
:text-shadow none
@ -540,9 +553,11 @@ ul.comments
#stream, #profile,
.comments
img.person_picture
:border-radius 3px
:-webkit-border-radius 3px
:-moz-border-radius 3px
:border-radius 3px
:display inline block
:height 30px
:display absolute
@ -586,10 +601,12 @@ li.message .from .right
#show_photo
img
:max-width 100%
:-webkit-box-shadow 0 2px 4px #333
:border 10px solid #fff
:bottom 80px solid #fff
:-webkit-box-shadow 0 2px 4px #333
:-moz-box-shadow 0 2px 4px #333
:-webkit-border-radius 3px
:-moz-border-radius 3px
:border-radius 3px
@ -619,9 +636,9 @@ textarea
:border 1px solid #ccc
:height auto
:border-radius 5px
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
input[type='checkbox']
:width auto
@ -661,9 +678,10 @@ label
:position absolute
:margin
:right 15px
:border-radius 5px
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
form
:position relative
@ -715,6 +733,8 @@ label
:bottom 1em
img
:-moz-border-radius 3px
:-webkit-border-radius 3px
:border-radius 3px
input[type='checkbox']
@ -859,6 +879,7 @@ h1.big_text
a
:-webkit-border-radius 5px 5px 0 0
:-moz-border-radius 5px 5px 0 0
:border-radius 5px 5px 0 0
:text-shadow 0 1px 0 #444
:line
@ -1000,8 +1021,13 @@ h1.big_text
img
:height 70px
:width 70px
:border-radius 5px
:-webkit-box-shadow 0 1px 2px #999
:-moz-box-shadow 0 1px 2px #999
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
&:hover
.delete
@ -1041,6 +1067,7 @@ h1.big_text
:border-radius 20px
:-webkit-box-shadow 0 1px 3px #000
:-moz-box-shadow 0 1px 3px #000
.x
:z-index 2
@ -1095,6 +1122,10 @@ ul#settings_nav
:width 30px
:height 30px
.friend_pictures.horizontal
img
:margin-right -5px
#thumbnails
:line-height 14px
@ -1103,6 +1134,9 @@ ul#settings_nav
:padding 0
#left_pane
h2
:font
:weight 200
ul
:margin 0
:padding 0
@ -1132,6 +1166,9 @@ ul#settings_nav
:bottom 0.7em
:border 2px dashed #FAC421
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
.null_arrow
@ -1158,6 +1195,7 @@ h2,h3,h4
input[type="search"]
:-webkit-appearance textfield
:-moz-appearance textfield
header
input[type="search"]
@ -1286,6 +1324,8 @@ ul.aspects
:height 20px
:-webkit-border-radius 10px
:-moz-border-radius 10px
:border-radius 10px
:line-height 16px
:text-indent 6px
@ -1299,8 +1339,14 @@ ul.aspects
:padding 12px
:background
:color rgb(255,255,255)
:-webkit-box-shadow 0 1px 3px #333
:-moz-box-shadow 0 1px 3px #333
:-webkit-border-radius 2px
:-moz-border-radius 2px
:border-radius 2px
:border
:bottom 1px solid #ccc
:top 1px solid #fff
@ -1335,6 +1381,9 @@ ul.aspects
:background
:color rgb(16,127,201)
:padding 8px
:-webkit-border-radius 10px
:-moz-border-radius 10px
:border-radius 10px
&:hover
@ -1369,7 +1418,10 @@ ul.aspects
#user_photo_uploader
.avatar
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
:height 100px
:width 100px
@ -1382,13 +1434,19 @@ ul.aspects
#profile_photo_upload
:margin
:top 5px
:min-height 100px
img
:position absolute
:left 0
:height 100px
:width 100px
:-webkit-border-radius 5px
:-moz-border-radius 5px
:border-radius 5px
:-webkit-box-shadow 0 1px 2px #666
:-moz-box-shadow 0 1px 2px #666
:padding
:left 120px

View file

@ -8,7 +8,7 @@ describe AlbumsController do
render_views
before do
@user = make_user
@aspect = @user.aspect(:name => "lame-os")
@aspect = @user.aspects.create(:name => "lame-os")
@album = @user.post :album, :to => @aspect.id, :name => 'things on fire'
sign_in :user, @user
end

View file

@ -9,13 +9,14 @@ describe AspectsController do
before do
@user = make_user
@aspect = @user.aspect(:name => "lame-os")
@aspect1 = @user.aspect(:name => "another aspect")
@aspect = @user.aspects.create(:name => "lame-os")
@aspect1 = @user.aspects.create(:name => "another aspect")
@user2 = make_user
@aspect2 = @user2.aspect(:name => "party people")
@aspect2 = @user2.aspects.create(:name => "party people")
friend_users(@user,@aspect, @user2, @aspect2)
@contact = @user.contact_for(@user2.person)
sign_in :user, @user
request.env["HTTP_REFERER"] = 'http://' + request.host
end
describe "#index" do
@ -44,9 +45,9 @@ describe AspectsController do
post :create, "aspect" => {"name" => ""}
@user.reload.aspects.count.should == 2
end
it "goes back to manage aspects" do
it "goes back to the page you came from" do
post :create, "aspect" => {"name" => ""}
response.should redirect_to(aspects_manage_path)
response.should redirect_to(:back)
end
end
end
@ -63,7 +64,7 @@ describe AspectsController do
describe "#update" do
before do
@aspect = @user.aspect(:name => "Bruisers")
@aspect = @user.aspects.create(:name => "Bruisers")
end
it "doesn't overwrite random attributes" do
new_user = Factory.create :user

View file

@ -8,7 +8,7 @@ describe PeopleController do
render_views
let(:user) { Factory(:user) }
let!(:aspect) { user.aspect(:name => "lame-os") }
let!(:aspect) { user.aspects.create(:name => "lame-os") }
before do
sign_in :user, user
@ -37,32 +37,18 @@ describe PeopleController do
it "doesn't overwrite the profile photo when an empty string is passed in" do
user.person.profile.image_url = "http://tom.joindiaspora.com/images/user/tom.jpg"
user.person.profile.save
params = {"profile"=>
{"image_url" => "",
"last_name" => user.person.profile.last_name,
"first_name" => user.person.profile.first_name}}
params = { "profile" =>
{ "image" => "",
"last_name" => user.person.profile.last_name,
"first_name" => user.person.profile.first_name }}
image_url = user.person.profile.image_url
put("update", :id => user.person.id, "person" => params)
put :update, "id" => user.person.id.to_s, "person" => params
user.person.reload
user.person.profile.image_url.should == image_url
end
it "doesn't prepend (https?://) if already present in image_url" do
params = {:profile=>
{:image_url => "https://google.com/image.png",
:last_name => user.person.profile.last_name,
:first_name => user.person.profile.first_name}}
put("update", :id => user.person.id, "person" => params)
user.person.reload
user.person.profile.image_url.should == params[:profile][:image_url]
end
end
end
end

View file

@ -8,7 +8,7 @@ describe PhotosController do
render_views
before do
@user = make_user
@aspect = @user.aspect(:name => "lame-os")
@aspect = @user.aspects.create(:name => "lame-os")
@album = @user.post :album, :to => @aspect.id, :name => 'things on fire'
@fixture_filename = 'button.png'
@fixture_name = File.join(File.dirname(__FILE__), '..', 'fixtures', @fixture_filename)

View file

@ -9,9 +9,9 @@ describe PublicsController do
render_views
let!(:user) { make_user }
let!(:user2) { make_user }
let!(:aspect1) { user.aspect(:name => "foo") }
let!(:aspect2) { user2.aspect(:name => "far") }
let!(:aspect2) { user2.aspect(:name => 'disciples') }
let!(:aspect1) { user.aspects.create(:name => "foo") }
let!(:aspect2) { user2.aspects.create(:name => "far") }
let!(:aspect2) { user2.aspects.create(:name => 'disciples') }
let!(:req) { user2.send_friend_request_to(user.person, aspect2) }
let!(:xml) { user2.salmon(req).xml_for(user.person) }
let(:person){Factory(:person)}

View file

@ -10,7 +10,7 @@ describe RequestsController do
@user = make_user
sign_in :user, @user
@user.aspect(:name => "lame-os")
@user.aspects.create(:name => "lame-os")
end
it "should not error out when requesting to be friends with yourself" do

View file

@ -7,7 +7,7 @@ require 'spec_helper'
describe ServicesController do
render_views
let(:user) { make_user }
let!(:aspect) { user.aspect(:name => "lame-os") }
let!(:aspect) { user.aspects.create(:name => "lame-os") }
let!(:service1) {a = Factory(:service); user.services << a; a}
let!(:service2) {a = Factory(:service); user.services << a; a}

View file

@ -24,7 +24,7 @@ describe SocketsController do
describe 'actionhash' do
before do
@aspect = @user.aspect :name => "losers"
@aspect = @user.aspects.create(:name => "losers")
@message = @user.post :status_message, :message => "post through user for victory", :to => @aspect.id
@fixture_name = File.dirname(__FILE__) + '/../fixtures/button.png'
end

View file

@ -8,7 +8,7 @@ describe StatusMessagesController do
render_views
let!(:user) { make_user }
let!(:aspect) { user.aspect(:name => "lame-os") }
let!(:aspect) { user.aspects.create(:name => "lame-os") }
before do
sign_in :user, user
@ -16,7 +16,12 @@ describe StatusMessagesController do
end
describe '#create' do
let(:status_message_hash) {{"status_message"=>{"public"=>"true", "message"=>"facebook, is that you?", "to" =>"#{aspect.id}"}}}
let(:status_message_hash) {
{:status_message =>{
:public =>"true",
:message =>"facebook, is that you?",
:to =>"#{aspect.id}"}}
}
context "posting out to facebook" do
let!(:service2) { s = Factory(:service, :provider => 'facebook'); user.services << s; s }
@ -27,10 +32,22 @@ describe StatusMessagesController do
end
it 'should not post to facebook when public is not set' do
status_message_hash['status_message']['public'] = 'false'
status_message_hash[:status_message][:public] = 'false'
user.should_not_receive(:post_to_facebook)
post :create, status_message_hash
end
it "doesn't overwrite person_id" do
new_user = make_user
status_message_hash[:status_message][:person_id] = new_user.person.id
post :create, status_message_hash
StatusMessage.find_by_message(status_message_hash[:status_message][:message]).person_id.should == user.person.id
end
it "doesn't overwrite id" do
old_status_message = user.post(:status_message, :message => "hello", :to => aspect.id)
status_message_hash[:status_message][:id] = old_status_message.id
lambda {post :create, status_message_hash}.should raise_error /failed save/
old_status_message.reload.message.should == 'hello'
end
end
context "posting to twitter" do
@ -42,7 +59,7 @@ describe StatusMessagesController do
end
it 'should not post to twitter when public in not set' do
status_message_hash['status_message']['public'] = 'false'
status_message_hash[:status_message][:public] = 'false'
user.should_not_receive(:post_to_twitter)
post :create, status_message_hash
end

View file

@ -7,7 +7,7 @@ require 'spec_helper'
describe UsersController do
let(:user) { make_user }
let!(:aspect) { user.aspect(:name => "lame-os") }
let!(:aspect) { user.aspects.create(:name => "lame-os") }
let!(:old_password) { user.encrypted_password }
let!(:old_language) { user.language }

View file

@ -28,9 +28,12 @@ module HelperMethods
def friend_users(user1, aspect1, user2, aspect2)
request = user1.send_friend_request_to(user2.person, aspect1)
user2.receive_friend_request(request)
user2.receive request.to_diaspora_xml, user1.person
reversed_request = user2.accept_friend_request( request.id, aspect2.id)
user1.reload
user1.receive reversed_request.to_diaspora_xml, user2.person
user1.reload
aspect1.reload

View file

@ -11,10 +11,10 @@ describe Diaspora::Exporter do
let!(:user2) { make_user }
let!(:user3) { make_user }
let!(:aspect) { user1.aspect(:name => "Old Work") }
let(:aspect1) { user1.aspect(:name => "Work") }
let(:aspect2) { user2.aspect(:name => "Family") }
let(:aspect3) { user3.aspect(:name => "Pivots") }
let!(:aspect) { user1.aspects.create(:name => "Old Work") }
let(:aspect1) { user1.aspects.create(:name => "Work") }
let(:aspect2) { user2.aspects.create(:name => "Family") }
let(:aspect3) { user3.aspects.create(:name => "Pivots") }
let!(:status_message1) { user1.post(:status_message, :message => "One", :public => true, :to => aspect1.id) }
let!(:status_message2) { user1.post(:status_message, :message => "Two", :public => true, :to => aspect1.id) }

View file

@ -20,18 +20,18 @@ describe Diaspora::Importer do
@person2 = Factory(:person)
# User1 has four aspects(1-4), each following user has one aspect
@aspect1 = @user1.aspect(:name => "Dudes")
@aspect2 = @user1.aspect(:name => "Girls")
@aspect3 = @user1.aspect(:name => "Bros")
@aspect4 = @user1.aspect(:name => "People")
@aspect5 = @user2.aspect(:name => "Abe Lincolns")
@aspect6 = @user3.aspect(:name => "Cats")
@aspect7 = @user4.aspect(:name => "Dogs")
@aspect8 = @user5.aspect(:name => "Hamsters")
@aspect9 = @user5.aspect(:name => "Gophers")
@aspect1 = @user1.aspects.create(:name => "Dudes")
@aspect2 = @user1.aspects.create(:name => "Girls")
@aspect3 = @user1.aspects.create(:name => "Bros")
@aspect4 = @user1.aspects.create(:name => "People")
@aspect5 = @user2.aspects.create(:name => "Abe Lincolns")
@aspect6 = @user3.aspects.create(:name => "Cats")
@aspect7 = @user4.aspects.create(:name => "Dogs")
@aspect8 = @user5.aspects.create(:name => "Hamsters")
@aspect9 = @user5.aspects.create(:name => "Gophers")
@aspect10 = @user1.aspect(:name => "Work")
@aspect11 = @user1.aspect(:name => "Family")
@aspect10 = @user1.aspects.create(:name => "Work")
@aspect11 = @user1.aspects.create(:name => "Family")
# User1 posts one status messages to aspects (1-4), two other users post message to one aspect
@status_message1 = @user1.post(:status_message, :message => "One", :public => false, :to => @aspect1.id)

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