Merge branch 'master' of https://github.com/diaspora/diaspora
This commit is contained in:
commit
a6f11e86dc
11 changed files with 179 additions and 96 deletions
1
.pairs
1
.pairs
|
|
@ -9,6 +9,7 @@ pairs:
|
|||
jd: Jeff Dickey; dickeytk
|
||||
dc: Dennis Collinson
|
||||
tf: Tim Frazer
|
||||
kf: Kevin Fitzpatrick
|
||||
email:
|
||||
prefix: pair
|
||||
domain: joindiaspora.com
|
||||
|
|
|
|||
|
|
@ -68,12 +68,6 @@ class UsersController < ApplicationController
|
|||
else
|
||||
flash[:error] = I18n.t 'users.update.unconfirmed_email_not_changed'
|
||||
end
|
||||
elsif u[:auto_follow_back]
|
||||
if @user.update_attributes(u)
|
||||
flash[:notice] = I18n.t 'users.update.follow_settings_changed'
|
||||
else
|
||||
flash[:error] = I18n.t 'users.update.follow_settings_not_changed'
|
||||
end
|
||||
end
|
||||
elsif aspect_order = params[:reorder_aspects]
|
||||
@user.reorder_aspects(aspect_order)
|
||||
|
|
|
|||
|
|
@ -79,12 +79,4 @@ LISTITEM
|
|||
def dropdown_may_create_new_aspect
|
||||
@aspect == :profile || @aspect == :tag || @aspect == :search || @aspect == :notification || params[:action] == "getting_started"
|
||||
end
|
||||
|
||||
def aspect_options_for_select(aspects)
|
||||
options = {}
|
||||
aspects.each do |aspect|
|
||||
options[aspect.to_s] = aspect.id
|
||||
end
|
||||
options
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ class Request
|
|||
end
|
||||
|
||||
# Finds or initializes a corresponding [Contact], and will set Contact#sharing to true
|
||||
# Follows back if user setting is set so
|
||||
# @note A [Contact] may already exist if the [Request]'s recipient is sharing with the sender
|
||||
# @return [Request]
|
||||
def receive(user, person)
|
||||
|
|
@ -79,8 +78,6 @@ class Request
|
|||
contact.sharing = true
|
||||
contact.save
|
||||
|
||||
user.share_with(person, user.auto_follow_back_aspect) if user.auto_follow_back
|
||||
|
||||
self
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ class User < ActiveRecord::Base
|
|||
has_many :invitations_from_me, :class_name => 'Invitation', :foreign_key => :sender_id, :dependent => :destroy
|
||||
has_many :invitations_to_me, :class_name => 'Invitation', :foreign_key => :recipient_id, :dependent => :destroy
|
||||
has_many :aspects, :order => 'order_id ASC'
|
||||
belongs_to :auto_follow_back_aspect, :class_name => 'Aspect'#, :foreign_key => 'auto_follow_back_aspect_id'
|
||||
has_many :aspect_memberships, :through => :aspects
|
||||
has_many :contacts
|
||||
has_many :contact_people, :through => :contacts, :source => :person
|
||||
|
|
@ -61,9 +60,7 @@ class User < ActiveRecord::Base
|
|||
:disable_mail,
|
||||
:invitation_service,
|
||||
:invitation_identifier,
|
||||
:show_community_spotlight_in_stream,
|
||||
:auto_follow_back,
|
||||
:auto_follow_back_aspect_id
|
||||
:show_community_spotlight_in_stream
|
||||
|
||||
|
||||
def self.all_sharing_with_person(person)
|
||||
|
|
|
|||
|
|
@ -91,29 +91,6 @@
|
|||
%hr
|
||||
%br
|
||||
|
||||
%h3#auto-follow-back-preferences
|
||||
= t('.following')
|
||||
= form_for current_user, :url => user_path, :html => { :method => :put } do |f|
|
||||
= f.error_messages
|
||||
|
||||
%p.checkbox_select
|
||||
= f.label :auto_follow_back, t('.auto_follow_back')
|
||||
= f.check_box :auto_follow_back
|
||||
%br
|
||||
%p.checkbox_select
|
||||
%span{:style => "color: #999"}
|
||||
= t('.auto_follow_aspect')
|
||||
= f.select :auto_follow_back_aspect_id, aspect_options_for_select(current_user.aspects)
|
||||
|
||||
%br
|
||||
= f.submit t('.change'), :class => 'button'
|
||||
|
||||
%br
|
||||
%br
|
||||
%hr
|
||||
%br
|
||||
|
||||
|
||||
%h3#getting-started-preferences
|
||||
= t('.show_getting_started')
|
||||
= form_for current_user, :url => user_path, :html => { :method => :put } do |f|
|
||||
|
|
|
|||
|
|
@ -944,9 +944,6 @@ en:
|
|||
show_community_spotlight: "Show Community Spotlight in Stream?"
|
||||
show_getting_started: 'Re-enable Getting Started'
|
||||
getting_started: 'New User Prefrences'
|
||||
following: "Following Settings"
|
||||
auto_follow_back: "Automatically follow back if someone follows you"
|
||||
auto_follow_aspect: "Aspect for automatically followed users:"
|
||||
|
||||
privacy_settings:
|
||||
title: "Privacy Settings"
|
||||
|
|
@ -987,8 +984,6 @@ en:
|
|||
email_notifications_changed: "Email notifications changed"
|
||||
unconfirmed_email_changed: "Email changed. Needs activation."
|
||||
unconfirmed_email_not_changed: "Email change failed"
|
||||
follow_settings_changed: "Follow settings changed"
|
||||
follow_settings_not_changed: "Follow settings change failed."
|
||||
public:
|
||||
does_not_exist: "User %{username} does not exist!"
|
||||
confirm_email:
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
class AddAutoFollowBackToUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :users, :auto_follow_back, :boolean, :default => false
|
||||
add_column :users, :auto_follow_back_aspect_id, :integer
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :users, :auto_follow_back
|
||||
remove_column :users, :auto_follow_back_aspect
|
||||
end
|
||||
end
|
||||
26
db/schema.rb
26
db/schema.rb
|
|
@ -1,3 +1,4 @@
|
|||
# encoding: UTF-8
|
||||
# This file is auto-generated from the current state of the database. Instead
|
||||
# of editing this file, please use the migrations feature of Active Record to
|
||||
# incrementally modify your database, and then regenerate this schema definition.
|
||||
|
|
@ -10,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20111114173111) do
|
||||
ActiveRecord::Schema.define(:version => 20111101202137) do
|
||||
|
||||
create_table "aspect_memberships", :force => true do |t|
|
||||
t.integer "aspect_id", :null => false
|
||||
|
|
@ -53,17 +54,17 @@ ActiveRecord::Schema.define(:version => 20111114173111) do
|
|||
end
|
||||
|
||||
create_table "comments", :force => true do |t|
|
||||
t.text "text", :null => false
|
||||
t.integer "commentable_id", :null => false
|
||||
t.integer "author_id", :null => false
|
||||
t.string "guid", :null => false
|
||||
t.text "text", :null => false
|
||||
t.integer "commentable_id", :null => false
|
||||
t.integer "author_id", :null => false
|
||||
t.string "guid", :null => false
|
||||
t.text "author_signature"
|
||||
t.text "parent_author_signature"
|
||||
t.text "youtube_titles"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "likes_count", :default => 0, :null => false
|
||||
t.string "commentable_type", :limit => 60, :default => "Post", :null => false
|
||||
t.integer "likes_count", :default => 0, :null => false
|
||||
t.string "commentable_type", :default => "Post", :null => false
|
||||
end
|
||||
|
||||
add_index "comments", ["author_id"], :name => "index_comments_on_person_id"
|
||||
|
|
@ -252,7 +253,6 @@ ActiveRecord::Schema.define(:version => 20111114173111) do
|
|||
add_index "people", ["owner_id"], :name => "index_people_on_owner_id", :unique => true
|
||||
|
||||
create_table "photos", :force => true do |t|
|
||||
t.integer "tmp_old_id"
|
||||
t.integer "author_id", :null => false
|
||||
t.boolean "public", :default => false, :null => false
|
||||
t.string "diaspora_handle"
|
||||
|
|
@ -371,12 +371,12 @@ ActiveRecord::Schema.define(:version => 20111114173111) do
|
|||
add_index "services", ["user_id"], :name => "index_services_on_user_id"
|
||||
|
||||
create_table "share_visibilities", :force => true do |t|
|
||||
t.integer "shareable_id", :null => false
|
||||
t.integer "shareable_id", :null => false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "hidden", :default => false, :null => false
|
||||
t.integer "contact_id", :null => false
|
||||
t.string "shareable_type", :limit => 60, :default => "Post", :null => false
|
||||
t.boolean "hidden", :default => false, :null => false
|
||||
t.integer "contact_id", :null => false
|
||||
t.string "shareable_type", :default => "Post", :null => false
|
||||
end
|
||||
|
||||
add_index "share_visibilities", ["contact_id"], :name => "index_post_visibilities_on_contact_id"
|
||||
|
|
@ -453,8 +453,6 @@ ActiveRecord::Schema.define(:version => 20111114173111) do
|
|||
t.string "confirm_email_token", :limit => 30
|
||||
t.datetime "locked_at"
|
||||
t.boolean "show_community_spotlight_in_stream", :default => true, :null => false
|
||||
t.boolean "auto_follow_back", :default => false
|
||||
t.integer "auto_follow_back_aspect_id"
|
||||
end
|
||||
|
||||
add_index "users", ["authentication_token"], :name => "index_users_on_authentication_token", :unique => true
|
||||
|
|
|
|||
165
public/index.html
Normal file
165
public/index.html
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
|
||||
<!DOCTYPE html>
|
||||
<html dir='ltr' lang='en'>
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>
|
||||
DIASPORA* ALPHA
|
||||
|
||||
</title>
|
||||
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
|
||||
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
|
||||
<link href='/favicon.png' rel='shortcut icon'>
|
||||
<link href='/apple-touch-icon.png' rel='apple-touch-icon'>
|
||||
<!-- Social Media Icons are by Paul Robert Lloyd @ http://paulrobertlloyd.com/2009/06/social_media_icons -->
|
||||
<!-- bootstrap/blueprint switch -->
|
||||
<link href="/stylesheets/blueprint/screen.css?10fa7ba02" media="screen" rel="stylesheet" type="text/css" />
|
||||
<link href="/stylesheets/blueprint/print.css?10fa7ba02" media="print" rel="stylesheet" type="text/css" />
|
||||
<link href="/stylesheets/login.css?10fa7ba02" media="screen" rel="stylesheet" type="text/css" />
|
||||
<!--[if (!IE)|(gte IE 8)]><!-->
|
||||
<link href="/assets/default-datauri.css?10fa7ba02" media="all" rel="stylesheet" type="text/css" />
|
||||
<!--<![endif]-->
|
||||
<!--[if lte IE 7]>
|
||||
<link href="/assets/default-mhtml.css?10fa7ba02" media="all" rel="stylesheet" type="text/css" />
|
||||
<![endif]-->
|
||||
<meta name="csrf-param" content="authenticity_token"/>
|
||||
<meta name="csrf-token" content="XXjEhGE+k4oLf4ivsS0w4z49YCW8ZlmeqZuO6dAxVV0="/>
|
||||
<!--[if IE]>
|
||||
<script src="/javascripts/ie.js?10fa7ba02" type="text/javascript"></script>
|
||||
<![endif]-->
|
||||
<script src="/assets/jquery.js?10fa7ba02" type="text/javascript"></script>
|
||||
<script>
|
||||
//<![CDATA[
|
||||
!window.jQuery && document.write(unescape('%3Cscript src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"%3E%3C/script%3E'))
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
//<![CDATA[
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-17207587-3']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script></head>
|
||||
<body class=''>
|
||||
<header class='landing'>
|
||||
<div class='container' style='position:relative;'>
|
||||
<a href="/"><img alt="Logo_large" class="diaspora_header_logo" height="32px" src="/images/logo_large.png?10fa7ba02" width="321px" /></a>
|
||||
<div class='right'>
|
||||
<ul id='landing_nav'>
|
||||
<li><a href="http://twitter.com/joindiaspora">@joindiaspora</a></li>
|
||||
<li><a href="https://github.com/diaspora/diaspora">github</a></li>
|
||||
<li><a href="http://blog.joindiaspora.com/">blog</a></li>
|
||||
<li><a href="/users/sign_in" class="login">log in</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</header>
|
||||
<div class='container' style=''>
|
||||
<div class='span-24 last' style=''>
|
||||
<div id='landing_content'>
|
||||
<div class='ilya'>
|
||||
<a href="https://joindiaspora.com/u/ilya"><img alt="Seed" src="/images/seed.jpg?10fa7ba02" /></a>
|
||||
<div class='memory'>
|
||||
<h1>Ilya Zhitomirskiy</h1>
|
||||
<h2>1989-2011</h2>
|
||||
</div>
|
||||
<a href="http://www.flickr.com/photos/31878512@N06/5093998704/" class="attribution" target="blank">Thank you Neal Fowler for being part of the Commons</a>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
/*<![CDATA[*/
|
||||
body{
|
||||
background-color:#0A0000;
|
||||
padding : 0;
|
||||
}
|
||||
.container {
|
||||
width : 100%;
|
||||
}
|
||||
.span-24.last {
|
||||
width : 100%;
|
||||
}
|
||||
#landing_content{
|
||||
margin-top:-6px;
|
||||
}
|
||||
#landing_content img {
|
||||
width : 100%;
|
||||
}
|
||||
.ilya {
|
||||
position : relative;
|
||||
}
|
||||
|
||||
.memory {
|
||||
position: absolute;
|
||||
top: 90px;
|
||||
right : 90px;
|
||||
text-align : right;
|
||||
}
|
||||
|
||||
#landing_content h1 {
|
||||
font-weight: 200;
|
||||
font-size: 38px;
|
||||
color: #D5D5D5;
|
||||
letter-spacing: 0.03em;
|
||||
}
|
||||
|
||||
#landing_content h2 {
|
||||
font-weight: lighter;
|
||||
font-size: 25px;
|
||||
color: #D5D5D5;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
footer .container {
|
||||
margin-top: 0;
|
||||
border-top : none;
|
||||
}
|
||||
.attribution {
|
||||
position : absolute;
|
||||
bottom : 8px;
|
||||
left : 8px;
|
||||
color : #777;
|
||||
}
|
||||
.attribution:hover {
|
||||
text-decoration : none;
|
||||
color : #666;
|
||||
}
|
||||
/*]]>*/
|
||||
</style>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<div class='container'>
|
||||
<ul id='footer_nav'>
|
||||
<li><a href="http://twitter.com/joindiaspora">@joindiaspora</a></li>
|
||||
<li><a href="https://github.com/diaspora/diaspora">github</a></li>
|
||||
<li><a href="http://blog.joindiaspora.com">blog</a></li>
|
||||
<li></li>
|
||||
<li><a href="https://github.com/diaspora/diaspora/wiki/Changelog">what's new?</a></li>
|
||||
<li></li>
|
||||
</ul>
|
||||
<img alt="Powered_by_diaspora" height="11px" src="/images/powered_by_diaspora.png?10fa7ba02" width="145px" />
|
||||
</div>
|
||||
</footer>
|
||||
<script type="text/javascript">if (!NREUMQ.f) { NREUMQ.f=function() {
|
||||
NREUMQ.push(["load",new Date().getTime()]);
|
||||
var e=document.createElement("script");
|
||||
e.type="text/javascript";e.async=true;e.src="https://d1ros97qkrwjf5.cloudfront.net/24/eum/rum-staging.js";
|
||||
document.body.appendChild(e);
|
||||
if(NREUMQ.a)NREUMQ.a();
|
||||
};
|
||||
NREUMQ.a=window.onload;window.onload=NREUMQ.f;
|
||||
};
|
||||
NREUMQ.push(["nrfj","beacon-1.newrelic.com","aca58d21b2",157961,"J1wMQ0cLDQpQQhsMCwlWTURdCxY=",0,25,new Date().getTime(),"","","","",""])</script></body>
|
||||
</html>
|
||||
|
|
@ -92,28 +92,6 @@ describe Request do
|
|||
:into => eve.aspects.first).receive(alice, eve.person)
|
||||
alice.contact_for(eve.person).should be_sharing
|
||||
end
|
||||
|
||||
it 'shares back if auto_following is enabled' do
|
||||
alice.auto_follow_back = true
|
||||
alice.auto_follow_back_aspect = alice.aspects.first
|
||||
eve.save
|
||||
|
||||
Request.diaspora_initialize(:from => eve.person, :to => alice.person,
|
||||
:into => eve.aspects.first).receive(alice, eve.person)
|
||||
|
||||
eve.contact_for(alice.person).should be_sharing
|
||||
end
|
||||
|
||||
it 'shares not back if auto_following is not enabled' do
|
||||
alice.auto_follow_back = false
|
||||
alice.auto_follow_back_aspect = alice.aspects.first
|
||||
eve.save
|
||||
|
||||
Request.diaspora_initialize(:from => eve.person, :to => alice.person,
|
||||
:into => eve.aspects.first).receive(alice, eve.person)
|
||||
|
||||
eve.contact_for(alice.person).should be_nil
|
||||
end
|
||||
end
|
||||
|
||||
context 'xml' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue