treequel 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/ChangeLog +354 -0
  2. data/LICENSE +27 -0
  3. data/README +66 -0
  4. data/Rakefile +345 -0
  5. data/Rakefile.local +43 -0
  6. data/bin/treeirb +14 -0
  7. data/bin/treequel +229 -0
  8. data/examples/company-directory.rb +112 -0
  9. data/examples/ldap-monitor.rb +143 -0
  10. data/examples/ldap-monitor/public/css/master.css +328 -0
  11. data/examples/ldap-monitor/public/images/card_small.png +0 -0
  12. data/examples/ldap-monitor/public/images/chain_small.png +0 -0
  13. data/examples/ldap-monitor/public/images/globe_small.png +0 -0
  14. data/examples/ldap-monitor/public/images/globe_small_green.png +0 -0
  15. data/examples/ldap-monitor/public/images/plug.png +0 -0
  16. data/examples/ldap-monitor/public/images/shadows/large-30-down.png +0 -0
  17. data/examples/ldap-monitor/public/images/tick.png +0 -0
  18. data/examples/ldap-monitor/public/images/tick_circle.png +0 -0
  19. data/examples/ldap-monitor/public/images/treequel-favicon.png +0 -0
  20. data/examples/ldap-monitor/views/backends.erb +41 -0
  21. data/examples/ldap-monitor/views/connections.erb +74 -0
  22. data/examples/ldap-monitor/views/databases.erb +39 -0
  23. data/examples/ldap-monitor/views/dump_subsystem.erb +14 -0
  24. data/examples/ldap-monitor/views/index.erb +14 -0
  25. data/examples/ldap-monitor/views/layout.erb +35 -0
  26. data/examples/ldap-monitor/views/listeners.erb +30 -0
  27. data/examples/ldap_state.rb +62 -0
  28. data/lib/treequel.rb +145 -0
  29. data/lib/treequel/branch.rb +589 -0
  30. data/lib/treequel/branchcollection.rb +204 -0
  31. data/lib/treequel/branchset.rb +360 -0
  32. data/lib/treequel/constants.rb +604 -0
  33. data/lib/treequel/directory.rb +541 -0
  34. data/lib/treequel/exceptions.rb +32 -0
  35. data/lib/treequel/filter.rb +704 -0
  36. data/lib/treequel/mixins.rb +325 -0
  37. data/lib/treequel/schema.rb +245 -0
  38. data/lib/treequel/schema/attributetype.rb +252 -0
  39. data/lib/treequel/schema/ldapsyntax.rb +96 -0
  40. data/lib/treequel/schema/matchingrule.rb +124 -0
  41. data/lib/treequel/schema/matchingruleuse.rb +124 -0
  42. data/lib/treequel/schema/objectclass.rb +289 -0
  43. data/lib/treequel/sequel_integration.rb +26 -0
  44. data/lib/treequel/utils.rb +169 -0
  45. data/rake/191_compat.rb +26 -0
  46. data/rake/dependencies.rb +76 -0
  47. data/rake/helpers.rb +434 -0
  48. data/rake/hg.rb +261 -0
  49. data/rake/manual.rb +782 -0
  50. data/rake/packaging.rb +135 -0
  51. data/rake/publishing.rb +318 -0
  52. data/rake/rdoc.rb +30 -0
  53. data/rake/style.rb +62 -0
  54. data/rake/svn.rb +668 -0
  55. data/rake/testing.rb +187 -0
  56. data/rake/verifytask.rb +64 -0
  57. data/rake/win32.rb +190 -0
  58. data/spec/lib/constants.rb +93 -0
  59. data/spec/lib/helpers.rb +100 -0
  60. data/spec/treequel/branch_spec.rb +569 -0
  61. data/spec/treequel/branchcollection_spec.rb +213 -0
  62. data/spec/treequel/branchset_spec.rb +376 -0
  63. data/spec/treequel/directory_spec.rb +487 -0
  64. data/spec/treequel/filter_spec.rb +482 -0
  65. data/spec/treequel/mixins_spec.rb +330 -0
  66. data/spec/treequel/schema/attributetype_spec.rb +237 -0
  67. data/spec/treequel/schema/ldapsyntax_spec.rb +83 -0
  68. data/spec/treequel/schema/matchingrule_spec.rb +158 -0
  69. data/spec/treequel/schema/matchingruleuse_spec.rb +137 -0
  70. data/spec/treequel/schema/objectclass_spec.rb +262 -0
  71. data/spec/treequel/schema_spec.rb +118 -0
  72. data/spec/treequel/utils_spec.rb +49 -0
  73. data/spec/treequel_spec.rb +179 -0
  74. metadata +169 -0
