Merge remote branch 'upstream/master' into port-test
This commit is contained in:
commit
d3a6031f88
10 changed files with 41 additions and 61 deletions
|
|
@ -96,7 +96,7 @@ GEM
|
||||||
activemodel (= 3.0.0)
|
activemodel (= 3.0.0)
|
||||||
activesupport (= 3.0.0)
|
activesupport (= 3.0.0)
|
||||||
activesupport (3.0.0)
|
activesupport (3.0.0)
|
||||||
addressable (2.2.1)
|
addressable (2.2.2)
|
||||||
arel (1.0.1)
|
arel (1.0.1)
|
||||||
activesupport (~> 3.0.0)
|
activesupport (~> 3.0.0)
|
||||||
aws (2.3.21)
|
aws (2.3.21)
|
||||||
|
|
@ -172,7 +172,7 @@ GEM
|
||||||
mini_fb (1.1.3)
|
mini_fb (1.1.3)
|
||||||
hashie
|
hashie
|
||||||
rest-client
|
rest-client
|
||||||
mini_magick (2.1)
|
mini_magick (2.3)
|
||||||
subexec (~> 0.0.4)
|
subexec (~> 0.0.4)
|
||||||
mocha (0.9.8)
|
mocha (0.9.8)
|
||||||
rake
|
rake
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ class Person
|
||||||
/^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix
|
/^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix
|
||||||
|
|
||||||
def self.search(query)
|
def self.search(query)
|
||||||
|
return Person.all if query.to_s.empty?
|
||||||
qTokens = query.to_s.strip.split(" ")
|
qTokens = query.to_s.strip.split(" ")
|
||||||
fullQueryText = Regexp.escape( query.to_s.strip )
|
fullQueryText = Regexp.escape( query.to_s.strip )
|
||||||
p = []
|
p = []
|
||||||
|
|
|
||||||
5
ci.sh
5
ci.sh
|
|
@ -4,6 +4,7 @@ echo "**************************************************************************
|
||||||
echo "* ruby 1.8.7-p249 build *" &&
|
echo "* ruby 1.8.7-p249 build *" &&
|
||||||
echo "*************************************************************************************************" &&
|
echo "*************************************************************************************************" &&
|
||||||
echo "" &&
|
echo "" &&
|
||||||
|
rm Gemfile.lock &&
|
||||||
source /usr/local/rvm/scripts/rvm &&
|
source /usr/local/rvm/scripts/rvm &&
|
||||||
rvm use ruby-1.8.7-p249 &&
|
rvm use ruby-1.8.7-p249 &&
|
||||||
bundle install &&
|
bundle install &&
|
||||||
|
|
@ -13,8 +14,8 @@ echo "**************************************************************************
|
||||||
echo "* ruby 1.9.2-p0 build *" &&
|
echo "* ruby 1.9.2-p0 build *" &&
|
||||||
echo "*************************************************************************************************" &&
|
echo "*************************************************************************************************" &&
|
||||||
echo "" &&
|
echo "" &&
|
||||||
|
rm Gemfile.lock &&
|
||||||
source /usr/local/rvm/scripts/rvm &&
|
source /usr/local/rvm/scripts/rvm &&
|
||||||
rvm use ruby-1.9.2-p0 &&
|
rvm use ruby-1.9.2-p0 &&
|
||||||
bundle install &&
|
bundle install &&
|
||||||
bundle exec rake ci &&
|
bundle exec rake ci
|
||||||
rm Gemfile.lock
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
%define git_release HEAD
|
%define git_release 1010092232_b313272
|
||||||
|
|
||||||
Summary: A social network server
|
Summary: A social network server
|
||||||
Name: diaspora
|
Name: diaspora
|
||||||
Version: 0.0.1
|
Version: 0.0
|
||||||
Release: 1.%{git_release}%{?dist}
|
Release: 1.%{git_release}%{?dist}
|
||||||
License: AGPLv3
|
License: AGPLv3
|
||||||
Group: Applications/Communications
|
Group: Applications/Communications
|
||||||
|
|
@ -19,7 +19,7 @@ BuildRoot: %{_rmpdir}/not-used-in-fedora/
|
||||||
|
|
||||||
Requires: mongodb-server
|
Requires: mongodb-server
|
||||||
Requires: ruby(abi) = 1.8
|
Requires: ruby(abi) = 1.8
|
||||||
Requires: diaspora-bundle = %{version}
|
Requires: diaspora-bundle = 0.0-1.1010081636_d1a4ee0.fc13
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
@ -34,10 +34,6 @@ find . -perm /u+x -type f -exec \
|
||||||
|
|
||||||
%build
|
%build
|
||||||
rm -rf master/vendor/bundle
|
rm -rf master/vendor/bundle
|
||||||
<<<<<<< HEAD
|
|
||||||
mkdir master/tmp || :
|
|
||||||
=======
|
|
||||||
>>>>>>> upstream/master
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -fr $RPM_BUILD_ROOT
|
rm -fr $RPM_BUILD_ROOT
|
||||||
|
|
@ -59,14 +55,7 @@ cp %SOURCE3 $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/diaspora
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
||||||
cp -ar master $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
cp -ar master $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
||||||
<<<<<<< HEAD
|
|
||||||
cp -ar master/.bundle $RPM_BUILD_ROOT/%{_datadir}/diaspora/master
|
|
||||||
cp diaspora-setup $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/diaspora/uploads
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/diaspora/tmp
|
|
||||||
=======
|
|
||||||
cp %SOURCE2 $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
cp %SOURCE2 $RPM_BUILD_ROOT/%{_datadir}/diaspora
|
||||||
>>>>>>> upstream/master
|
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/diaspora
|
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/log/diaspora
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/diaspora/uploads
|
mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib/diaspora/uploads
|
||||||
|
|
@ -91,25 +80,8 @@ sed -i -e '\|.*/master/config.ru"$|d' \
|
||||||
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
<<<<<<< HEAD
|
|
||||||
rm -f %{_datadir}/diaspora/master/vendor/bundle
|
|
||||||
rm -f %{_datadir}/diaspora/master/log
|
|
||||||
rm -f %{_datadir}/diaspora/master/public/uploads
|
|
||||||
rm -rf %{_datadir}/diaspora/master/tmp
|
|
||||||
|
|
||||||
ln -s %{_localstatedir}/log/diaspora \
|
|
||||||
%{_datadir}/diaspora/master/log || :
|
|
||||||
ln -s %{_libdir}/diaspora-bundle/master/vendor/bundle \
|
|
||||||
%{_datadir}/diaspora/master/vendor || :
|
|
||||||
ln -s %{_localstatedir}/lib/diaspora/uploads \
|
|
||||||
%{_datadir}/diaspora/master/public/uploads || :
|
|
||||||
ln -s %{_localstatedir}/lib/diaspora/tmp \
|
|
||||||
%{_datadir}/diaspora/master/tmp || :
|
|
||||||
/sbin/chkconfig --add diaspora-ws || :
|
|
||||||
=======
|
|
||||||
/sbin/chkconfig --add diaspora-wsd
|
/sbin/chkconfig --add diaspora-wsd
|
||||||
|
|
||||||
>>>>>>> upstream/master
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ $1 -eq 0 ] ; then
|
if [ $1 -eq 0 ] ; then
|
||||||
|
|
@ -124,27 +96,21 @@ rm -fr $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files -f files
|
%files -f files
|
||||||
%defattr(-, root, root, 0755)
|
%defattr(-, root, root, 0755)
|
||||||
<<<<<<< HEAD
|
|
||||||
%doc README.md GNU-AGPL-3.0
|
|
||||||
=======
|
|
||||||
%doc AUTHORS README.md GNU-AGPL-3.0 COPYRIGHT README-Fedora.md
|
%doc AUTHORS README.md GNU-AGPL-3.0 COPYRIGHT README-Fedora.md
|
||||||
>>>>>>> upstream/master
|
|
||||||
%attr(-, diaspora, diaspora) %{_datadir}/diaspora/master/config.ru
|
%attr(-, diaspora, diaspora) %{_datadir}/diaspora/master/config.ru
|
||||||
%attr(-, diaspora, diaspora) %{_datadir}/diaspora/master/config/environment.rb
|
%attr(-, diaspora, diaspora) %{_datadir}/diaspora/master/config/environment.rb
|
||||||
%attr(-, diaspora, diaspora) %{_localstatedir}/log/diaspora
|
%attr(-, diaspora, diaspora) %{_localstatedir}/log/diaspora
|
||||||
%attr(-, diaspora, diaspora) %{_localstatedir}/lib/diaspora/uploads
|
%attr(-, diaspora, diaspora) %{_localstatedir}/lib/diaspora/uploads
|
||||||
%attr(-, diaspora, diaspora) %{_localstatedir}/lib/diaspora/tmp
|
%attr(-, diaspora, diaspora) %{_localstatedir}/lib/diaspora/tmp
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
%{_datadir}/diaspora/master/tmp
|
%{_datadir}/diaspora/master/tmp
|
||||||
%{_datadir}/diaspora/master/public/uploads
|
%{_datadir}/diaspora/master/public/uploads
|
||||||
%{_datadir}/diaspora/master/log
|
%{_datadir}/diaspora/master/log
|
||||||
>>>>>>> upstream/master
|
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/diaspora
|
%config(noreplace) %{_sysconfdir}/logrotate.d/diaspora
|
||||||
%{_sysconfdir}/init.d/diaspora-wsd
|
%{_sysconfdir}/init.d/diaspora-wsd
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Sep 24 2010 Alec Leamas <leamas.alec@gmail.com> 0.0-1.1009280542_859ec2d
|
* Fri Sep 24 2010 Alec Leamas <leamas.alec@gmail.com> 0.0-1.1010092232_b313272.fc13
|
||||||
|
|
||||||
- Initial attempt to create a spec fi+le
|
- Initial attempt to create a spec fi+le
|
||||||
|
|
||||||
# rubygem-term-ansicolor in repo (1.0.5)
|
# rubygem-term-ansicolor in repo (1.0.5)
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,13 @@ dependencies lives in the nothing is insalled by user or on system level.
|
||||||
make-dist.sh accepts arguments to get a specified commit and/or use another
|
make-dist.sh accepts arguments to get a specified commit and/or use another
|
||||||
repo.
|
repo.
|
||||||
|
|
||||||
This has been tested on a Ubuntu 32-bit 10.10 , clean server. Since this
|
This has been tested on a Ubuntu 32-bit 10.10 , clean server and on 10.04
|
||||||
is a very small dist, the dependencies should possibly be complete.
|
Lucid desktop, also clean installation.
|
||||||
|
|
||||||
|
mongodb is having problems occasionally. Sometimes the dependencies are not
|
||||||
|
installed, and mongod refuses to start. invoke /usr/bin/mongod -f /etc/mongodb.conf
|
||||||
|
fo test. The lockfile /var/lib/mongodb/mongod.conf is also a potential
|
||||||
|
problem. Remove to make it start again.
|
||||||
|
|
||||||
The diaspora-wsd is just placeholder FTM, it does **not** work.
|
The diaspora-wsd is just placeholder FTM, it does **not** work.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ grep -v '^#' /etc/apt/sources.list | grep -q universe || {
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -qy --ignore-missing build-essential libxslt1-dev \
|
sudo apt-get install -qy --ignore-missing build-essential libxslt1-dev \
|
||||||
libxml2 ruby-full mongodb rake python-software-properties git-core \
|
libxml2 ruby-full mongodb rake python-software-properties git-core \
|
||||||
imagemagick libmagick9-dev
|
imagemagick libmagick9-dev xulrunner-1.9
|
||||||
sudo add-apt-repository ppa:maco.m/ruby
|
sudo add-apt-repository ppa:maco.m/ruby
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -qy rubygems
|
sudo apt-get install -qy rubygems
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,9 @@ test -n "$services" && {
|
||||||
echo " $services"
|
echo " $services"
|
||||||
}
|
}
|
||||||
|
|
||||||
/usr/sbin/service mongodb start || :
|
service mongodb stop || :
|
||||||
|
rm -f /var/lib/mongodb/mongod.lock
|
||||||
|
service mongodb start || :
|
||||||
|
|
||||||
cd /usr/share/diaspora/master
|
cd /usr/share/diaspora/master
|
||||||
|
|
||||||
|
|
@ -26,11 +28,13 @@ if rake db:seed:dev; then
|
||||||
else
|
else
|
||||||
cat <<- EOF
|
cat <<- EOF
|
||||||
|
|
||||||
Database config failed. You might want to remove all db files with
|
Database config failed. You might want to
|
||||||
'rm -rf /var/lib/mongodb/*' and/or resetting the config file by
|
- Just remove the db lock file: rm /var/lib/mongodb/mongod.lock
|
||||||
'cp config/app_config.yml.example config/app_config.yml' before
|
- Remove all db files: rm -rf /var/lib/mongodb/*
|
||||||
making a new try. Also, make sure the mongodb server is running
|
- Reset the config file by
|
||||||
e. g., using '/sbin/service mongod status'.
|
cp config/app_config.yml.example config/app_config.yml
|
||||||
|
Also, make sure the mongodb server is running e. g., using
|
||||||
|
'service mongod status'.
|
||||||
EOF
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ li.message {
|
||||||
font-weight: bold; }
|
font-weight: bold; }
|
||||||
li.message .content div.info {
|
li.message .content div.info {
|
||||||
color: #444444;
|
color: #444444;
|
||||||
font-size: 14px; }
|
font-size: 13px; }
|
||||||
li.message .content div.info a {
|
li.message .content div.info a {
|
||||||
color: #cccccc; }
|
color: #cccccc; }
|
||||||
li.message .content div.info .time {
|
li.message .content div.info .time {
|
||||||
|
|
|
||||||
|
|
@ -267,7 +267,7 @@ li.message
|
||||||
|
|
||||||
div.info
|
div.info
|
||||||
:color #444
|
:color #444
|
||||||
:font-size 14px
|
:font-size 13px
|
||||||
a
|
a
|
||||||
:color #ccc
|
:color #ccc
|
||||||
.time
|
.time
|
||||||
|
|
|
||||||
|
|
@ -166,19 +166,22 @@ describe User do
|
||||||
describe 'unfriending' do
|
describe 'unfriending' do
|
||||||
before do
|
before do
|
||||||
friend_users(user,aspect, user2, aspect2)
|
friend_users(user,aspect, user2, aspect2)
|
||||||
|
user.reload
|
||||||
|
user2.reload
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should unfriend the other user on the same seed' do
|
it 'should unfriend the other user on the same seed' do
|
||||||
user.friends(true).count.should == 1
|
user.friends.count.should == 1
|
||||||
user2.friends(true).count.should == 1
|
user2.friends.count.should == 1
|
||||||
|
|
||||||
user2.unfriend user.person
|
user2.unfriend user.person
|
||||||
|
user2.reload
|
||||||
|
|
||||||
user2.friends(true).count.should == 0
|
user2.friends.count.should == 0
|
||||||
user.unfriended_by user2.person
|
user.unfriended_by user2.person
|
||||||
|
|
||||||
aspect.reload.people(true).count.should == 0
|
aspect.reload.people.count.should == 0
|
||||||
aspect2.reload.people(true).count.should == 0
|
aspect2.reload.people.count.should == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with a post' do
|
context 'with a post' do
|
||||||
|
|
@ -189,10 +192,10 @@ describe User do
|
||||||
user.unfriended_by user2.person
|
user.unfriended_by user2.person
|
||||||
end
|
end
|
||||||
it "deletes the unfriended user's posts from visible_posts" do
|
it "deletes the unfriended user's posts from visible_posts" do
|
||||||
user.raw_visible_posts(true).include?(@message.id).should be_false
|
user.reload.raw_visible_posts.include?(@message.id).should be_false
|
||||||
end
|
end
|
||||||
it "deletes the unfriended user's posts from the aspect's posts" do
|
it "deletes the unfriended user's posts from the aspect's posts" do
|
||||||
aspect2.posts(true).include?(@message).should be_false
|
aspect2.posts.include?(@message).should be_false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue