parlement 0.1 → 0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +12 -701
- data/Rakefile +61 -14
- data/app/controllers/elt_controller.rb +3 -3
- data/app/controllers/person_controller.rb +13 -0
- data/app/helpers/person_helper.rb +2 -0
- data/app/views/account/_login.rhtml +1 -1
- data/app/views/account/_show.rhtml +7 -10
- data/app/views/elt/_elt.rhtml +32 -27
- data/app/views/elt/_list.rhtml +1 -1
- data/app/views/elt/new.rhtml +2 -2
- data/app/views/elt/show.rhtml +1 -11
- data/app/views/layouts/top.rhtml +5 -11
- data/app/views/person/show.rhtml +40 -0
- data/config/environment.rb +4 -1
- data/config/routes.rb +1 -0
- data/db/ROOT/CV.txt +2 -2
- data/db/ROOT/parlement/news/release0.1.txt +8 -0
- data/db/ROOT/parlement/news.txt +2 -0
- data/db/ROOT/parlement/security/anonymity.txt +17 -0
- data/db/ROOT/parlement/security.txt +13 -8
- data/db/ROOT/parlement.txt +5 -5
- data/db/ROOT/perso.txt +1 -1
- data/db/development_structure.sql +418 -0
- data/db/schema.sql +1 -1
- data/public/stylesheets/default.css +51 -28
- data/test/functional/person_controller_test.rb +18 -0
- metadata +16 -6
- data/db/ROOT/IP.txt +0 -3
- /data/app/views/{account/_help.rhtml → _help.rhtml} +0 -0
data/Rakefile
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
2
|
# for example lib/tasks/switchtower.rake, and they will automatically be available to Rake.
|
3
3
|
|
4
|
-
require(File.join(File.dirname(__FILE__), 'config', 'boot'))
|
4
|
+
#require(File.join(File.dirname(__FILE__), 'config', 'boot'))
|
5
|
+
require(File.join(File.dirname(__FILE__), 'config', 'environment'))
|
5
6
|
|
6
7
|
require 'rake'
|
7
8
|
require 'rake/testtask'
|
@@ -13,7 +14,8 @@ require 'tasks/rails'
|
|
13
14
|
require 'meta_project'
|
14
15
|
|
15
16
|
require 'rake/contrib/rubyforgepublisher'
|
16
|
-
|
17
|
+
require 'meta_project/release/freshmeat'
|
18
|
+
require 'meta_project/release/raa'
|
17
19
|
|
18
20
|
desc "Deploy basic application directories"
|
19
21
|
task :deploy => :environment do
|
@@ -27,7 +29,7 @@ end
|
|
27
29
|
|
28
30
|
|
29
31
|
PKG_NAME = "parlement"
|
30
|
-
PKG_VERSION =
|
32
|
+
PKG_VERSION = PARLEMENT_VERSION
|
31
33
|
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
32
34
|
|
33
35
|
PKG_FILES = FileList[
|
@@ -39,7 +41,7 @@ spec = Gem::Specification.new do |s|
|
|
39
41
|
## Basic information.
|
40
42
|
s.name = PKG_NAME
|
41
43
|
s.version = PKG_VERSION
|
42
|
-
s.summary = "
|
44
|
+
s.summary = "Trusted Direct Democracy on a forum"
|
43
45
|
s.description = <<EOF
|
44
46
|
This is a forum and mailing list project, which aims to be a complete Direct
|
45
47
|
Democracy implementation where everybody can propose polls, vote on them, or
|
@@ -78,6 +80,7 @@ Rake::GemPackageTask.new(spec) do |pkg|
|
|
78
80
|
#pkg.package_files.include("*")
|
79
81
|
end
|
80
82
|
|
83
|
+
|
81
84
|
# Support Tasks ------------------------------------------------------
|
82
85
|
|
83
86
|
desc "Look for TODO and FIXME tags in the code"
|
@@ -87,25 +90,53 @@ task :todo do
|
|
87
90
|
end
|
88
91
|
end
|
89
92
|
|
90
|
-
task :release => [:verify_env_vars, :release_files, :publish_doc, :publish_news, :tag]
|
93
|
+
#task :release => [:verify_env_vars, :release_files, :publish_doc, :publish_news, :tag]
|
94
|
+
task :release => [:verify_env_vars, :release_files, :publish_news]
|
91
95
|
|
92
96
|
task :verify_env_vars do
|
97
|
+
if not ENV["RUBYFORGE_USER"]
|
98
|
+
print "rubyforge.org's user: "
|
99
|
+
ENV["RUBYFORGE_USER"] = STDIN.gets.chomp
|
100
|
+
end
|
101
|
+
|
102
|
+
# This echos password to shell which is a bit sucky
|
103
|
+
if ENV["RUBYFORGE_PASSWORD"]
|
104
|
+
password = ENV["RUBYFORGE_PASSWORD"]
|
105
|
+
else
|
106
|
+
print "#{ENV['RUBYFORGE_USER']}@rubyforge.org's password: "
|
107
|
+
ENV["RUBYFORGE_PASSWORD"] = STDIN.gets.chomp
|
108
|
+
end
|
109
|
+
|
93
110
|
raise "RUBYFORGE_USER environment variable not set!" unless ENV['RUBYFORGE_USER']
|
94
111
|
raise "RUBYFORGE_PASSWORD environment variable not set!" unless ENV['RUBYFORGE_PASSWORD']
|
95
|
-
|
96
|
-
|
112
|
+
|
113
|
+
if not ENV["FRESHMEAT_USER"]
|
114
|
+
print "freshmeat user: "
|
115
|
+
ENV["FRESHMEAT_USER"] = STDIN.gets.chomp
|
116
|
+
end
|
117
|
+
|
118
|
+
# This echos password to shell which is a bit sucky
|
119
|
+
if ENV["FRESHMEAT_PASSWORD"]
|
120
|
+
password = ENV["FRESHMEAT_PASSWORD"]
|
121
|
+
else
|
122
|
+
print "freshmeat's password: "
|
123
|
+
ENV["FRESHMEAT_PASSWORD"] = STDIN.gets.chomp
|
124
|
+
end
|
125
|
+
|
97
126
|
end
|
98
127
|
|
99
128
|
task :publish_doc do
|
100
|
-
publisher = Rake::RubyForgePublisher.new(
|
129
|
+
publisher = Rake::RubyForgePublisher.new(PKG_NAME, ENV['RUBYFORGE_USER'])
|
101
130
|
publisher.upload
|
102
131
|
end
|
103
132
|
|
104
133
|
desc "Release files on RubyForge"
|
105
134
|
task :release_files => [:gem] do
|
106
|
-
release_files = FileList[ "pkg/#{PKG_FILE_NAME}.gem"
|
135
|
+
release_files = FileList[ "pkg/#{PKG_FILE_NAME}.gem",
|
136
|
+
"pkg/#{PKG_FILE_NAME}.tgz",
|
137
|
+
"pkg/#{PKG_FILE_NAME}.zip" ]
|
107
138
|
|
108
|
-
Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new(
|
139
|
+
Rake::XForge::Release.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |release|
|
109
140
|
# Never hardcode user name and password in the Rakefile!
|
110
141
|
release.user_name = ENV['RUBYFORGE_USER']
|
111
142
|
release.password = ENV['RUBYFORGE_PASSWORD']
|
@@ -115,15 +146,32 @@ task :release_files => [:gem] do
|
|
115
146
|
end
|
116
147
|
end
|
117
148
|
|
118
|
-
|
149
|
+
|
150
|
+
desc "Publish news"
|
119
151
|
task :publish_news => [:gem] do
|
120
|
-
|
152
|
+
Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::RubyForge.new(PKG_NAME)) do |news|
|
153
|
+
# Never hardcode user name and password in the Rakefile!
|
154
|
+
news.user_name = ENV['RUBYFORGE_USER']
|
155
|
+
news.password = ENV['RUBYFORGE_PASSWORD']
|
156
|
+
end
|
121
157
|
|
122
|
-
|
158
|
+
fm = DevTools::Freshmeat::FreshmeatService.new(ENV['FRESHMEAT_USER'], ENV['FRESHMEAT_PASSWORD'])
|
159
|
+
fm.get_project_list.each do |p|
|
160
|
+
puts p
|
161
|
+
branches = fm.get_branch_list( p.shortName )
|
162
|
+
puts branches.inspect
|
163
|
+
release = fm.get_release( p.shortName, branches[0], p.version )
|
164
|
+
puts release
|
165
|
+
end
|
166
|
+
puts fm.logout
|
167
|
+
|
168
|
+
"""
|
169
|
+
Rake::XForge::NewsPublisher.new(MetaProject::Project::XForge::Fresh.new(PKG_NAME)) do |news|
|
123
170
|
# Never hardcode user name and password in the Rakefile!
|
124
171
|
news.user_name = ENV['RUBYFORGE_USER']
|
125
172
|
news.password = ENV['RUBYFORGE_PASSWORD']
|
126
173
|
end
|
174
|
+
"""
|
127
175
|
end
|
128
176
|
|
129
177
|
desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
|
@@ -133,4 +181,3 @@ task :tag do
|
|
133
181
|
sh %{cvs tag #{reltag}}
|
134
182
|
end
|
135
183
|
|
136
|
-
|
@@ -27,7 +27,7 @@ class EltController < ApplicationController
|
|
27
27
|
|
28
28
|
def list
|
29
29
|
@elt = Elt.find(params[:id]) if @elt == nil
|
30
|
-
render :partial => 'list', :locals => { :elt => @elt }
|
30
|
+
render :partial => '/elt/list', :locals => { :elt => @elt }
|
31
31
|
end
|
32
32
|
|
33
33
|
def rss
|
@@ -67,10 +67,10 @@ class EltController < ApplicationController
|
|
67
67
|
#redirect_to :action => 'top', :id => @elt.parent_id
|
68
68
|
#render_component(:action => 'show', :id => @elt.id )
|
69
69
|
|
70
|
-
render :partial => 'elt', :locals => { :elt => @elt, :eltTop => false }
|
70
|
+
render :partial => '/elt/elt', :locals => { :elt => @elt, :eltTop => false }
|
71
71
|
else
|
72
72
|
flash[:notice] = 'Error'
|
73
|
-
render :action => 'new'
|
73
|
+
render :controller => 'elt', :action => 'new'
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
class PersonController < ApplicationController
|
2
|
+
layout 'top'
|
3
|
+
model :person
|
4
|
+
|
5
|
+
def show
|
6
|
+
@person = Person.find(params[:id])
|
7
|
+
@title = @person.name+' (parlement)'
|
8
|
+
|
9
|
+
rescue ActiveRecord::RecordNotFound => e
|
10
|
+
flash[:error] = "Person '#{params[:id]}' does not exist"
|
11
|
+
redirect_to '/'
|
12
|
+
end
|
13
|
+
end
|
@@ -5,19 +5,16 @@
|
|
5
5
|
<%= error_messages_for 'person' if @person %>
|
6
6
|
<%= error_messages_for 'user' if @user %>
|
7
7
|
|
8
|
-
<% if @session[:person]
|
9
|
-
<% if @session[:person]
|
10
|
-
and @session[:person].name != '' %>
|
8
|
+
<% if @session[:person] %>
|
9
|
+
<% if @session[:person].name and @session[:person].name != '' %>
|
11
10
|
<div class="author">
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<% end %>
|
11
|
+
<<%= link_to(@session[:person].name,
|
12
|
+
:controller => 'person',
|
13
|
+
:action => 'show',
|
14
|
+
:id => @session[:person]) %>>
|
17
15
|
</div>
|
18
16
|
<% end %>
|
19
17
|
|
20
|
-
|
21
18
|
<div class="logout">
|
22
19
|
<%= link_to_remote('(X)',
|
23
20
|
:update => divId,
|
@@ -26,6 +23,6 @@
|
|
26
23
|
</div>
|
27
24
|
<% else %>
|
28
25
|
|
29
|
-
<%= render :partial => 'account/login', :locals => { :divId => divId } %>
|
26
|
+
<%= render :partial => '/account/login', :locals => { :divId => divId } %>
|
30
27
|
<% end %>
|
31
28
|
|
data/app/views/elt/_elt.rhtml
CHANGED
@@ -1,41 +1,48 @@
|
|
1
1
|
<% eltSubsNb = elt.children.count if eltSubsNb == nil %>
|
2
2
|
|
3
|
+
<% if elt.id and not elt.subject.include? elt.parent.subject and not eltTop %>
|
4
|
+
<br />
|
5
|
+
<% end %>
|
6
|
+
|
3
7
|
<div class="elt" id="elt_<%= elt.id %>">
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<% end %>
|
13
|
-
</div>
|
14
|
-
<% end %>
|
8
|
+
<div class="author">
|
9
|
+
<% if elt.person %>
|
10
|
+
<<%= link_to(elt.person.name,
|
11
|
+
:controller => 'person', :action => 'show', :id => elt.person) %>>
|
12
|
+
<% elsif elt.parent_id != 'ROOT' and elt.subject.include? elt.parent.subject %>
|
13
|
+
<<%= ANONYMOUS_POSTER %>>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
15
16
|
|
16
17
|
<div class="eltInfo" title="<%= elt.created_on %>">
|
17
18
|
<!--
|
18
19
|
<= link_to('@', :action => 'raw_elt', :id => elt) if elt.mail != nil >
|
19
20
|
-->
|
20
|
-
|
21
21
|
<% if elt.id and elt.children.count == 0 %>
|
22
22
|
<%= link_to_remote('>>',
|
23
23
|
:update => 'eltNew_'+elt.id.to_s,
|
24
|
-
:url => { :action => 'new', :id => elt },
|
24
|
+
:url => { :controller => 'elt', :action => 'new', :id => elt },
|
25
25
|
:loaded => visual_effect(:BlindDown, 'eltNew_'+elt.id.to_s)+
|
26
26
|
visual_effect(:BlindDown, 'eltSubsClose_'+elt.id.to_s)) %>
|
27
27
|
<% end %>
|
28
28
|
</div>
|
29
29
|
|
30
|
-
<% if elt.parent_id == 'ROOT' or
|
31
|
-
|
30
|
+
<% if elt.parent_id == 'ROOT' or eltTop \
|
31
|
+
or not elt.subject.include? elt.parent.subject %>
|
32
|
+
<% if elt.parent_id != 'ROOT' %>
|
33
|
+
<span class="created_on">
|
34
|
+
<%= elt.created_on.strftime('%d/%m/%y %H:%M') %>
|
35
|
+
</span>
|
36
|
+
<% end %>
|
37
|
+
|
38
|
+
<<%= eltTop ? 'h1' : 'h2' %>>
|
32
39
|
<% if elt.id %>
|
33
40
|
<%= link_to(textilize_without_paragraph(elt.subject),
|
34
41
|
:controller => 'elt', :action => 'show', :id => elt) %>
|
35
42
|
<% else %>
|
36
43
|
<%= textilize_without_paragraph(elt.subject) %>
|
37
44
|
<% end %>
|
38
|
-
|
45
|
+
</<%= eltTop ? 'h1' : 'h2' %>>
|
39
46
|
<% end %>
|
40
47
|
|
41
48
|
<div class="eltBody">
|
@@ -53,14 +60,14 @@
|
|
53
60
|
class="eltMore" id="eltMore_<%= elt.id %>">
|
54
61
|
<%= link_to_remote(eltSubsNb.to_s+' more',
|
55
62
|
:update => 'eltSubs_'+elt.id.to_s,
|
56
|
-
:url => { :action => 'list', :id => elt },
|
63
|
+
:url => { :controller => 'elt', :action => 'list', :id => elt },
|
57
64
|
:loading => visual_effect(:SwitchOff, 'eltMore_'+elt.id.to_s)+
|
58
65
|
visual_effect(:BlindDown, 'eltSubsClose_'+elt.id.to_s),
|
59
66
|
:loaded => visual_effect(:BlindDown, 'eltSubs_'+elt.id.to_s)) %>
|
60
67
|
|
61
68
|
<%= link_to_remote('Add >>',
|
62
69
|
:update => 'eltNew_'+elt.id.to_s,
|
63
|
-
:url => { :action => 'new', :id => elt },
|
70
|
+
:url => { :controller => 'elt', :action => 'new', :id => elt },
|
64
71
|
:loaded => visual_effect(:BlindDown, 'eltNew_'+elt.id.to_s)+
|
65
72
|
visual_effect(:BlindDown, 'eltSubsClose_'+elt.id.to_s)) %>
|
66
73
|
</div>
|
@@ -68,7 +75,7 @@
|
|
68
75
|
<div style="display:<%= (eltTop or eltSubsNb == 1) ? '' : 'none' %>"
|
69
76
|
class="eltSubs" id="eltSubs_<%= elt.id %>">
|
70
77
|
<% if eltTop or eltSubsNb == 1 %>
|
71
|
-
<%= render :partial => 'list', :locals => { :elt => elt } %>
|
78
|
+
<%= render :partial => '/elt/list', :locals => { :elt => elt } %>
|
72
79
|
<% end %>
|
73
80
|
</div>
|
74
81
|
|
@@ -86,18 +93,16 @@
|
|
86
93
|
visual_effect(:BlindUp, 'eltSubsClose_'+elt.id.to_s)+
|
87
94
|
visual_effect(:BlindDown, 'eltMore_'+elt.id.to_s)) %>
|
88
95
|
|
89
|
-
<% if elt.person
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
<<%= elt.person.name %>>
|
95
|
-
<% end %>
|
96
|
+
<% if elt.person %>
|
97
|
+
<<%= link_to(elt.person.name,
|
98
|
+
:controller => 'person', :action => 'show', :id => elt.person) %>>
|
99
|
+
<% elsif elt.parent_id != 'ROOT' and elt.subject.include? elt.parent.subject %>
|
100
|
+
<<%= ANONYMOUS_POSTER %>>
|
96
101
|
<% end %>
|
97
102
|
|
98
103
|
<%= link_to_remote('Add >>',
|
99
104
|
:update => 'eltNew_'+elt.id.to_s,
|
100
|
-
:url => { :action => 'new', :id => elt },
|
105
|
+
:url => { :controller => 'elt', :action => 'new', :id => elt },
|
101
106
|
:loaded => visual_effect(:BlindDown, 'eltNew_'+elt.id.to_s)+
|
102
107
|
visual_effect(:BlindDown, 'eltSubsClose_'+elt.id.to_s)) %>
|
103
108
|
</div>
|
data/app/views/elt/_list.rhtml
CHANGED
@@ -22,7 +22,7 @@ e = Elt.find_all("parent_id = '#{elt.id}'",
|
|
22
22
|
:loading => visual_effect(:BlindDown, 'eltSubsClose_'+elt.id.to_s),
|
23
23
|
:loaded => visual_effect(:BlindDown, 'eltSubs_'+elt.id.to_s)) if e_pages.current.previous %>
|
24
24
|
|
25
|
-
<%= render :partial => 'elt',
|
25
|
+
<%= render :partial => '/elt/elt',
|
26
26
|
:collection => e.reverse,
|
27
27
|
:locals => { :eltTop => false } %>
|
28
28
|
|
data/app/views/elt/new.rhtml
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
<h2>
|
25
25
|
<%= text_field 'elt', 'subject', :style => 'font-weight:bolder' %>
|
26
26
|
|
27
|
-
<%= render :partial => '
|
27
|
+
<%= render :partial => '/help',
|
28
28
|
:locals => { :divId => 'title'+@elt.parent_id, :content => '
|
29
29
|
This is the title of your proposition.
|
30
30
|
<br/>
|
@@ -47,7 +47,7 @@
|
|
47
47
|
:loaded => visual_effect(:BlindDown, 'eltNewPreview_'+@elt.parent_id)) %>
|
48
48
|
<%= submit_tag 'Propose' %>
|
49
49
|
|
50
|
-
<%= render :partial => '
|
50
|
+
<%= render :partial => '/help',
|
51
51
|
:locals => { :divId => 'body'+@elt.parent_id, :content => '
|
52
52
|
_<em>emphasis</em>_ *<strong>strong</strong>* -<span
|
53
53
|
style="text-decoration:line-through;">strike-through</span>- +added+
|
data/app/views/elt/show.rhtml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="sidebar"
|
1
|
+
<div class="sidebar">
|
2
2
|
<div class="box">
|
3
3
|
<% if @elt.children.count > 0 %>
|
4
4
|
<div class="boxTitle">Titres</div>
|
@@ -18,14 +18,6 @@
|
|
18
18
|
<%= link_to image_tag("/images/webfeed.gif"),
|
19
19
|
:action => 'rss', :id => @elt %>
|
20
20
|
</div>
|
21
|
-
|
22
|
-
<!--
|
23
|
-
<a href="http://echarp.dyndns.org/perso/image/echarp.jpg"
|
24
|
-
title="Oui oui, je fais mon style ;)">
|
25
|
-
<img src="/perso/image/echarpSmall.jpg" style="margin-top:1em"/>
|
26
|
-
<img src="http://echarp.dyndns.org/perso/CV/20030520echarp.jpg"/>
|
27
|
-
</a>
|
28
|
-
-->
|
29
21
|
</div>
|
30
22
|
|
31
23
|
<% @flash.each do |key, value| %>
|
@@ -42,5 +34,3 @@
|
|
42
34
|
<%= render :partial => 'elt', :layout => 'top',
|
43
35
|
:locals => { :elt => @elt, :eltTop => true } %>
|
44
36
|
|
45
|
-
<div class="version">version <%= PARLEMENT_VERSION %></div>
|
46
|
-
|
data/app/views/layouts/top.rhtml
CHANGED
@@ -1,16 +1,10 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
3
|
|
4
4
|
<html>
|
5
5
|
<head>
|
6
6
|
<title><%= @title %></title>
|
7
|
-
<!--<title><%= controller.action_name %></title>-->
|
8
|
-
|
9
7
|
<%= stylesheet_link_tag 'default' %>
|
10
|
-
<!--
|
11
|
-
<%= stylesheet_link_tag 'scaffold' %>
|
12
|
-
<%= javascript_include_tag "/javascripts/live_tree.js" %>
|
13
|
-
-->
|
14
8
|
<%= javascript_include_tag "/javascripts/prototype" %>
|
15
9
|
<%= javascript_include_tag "/javascripts/scriptaculous" %>
|
16
10
|
|
@@ -28,7 +22,7 @@
|
|
28
22
|
|
29
23
|
<body>
|
30
24
|
<div class="sidebar">
|
31
|
-
<a class="title" href="
|
25
|
+
<a class="title" href="http://leparlement.org">Parlement</a>
|
32
26
|
|
33
27
|
<div class="signets">
|
34
28
|
<a href="http://rubyforge.org/projects/parlement">forge</a>
|
@@ -38,8 +32,8 @@
|
|
38
32
|
|
39
33
|
<%= @content_for_layout %>
|
40
34
|
|
41
|
-
|
42
|
-
|
35
|
+
<a href="<%= url_for :controller => 'elt', :action => 'show', :id => '' %>"
|
36
|
+
class="version">version <%= PARLEMENT_VERSION %></a>
|
43
37
|
</body>
|
44
38
|
</html>
|
45
39
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
<h1><%= @person.name %></h1>
|
2
|
+
|
3
|
+
<p>Created on <%= @person.created_on %></p>
|
4
|
+
|
5
|
+
|
6
|
+
<p>Posts made by <%= @person.name %>
|
7
|
+
<%= render :partial => '/help',
|
8
|
+
:locals => { :divId => 'body'+@person.id, :content => '
|
9
|
+
posts can be displayed more than once depending on their occurence in sub
|
10
|
+
threads
|
11
|
+
' } %></p>
|
12
|
+
|
13
|
+
<%
|
14
|
+
# TODO get the count from the parent element call
|
15
|
+
e_pages = ActionController::Pagination::Paginator.new(
|
16
|
+
self, @person.elts.count, PAGE_ELT_LENGTH, @params['page'])
|
17
|
+
e = Elt.find_all("person_id = '#{@person.id}'",
|
18
|
+
'created_on DESC', e_pages.current.to_sql)
|
19
|
+
%>
|
20
|
+
|
21
|
+
<%= link_to_remote('< Previous',
|
22
|
+
:update => 'eltSubs_'+elt.id.to_s,
|
23
|
+
:url => { :action => 'list', :id => elt, :page => e_pages.current.next },
|
24
|
+
:loading => visual_effect(:BlindDown, 'eltSubsClose_'+elt.id.to_s),
|
25
|
+
:loaded => visual_effect(:BlindDown, 'eltSubs_'+elt.id.to_s)) if e_pages.current.next %>
|
26
|
+
|
27
|
+
<span style="display:<%= e_pages.length > 1 ? '' : 'none'%>" class="pageCount">
|
28
|
+
(<%= e_pages.length-e_pages.current.to_i+1 %>/<%= e_pages.length %>)
|
29
|
+
</span>
|
30
|
+
|
31
|
+
<%= link_to_remote('Next >',
|
32
|
+
:update => 'eltSubs_'+elt.id.to_s,
|
33
|
+
:url => { :action => 'list', :id => elt, :page => e_pages.current.previous },
|
34
|
+
:loading => visual_effect(:BlindDown, 'eltSubsClose_'+elt.id.to_s),
|
35
|
+
:loaded => visual_effect(:BlindDown, 'eltSubs_'+elt.id.to_s)) if e_pages.current.previous %>
|
36
|
+
|
37
|
+
<%= render :partial => '/elt/elt',
|
38
|
+
:collection => e.reverse,
|
39
|
+
:locals => { :eltTop => false } %>
|
40
|
+
|
data/config/environment.rb
CHANGED
@@ -58,10 +58,13 @@ require 'rails_file_column'
|
|
58
58
|
require 'jcode'
|
59
59
|
$KCODE = 'u'
|
60
60
|
|
61
|
+
PARLEMENT_VERSION='0.2'
|
62
|
+
|
61
63
|
# How many elements are displayed at once
|
62
64
|
PAGE_ELT_LENGTH = 20
|
63
65
|
|
64
|
-
|
66
|
+
# What is the name of a quick anonymous poster
|
67
|
+
ANONYMOUS_POSTER = 'anon'
|
65
68
|
|
66
69
|
require 'environments/user_environment'
|
67
70
|
|
data/config/routes.rb
CHANGED
@@ -11,6 +11,7 @@ ActionController::Routing::Routes.draw do |map|
|
|
11
11
|
# map.connect '', :controller => "welcome"
|
12
12
|
|
13
13
|
map.connect '', :controller => 'elt', :action => 'show', :id => 'parlement'
|
14
|
+
map.connect 'index.rss', :controller => 'elt', :action => 'rss', :id => 'parlement'
|
14
15
|
map.connect ':id', :controller => 'elt', :action => 'show', :id => 'parlement'
|
15
16
|
map.connect ':id/index.rss', :controller => 'elt', :action => 'rss'
|
16
17
|
|
data/db/ROOT/CV.txt
CHANGED
@@ -50,8 +50,8 @@ Langages : java, ruby, J2EE, XML/XSLT, SQL, UML.
|
|
50
50
|
Bases de donn�es : "PostgreSQL":http://www.postgresql.org,
|
51
51
|
"HsqlDB":http://hsqldb.org, "MySQL":http://www.mysql.com.
|
52
52
|
|
53
|
-
Frameworks : "Cocoon":http://cocoon.apache.org, "
|
54
|
-
|
53
|
+
Frameworks : "Cocoon":http://cocoon.apache.org, "Ruby on
|
54
|
+
Rails":http://rubyonrails.org, "struts":http://struts.apache.org.
|
55
55
|
|
56
56
|
Logiciels : "JBoss":http://jboss.org, "JOnAS":http://jonas.objectweb.org,
|
57
57
|
"Tomcat":http://tomcat.apache.org, "Jetty":http://jetty.mortbay.org,
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Anonymity
|
2
|
+
|
3
|
+
In the virtual world, it is impossible to be totally anonymous while still
|
4
|
+
ensuring that one person can only vote once. Because at one moment or another
|
5
|
+
you need to link a vote to a person.
|
6
|
+
|
7
|
+
In the physical world this connection is lost in the voting box. But on
|
8
|
+
internet everything can be traced, no matter what you do you can never be
|
9
|
+
totally certain that a relation is lost.
|
10
|
+
|
11
|
+
So to have anonymity a scheme can be constructed using trust. Trust that a
|
12
|
+
voter can have into a third party of *his* choice. It is a trustee who will
|
13
|
+
vouch for the voter's reinscription on the electoral list using a pseudonym.
|
14
|
+
|
15
|
+
Thus you have two identities, the real person, knwown and accounted on the
|
16
|
+
electoral list, but unable to vote because she is marked as anonymous. And a
|
17
|
+
pseudonym.
|
@@ -3,8 +3,8 @@ Security
|
|
3
3
|
Of course a large scale Direct Democracy relying on electrons is difficult to
|
4
4
|
accept, due to one very valid reason: we can't trust internet.
|
5
5
|
|
6
|
-
It is so easy to change rules, to break into
|
7
|
-
|
6
|
+
It is so easy to change rules, to break into servers, to subvert data. Can we
|
7
|
+
ever use it for such an important things as politics?
|
8
8
|
|
9
9
|
There is a way, a simple one relying on three elements:
|
10
10
|
* p2p servers
|
@@ -18,17 +18,22 @@ When you cast a vote you sign it with your private key.
|
|
18
18
|
Anybody can setup electoral lists that contain public keys.
|
19
19
|
|
20
20
|
|
21
|
-
There you have it. Basic isn't it? Of course all data is
|
22
|
-
to the point
|
23
|
-
the basic and simplest setup).
|
21
|
+
There you have it. Basic isn't it? Of course it requires that *all* data is
|
22
|
+
totally transparent, to the point it can be replicated among any number of
|
23
|
+
server. No anonimity (in the basic and simplest setup).
|
24
24
|
|
25
25
|
pgp signatures being what they are, can not be subverted (nowadays and in the
|
26
26
|
near future), thus the votes can take any path available to them. They can be
|
27
27
|
cast from any server. But to be sure that one's vote is not simply erased from
|
28
|
-
that first node, it is recommended to check that it has been replicated to
|
29
|
-
other ones. Or better, to send it directly to different servers.
|
28
|
+
that first node, it is recommended to check that it has been replicated to a
|
29
|
+
few other ones. Or better, to send it directly to different servers.
|
30
30
|
|
31
|
-
There can be any number of participants, votes
|
31
|
+
There can be any number of participants, votes or issues, but at the end of the
|
32
32
|
day the results are calculated using one electoral list and on one server.
|
33
33
|
Everybody can check if thoses results are valid or not.
|
34
34
|
|
35
|
+
This doesn't bring 100%% security, no such thing can exist even in the physical
|
36
|
+
world, but it can bring trust. An active trust, if you care about the issues,
|
37
|
+
the process, the participants, you can supervise it and make sure it goes as it
|
38
|
+
should. The more eyes, the more trust.
|
39
|
+
|
data/db/ROOT/parlement.txt
CHANGED
@@ -5,7 +5,7 @@ unities: unity of time, unity of place and unity of object. It's a principle
|
|
5
5
|
taking its roots in ancient Greece, and it certainly contributes to the awe we
|
6
6
|
can feel when comes election day. But it is also a limitation...
|
7
7
|
|
8
|
-
<
|
8
|
+
<table align="center"><tr><td>
|
9
9
|
|
10
10
|
In the physical world we vote on:
|
11
11
|
|
@@ -13,13 +13,11 @@ In the physical world we vote on:
|
|
13
13
|
* one place
|
14
14
|
* one issue
|
15
15
|
|
16
|
-
</
|
17
|
-
|
18
|
-
<div style="float:left;margin-top:3em;margin-right:3em;margin-bottom:1em">
|
16
|
+
</td><td style="padding-right:3em;" vertical-align="center">
|
19
17
|
|
20
18
|
=>
|
21
19
|
|
22
|
-
</
|
20
|
+
</td><td>
|
23
21
|
|
24
22
|
In Internet we can vote:
|
25
23
|
|
@@ -27,6 +25,8 @@ In Internet we can vote:
|
|
27
25
|
* any where
|
28
26
|
* any issue
|
29
27
|
|
28
|
+
</td></tr></table>
|
29
|
+
|
30
30
|
It is us, individuals, citizens, who choose what we want to do.
|
31
31
|
|
32
32
|
These three freedom have consequences, for example if you can vote anytime, you
|