@@ -0,0 +1,328 @@
1
+ /* @override http://gont.ljc.laika.com:9191/css/master.css */
2
+
3
+ /*
4
+ * LDAP Web Monitor Stylesheet
5
+ *
6
+ * Authors:
7
+ * * Michael Granger <mgranger@laika.com>
8
+ *
9
+ */
10
+
11
+ /* @group Entity styles */
12
+ html {
13
+ font: 14px/1.4em "Helvetica Neue", Verdana, sans-serif;
14
+ margin: 0;
15
+ padding: 0;
16
+ text-align: left;
17
+ line-height: 1.5em;
18
+ border-left: 2px solid #908558;
19
+ min-height: 100%;
20
+ background-color: #a8a8a9;
21
+ }
22
+
23
+ body {
24
+ background: #f0f0f2;
25
+ margin: 0;
26
+ min-width: 620px;
27
+ }
28
+
29
+ h1,h2,h3,h4,h5,h6 {
30
+ margin-top: 1em;
31
+ margin-bottom: 0;
32
+ color: #333;
33
+ font-weight: bold;
34
+ }
35
+
36
+ h1 {
37
+ font-family: "Helvetica Neue UltraLight", sans-serif;
38
+ font-size: 340%;
39
+ text-shadow: 1px 1px 2px #666;
40
+ padding-bottom: 0.25em;
41
+ border-bottom: 1px solid #3f6217;
42
+ margin-top: 0;
43
+ }
44
+
45
+ h2 {
46
+ font-family: "Helvetica Neue Condensed Bold", Verdana, sans-serif;
47
+ font-size: 180%;
48
+ }
49
+
50
+ h3 {
51
+ font-size: 120%;
52
+ border-left: 1em solid;
53
+ padding-left: 0.5em;
54
+ }
55
+
56
+ h4 {
57
+ font-size: 110%;
58
+ }
59
+
60
+ h5 {
61
+ font-variant: small-caps;
62
+ }
63
+
64
+ h6 {
65
+ font-style: italic;
66
+ }
67
+
68
+ input, textarea, button, select {
69
+ font: 12px/1.2em "Helvetica Neue Condensed Bold", Verdana, sans-serif;
70
+ padding: 1px;
71
+ border: 1px solid #CDCABD;
72
+ background: #E5E1D2;
73
+ color: #3a3a2b;
74
+ }
75
+ textarea {
76
+ width: 100%;
77
+ }
78
+ textarea.code {
79
+ font: 12px/1.2em "Vera Sans Mono", monospace;
80
+ }
81
+
82
+ input:focus, textarea:focus, select:focus, button:focus {
83
+ background: #AED5E3;
84
+ border: 1px solid #6894B4;
85
+ }
86
+
87
+ input[type=submit], input[type=reset], button {
88
+ cursor: pointer;
89
+ }
90
+
91
+ input[type=submit]:hover, input[type=reset]:hover, button:hover {
92
+
93
+ }
94
+
95
+ button {
96
+ font-size: 1.1em;
97
+ padding: 0.2em 1em;
98
+ -webkit-border-radius: 5px;
99
+ -moz-border-radius: 5px;
100
+ border-color: #918474;
101
+ -webkit-box-shadow: 1px 1px 2px rgba(35,35,35,0.4);
102
+ box-shadow: 1px 1px 2px #333;
103
+ }
104
+
105
+ form {
106
+ margin: 0 auto;
107
+ background: #FAF8F1;
108
+ border: none;
109
+ padding: 0.4em 1em;
110
+ -webkit-border-radius: 5px;
111
+ -moz-border-radius: 5px;
112
+ -webkit-box-shadow: 1px 1px 5px rgba(55,55,55,0.4);
113
+ -moz-box-shadow: 1px 1px 5px 2px #999;
114
+ }
115
+
116
+ fieldset {
117
+ margin: 0.2em auto;
118
+ border: none;
119
+ }
120
+
121
+ legend {
122
+ font-weight: bold;
123
+ color: #616253;
124
+ font-size: 140%;
125
+ }
126
+
127
+ fieldset.nodisplay {
128
+ border: 0;
129
+ margin: 0;
130
+ background: inherit;
131
+ -webkit-box-shadow: none;
132
+ }
133
+
134
+ fieldset.nodisplay legend {
135
+ display: none;
136
+ }
137
+
138
+ a {
139
+ color: #3f6217;
140
+ font-weight: bold;
141
+ text-decoration: none;
142
+ border-bottom: 1px dotted;
143
+ }
144
+
145
+ th a {
146
+ color: inherit;
147
+ }
148
+
149
+ a:visited {
150
+ color: #3a3a2b;
151
+ }
152
+
153
+ a:hover {
154
+ border-bottom: 1px solid;
155
+ }
156
+
157
+ a:hover img {
158
+ border: 0;
159
+ }
160
+
161
+ ul {
162
+ padding-left: 25px;
163
+ }
164
+
165
+ ul li {
166
+ padding-left: 0;
167
+ margin-left: 0;
168
+ }
169
+
170
+ img {
171
+ border: 0;
172
+ }
173
+
174
+ table caption {
175
+ margin: 15px 5px 0;
176
+ font-size: 10px;
177
+ padding: 5px 0 2px;
178
+ }
179
+
180
+ table {
181
+ border-collapse: collapse;
182
+ margin: 1em 0;
183
+ -webkit-box-shadow: 1px 1px 5px rgba(25,25,25,0.7);
184
+ box-shadow: 1px 1px 5px #333;
185
+ }
186
+ table thead,
187
+ table tbody {
188
+ border: 1px solid #c1c1c1;
189
+ }
190
+ table th {
191
+ vertical-align: bottom;
192
+ text-align: center;
193
+ }
194
+ table.horizontal tbody th {
195
+ vertical-align: top;
196
+ text-align: right;
197
+ }
198
+ table td {
199
+ padding: 2px 0.5em;
200
+ vertical-align: top;
201
+ }
202
+ table td.numeric {
203
+ text-align: right;
204
+ }
205
+ table td.icon {
206
+ vertical-align: top;
207
+ text-align: center;
208
+ }
209
+ table td.icon img {
210
+ margin: 0 auto;
211
+ }
212
+
213
+ table th {
214
+ padding: 1px 0.5em;
215
+ }
216
+ table th.odd {
217
+ background-color: #f6f6f6;
218
+ }
219
+ table th.even {
220
+ background-color: #e5e5e5;
221
+ }
222
+
223
+ table tr.odd {
224
+ background-color: #f6ecbf;
225
+ }
226
+ table tr.odd td.even {
227
+ background-color: #e6ddb2;
228
+ }
229
+ table tr.even {
230
+ background-color: #decda8;
231
+ }
232
+ table tr.even td.even {
233
+ background-color: #c8b897;
234
+ }
235
+
236
+ dl {
237
+
238
+ }
239
+
240
+ dt {
241
+ font-weight: bold;
242
+ border-bottom: 1px solid #999;
243
+ color: #3f6217;
244
+ }
245
+
246
+ dt a {
247
+ border: none;
248
+ color: inherit;
249
+ }
250
+
251
+ dd {
252
+ margin: 0;
253
+ }
254
+
255
+ dd + dt {
256
+ margin-top: 1em;
257
+ }
258
+
259
+ p code, li code, dd code {
260
+ color: #333;
261
+ background-color: #e4e0d2;
262
+ border: 1px dotted #acaa92;
263
+ }
264
+
265
+ pre code {
266
+ color: inherit;
267
+ background-color: transparent;
268
+ border: none;
269
+ }
270
+
271
+ /* @end */
272
+
273
+ /* @group IDed page elements */
274
+
275
+ #content {
276
+ position: relative;
277
+ z-index: 0;
278
+ padding: 4em;
279
+ }
280
+
281
+ #homelink {
282
+ position: absolute;
283
+ top: 4em;
284
+ right: 4em;
285
+ }
286
+
287
+ #footer {
288
+ font-size: 0.8em;
289
+ background: url(../images/shadows/large-30-down.png) repeat-x 0 bottom;
290
+ margin: 0;
291
+ padding: 3em 2em 1em;
292
+ }
293
+
294
+ #footer p {
295
+ margin: 0;
296
+ }
297
+
298
+ table#connection-list {
299
+ font-size: 0.9em;
300
+ }
301
+
302
+ /* @end */
303
+
304
+
305
+ /* @group classed page elements */
306
+
307
+ .dn, .oid, .uri, .socket {
308
+ padding-left: 18px;
309
+ padding-right: 0.2em;
310
+ background-color: #e8d9b7;
311
+ border: 1px solid #a38e2b;
312
+ -webkit-border-radius: 5px;
313
+ }
314
+ .dn {
315
+ background: url(../images/chain_small.png) no-repeat 2px;
316
+ }
317
+ .oid {
318
+ background: url(../images/card_small.png) no-repeat 2px;
319
+ }
320
+ .uri {
321
+ background: url(../images/globe_small_green.png) no-repeat 2px;
322
+ }
323
+ .socket {
324
+ padding-left: 22px;
325
+ background: url(../images/plug.png) no-repeat 4px;
326
+ }
327
+
328
+ /* @end */
@@ -0,0 +1,41 @@
1
+ <h2>Server Backends</h2>
2
+
3
+ <p><%= subsystem[:description ]%></p>
4
+
5
+ <table id="backend-list" class="horizontal">
6
+ <thead>
7
+ <tr>
8
+ <th></th>
9
+ <th class="even">Runtime Config?</th>
10
+ <th class="odd">Supported Controls</th>
11
+ <th class="even">See Also</th>
12
+ </tr>
13
+ </thead>
14
+ <tbody>
15
+ <% backends.each_with_index do |backend, i| %>
16
+ <% rowclass = i.divmod(2).last.zero? ? "even" : "odd" %>
17
+ <tr class="<%= rowclass %>">
18
+ <th><%= backend[:monitoredInfo] %></th>
19
+ <td class="even icon">
20
+ <% if backend[:monitorRuntimeConfig].first == 'TRUE' %>
21
+ <img src="/images/tick.png" width="16" height="16" alt="Yes" />
22
+ <% else %>
23
+ &nbsp;
24
+ <% end %>
25
+ </td>
26
+ <td class="odd list">
27
+ <% if backend[:supportedControl] %>
28
+ <%= backend[:supportedControl].
29
+ collect {|oid| %{<span class="oid">#{oid}</span>} }.
30
+ join(', ') %><br />
31
+ <% end %>
32
+ </td>
33
+ <td class="even">
34
+ <% if backend[:seeAlso] %><span class="dn"><%= backend[:seeAlso] %></span><% end %>
35
+ </td>
36
+ </tr>
37
+ <% end %>
38
+ </tbody>
39
+ </table>
40
+
41
+
@@ -0,0 +1,74 @@
1
+ <h2>Server Connections</h2>
2
+
3
+ <p><%= subsystem[:description ]%></p>
4
+
5
+ <p><%= current[:monitorCounter] %> current connection/s, <%= total[:monitorCounter] %> since startup.</p>
6
+
7
+ <h3>Current Connections</h3>
8
+
9
+ <table id="connection-list">
10
+ <thead>
11
+ <tr>
12
+ <th class="odd" rowspan="2">#</th>
13
+ <th class="even" rowspan="2">Proto</th>
14
+ <th class="odd" colspan="4">Ops</th>
15
+ <!-- Ops Exec -->
16
+ <!-- Ops Pend -->
17
+ <!-- Ops Fin -->
18
+ <th class="even" colspan="3">Conn</th>
19
+ <!-- Conn Read -->
20
+ <!-- Conn Write -->
21
+ <th class="odd" rowspan="2">Mask</th>
22
+ <th class="even" rowspan="2">Authz DN</th>
23
+ <th class="odd" rowspan="2">Sockets</th>
24
+ <th class="even" rowspan="2">Age</th>
25
+ <th class="odd" rowspan="2">Activity</th>
26
+ </tr>
27
+ <tr>
28
+ <!-- # -->
29
+ <!-- Proto -->
30
+ <th class="odd">Recd</th><!-- Ops -->
31
+ <th class="odd">Exec</th>
32
+ <th class="odd">Pend</th>
33
+ <th class="odd">Fin</th>
34
+ <th class="even">Get</th><!-- Conn -->
35
+ <th class="even">Read</th>
36
+ <th class="even">Write</th>
37
+ <!-- Mask -->
38
+ <!-- Authz DN -->
39
+ <!-- Sockets -->
40
+ <!-- Age -->
41
+ <!-- Activity -->
42
+ </tr>
43
+
44
+ </thead>
45
+ <tbody>
46
+
47
+ <% connections.each_with_index do |conn, i| %>
48
+ <% rowclass = i.divmod(2).last.zero? ? "odd" : "even" %>
49
+ <tr class="<%= rowclass %>">
50
+ <td class="numeric odd"><%= conn[:monitorConnectionNumber].first %></td>
51
+ <td class="numeric even"><%= conn[:monitorConnectionProtocol].first %></td>
52
+ <td class="numeric odd"><%= conn[:monitorConnectionOpsReceived].first %></td>
53
+ <td class="numeric even"><%= conn[:monitorConnectionOpsExecuting].first %></td>
54
+ <td class="numeric odd"><%= conn[:monitorConnectionOpsPending].first %></td>
55
+ <td class="numeric even"><%= conn[:monitorConnectionOpsCompleted].first %></td>
56
+ <td class="numeric odd"><%= conn[:monitorConnectionGet].first %></td>
57
+ <td class="numeric even"><%= conn[:monitorConnectionRead].first %></td>
58
+ <td class="numeric odd"><%= conn[:monitorConnectionWrite].first %></td>
59
+ <td class="even"><%= conn[:monitorConnectionMask].first %></td>
60
+ <td class="odd"><%= conn[:monitorConnectionAuthzDN].first %></td>
61
+ <td class="diagram even">
62
+ <span class="socket local-socket"><%=
63
+ conn[:monitorConnectionLocalAddress].first[/IP=(.*)/, 1] %></span>
64
+ &#x2190;&#x2192;
65
+ <span class="socket peer-socket"><%=
66
+ conn[:monitorConnectionPeerAddress].first[/IP=(.*)/, 1] %></span>
67
+ </td>
68
+ <td class="time odd"><%= time_delta_string(conn[:monitorConnectionStartTime].first) %></td>
69
+ <td class="time even"><%= time_delta_string(conn[:monitorConnectionActivityTime].first) %> ago</td>
70
+ </tr>
71
+ <% end %>
72
+ </tbody>
73
+ </table>
74
+ </dl>