Merge branch 'master' of github.com:diaspora/diaspora into production

This commit is contained in:
danielvincent 2010-09-16 17:35:58 -07:00
commit c2c3a51622
12 changed files with 138 additions and 19 deletions

View file

@ -147,13 +147,13 @@ To install Git on **Mac OS X**, run the following:
### Rubygems
On **Ubuntu**, run the following:
On **Ubuntu** 10.04, run the following:
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
tar -xf rubygems-1.3.7.tgz
cd rubygems-1.3.7
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo add-apt-repository ppa:maco.m/ruby
sudo apt-get update
sudo apt-get install rubygems
This PPA is maintained by an Ubuntu Developer. For Ubuntu 10.10, this version of rubygems is in the repositories.
On **Fedora**, run the following:
@ -164,7 +164,7 @@ On **Mac OS X**, RubyGems comes preinstalled; however, you might need to update
### Bundler
After RubyGems is updated, simply run `sudo gem install bundler` to get Bundler.
After RubyGems is updated, simply run `sudo gem install bundler` to get Bundler. If you're using Ubuntu repository .debs, bundler is found at /var/lib/gems/1.8/bin/bundle
## Getting Diaspora
@ -184,6 +184,8 @@ If you installed the Ubuntu package, MongoDB should already be running (if not,
If you installed the Fedora package, MongoDB will need to be started via `service mongodb start`. If you installed the binary manually, run `sudo mongod` from where mongo is installed to start mongo.
If you installed the OsX package through "brew", MongoDB will need to be started via `sudo launchctl load /Library/LaunchDaemons/org.mongodb.mongod.plist`. (before you have to go to /Library/LaunchDaemons and add a symlink to /usr/local/Cellar/mongodb/1.6.2-x86_64/org.mongodb.mongod.plist)
Diaspora will not run unless mongo is running. Mongo will not run by default, and will need to be started every time you wish to use or run the test suite for Diaspora.
### Run the app server

View file

@ -12,7 +12,7 @@
Requests
.requests
%ul
%ul.dropzone
- for request in @remote_requests
%li.requested_person{:id => request.person.id, :request_id => request.id}
= person_image_tag(request.person)
@ -22,7 +22,7 @@
Ignore/Remove
%li.remove
%ul
%ul.dropzone
- content_for :publish do
= link_to("add a new aspect", "#add_aspect_pane", :id => "add_aspect_button", :class => "new_aspect button", :title => "Add a new aspect")

View file

@ -7,6 +7,9 @@
%h5 DEBUG INFO
#debug_more{ :style => "display:none;" }
%ul
%li
%b
= GIT_INFO
%li
%b params
= params.inspect
@ -14,3 +17,4 @@
%b websocket status
#debug
.msg

View file

@ -6,9 +6,9 @@
require File.expand_path('../boot', __FILE__)
require "action_controller/railtie"
require "action_mailer/railtie"
require "active_resource/railtie"
require 'action_controller/railtie'
require 'action_mailer/railtie'
require 'active_resource/railtie'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)

View file

@ -7,6 +7,7 @@
# Load the rails application
require File.expand_path('../application', __FILE__)
Haml::Template.options[:format] = :html5
Haml::Template.options[:escape_html] = true
# Initialize the rails application
Diaspora::Application.initialize!

View file

@ -0,0 +1,6 @@
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
GIT_INFO = `git show`

View file

