Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
9c334e24e4
9 changed files with 41 additions and 28 deletions
|
|
@ -1,4 +1,4 @@
|
|||
Diaspora is copyright Diaspora Inc., 2010, and files herein are licensed under the Affero General Public License version 3, the text of which can be found in GNU-AGPL-3.0, unless otherwise noted. Components of Diaspora, including Rails, JQuery, and Devise, are licensed under the MIT/X11 license. Blueprint-CSS is licensed under a modified version of the MIT/X11 license. All unmodified files from these and other sources retain their original copyright and license notices: see the relevant individual files. Attribution information for Diaspora is contained in the AUTHORS file.
|
||||
Diaspora is copyright Diaspora Inc., 2010, and files herein are licensed under the Affero General Public License version 3, the text of which can be found in GNU-AGPL-3.0, or any later version of the AGPL, unless otherwise noted. Components of Diaspora, including Rails, JQuery, and Devise, are licensed under the MIT/X11 license. Blueprint-CSS is licensed under a modified version of the MIT/X11 license. All unmodified files from these and other sources retain their original copyright and license notices: see the relevant individual files. Attribution information for Diaspora is contained in the AUTHORS file.
|
||||
|
||||
* In addition, as a special exception, the copyright holders give
|
||||
* permission to link the code of portions of this program with the
|
||||
|
|
@ -11,4 +11,4 @@ Diaspora is copyright Diaspora Inc., 2010, and files herein are licensed under t
|
|||
* version of the file(s), but you are not obligated to do so. If you
|
||||
* do not wish to do so, delete this exception statement from your
|
||||
* version. If you delete this exception statement from all source
|
||||
* files in the program, then also delete it here.
|
||||
* files in the program, then also delete it here.
|
||||
|
|
|
|||
19
README.md
19
README.md
|
|
@ -17,6 +17,14 @@ The privacy aware, personally controlled, do-it-all, open source social network.
|
|||
Also, we really want to continue to focus on features and improving the code base. When we think it is
|
||||
ready for general use, we will post more detailed instructions.
|
||||
|
||||
## Notice
|
||||
|
||||
We currently run Diaspora with the [thin](http://code.macournoyer.com/thin/) as our webserver, behind [nginx](http://wiki.nginx.org/Main). Diaspora uses the asynchronous feature of [EventMachine](http://rubyeventmachine.com/) to send messages between seeds,
|
||||
|
||||
using the power of the [Reactor](http://en.wikipedia.org/wiki/Reactor_pattern) pattern. If you use mod_rails, mongrel, or another non-eventmachine based application server, federation and/or websockets may not work.
|
||||
|
||||
If you don't like thin, you can always try [Rainbows!](http://rainbows.rubyforge.org/)
|
||||
We will try and fully support more webservers later, but that is what works for now.
|
||||
|
||||
|
||||
These instructions are for machines running [Ubuntu](http://www.ubuntu.com/), [Fedora](http://www.fedoraproject.org) or Mac OS X. We are developing Diaspora for the latest and greatest browsers, so please update your Firefox, Chrome or Safari to the latest and greatest.
|
||||
|
|
@ -235,14 +243,3 @@ Ongoing discussion:
|
|||
More general info and updates about the project can be found on our [blog](http://joindiaspora.com), [and on Twitter](http://twitter.com/joindiaspora). Also, be sure to join the official [mailing list](http://http://eepurl.com/Vebk).
|
||||
|
||||
If you wish to contact us privately about any exploits in Diaspora you may find, you can email [exploits@joindiaspora.com](mailto:exploits@joindiaspora.com).
|
||||
|
||||
|
||||
## License
|
||||
Copyright 2010 Diaspora Inc.
|
||||
|
||||
Diaspora is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
Diaspora is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License along with Diaspora. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ class PublicsController < ApplicationController
|
|||
|
||||
def hcard
|
||||
@person = Person.find_by_id params[:id]
|
||||
puts @person
|
||||
unless @person.nil? || @person.owner.nil?
|
||||
render 'hcard'
|
||||
end
|
||||
|
|
@ -34,7 +33,6 @@ class PublicsController < ApplicationController
|
|||
return unless params[:xml]
|
||||
begin
|
||||
person = Person.first(:id => params[:id])
|
||||
puts person.real_name
|
||||
@user = person.owner
|
||||
rescue NoMethodError => e
|
||||
Rails.logger.error("Received post for nonexistent person #{params[:id]}")
|
||||
|
|
|
|||
|
|
@ -43,11 +43,11 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def owner_image_tag
|
||||
person_image_tag(current_user)
|
||||
person_image_tag(current_user.person)
|
||||
end
|
||||
|
||||
def owner_image_link
|
||||
person_image_link(current_user)
|
||||
person_image_link(current_user.person)
|
||||
end
|
||||
|
||||
def person_image_tag(person)
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class Person
|
|||
|
||||
def self.by_webfinger( identifier, opts = {})
|
||||
#need to check if this is a valid email structure, maybe should do in JS
|
||||
local_person = Person.first(:diaspora_handle => identifier.gsub('acct:', ''))
|
||||
local_person = Person.first(:diaspora_handle => identifier.gsub('acct:', '').to_s.downcase)
|
||||
|
||||
if local_person
|
||||
Rails.logger.info("Do not need to webfinger, found a local person #{local_person.real_name}")
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
.content
|
||||
%span.from
|
||||
= link_to person.real_name, person
|
||||
= link_to person.real_name, person_path(person)
|
||||
|
||||
.info
|
||||
= person.diaspora_handle
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
|
||||
- content_for :page_title do
|
||||
= @person.real_name
|
||||
profile
|
||||
|
||||
- content_for :left_pane do
|
||||
#profile
|
||||
|
|
|
|||
|
|
@ -86,7 +86,8 @@ module Diaspora
|
|||
|
||||
def remove_friend(bad_friend)
|
||||
raise "Friend not deleted" unless self.friend_ids.delete( bad_friend.id )
|
||||
aspects.each{|g| g.person_ids.delete( bad_friend.id )}
|
||||
aspects.each{|aspect|
|
||||
aspect.person_ids.delete( bad_friend.id )}
|
||||
self.save
|
||||
|
||||
self.raw_visible_posts.find_all_by_person_id( bad_friend.id ).each{|post|
|
||||
|
|
|
|||
|
|
@ -189,16 +189,14 @@ describe User do
|
|||
@user2 = Factory.create :user
|
||||
@aspect2 = @user2.aspect(:name => "Gross people")
|
||||
|
||||
request = @user.send_friend_request_to( @user2, @aspect)
|
||||
request.reverse_for @user2
|
||||
@user2.activate_friend(@user.person, @aspect2)
|
||||
@user.receive request.to_diaspora_xml
|
||||
friend_users(@user, @aspect, @user2, @aspect2)
|
||||
@user.reload
|
||||
@user2.reload
|
||||
@aspect.reload
|
||||
@aspect2.reload
|
||||
end
|
||||
|
||||
it 'should unfriend the other user on the same seed' do
|
||||
@user.reload
|
||||
@user2.reload
|
||||
|
||||
@user.friends.count.should == 1
|
||||
@user2.friends.count.should == 1
|
||||
|
||||
|
|
@ -212,6 +210,25 @@ describe User do
|
|||
@aspect.people.count.should == 0
|
||||
@aspect2.people.count.should == 0
|
||||
end
|
||||
context 'with a post' do
|
||||
before do
|
||||
@message = @user.post(:status_message, :message => "hi", :to => @aspect.id)
|
||||
@user2.receive @message.to_diaspora_xml.to_s
|
||||
@user2.unfriend @user.person
|
||||
@user.unfriended_by @user2.person
|
||||
@aspect.reload
|
||||
@aspect2.reload
|
||||
@user.reload
|
||||
@user2.reload
|
||||
end
|
||||
it "deletes the unfriended user's posts from visible_posts" do
|
||||
@user.raw_visible_posts.include?(@message.id).should be_false
|
||||
end
|
||||
it "deletes the unfriended user's posts from the aspect's posts" do
|
||||
pending "We need to implement this"
|
||||
@aspect2.posts.include?(@message).should be_false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue