From 674fbc050be44d792266232b3be147ac12cf9c4d Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 11 Oct 2010 16:01:16 -0700 Subject: [PATCH 1/9] Some readme modifications --- README.md | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 40447939b..8cde335d4 100644 --- a/README.md +++ b/README.md @@ -3,37 +3,36 @@ The privacy aware, personally controlled, do-it-all, open source social network. -**DISCLAIMER: THIS IS PRE-ALPHA SOFTWARE AND SHOULD BE TREATED ACCORDINGLY.** +**THIS IS PRE-ALPHA SOFTWARE AND SHOULD BE TREATED ACCORDINGLY.** **PLEASE, DO NOT RUN IN PRODUCTION. IT IS FUN TO GET RUNNING, BUT EXPECT THINGS TO BE BROKEN** -Initial installation instructions are [here](http://github.com/diaspora/diaspora/wiki/Installing-and-Running-Diaspora). +### Installation instructions are [here](http://github.com/diaspora/diaspora/wiki/Installing-and-Running-Diaspora). -We are continuing to build features and improve the code base. -When we think it is ready for general use, we will post more final -instructions. Issue tracking is at [bugs.joindiaspora.com](bugs.joindiaspora.com). +### Please report any bugs you see. Issue tracking is at [bugs.joindiaspora.com](http://bugs.joindiaspora.com). -## Commit Guidelines +## Contributing to Diaspora -You are welcome to contribute, add to and extend Diaspora however you see fit. We -will do our best to incorporate everything that meets our guidelines. +You can find an introduction to the source code [here](http://github.com/diaspora/diaspora/wiki/An-Introduction-to-the-Diaspora-Source). +Bugs and pending features are on our [issue tracker](http://bugs.joindiaspora.com). Here are a few good places to start: +- Run "rake spec" to run our [Rspec](http://blog.davidchelimsky.net/2007/05/14/an-introduction-to-rspec-part-i/) +unit test suite. Take a look at the pending specs, make one pass! +- Run "rake cucumber" to run our [Cucumber](http://rubylearning.com/blog/2010/10/05/outside-in-development/) +integration test suite. As you can see, we need more integration tests. Pick a feature and write one! +- Take a look at the [issue tracker](http://bugs.joindiaspora.com) and pick a bug. +Write a spec for it, so it's easy for another developer to fix it. -You can find an introduction to the source code [here](http://github.com/diaspora/diaspora/wiki/An-Introduction-to-the-Diaspora-Source). For an idea of where to start, look at our [issue tracker](bugs.joindiaspora.com). +Patches must be tested, and all your tests should be green, +unless you're marking an existing bug, before a pull request is sent. +Unit tests should be in Rspec, and integration tests should be in Cucumber. -Make a topic branch. By making your changes in a topic branch, you ensure that new commits to your master are not included in the pull request, and it's easier for us to merge your commits. +Please make your changes in a branch to ensure that new commits to your master are +not included in the pull request, and to make it easier for us to merge your commits. Please do not rebase our tree into yours. See [here](http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html) for when to rebase. -Patches must be tested, and all your tests should be green -before a pull request is sent. Please write your tests in Rspec. - -GEMS: We would like to keep external dependencies unduplicated. We're using -Nokogiri, Mongomapper, and EM::HttpRequest as much as possible. We have a few -gems in the project we'd rather not use, but if you can, use dependencies we -already have. - We need you to fill out a [contributor agreement form](https://spreadsheets.google.com/a/joindiaspora.com/viewform?formkey=dGI2cHA3ZnNHLTJvbm10LUhXRTJjR0E6MQ&theme=0AX42CRMsmRFbUy1iOGYwN2U2Mi1hNWU0LTRlNjEtYWMyOC1lZmU4ODg1ODc1ODI&ifq) before we can accept your patches. The agreement gives Diaspora joint From be8b16c5cbd12433a56557b9607e7daf20fddddf Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 11 Oct 2010 16:32:28 -0700 Subject: [PATCH 2/9] ### looks bad --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8cde335d4..4b0157f93 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,9 @@ network. **PLEASE, DO NOT RUN IN PRODUCTION. IT IS FUN TO GET RUNNING, BUT EXPECT THINGS TO BE BROKEN** -### Installation instructions are [here](http://github.com/diaspora/diaspora/wiki/Installing-and-Running-Diaspora). +Installation instructions are [here](http://github.com/diaspora/diaspora/wiki/Installing-and-Running-Diaspora). -### Please report any bugs you see. Issue tracking is at [bugs.joindiaspora.com](http://bugs.joindiaspora.com). +Please report any bugs you see. Issue tracking is at [bugs.joindiaspora.com](http://bugs.joindiaspora.com). ## Contributing to Diaspora From a372ec33be00e5937c616ce0a5078bf315aa3dc8 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 11 Oct 2010 16:36:34 -0700 Subject: [PATCH 3/9] fixing uninitialized constant in rake task --- lib/tasks/db.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index 0b82b26a3..142b8323d 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -67,6 +67,7 @@ namespace :db do end task :move_private_key do + require File.dirname(__FILE__) + '/../../config/environment' User.all.each do |user| if user.private_key.nil? user.private_key = user.person.serialized_key From c8f864a69ba2fec18a972077faf070e31a289eb6 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 11 Oct 2010 17:22:53 -0700 Subject: [PATCH 4/9] Finish fixing move_private_key --- lib/tasks/db.rake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index 142b8323d..a71ca72f0 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -69,12 +69,12 @@ namespace :db do task :move_private_key do require File.dirname(__FILE__) + '/../../config/environment' User.all.each do |user| - if user.private_key.nil? - user.private_key = user.person.serialized_key + if user.serialized_private_key.nil? + user.serialized_private_key = user.person.serialized_key user.save person = user.person person.serialized_key = nil - person.serialized_public_key = user.encryption_key.public_key + person.serialized_public_key = user.encryption_key.public_key.to_s person.save end end From b370f4c56089d579237c73adcc5de3a02f1619e5 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 11 Oct 2010 18:41:09 -0700 Subject: [PATCH 5/9] adjust readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 4b0157f93..4f6723507 100644 --- a/README.md +++ b/README.md @@ -15,10 +15,13 @@ Please report any bugs you see. Issue tracking is at [bugs.joindiaspora.com](ht You can find an introduction to the source code [here](http://github.com/diaspora/diaspora/wiki/An-Introduction-to-the-Diaspora-Source). Bugs and pending features are on our [issue tracker](http://bugs.joindiaspora.com). Here are a few good places to start: + - Run "rake spec" to run our [Rspec](http://blog.davidchelimsky.net/2007/05/14/an-introduction-to-rspec-part-i/) unit test suite. Take a look at the pending specs, make one pass! + - Run "rake cucumber" to run our [Cucumber](http://rubylearning.com/blog/2010/10/05/outside-in-development/) integration test suite. As you can see, we need more integration tests. Pick a feature and write one! + - Take a look at the [issue tracker](http://bugs.joindiaspora.com) and pick a bug. Write a spec for it, so it's easy for another developer to fix it. From 2d57b5dc9a52d05d44d8f8d7cacb9caf43027c4b Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Mon, 11 Oct 2010 22:24:48 -0700 Subject: [PATCH 6/9] bash script to run specs against multiple versions of Ruby on CI --- ci.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ci.sh diff --git a/ci.sh b/ci.sh new file mode 100644 index 000000000..63bab3bcf --- /dev/null +++ b/ci.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +echo "*************************************************************************************************" && +echo "* ruby 1.8.7-p249 build *" && +echo "*************************************************************************************************" && +echo "" && +source /usr/local/rvm/scripts/rvm && rvm use ruby-1.8.7-p249 && bundle install && bundle exec rake ci && +echo "" && +echo "*************************************************************************************************" && +echo "* ruby 1.9.2-p0 build *" && +echo "*************************************************************************************************" && +echo "" && +source /usr/local/rvm/scripts/rvm && rvm use ruby-1.9.2-p0 && bundle install && bundle exec rake ci \ No newline at end of file From e3e76ec3e0f1d2d9cf45c14a962f94d153b7f93b Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Mon, 11 Oct 2010 22:33:44 -0700 Subject: [PATCH 7/9] correct permissions on bash script for CI --- ci.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 ci.sh diff --git a/ci.sh b/ci.sh old mode 100644 new mode 100755 From 546401cbecb81bd151a2f874833b717c3b4d6ef0 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Mon, 11 Oct 2010 22:37:58 -0700 Subject: [PATCH 8/9] Gemfile.lock is different in 1.9.2, so we need to remove it after running specs so the next pull succeeds. --- ci.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ci.sh b/ci.sh index 63bab3bcf..e631517e1 100755 --- a/ci.sh +++ b/ci.sh @@ -4,10 +4,17 @@ echo "************************************************************************** echo "* ruby 1.8.7-p249 build *" && echo "*************************************************************************************************" && echo "" && -source /usr/local/rvm/scripts/rvm && rvm use ruby-1.8.7-p249 && bundle install && bundle exec rake ci && +source /usr/local/rvm/scripts/rvm && +rvm use ruby-1.8.7-p249 && +bundle install && +bundle exec rake ci && echo "" && echo "*************************************************************************************************" && echo "* ruby 1.9.2-p0 build *" && echo "*************************************************************************************************" && echo "" && -source /usr/local/rvm/scripts/rvm && rvm use ruby-1.9.2-p0 && bundle install && bundle exec rake ci \ No newline at end of file +source /usr/local/rvm/scripts/rvm && +rvm use ruby-1.9.2-p0 && +bundle install && +bundle exec rake ci && +rm Gemfile.lock \ No newline at end of file From 19b5fb0b84aac9513a5d83b00bdc1fa8d222ad36 Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 12 Oct 2010 10:55:19 -0700 Subject: [PATCH 9/9] Delete instead of destroy to simulate a remote user --- spec/models/user/receive_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/user/receive_spec.rb b/spec/models/user/receive_spec.rb index 027645e39..581fd7d4d 100644 --- a/spec/models/user/receive_spec.rb +++ b/spec/models/user/receive_spec.rb @@ -81,7 +81,7 @@ describe User do user.raw_visible_posts.count.should == 1 person = user2.person - user2.destroy + user2.delete user.unfriend(person) user.reload