parlement 0.1
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 +709 -0
- data/COPYING +223 -0
- data/README +20 -0
- data/Rakefile +136 -0
- data/app/controllers/account_controller.rb +181 -0
- data/app/controllers/application.rb +30 -0
- data/app/controllers/elt_controller.rb +83 -0
- data/app/helpers/account_helper.rb +2 -0
- data/app/helpers/application_helper.rb +4 -0
- data/app/helpers/elt_helper.rb +37 -0
- data/app/helpers/live_tree.rb +238 -0
- data/app/helpers/mailman.rb +96 -0
- data/app/models/attachment.rb +4 -0
- data/app/models/elt.rb +17 -0
- data/app/models/mail.rb +4 -0
- data/app/models/notifier.rb +13 -0
- data/app/models/person.rb +9 -0
- data/app/models/user.rb +7 -0
- data/app/models/user_notify.rb +75 -0
- data/app/views/account/_help.rhtml +23 -0
- data/app/views/account/_login.rhtml +57 -0
- data/app/views/account/_show.rhtml +31 -0
- data/app/views/account/logout.rhtml +10 -0
- data/app/views/account/signup.rhtml +17 -0
- data/app/views/account/welcome.rhtml +13 -0
- data/app/views/elt/_elt.rhtml +105 -0
- data/app/views/elt/_form.rhtml +31 -0
- data/app/views/elt/_list.rhtml +28 -0
- data/app/views/elt/new.rhtml +102 -0
- data/app/views/elt/rss.rxml +31 -0
- data/app/views/elt/show.rhtml +46 -0
- data/app/views/elt/show_tree.rhtml +8 -0
- data/app/views/layouts/scaffold.rhtml +13 -0
- data/app/views/layouts/top.rhtml +45 -0
- data/app/views/notifier/changeEmail.rhtml +10 -0
- data/config/boot.rb +17 -0
- data/config/database.yml +82 -0
- data/config/environment.rb +92 -0
- data/config/environments/development.rb +17 -0
- data/config/environments/production.rb +17 -0
- data/config/environments/test.rb +17 -0
- data/config/environments/user_environment.rb +1 -0
- data/config/routes.rb +28 -0
- data/db/ROOT/CV.txt +166 -0
- data/db/ROOT/IP.txt +3 -0
- data/db/ROOT/parleR.txt +3 -0
- data/db/ROOT/parlement/security.txt +34 -0
- data/db/ROOT/parlement/test.txt +4 -0
- data/db/ROOT/parlement.txt +51 -0
- data/db/ROOT/perso.txt +215 -0
- data/db/schema.sql +127 -0
- data/lib/data_import.rb +54 -0
- data/lib/file_column.rb +263 -0
- data/lib/file_column_helper.rb +45 -0
- data/lib/localization.rb +88 -0
- data/lib/localizer.rb +88 -0
- data/lib/login_system.rb +87 -0
- data/lib/rails_file_column.rb +19 -0
- data/lib/user_system.rb +101 -0
- data/public/404.html +8 -0
- data/public/500.html +8 -0
- data/public/dispatch.cgi +10 -0
- data/public/dispatch.fcgi +24 -0
- data/public/dispatch.rb +10 -0
- data/public/engine_files/README +5 -0
- data/public/engine_files/login_engine/stylesheets/login_engine.css +81 -0
- data/public/favicon.ico +0 -0
- data/public/favicon.png +0 -0
- data/public/images/live_tree_branch_collapsed_icon.gif +0 -0
- data/public/images/live_tree_branch_expanded_icon.gif +0 -0
- data/public/images/live_tree_leaf_icon.gif +0 -0
- data/public/images/live_tree_loading_spinner.gif +0 -0
- data/public/images/webfeed.gif +0 -0
- data/public/javascripts/controls.js +721 -0
- data/public/javascripts/dragdrop.js +519 -0
- data/public/javascripts/effects.js +992 -0
- data/public/javascripts/live_tree.js +749 -0
- data/public/javascripts/prototype.js +1726 -0
- data/public/javascripts/scriptaculous.js +47 -0
- data/public/javascripts/slider.js +258 -0
- data/public/oldREADME +190 -0
- data/public/oldindex.html +78 -0
- data/public/robots.txt +1 -0
- data/public/stylesheets/default.css +238 -0
- data/public/stylesheets/live_tree.css +62 -0
- data/public/stylesheets/scaffold.css +74 -0
- data/script/about +3 -0
- data/script/benchmarker +19 -0
- data/script/breakpointer +3 -0
- data/script/console +3 -0
- data/script/create_db +7 -0
- data/script/destroy +3 -0
- data/script/generate +3 -0
- data/script/performance/benchmarker +3 -0
- data/script/performance/profiler +3 -0
- data/script/plugin +3 -0
- data/script/process/reaper +3 -0
- data/script/process/spawner +3 -0
- data/script/process/spinner +3 -0
- data/script/profiler +34 -0
- data/script/runner +3 -0
- data/script/server +3 -0
- data/test/fixtures/attachments.yml +10 -0
- data/test/fixtures/elts.yml +15 -0
- data/test/fixtures/mails.yml +7 -0
- data/test/fixtures/people.yml +49 -0
- data/test/fixtures/users.yml +41 -0
- data/test/functional/account_controller_test.rb +239 -0
- data/test/functional/elt_controller_test.rb +18 -0
- data/test/mocks/test/time.rb +17 -0
- data/test/mocks/test/user_notify.rb +16 -0
- data/test/test_helper.rb +28 -0
- data/test/unit/attachment_test.rb +14 -0
- data/test/unit/elt_test.rb +14 -0
- data/test/unit/mail_test.rb +14 -0
- data/test/unit/notifier_test.rb +31 -0
- data/test/unit/person_test.rb +24 -0
- data/test/unit/user_test.rb +94 -0
- data/vendor/plugins/engines/CHANGELOG +7 -0
- data/vendor/plugins/engines/README +128 -0
- data/vendor/plugins/engines/init.rb +33 -0
- data/vendor/plugins/engines/lib/action_mailer_extensions.rb +160 -0
- data/vendor/plugins/engines/lib/action_view_extensions.rb +130 -0
- data/vendor/plugins/engines/lib/dependencies_extensions.rb +56 -0
- data/vendor/plugins/engines/lib/engines.rb +292 -0
- data/vendor/plugins/engines/lib/ruby_extensions.rb +127 -0
- data/vendor/plugins/engines/lib/testing_extensions.rb +33 -0
- data/vendor/plugins/engines/test/ruby_extensions_test.rb +94 -0
- data/vendor/plugins/login_engine/README +258 -0
- data/vendor/plugins/login_engine/app/controllers/user_controller.rb +248 -0
- data/vendor/plugins/login_engine/app/helpers/user_helper.rb +88 -0
- data/vendor/plugins/login_engine/app/models/user.rb +7 -0
- data/vendor/plugins/login_engine/app/models/user_notify.rb +75 -0
- data/vendor/plugins/login_engine/app/views/user/_edit.rhtml +11 -0
- data/vendor/plugins/login_engine/app/views/user/_password.rhtml +9 -0
- data/vendor/plugins/login_engine/app/views/user/change_password.rhtml +17 -0
- data/vendor/plugins/login_engine/app/views/user/edit.rhtml +23 -0
- data/vendor/plugins/login_engine/app/views/user/forgot_password.rhtml +18 -0
- data/vendor/plugins/login_engine/app/views/user/home.rhtml +7 -0
- data/vendor/plugins/login_engine/app/views/user/login.rhtml +17 -0
- data/vendor/plugins/login_engine/app/views/user/logout.rhtml +8 -0
- data/vendor/plugins/login_engine/app/views/user/signup.rhtml +17 -0
- data/vendor/plugins/login_engine/app/views/user_notify/change_password.rhtml +10 -0
- data/vendor/plugins/login_engine/app/views/user_notify/delete.rhtml +5 -0
- data/vendor/plugins/login_engine/app/views/user_notify/forgot_password.rhtml +11 -0
- data/vendor/plugins/login_engine/app/views/user_notify/pending_delete.rhtml +9 -0
- data/vendor/plugins/login_engine/app/views/user_notify/signup.rhtml +12 -0
- data/vendor/plugins/login_engine/db/schema.rb +25 -0
- data/vendor/plugins/login_engine/init_engine.rb +10 -0
- data/vendor/plugins/login_engine/lib/login_engine/authenticated_system.rb +107 -0
- data/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb +149 -0
- data/vendor/plugins/login_engine/lib/login_engine.rb +58 -0
- data/vendor/plugins/login_engine/public/stylesheets/login_engine.css +81 -0
- data/vendor/plugins/login_engine/tasks/tasks.rake +4 -0
- data/vendor/plugins/login_engine/test/fixtures/templates/users.yml +41 -0
- data/vendor/plugins/login_engine/test/fixtures/users.yml +41 -0
- data/vendor/plugins/login_engine/test/functional/user_controller_test.rb +533 -0
- data/vendor/plugins/login_engine/test/mocks/mail.rb +14 -0
- data/vendor/plugins/login_engine/test/mocks/time.rb +19 -0
- data/vendor/plugins/login_engine/test/test_helper.rb +15 -0
- data/vendor/plugins/login_engine/test/unit/user_test.rb +94 -0
- metadata +276 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
html {
|
|
2
|
+
border:none;
|
|
3
|
+
background:black; }
|
|
4
|
+
|
|
5
|
+
body {
|
|
6
|
+
font-family:serif;
|
|
7
|
+
color:black;
|
|
8
|
+
background:white;
|
|
9
|
+
padding:0.8em;
|
|
10
|
+
margin:0.8em;
|
|
11
|
+
text-align:justify; }
|
|
12
|
+
input, textarea {
|
|
13
|
+
color:black;
|
|
14
|
+
border-color:#889;
|
|
15
|
+
background:transparent; }
|
|
16
|
+
textarea { width:99%; }
|
|
17
|
+
|
|
18
|
+
img {
|
|
19
|
+
border:none;
|
|
20
|
+
max-width:100%; }
|
|
21
|
+
|
|
22
|
+
blockquote { font-style:italic; }
|
|
23
|
+
|
|
24
|
+
h1, h2 {
|
|
25
|
+
text-align:left;
|
|
26
|
+
margin:0px;
|
|
27
|
+
padding-top:1.1em;
|
|
28
|
+
padding-left:1%;
|
|
29
|
+
padding-bottom:2%; }
|
|
30
|
+
h2 {
|
|
31
|
+
background:#ddd;
|
|
32
|
+
margin-top:1em;
|
|
33
|
+
font-size:larger;
|
|
34
|
+
font-weight:normal; }
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
.notice, .warning, .error {
|
|
38
|
+
font-size:larger;
|
|
39
|
+
font-weight:bold;
|
|
40
|
+
text-align:center; }
|
|
41
|
+
.notice { color:#080; }
|
|
42
|
+
.warning { color:#f84; }
|
|
43
|
+
.error { color:#f00; }
|
|
44
|
+
|
|
45
|
+
.version {
|
|
46
|
+
color:#888;
|
|
47
|
+
font-size:smaller;
|
|
48
|
+
float:right; }
|
|
49
|
+
|
|
50
|
+
.login {
|
|
51
|
+
margin-top:1em;
|
|
52
|
+
margin-left:2em; }
|
|
53
|
+
.logout {
|
|
54
|
+
float:left;
|
|
55
|
+
font-size:smaller; }
|
|
56
|
+
|
|
57
|
+
.helpLink, .helpLinkClose {
|
|
58
|
+
text-decoration:none;
|
|
59
|
+
font-size:medium;
|
|
60
|
+
font-style:italic;
|
|
61
|
+
padding-left:1%;
|
|
62
|
+
padding-right:1%; }
|
|
63
|
+
.helpLinkClose { text-decoration:line-through; }
|
|
64
|
+
|
|
65
|
+
.help {
|
|
66
|
+
padding-top:1em;
|
|
67
|
+
font-size:medium;
|
|
68
|
+
font-weight:normal;
|
|
69
|
+
background:transparent; }
|
|
70
|
+
|
|
71
|
+
.helpTitle, .helpTitle:link, .helpTitle:visited {
|
|
72
|
+
display:block;
|
|
73
|
+
font-size:larger;
|
|
74
|
+
font-weight:bolder; }
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
.parent {
|
|
78
|
+
text-align:center;
|
|
79
|
+
font-size:smaller;
|
|
80
|
+
font-weight:normal;
|
|
81
|
+
font-style:italic;
|
|
82
|
+
margin:0px;
|
|
83
|
+
padding-right:2em; }
|
|
84
|
+
|
|
85
|
+
a:link, a:visited { color:#369; }
|
|
86
|
+
a:hover, a:active {
|
|
87
|
+
color:#060;
|
|
88
|
+
background:#ff8; }
|
|
89
|
+
|
|
90
|
+
.sidebar {
|
|
91
|
+
float:right;
|
|
92
|
+
font-size:smaller;
|
|
93
|
+
padding-left:1em;
|
|
94
|
+
width:30%;
|
|
95
|
+
text-align:center;
|
|
96
|
+
background:white; }
|
|
97
|
+
|
|
98
|
+
.title {
|
|
99
|
+
font-size:larger;
|
|
100
|
+
font-weight:bolder;
|
|
101
|
+
letter-spacing:0.3em; }
|
|
102
|
+
|
|
103
|
+
.box {
|
|
104
|
+
border:outset 2px #889;
|
|
105
|
+
background:#ccc;
|
|
106
|
+
margin-top:1em;
|
|
107
|
+
padding-bottom:1em; }
|
|
108
|
+
|
|
109
|
+
.boxTitle {
|
|
110
|
+
text-align:left;
|
|
111
|
+
font-weight:bold;
|
|
112
|
+
padding:0.2em;
|
|
113
|
+
margin-bottom:0.4em;
|
|
114
|
+
color:#ff4;
|
|
115
|
+
background:#557; }
|
|
116
|
+
|
|
117
|
+
.boxSubtitle {
|
|
118
|
+
font-size:small;
|
|
119
|
+
text-align:right;
|
|
120
|
+
color:#ff4;
|
|
121
|
+
background:#557; }
|
|
122
|
+
|
|
123
|
+
.boxLine {
|
|
124
|
+
text-align:left;
|
|
125
|
+
padding-left:1em; }
|
|
126
|
+
.boxLineR {
|
|
127
|
+
float:right;
|
|
128
|
+
padding-right:1em; }
|
|
129
|
+
|
|
130
|
+
.boxMore {
|
|
131
|
+
font-weight:bold;
|
|
132
|
+
text-align:right; }
|
|
133
|
+
|
|
134
|
+
.author {
|
|
135
|
+
margin-right:0.5em;
|
|
136
|
+
font-style:italic;
|
|
137
|
+
float:left; }
|
|
138
|
+
|
|
139
|
+
.eltInfo {
|
|
140
|
+
float:right;
|
|
141
|
+
margin-left:1em; }
|
|
142
|
+
|
|
143
|
+
.eltBody { padding-left:1%; }
|
|
144
|
+
|
|
145
|
+
.eltSub, .help {
|
|
146
|
+
margin-left:2%;
|
|
147
|
+
border-left:solid 2px #ddd;
|
|
148
|
+
padding-left:1%; }
|
|
149
|
+
|
|
150
|
+
.pageCount {
|
|
151
|
+
margin-left:2em;
|
|
152
|
+
margin-right:2em;
|
|
153
|
+
font-size:smaller;
|
|
154
|
+
letter-spacing:0.3em; }
|
|
155
|
+
|
|
156
|
+
.eltSubsClose { margin-left:1%; font-size:smaller; }
|
|
157
|
+
|
|
158
|
+
/*
|
|
159
|
+
.link {
|
|
160
|
+
padding-left:1em;
|
|
161
|
+
font-weight:bold;
|
|
162
|
+
vertical-align:middle; }
|
|
163
|
+
|
|
164
|
+
.xml {
|
|
165
|
+
position:absolute;
|
|
166
|
+
top:0em;
|
|
167
|
+
right:0em; }
|
|
168
|
+
|
|
169
|
+
.level {
|
|
170
|
+
display:inline;
|
|
171
|
+
font-weight:bold;
|
|
172
|
+
color:#44C; }
|
|
173
|
+
|
|
174
|
+
.propose, .choose, .delegate { margin-left:1em; }
|
|
175
|
+
.propose:before { color:#881; }
|
|
176
|
+
.choose:before { color:#188; }
|
|
177
|
+
.delegate:before { color:#818; }
|
|
178
|
+
.propose:before, .choose:before, .delegate:before {
|
|
179
|
+
content:"->";
|
|
180
|
+
font-size:x-large;
|
|
181
|
+
font-weight:bold; }
|
|
182
|
+
.moderate { text-align:center; font-weight:bold; font-size:larger; }
|
|
183
|
+
.moderate:before { color:#CCC; content:"-> "; }
|
|
184
|
+
.moderateActual { display:inline; color:#44F; }
|
|
185
|
+
.moderateActual:before { content:"["; }
|
|
186
|
+
.moderateActual:after { content:"]"; }
|
|
187
|
+
|
|
188
|
+
.messageTitle {
|
|
189
|
+
font-size:larger;
|
|
190
|
+
font-weight:bold;
|
|
191
|
+
font-weight:italic;
|
|
192
|
+
color:#333; }
|
|
193
|
+
|
|
194
|
+
.ancestor { text-align:right; }
|
|
195
|
+
|
|
196
|
+
.section {
|
|
197
|
+
border:outset thin #889;
|
|
198
|
+
margin-bottom:1em; }
|
|
199
|
+
|
|
200
|
+
.sectionTitle {
|
|
201
|
+
font-size:x-large;
|
|
202
|
+
text-align:left;
|
|
203
|
+
font-weight:bold;
|
|
204
|
+
padding:6px;
|
|
205
|
+
background:#eef; }
|
|
206
|
+
|
|
207
|
+
.subTitle { text-align:right; }
|
|
208
|
+
|
|
209
|
+
.out, .err, .info {
|
|
210
|
+
font-size:larger;
|
|
211
|
+
font-weight:bold;
|
|
212
|
+
padding:1em;
|
|
213
|
+
text-align:center;
|
|
214
|
+
background:white; }
|
|
215
|
+
.out { color:#080; }
|
|
216
|
+
.err { color:#800; }
|
|
217
|
+
.info { color:#008; }
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
.footnote:before { content:"("; }
|
|
221
|
+
.footnote {
|
|
222
|
+
font-size:smaller;
|
|
223
|
+
text-align:right;
|
|
224
|
+
margin-top:1em; }
|
|
225
|
+
.footnote:after { content:")"; }
|
|
226
|
+
|
|
227
|
+
th.visu, td.visu, th.param, td.param {
|
|
228
|
+
padding-left:1em;
|
|
229
|
+
padding-right:1em;
|
|
230
|
+
background:#ddd; }
|
|
231
|
+
th.visu, th.param { background:#ddf; }
|
|
232
|
+
td.visu { background:#bbb; }
|
|
233
|
+
|
|
234
|
+
input.param { width:100%; }
|
|
235
|
+
textarea.param { width:100%; height:50em; }
|
|
236
|
+
textarea.paramSmall { width:100%; height:1.5em; }
|
|
237
|
+
|
|
238
|
+
*/
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
.live_tree {
|
|
2
|
+
border: 1px solid black;
|
|
3
|
+
padding: 5px;
|
|
4
|
+
overflow: auto;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.live_tree_branch, .live_tree_root {
|
|
10
|
+
list-style-type: none;
|
|
11
|
+
margin-left: 0;
|
|
12
|
+
padding-left: 1em;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.live_tree_root {
|
|
16
|
+
padding: 0;
|
|
17
|
+
margin: 0;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.live_tree_loading_tree {
|
|
22
|
+
color: black;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.live_tree_searching {
|
|
26
|
+
margin-bottom: 10px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.live_tree_item {
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
a.live_tree_branch_expand_link {
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
a.live_tree_branch_collapse_link {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.live_tree_item_icon {
|
|
39
|
+
color: #048;
|
|
40
|
+
border-style: none;
|
|
41
|
+
margin-right: 0.5ex;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.live_tree_check_box {
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.live_tree_loading_icon {
|
|
48
|
+
margin-right: 0.5ex;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
a.live_tree_item_link {
|
|
52
|
+
color: black;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.live_tree_item_name {
|
|
56
|
+
color: black;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.live_tree_active_item_name {
|
|
60
|
+
background-color: #048;
|
|
61
|
+
color: white;
|
|
62
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
body { background-color: #fff; color: #333; }
|
|
2
|
+
|
|
3
|
+
body, p, ol, ul, td {
|
|
4
|
+
font-family: verdana, arial, helvetica, sans-serif;
|
|
5
|
+
font-size: 13px;
|
|
6
|
+
line-height: 18px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
pre {
|
|
10
|
+
background-color: #eee;
|
|
11
|
+
padding: 10px;
|
|
12
|
+
font-size: 11px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
a { color: #000; }
|
|
16
|
+
a:visited { color: #666; }
|
|
17
|
+
a:hover { color: #fff; background-color:#000; }
|
|
18
|
+
|
|
19
|
+
.fieldWithErrors {
|
|
20
|
+
padding: 2px;
|
|
21
|
+
background-color: red;
|
|
22
|
+
display: table;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#ErrorExplanation {
|
|
26
|
+
width: 400px;
|
|
27
|
+
border: 2px solid 'red';
|
|
28
|
+
padding: 7px;
|
|
29
|
+
padding-bottom: 12px;
|
|
30
|
+
margin-bottom: 20px;
|
|
31
|
+
background-color: #f0f0f0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
#ErrorExplanation h2 {
|
|
35
|
+
text-align: left;
|
|
36
|
+
font-weight: bold;
|
|
37
|
+
padding: 5px 5px 5px 15px;
|
|
38
|
+
font-size: 12px;
|
|
39
|
+
margin: -7px;
|
|
40
|
+
background-color: #c00;
|
|
41
|
+
color: #fff;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
#ErrorExplanation p {
|
|
45
|
+
color: #333;
|
|
46
|
+
margin-bottom: 0;
|
|
47
|
+
padding: 5px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#ErrorExplanation ul li {
|
|
51
|
+
font-size: 12px;
|
|
52
|
+
list-style: square;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
div.uploadStatus {
|
|
56
|
+
margin: 5px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
div.progressBar {
|
|
60
|
+
margin: 5px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
div.progressBar div.border {
|
|
64
|
+
background-color: #fff;
|
|
65
|
+
border: 1px solid grey;
|
|
66
|
+
width: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
div.progressBar div.background {
|
|
70
|
+
background-color: #333;
|
|
71
|
+
height: 18px;
|
|
72
|
+
width: 0%;
|
|
73
|
+
}
|
|
74
|
+
|
data/script/about
ADDED
data/script/benchmarker
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/ruby1.8
|
|
2
|
+
|
|
3
|
+
if ARGV.empty?
|
|
4
|
+
puts "Usage: benchmarker times 'Person.expensive_way' 'Person.another_expensive_way' ..."
|
|
5
|
+
exit
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
require File.dirname(__FILE__) + '/../config/environment'
|
|
9
|
+
require 'benchmark'
|
|
10
|
+
include Benchmark
|
|
11
|
+
|
|
12
|
+
# Don't include compilation in the benchmark
|
|
13
|
+
ARGV[1..-1].each { |expression| eval(expression) }
|
|
14
|
+
|
|
15
|
+
bm(6) do |x|
|
|
16
|
+
ARGV[1..-1].each_with_index do |expression, idx|
|
|
17
|
+
x.report("##{idx + 1}") { ARGV[0].to_i.times { eval(expression) } }
|
|
18
|
+
end
|
|
19
|
+
end
|
data/script/breakpointer
ADDED
data/script/console
ADDED
data/script/create_db
ADDED
data/script/destroy
ADDED
data/script/generate
ADDED
data/script/plugin
ADDED
data/script/profiler
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/ruby1.8
|
|
2
|
+
if ARGV.empty?
|
|
3
|
+
$stderr.puts "Usage: profiler 'Person.expensive_method(10)' [times]"
|
|
4
|
+
exit(1)
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
# Keep the expensive require out of the profile.
|
|
8
|
+
$stderr.puts 'Loading Rails...'
|
|
9
|
+
require File.dirname(__FILE__) + '/../config/environment'
|
|
10
|
+
|
|
11
|
+
# Define a method to profile.
|
|
12
|
+
if ARGV[1] and ARGV[1].to_i > 1
|
|
13
|
+
eval "def profile_me() #{ARGV[1]}.times { #{ARGV[0]} } end"
|
|
14
|
+
else
|
|
15
|
+
eval "def profile_me() #{ARGV[0]} end"
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Use the ruby-prof extension if available. Fall back to stdlib profiler.
|
|
19
|
+
begin
|
|
20
|
+
require 'prof'
|
|
21
|
+
$stderr.puts 'Using the ruby-prof extension.'
|
|
22
|
+
Prof.clock_mode = Prof::GETTIMEOFDAY
|
|
23
|
+
Prof.start
|
|
24
|
+
profile_me
|
|
25
|
+
results = Prof.stop
|
|
26
|
+
require 'rubyprof_ext'
|
|
27
|
+
Prof.print_profile(results, $stderr)
|
|
28
|
+
rescue LoadError
|
|
29
|
+
$stderr.puts 'Using the standard Ruby profiler.'
|
|
30
|
+
Profiler__.start_profile
|
|
31
|
+
profile_me
|
|
32
|
+
Profiler__.stop_profile
|
|
33
|
+
Profiler__.print_profile($stderr)
|
|
34
|
+
end
|
data/script/runner
ADDED
data/script/server
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
|
2
|
+
first_elts:
|
|
3
|
+
id: ROOT
|
|
4
|
+
second_elts:
|
|
5
|
+
id: 0
|
|
6
|
+
parent_id: ROOT
|
|
7
|
+
subject: zeroth element
|
|
8
|
+
another_elts:
|
|
9
|
+
id: 1
|
|
10
|
+
parent_id: ROOT
|
|
11
|
+
subject: Another element
|
|
12
|
+
mail:
|
|
13
|
+
id: mail
|
|
14
|
+
parent_id: ROOT
|
|
15
|
+
subject: Mails
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
|
2
|
+
first_person:
|
|
3
|
+
id: first
|
|
4
|
+
name: first
|
|
5
|
+
another_person:
|
|
6
|
+
id: second
|
|
7
|
+
name: second
|
|
8
|
+
bob:
|
|
9
|
+
id: bob
|
|
10
|
+
name: bob
|
|
11
|
+
email: bob@test.com
|
|
12
|
+
bob_other:
|
|
13
|
+
id: bob_other
|
|
14
|
+
name: bob_other
|
|
15
|
+
bob2_person:
|
|
16
|
+
id: bob2
|
|
17
|
+
name: bob2
|
|
18
|
+
bob3_person:
|
|
19
|
+
id: bob3
|
|
20
|
+
name: bob3
|
|
21
|
+
|
|
22
|
+
existingbob:
|
|
23
|
+
id: 1000002
|
|
24
|
+
name: existingbob
|
|
25
|
+
longbob:
|
|
26
|
+
id: 1000003
|
|
27
|
+
name: longbob
|
|
28
|
+
email: longbob@test.com
|
|
29
|
+
|
|
30
|
+
deletebob1:
|
|
31
|
+
id: 1000004
|
|
32
|
+
name: deletebob1
|
|
33
|
+
email: deletebob1@test.com
|
|
34
|
+
|
|
35
|
+
deletebob2:
|
|
36
|
+
id: 1000005
|
|
37
|
+
name: deletebob2
|
|
38
|
+
email: deletebob2@test.com
|
|
39
|
+
|
|
40
|
+
noName:
|
|
41
|
+
id: noName
|
|
42
|
+
name: ""
|
|
43
|
+
justForTest:
|
|
44
|
+
id: justForTest
|
|
45
|
+
name: hugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhugebobhug
|
|
46
|
+
bo:
|
|
47
|
+
id: bo
|
|
48
|
+
name: bo
|
|
49
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
|
2
|
+
|
|
3
|
+
bob:
|
|
4
|
+
id: 1000001
|
|
5
|
+
login: bob
|
|
6
|
+
salted_password: b1de1d1d2aec05df2be6f02995537c1783f08490 # atest
|
|
7
|
+
salt: bf3c47e71c0bfeb6288c9b6b5e24e15256a0e407
|
|
8
|
+
email: bob@test.com
|
|
9
|
+
verified: 1
|
|
10
|
+
|
|
11
|
+
existingbob:
|
|
12
|
+
id: 1000002
|
|
13
|
+
login: existingbob
|
|
14
|
+
salted_password: b1de1d1d2aec05df2be6f02995537c1783f08490 # atest
|
|
15
|
+
salt: bf3c47e71c0bfeb6288c9b6b5e24e15256a0e407
|
|
16
|
+
email: existingbob@test.com
|
|
17
|
+
verified: 1
|
|
18
|
+
|
|
19
|
+
longbob:
|
|
20
|
+
id: 1000003
|
|
21
|
+
login: longbob
|
|
22
|
+
salted_password: 53427dca242488e885216a579e362ee888c3ebc1 # alongtest
|
|
23
|
+
salt: d35a9cc89af83799d9a938a74cb06a11d295aa9c
|
|
24
|
+
email: longbob@test.com
|
|
25
|
+
verified: 1
|
|
26
|
+
|
|
27
|
+
deletebob1:
|
|
28
|
+
id: 1000004
|
|
29
|
+
login: deletebob1
|
|
30
|
+
salted_password: 53427dca242488e885216a579e362ee888c3ebc1 # alongtest
|
|
31
|
+
salt: d35a9cc89af83799d9a938a74cb06a11d295aa9c
|
|
32
|
+
email: deletebob1@test.com
|
|
33
|
+
verified: 1
|
|
34
|
+
|
|
35
|
+
deletebob2:
|
|
36
|
+
id: 1000005
|
|
37
|
+
login: deletebob2
|
|
38
|
+
salted_password: 53427dca242488e885216a579e362ee888c3ebc1 # alongtest
|
|
39
|
+
salt: d35a9cc89af83799d9a938a74cb06a11d295aa9c
|
|
40
|
+
email: deletebob2@test.com
|
|
41
|
+
verified: 1
|