@ -5,7 +5,7 @@
require 'em-websocket'
require 'eventmachine'
require "lib/diaspora/websocket"
require 'lib/diaspora/websocket'
EM.next_tick {
Diaspora::WebSocket.initialize_channels

View file

@ -7,11 +7,11 @@
require "#{File.dirname(__FILE__)}/packages/essential"
require "#{File.dirname(__FILE__)}/packages/database"
require "#{File.dirname(__FILE__)}/packages/server"
require "#{File.dirname(__FILE__)}/packages/scm"
require "#{File.dirname(__FILE__)}/packages/ruby"
require '#{File.dirname(__FILE__)}/packages/essential'
require '#{File.dirname(__FILE__)}/packages/database'
require '#{File.dirname(__FILE__)}/packages/server'
require '#{File.dirname(__FILE__)}/packages/scm'
require '#{File.dirname(__FILE__)}/packages/ruby'
policy :diaspora, :roles => [:pivots] do
# requires :clean_dreamhost

View file

@ -39,6 +39,7 @@ $(function() {
});
$(".aspect ul").droppable({
hoverClass: 'active',
drop: function(event, ui) {
if ($(ui.draggable[0]).hasClass('requested_person')){
@ -69,6 +70,7 @@ $(function() {
});
$(".remove ul").droppable({
hoverClass: 'active',
drop: function(event, ui) {
if ($(ui.draggable[0]).hasClass('requested_person')){
@ -91,7 +93,7 @@ $(function() {
});
});
$(".aspect h1").live( 'click', function() {
$(".aspect h1").live( 'focus', function() {
var $this = $(this);
var id = $this.closest("li").children("ul").attr("id");

View file

@ -547,6 +547,10 @@ h1.big_text {
border: 1px solid #cccccc;
list-style: none;
padding: 15px; }
.aspect ul.dropzone.active,
.requests ul.dropzone.active,
.remove ul.dropzone.active {
background-color: #fafafa; }
.aspect .person,
.aspect .requested_person,
.requests .person,

View file

@ -711,6 +711,10 @@ h1.big_text
:style none
:padding 15px
&.active
:background
:color #fafafa
.person,
.requested_person
:display inline-block

96
ubuntu-setup.bash Normal file
View file

@ -0,0 +1,96 @@
#!/bin/bash
# Author : hemanth.hm@gmail.com
# Site : www.h3manth.com
# This script helps to setup diaspora.
#
# Set extented globbing
shopt -s extglob
# Check if the user has sudo privileges.
[[ $( id -u) ]] && echo "$(whoami) has no sudo permissions on this machine" && exit 1
# Install build tools
echo "Installing build tools.."
sudo apt-get -y --no-install-recommends install build-essential libxslt1.1 libxslt1-dev libxml2
echo "..Done installing build tools"
# Install Ruby 1.8.7
echo "Installing ruby-full Ruby 1.8.7.."
sudo apt-get -y --no-install-recommends install ruby-full
echo "..Done installing Ruby"
# Install Rake
echo "Installing rake.."
sudo apt-get -y --no-install-recommends install rake
echo "..Done installing rake"
# Get the current release and install mongodb
lsb=$(lsb_release -rs)
ver=${lsb//.+(0)/.}
repo="deb http://downloads.mongodb.org/distros/ubuntu ${ver} 10gen"
echo "Setting up MongoDB.."
echo "."
echo ${repo} | sudo tee -a /etc/apt/sources.list
echo "."
echo "Fetching keys.."
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "."
sudo apt-get update
echo "."
sudo apt-get -y --no-install-recommends install mongodb-stable
echo "Done installing monngodb-stable.."
# Install imagemagick
echo "Installing imagemagick.."
sudo apt-get -y --no-install-recommends install imagemagick libmagick9-dev
echo "Installed imagemagick.."
# Install git-core
echo "Installing git-core.."
sudo apt-get -y --no-install-recommends install git-core
echo "Installed git-core.."
# Setting up ruby gems
echo "Fetching and installing ruby gems.."
(
echo "."
cd /tmp
wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
echo "."
tar -xf rubygems-1.3.7.tgz
echo "."
cd rubygems-1.3.7
echo "."
sudo ruby setup.rb
echo "."
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
echo "."
)
echo "Done installing the gems.."
# Install blunder
echo "Installing blunder.."
sudo gem install bundler
echo "Installed blunder.."
# Take a clone of Diaspora
(
echo "Clone diaspora source.."
git clone http://github.com/diaspora/diaspora.git
echo "Cloned the source.."
# Install extra gems
cd diaspora
echo "Installing more gems.."
sudo bundle install
echo "Installed."
# Install DB setup
echo "Seting up DB.."
rake db:seed:tom
echo "DB ready. Login -> tom and password -> evankorth. More details ./diaspora/db/seeds/tom.rb."
# Run appserver
echo "Starting server"
bundle exec thin start
)