README in parlement-0.9 vs README in parlement-0.10
- old
+ new
@@ -3,14 +3,15 @@
| '_ \ / _` | '__| |/ _ \ '_ ` _ \ / _ \ '_ \| __|
| |_) | (_| | | | | __/ | | | | | __/ | | | |_
| .__/ \__,_|_| |_|\___|_| |_| |_|\___|_| |_|\__|
|_|
-I use debian, here are the commands I use to setup my machine for parlement:
+On debian, here are the commands used to setup the parlement machine:
# apt-get install postgresql
# sudo su - postgres
-# createuser /your_login/
+~ createuser /your_login/
+~ exit
# apt-get install ruby
# apt-get install libpgsql-ruby
# apt-get install irb
# apt-get install rdoc
@@ -20,10 +21,11 @@
You need to install "ruby gems":http://docs.rubygems.org
And then:
# gem install rails
# gem install redcloth
+# gem install term-ansicolor
Only if you expect to develop and do any release:
# gem install meta_project
@@ -38,56 +40,27 @@
filtering tool), define this kind of rule:
:0 c
* ^TO parlement|leparlement.org
| /home/manu/parlement/trunk/script/runner 'Mailman.receive STDIN.read'
-
Once you have everything set up (ruby, postgresql, redcloth, irb), you can
initialise and launch parlement this way:
-Go into the right folder
-~ cd parlement/trunk
+~ svn checkout svn://rubyforge.org/var/svn/parlement # Get the code source
+~ cd parlement/trunk # Go into the right folder
+~ createdb parlement_development # Create database
+~ psql -q template1 -f db/schema.sql # Initiate the db schema
+~ rake migrate # Get the db to its last version
+~ ruby lib/data_import.rb # Populate the db
+~ ruby ./script/server # Launch the server
-Create the db
-~ psql -q template1 -f db/schema.sql
-
-Populate the db
-~ ruby lib/data_import.rb
-
-Migrate the db to its last version
-~ rake migrate
-
-Launch the developement web server
-~ ruby ./script/server
-
Now you can go to http://localhost:3000 with your browser.
You can check that everything works all right on your machine with the testing suite:
~ rake
-
__ __ _
\ \ / /__| | ___ ___ _ __ ___ ___
\ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \
\ V V / __/ | (_| (_) | | | | | | __/
\_/\_/ \___|_|\___\___/|_| |_| |_|\___|
-
-
-
-
-What is below is just for future personal reference...
-
-
-# Here is my console code to reset threads from their original mails:
->> elts=Mail.find_all.select{|m|m.file and mail=TMail::Mail.parse(m.file) and reply=mail.in_reply_to and mailObject=Mail.find_by_message(reply) and mailObject.elt.id!=m.elt.parent_id}.collect{|m| {:elt=>m.elt.id, :parent=>Mail.find_by_message(TMail::Mail.parse(m.file).in_reply_to).elt.id}}; puts elts.size
->> elts.each{|e|print e[:elt], ' ', e[:parent], ' '; puts Elt.update_all("parent_id='#{e[:parent]}'", "id='#{e[:elt]}'")}; puts elts.size
-
-# To get and remove duplicate messages
->> messages=Mail.find_by_sql "select message from mails group by message having count(message) > 1"; puts messages.length
->> messages.each{ |m| mail=Mail.find_all_by_message m.message; mail.each{|m| print m.elt.id, ' ', m.elt.subject, ' ', m.elt.children.size; puts } }; puts messages.length
->> messages.each{ |m| mail=Mail.find_all_by_message m.message; mail.each_index{|i| m=mail[i]; print i, ' ', m.elt.id, ' ', m.elt.subject, ' ', m.elt.children.size; m.elt.destroy if i>0 and m.elt.children.size==0; puts } }; puts messages.length
-
-# To get all existing votes
-elts=Elt.find(:all, :conditions => ["body LIKE '%%+1%%' OR body LIKE '%%0%%' OR body LIKE '%%-1%%'"]); puts elts.size
-elts.each { |e| print '(', Regexp.last_match(1), ')' if e.body =~ /^\s*(-1|0|\+1)(\s*|$)/ }; puts; puts elts.size
-elts.each { |e| e.vote(Regexp.last_match(1), e.person) if e.body =~ /^\s*(-1|0|\+1)(\s*|$)/ }; puts; puts elts.size