parlement 0.2 → 0.3
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 +14 -4
- data/README +25 -5
- data/Rakefile +21 -21
- data/app/controllers/account_controller.rb +5 -1
- data/app/controllers/elt_controller.rb +7 -10
- data/app/controllers/person_controller.rb +9 -0
- data/app/controllers/subscriber_controller.rb +21 -0
- data/app/helpers/elt_helper.rb +25 -13
- data/app/helpers/mailman.rb +9 -92
- data/app/helpers/subscriber_helper.rb +2 -0
- data/app/models/attachment.rb +2 -0
- data/app/models/elt.rb +64 -2
- data/app/models/mail.rb +198 -0
- data/app/models/mail_notify.rb +63 -0
- data/app/models/person.rb +8 -1
- data/app/views/account/_login.rhtml +31 -28
- data/app/views/account/_show.rhtml +4 -4
- data/app/views/elt/_elt.rhtml +23 -28
- data/app/views/elt/_list.rhtml +6 -2
- data/app/views/elt/new.rhtml +1 -1
- data/app/views/elt/show.rhtml +32 -10
- data/app/views/layouts/top.rhtml +16 -10
- data/app/views/mail_notify/publish.text.html.rhtml +46 -0
- data/app/views/mail_notify/publish.text.plain.rhtml +2 -0
- data/app/views/person/_listElts.rhtml +33 -0
- data/app/views/person/show.rhtml +21 -19
- data/config/boot.rb +2 -0
- data/config/environment.rb +19 -13
- data/config/environments/development.rb +3 -1
- data/config/environments/production.rb +2 -0
- data/config/environments/test.rb +2 -0
- data/config/routes.rb +5 -2
- data/db/ROOT/mail.txt +2 -0
- data/db/ROOT/parlement/news/release0.2.txt +8 -0
- data/db/ROOT/parlement/news/release0.3.txt +11 -0
- data/db/ROOT/parlement/test.txt +6 -1
- data/db/ROOT/parlement.txt +23 -30
- data/db/ROOT/perso.txt +17 -18
- data/db/development_structure.sql +133 -217
- data/db/schema.rb +83 -0
- data/db/schema.sql +11 -15
- data/lib/data_import.rb +3 -1
- data/public/attachment/file/architecture.png +0 -0
- data/public/attachment/file/architecture.svg +8972 -0
- data/public/attachment/file/security.svg +8960 -0
- data/public/images/Sleep-Deprivation-5.JPG +0 -0
- data/public/images/eltBackground.png +0 -0
- data/public/images/eltBackground.svg +89 -0
- data/public/images/orange_by_darren_Hester_350o.jpg +0 -0
- data/public/images/rails.png +0 -0
- data/public/images/smile.png +0 -0
- data/public/images/smile.svg +257 -0
- data/public/images/world.png +0 -0
- data/public/images/world.svg +170 -0
- data/public/javascripts/controls.js +30 -1
- data/public/javascripts/dragdrop.js +210 -145
- data/public/javascripts/effects.js +261 -399
- data/public/javascripts/ie7.js +6 -0
- data/public/javascripts/prototype.js +131 -72
- data/public/oldindex.html +270 -71
- data/public/stylesheets/default.css +189 -215
- data/script/about +1 -1
- data/script/breakpointer +1 -1
- data/script/console +1 -1
- data/script/destroy +1 -1
- data/script/generate +1 -1
- data/script/performance/benchmarker +1 -1
- data/script/performance/profiler +1 -1
- data/script/plugin +1 -1
- data/script/process/reaper +1 -1
- data/script/process/spawner +1 -1
- data/script/process/spinner +1 -1
- data/script/runner +1 -1
- data/script/server +1 -1
- data/test/fixtures/elts.yml +2 -0
- data/test/fixtures/mail/mail_ruby +27 -0
- data/test/fixtures/mail/mail_rubyChild +28 -0
- data/test/fixtures/mail/mail_rubyWithAttachment +7932 -0
- data/test/fixtures/mail/mail_rubyWithSubject +27 -0
- data/test/fixtures/mails.yml +7 -1
- data/test/fixtures/people.yml +5 -0
- data/test/fixtures/subscribers.yml +11 -0
- data/test/functional/account_controller_test.rb +38 -37
- data/test/functional/subscriber_controller_test.rb +128 -0
- data/test/test_helper.rb +44 -0
- data/test/unit/attachment_test.rb +1 -1
- data/test/unit/elt_test.rb +3 -2
- data/test/unit/mail_notify_test.rb +37 -0
- data/test/unit/mail_test.rb +124 -1
- data/test/unit/notifier_test.rb +0 -14
- data/test/unit/person_test.rb +2 -1
- data/test/unit/subscriber_test.rb +35 -0
- data/test/unit/user_test.rb +3 -3
- data/vendor/plugins/file_column/CHANGELOG +64 -0
- data/vendor/plugins/file_column/README +54 -0
- data/vendor/plugins/file_column/Rakefile +36 -0
- data/vendor/plugins/file_column/TODO +6 -0
- data/vendor/plugins/file_column/init.rb +12 -0
- data/vendor/plugins/file_column/lib/file_column.rb +719 -0
- data/vendor/plugins/file_column/lib/file_column_helper.rb +145 -0
- data/vendor/plugins/file_column/lib/file_compat.rb +28 -0
- data/vendor/plugins/file_column/lib/magick_file_column.rb +188 -0
- data/vendor/plugins/file_column/lib/validations.rb +112 -0
- data/vendor/plugins/file_column/test/abstract_unit.rb +90 -0
- data/vendor/plugins/file_column/test/connection.rb +17 -0
- data/vendor/plugins/file_column/test/file_column_helper_test.rb +97 -0
- data/vendor/plugins/file_column/test/file_column_test.rb +630 -0
- data/vendor/plugins/file_column/test/fixtures/entry.rb +32 -0
- data/vendor/plugins/file_column/test/fixtures/invalid-image.jpg +1 -0
- data/vendor/plugins/file_column/test/fixtures/kerb.jpg +0 -0
- data/vendor/plugins/file_column/test/fixtures/mysql.sql +25 -0
- data/vendor/plugins/file_column/test/fixtures/schema.rb +10 -0
- data/vendor/plugins/file_column/test/fixtures/skanthak.png +0 -0
- data/vendor/plugins/file_column/test/magick_test.rb +251 -0
- data/vendor/plugins/file_column/test/magick_view_only_test.rb +21 -0
- data/vendor/plugins/guid/README.TXT +19 -0
- data/vendor/plugins/guid/init.rb +23 -0
- data/vendor/plugins/guid/lib/usesguid.rb +37 -0
- data/vendor/plugins/guid/lib/uuid22.rb +43 -0
- data/vendor/plugins/guid/lib/uuidtools.rb +565 -0
- metadata +83 -15
- data/db/ROOT/CV.txt +0 -166
- data/lib/file_column.rb +0 -263
- data/lib/file_column_helper.rb +0 -45
- /data/{lib → vendor/plugins/file_column/lib}/rails_file_column.rb +0 -0
data/db/schema.sql
CHANGED
|
@@ -19,16 +19,15 @@ CREATE DATABASE parlement_development
|
|
|
19
19
|
\connect parlement_development manu
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
CREATE SEQUENCE people_id_seq;
|
|
23
22
|
CREATE TABLE people (
|
|
24
|
-
id text PRIMARY KEY
|
|
23
|
+
id text PRIMARY KEY,
|
|
25
24
|
created_on timestamp with time zone NOT NULL DEFAULT now(),
|
|
26
25
|
name TEXT UNIQUE,
|
|
27
26
|
email text
|
|
28
27
|
);
|
|
29
28
|
|
|
30
29
|
INSERT INTO people (id, name, email)
|
|
31
|
-
VALUES ('echarp', 'echarp', 'manu@
|
|
30
|
+
VALUES ('echarp', 'echarp', 'manu@localhost');
|
|
32
31
|
|
|
33
32
|
--CREATE TABLE "users" (
|
|
34
33
|
-- id SERIAL PRIMARY KEY,
|
|
@@ -69,9 +68,8 @@ CREATE TABLE "users" (
|
|
|
69
68
|
--VALUES (0, 'echarp', 'manu@echarp.org', '5640f07556079f0f2259f9ad12c6758515dedf94');
|
|
70
69
|
|
|
71
70
|
|
|
72
|
-
CREATE SEQUENCE elts_id_seq;
|
|
73
71
|
CREATE TABLE elts (
|
|
74
|
-
id text PRIMARY KEY
|
|
72
|
+
id text PRIMARY KEY,
|
|
75
73
|
parent_id text REFERENCES elts,
|
|
76
74
|
position float,
|
|
77
75
|
created_on timestamp with time zone NOT NULL DEFAULT now(),
|
|
@@ -82,44 +80,42 @@ CREATE TABLE elts (
|
|
|
82
80
|
|
|
83
81
|
INSERT INTO elts (id, subject) VALUES ('ROOT', '');
|
|
84
82
|
|
|
85
|
-
CREATE SEQUENCE mails_id_seq;
|
|
86
83
|
CREATE TABLE mails (
|
|
87
|
-
id text PRIMARY KEY
|
|
84
|
+
id text PRIMARY KEY,
|
|
88
85
|
elt_id text NOT NULL REFERENCES elts,
|
|
89
86
|
message text,
|
|
90
87
|
mail_parents text,
|
|
91
88
|
file text
|
|
92
89
|
);
|
|
93
90
|
|
|
94
|
-
CREATE SEQUENCE attachments_id_seq;
|
|
95
91
|
CREATE TABLE attachments (
|
|
96
|
-
id text PRIMARY KEY
|
|
92
|
+
id text PRIMARY KEY,
|
|
97
93
|
elt_id text NOT NULL REFERENCES elts,
|
|
98
94
|
created_on timestamp with time zone NOT NULL DEFAULT now(),
|
|
99
95
|
content_type text,
|
|
100
96
|
file text
|
|
101
97
|
);
|
|
102
98
|
|
|
103
|
-
|
|
99
|
+
-- The people_elts relationship
|
|
104
100
|
CREATE TABLE subscribers (
|
|
105
|
-
id text PRIMARY KEY default nextval('public.subscribers_id_seq'),
|
|
106
101
|
elt_id text NOT NULL REFERENCES elts,
|
|
107
|
-
|
|
108
|
-
confirmed boolean NOT NULL default false
|
|
102
|
+
person_id text NOT NULL REFERENCES people
|
|
109
103
|
);
|
|
110
104
|
|
|
111
|
-
INSERT INTO subscribers(elt_id,
|
|
112
|
-
VALUES ('ROOT', '
|
|
105
|
+
INSERT INTO subscribers(elt_id, person_id)
|
|
106
|
+
VALUES ('ROOT', 'echarp');
|
|
113
107
|
|
|
114
108
|
CREATE TABLE choices (
|
|
115
109
|
elt_id text NOT NULL REFERENCES elts,
|
|
116
110
|
person_id text NOT NULL REFERENCES people,
|
|
111
|
+
created_on timestamp with time zone NOT NULL DEFAULT now(),
|
|
117
112
|
PRIMARY KEY (elt_id, person_id)
|
|
118
113
|
);
|
|
119
114
|
|
|
120
115
|
CREATE TABLE delegations (
|
|
121
116
|
elt_id text NOT NULL REFERENCES elts,
|
|
122
117
|
person_id text NOT NULL REFERENCES people,
|
|
118
|
+
created_on timestamp with time zone NOT NULL DEFAULT now(),
|
|
123
119
|
temporary boolean NOT NULL DEFAULT false,
|
|
124
120
|
delegate_to text NOT NULL REFERENCES people,
|
|
125
121
|
PRIMARY KEY (elt_id, person_id)
|
data/lib/data_import.rb
CHANGED
|
@@ -14,7 +14,7 @@ def inputDir(directory)
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
Dir.foreach(directory) do |d|
|
|
17
|
-
if (d != '.' and d != '..')
|
|
17
|
+
if (d != '.' and d != '..' and d != '.svn')
|
|
18
18
|
dir = directory+'/'+d
|
|
19
19
|
if (File.directory?(dir) or File.symlink?(dir))
|
|
20
20
|
#puts 'dir: '+dir
|
|
@@ -38,6 +38,8 @@ def inputFile(d, fileName)
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
if elt.created_on == nil or elt.created_on < file.mtime
|
|
41
|
+
elt.mail = nil
|
|
42
|
+
|
|
41
43
|
elt.parent_id = d
|
|
42
44
|
elt.created_on = file.mtime
|
|
43
45
|
puts elt.created_on.class
|
|
Binary file
|