treequel 1.5.3 → 1.6.0
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/ChangeLog +181 -3
- data/{History.md → History.rdoc} +53 -19
- data/Manifest.txt +5 -2
- data/{README.md → README.rdoc} +0 -0
- data/Rakefile +55 -21
- data/bin/treewhat +4 -0
- data/lib/treequel/branch.rb +28 -1
- data/lib/treequel/branchset.rb +9 -0
- data/lib/treequel/constants.rb +145 -22
- data/lib/treequel/directory.rb +12 -0
- data/lib/treequel/model.rb +5 -0
- data/lib/treequel/schema/attributetype.rb +28 -4
- data/lib/treequel/schema/objectclass.rb +40 -8
- data/lib/treequel/schema.rb +77 -28
- data/lib/treequel.rb +2 -2
- data/spec/data/ad_schema.yml +1752 -0
- data/spec/data/opends.yml +1986 -0
- data/spec/data/ticket11.yml +17 -0
- data/spec/lib/helpers.rb +17 -2
- data/spec/treequel/branch_spec.rb +8 -1
- data/spec/treequel/branchset_spec.rb +9 -0
- data/spec/treequel/directory_spec.rb +4 -2
- data/spec/treequel/monkeypatches_spec.rb +1 -1
- data/spec/treequel/schema/attributetype_spec.rb +88 -11
- data/spec/treequel/schema/matchingrule_spec.rb +37 -0
- data/spec/treequel/schema/objectclass_spec.rb +85 -1
- data/spec/treequel/schema_spec.rb +145 -30
- data.tar.gz.sig +0 -0
- metadata +147 -222
- metadata.gz.sig +0 -0
data/ChangeLog
CHANGED
|
@@ -1,8 +1,186 @@
|
|
|
1
|
+
2011-10-20 Michael Granger <ged@FaerieMUD.org>
|
|
2
|
+
|
|
3
|
+
* bin/treewhat:
|
|
4
|
+
Make the treewhat tool executable
|
|
5
|
+
[6d8a6dc8e9dc] [tip]
|
|
6
|
+
|
|
7
|
+
* Rakefile:
|
|
8
|
+
Made checkin check the manifest, too
|
|
9
|
+
[0a70199cddf3]
|
|
10
|
+
|
|
11
|
+
* Manifest.txt:
|
|
12
|
+
Updated the Manifest
|
|
13
|
+
[18f6fafe8b76]
|
|
14
|
+
|
|
15
|
+
* misc/ruby-ldap-controlsfix.patch, misc/ruby-terminfo-0.1.1.gem:
|
|
16
|
+
Removed old cruft under misc/
|
|
17
|
+
[b1af9f473836]
|
|
18
|
+
|
|
19
|
+
* History.md, History.rdoc, README.md, README.rdoc, Rakefile,
|
|
20
|
+
lib/treequel.rb, spec/lib/helpers.rb:
|
|
21
|
+
Bumped version to 1.6.0, added coverage support, updated history.
|
|
22
|
+
[2639d7f96151]
|
|
23
|
+
|
|
24
|
+
2011-10-06 Michael Granger <ged@FaerieMUD.org>
|
|
25
|
+
|
|
26
|
+
* bin/treewhat:
|
|
27
|
+
Adding workaround for vendored "sysexits" library under MacOX X 10.7
|
|
28
|
+
[b3474679e7f3]
|
|
29
|
+
|
|
30
|
+
2011-08-15 Michael Granger <ged@FaerieMUD.org>
|
|
31
|
+
|
|
32
|
+
* Rakefile:
|
|
33
|
+
Fix dev dependency version spec.
|
|
34
|
+
[d395c6dc9c1f] [github/master]
|
|
35
|
+
|
|
36
|
+
2011-08-09 Michael Granger <ged@FaerieMUD.org>
|
|
37
|
+
|
|
38
|
+
* lib/treequel/model.rb:
|
|
39
|
+
Add a log message to Treequel::Model#validate if some validations
|
|
40
|
+
fail.
|
|
41
|
+
[8678f65925df]
|
|
42
|
+
|
|
43
|
+
* lib/treequel/branchset.rb, spec/treequel/branchset_spec.rb:
|
|
44
|
+
Added convenience mutator to Treequel::Branchset for selecting
|
|
45
|
+
operational attributes.
|
|
46
|
+
[64c7bd0d6870]
|
|
47
|
+
|
|
48
|
+
2011-06-29 Michael Granger <ged@FaerieMUD.org>
|
|
49
|
+
|
|
50
|
+
* manual/src/connecting.page:
|
|
51
|
+
Add the auto-toc to the connecting page of the manual
|
|
52
|
+
[84f4281ddd08]
|
|
53
|
+
|
|
54
|
+
* Rakefile:
|
|
55
|
+
De-Yard the project
|
|
56
|
+
[8452d7f6ae81]
|
|
57
|
+
|
|
58
|
+
2011-06-28 Michael Granger <ged@FaerieMUD.org>
|
|
59
|
+
|
|
60
|
+
* Rakefile, spec/lib/helpers.rb, spec/treequel/schema_spec.rb:
|
|
61
|
+
Updated for newest version of RSpec, make specs behave nicer under
|
|
62
|
+
JRuby.
|
|
63
|
+
[35033dbe4ce4]
|
|
64
|
+
|
|
65
|
+
* lib/treequel/branch.rb, spec/treequel/branch_spec.rb:
|
|
66
|
+
Adding a Branch#dn2ufn workaround for jruby-ldap
|
|
67
|
+
[161b54f6d80c]
|
|
68
|
+
|
|
69
|
+
* Merged with fcb89939ba84
|
|
70
|
+
[da4761033bea]
|
|
71
|
+
|
|
72
|
+
* Rakefile, spec/treequel/monkeypatches_spec.rb:
|
|
73
|
+
Some fixes for JRuby + jruby-ldap
|
|
74
|
+
- Use a modern timezone for the Time tests
|
|
75
|
+
- Depend on jruby-ldap instead of ruby-ldap when run under JRuby
|
|
76
|
+
[126b71a64184]
|
|
77
|
+
|
|
78
|
+
2011-06-16 Michael Granger <ged@FaerieMUD.org>
|
|
79
|
+
|
|
80
|
+
* lib/treequel/directory.rb, spec/treequel/directory_spec.rb:
|
|
81
|
+
Add a copy constructor to Treequel::Directory to avoid two directory
|
|
82
|
+
objects sharing the same connection
|
|
83
|
+
[1a1383549960]
|
|
84
|
+
|
|
85
|
+
2011-06-14 Michael Granger <ged@FaerieMUD.org>
|
|
86
|
+
|
|
87
|
+
* lib/treequel/model.rb:
|
|
88
|
+
Adding debug logging to Treequel::Model#save
|
|
89
|
+
[fcb89939ba84]
|
|
90
|
+
|
|
91
|
+
2011-05-25 Michael Granger <ged@FaerieMUD.org>
|
|
92
|
+
|
|
93
|
+
* lib/treequel/constants.rb, lib/treequel/schema.rb,
|
|
94
|
+
lib/treequel/schema/attributetype.rb,
|
|
95
|
+
lib/treequel/schema/objectclass.rb, spec/data/opends.yml,
|
|
96
|
+
spec/data/ticket11.yml, spec/treequel/schema/attributetype_spec.rb,
|
|
97
|
+
spec/treequel/schema/matchingrule_spec.rb,
|
|
98
|
+
spec/treequel/schema/objectclass_spec.rb,
|
|
99
|
+
spec/treequel/schema_spec.rb:
|
|
100
|
+
Adding support for Sun OpenDS schema artifacts (fixes #11)
|
|
101
|
+
* various workarounds for malformed objectClass and attributeType
|
|
102
|
+
declarations
|
|
103
|
+
* Regex encoding fixes for 1.9.2
|
|
104
|
+
* Treequel::Schema.strict_parse_mode flag for enabling the old
|
|
105
|
+
(strict) parsing behavior.
|
|
106
|
+
[80ee64e262bb]
|
|
107
|
+
|
|
108
|
+
2011-04-26 Michael Granger <ged@FaerieMUD.org>
|
|
109
|
+
|
|
110
|
+
* lib/treequel/constants.rb:
|
|
111
|
+
Change WSP and SP patterns to literal characters instead of using a
|
|
112
|
+
charclass
|
|
113
|
+
[794b4e96de47]
|
|
114
|
+
|
|
115
|
+
2011-04-20 Michael Granger <ged@FaerieMUD.org>
|
|
116
|
+
|
|
117
|
+
* Rakefile:
|
|
118
|
+
Add guard for the 'hoe' require to the Rakefile.
|
|
119
|
+
[f07207762a63]
|
|
120
|
+
|
|
121
|
+
2011-04-07 Michael Granger <ged@FaerieMUD.org>
|
|
122
|
+
|
|
123
|
+
* .hgtags:
|
|
124
|
+
Added tag v1.5.3 for changeset 979f03a70e97
|
|
125
|
+
[028260f9e256]
|
|
126
|
+
|
|
127
|
+
* .hgsigs:
|
|
128
|
+
Added signature for changeset 1f396aca7d8b
|
|
129
|
+
[979f03a70e97] [v1.5.3]
|
|
130
|
+
|
|
131
|
+
* History.md, Rakefile, lib/treequel.rb:
|
|
132
|
+
Bump the patch version.
|
|
133
|
+
[1f396aca7d8b]
|
|
134
|
+
|
|
135
|
+
* lib/treequel/directory.rb, spec/lib/helpers.rb,
|
|
136
|
+
spec/treequel/directory_spec.rb:
|
|
137
|
+
Include regular attributes (in addition to operational ones) in the
|
|
138
|
+
root_dse, as AD stores everything in regular attributes.
|
|
139
|
+
[1bfa919abbb6]
|
|
140
|
+
|
|
141
|
+
2011-04-04 Michael Granger <ged@FaerieMUD.org>
|
|
142
|
+
|
|
143
|
+
* bin/treewhat:
|
|
144
|
+
Merged with 28576726289e
|
|
145
|
+
[ed9e50bcfe1b]
|
|
146
|
+
|
|
147
|
+
* bin/treewhat:
|
|
148
|
+
Adding schema artifacts to the treewhat command
|
|
149
|
+
[58261aeb1c82]
|
|
150
|
+
|
|
151
|
+
2011-03-28 Michael Granger <ged@FaerieMUD.org>
|
|
152
|
+
|
|
153
|
+
* bin/treewhat:
|
|
154
|
+
Updated the 'treewhat' schema tool.
|
|
155
|
+
* Show additional details for some schema objects.
|
|
156
|
+
[28576726289e]
|
|
157
|
+
|
|
158
|
+
2011-03-21 Michael Granger <ged@FaerieMUD.org>
|
|
159
|
+
|
|
160
|
+
* bin/treequel:
|
|
161
|
+
Adding a --no-tls flag to the treequel shell
|
|
162
|
+
[30a7f36e7321]
|
|
163
|
+
|
|
164
|
+
* Rakefile:
|
|
165
|
+
Re-enable the Yard plugin, but don't pollute the gemspec with Yard-
|
|
166
|
+
only options
|
|
167
|
+
[63134a964df5]
|
|
168
|
+
|
|
169
|
+
2011-03-18 Michael Granger <ged@FaerieMUD.org>
|
|
170
|
+
|
|
171
|
+
* manual/resources/css/manual.css:
|
|
172
|
+
CSS tweaks for examples
|
|
173
|
+
[67425ac31205]
|
|
174
|
+
|
|
175
|
+
* manual/resources/css/manual.css:
|
|
176
|
+
Manual CSS fixes for HTML5 elements under FF3.6
|
|
177
|
+
[72d3e439772f]
|
|
178
|
+
|
|
1
179
|
2011-03-17 Michael Granger <ged@FaerieMUD.org>
|
|
2
180
|
|
|
3
181
|
* .hgtags:
|
|
4
182
|
Added tag v1.5.2 for changeset 93550dca4121
|
|
5
|
-
[5132c59e6e3b]
|
|
183
|
+
[5132c59e6e3b]
|
|
6
184
|
|
|
7
185
|
* .hgsigs:
|
|
8
186
|
Added signature for changeset 585d3733441e
|
|
@@ -42,7 +220,7 @@
|
|
|
42
220
|
|
|
43
221
|
* spec/treequel/monkeypatches_spec.rb:
|
|
44
222
|
Fixing bad time tests uncovered by the DST switch
|
|
45
|
-
[63ac5e6f0b10]
|
|
223
|
+
[63ac5e6f0b10]
|
|
46
224
|
|
|
47
225
|
2011-03-08 Michael Granger <ged@FaerieMUD.org>
|
|
48
226
|
|
|
@@ -59,7 +237,7 @@
|
|
|
59
237
|
|
|
60
238
|
* .hgtags:
|
|
61
239
|
Added tag v1.5.1 for changeset b0945a1e6ee0
|
|
62
|
-
[f3dbf7033b58]
|
|
240
|
+
[f3dbf7033b58]
|
|
63
241
|
|
|
64
242
|
* .hgsigs:
|
|
65
243
|
Added signature for changeset 01662c7a2a07
|
data/{History.md → History.rdoc}
RENAMED
|
@@ -1,4 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
== v1.6.0 [2011-10-06] Michael Granger <ged@FaerieMUD.org>
|
|
2
|
+
|
|
3
|
+
- Adding workaround for vendored "sysexits" library under MacOX X 10.7
|
|
4
|
+
- Add a log message to Treequel::Model#validate if some validations
|
|
5
|
+
fail.
|
|
6
|
+
- Added convenience mutator to Treequel::Branchset for selecting
|
|
7
|
+
operational attributes.
|
|
8
|
+
- De-Yard the API docs
|
|
9
|
+
- Some fixes for JRuby + jruby-ldap
|
|
10
|
+
- Use a modern timezone for the Time tests
|
|
11
|
+
- Add a copy constructor to Treequel::Directory to avoid two directory
|
|
12
|
+
objects sharing the same connection
|
|
13
|
+
- Adding support for Sun OpenDS schema artifacts (fixes #11)
|
|
14
|
+
* various workarounds for malformed objectClass and attributeType
|
|
15
|
+
declarations
|
|
16
|
+
* Regex encoding fixes for 1.9.2
|
|
17
|
+
* Treequel::Schema.strict_parse_mode flag for enabling the old
|
|
18
|
+
(strict) parsing behavior.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
== v1.5.3 [2011-04-07] Michael Granger <ged@FaerieMUD.org>
|
|
22
|
+
|
|
23
|
+
- Added signature for changeset 1f396aca7d8b
|
|
24
|
+
|
|
25
|
+
== v1.5.3 [2011-04-07] Michael Granger <ged@FaerieMUD.org>
|
|
2
26
|
|
|
3
27
|
* Don't pollute the gemspec with Yard-only options
|
|
4
28
|
* Adding a --no-tls flag to the treequel shell
|
|
@@ -8,7 +32,7 @@
|
|
|
8
32
|
* Include regular attributes (in addition to operational ones) in the
|
|
9
33
|
root_dse, as AD stores everything in regular attributes.
|
|
10
34
|
|
|
11
|
-
|
|
35
|
+
== v1.5.2 [2011-03-17] Michael Granger <ged@FaerieMUD.org>
|
|
12
36
|
|
|
13
37
|
* Manual updates
|
|
14
38
|
* Fixing bad time tests uncovered by the DST switch
|
|
@@ -16,13 +40,13 @@
|
|
|
16
40
|
* Fix for Github issue [ged/treequel GH-1] (closes #7)
|
|
17
41
|
|
|
18
42
|
|
|
19
|
-
|
|
43
|
+
== v1.5.1 [2011-02-25] Michael Granger <ged@FaerieMUD.org>
|
|
20
44
|
|
|
21
45
|
* Adding handling of operational attributes to Treequel::Model schema
|
|
22
46
|
validations, updated the subschema test data to a recent OpenLDAP.
|
|
23
47
|
|
|
24
48
|
|
|
25
|
-
|
|
49
|
+
== v1.5.0 [2011-02-24] Michael Granger <ged@FaerieMUD.org>
|
|
26
50
|
|
|
27
51
|
* Make Treequel::Model::ObjectClass Enumerable
|
|
28
52
|
* Add a default directory to Treequel::Model for creating and
|
|
@@ -36,26 +60,26 @@
|
|
|
36
60
|
* Make dependencies not so pessimistic.
|
|
37
61
|
|
|
38
62
|
|
|
39
|
-
|
|
63
|
+
== v1.4.4 [2011-02-10] Michael Granger <ged@FaerieMUD.org>
|
|
40
64
|
|
|
41
65
|
* Add the .gemtest and Manifest to the manifest, bump patch version.
|
|
42
66
|
* Make Treequel testable via Gem Testers
|
|
43
67
|
* Hack to work around the pointer-mismanagement of LDAP::Mod
|
|
44
68
|
|
|
45
69
|
|
|
46
|
-
|
|
70
|
+
== v1.4.3 [2011-02-10] Michael Granger <ged@FaerieMUD.org>
|
|
47
71
|
|
|
48
72
|
* Added gem-testers support
|
|
49
73
|
* Added a monkeypatch to work around a memory-corruption issue in
|
|
50
74
|
ruby-ldap.
|
|
51
75
|
|
|
52
76
|
|
|
53
|
-
|
|
77
|
+
== v1.4.2 [2011-02-07] Michael Granger <ged@FaerieMUD.org>
|
|
54
78
|
|
|
55
79
|
Fixed missing DEFAULT_EDITOR constant.
|
|
56
80
|
|
|
57
81
|
|
|
58
|
-
|
|
82
|
+
== v1.4.1 [2011-02-02] Michael Granger <ged@FaerieMUD.org>
|
|
59
83
|
|
|
60
84
|
More Treequel shell cleanup based on feedback from Michael Hix.
|
|
61
85
|
|
|
@@ -63,13 +87,13 @@ More Treequel shell cleanup based on feedback from Michael Hix.
|
|
|
63
87
|
* Consistently verify RDN arguments where they're used.
|
|
64
88
|
|
|
65
89
|
|
|
66
|
-
|
|
90
|
+
== v1.4.1 [2011-02-02] Michael Granger <ged@FaerieMUD.org>
|
|
67
91
|
|
|
68
92
|
Bugfix:
|
|
69
93
|
|
|
70
94
|
* Fixed result error as fatal exception in Treequel shell
|
|
71
95
|
|
|
72
|
-
|
|
96
|
+
== v1.4.0 [2011-01-31] Michael Granger <ged@FaerieMUD.org>
|
|
73
97
|
|
|
74
98
|
Enhancements:
|
|
75
99
|
|
|
@@ -82,19 +106,19 @@ Bugfixes:
|
|
|
82
106
|
* Escape filter metacharacters in simple filter components
|
|
83
107
|
|
|
84
108
|
|
|
85
|
-
|
|
109
|
+
== v1.3.2
|
|
86
110
|
|
|
87
111
|
Bugfix:
|
|
88
112
|
|
|
89
113
|
* Ensure the entry hash that's passed to Treequel::Model#apply_applicable_mixins isn't modified; fixes a bug when modifying a new unsaved Model object.
|
|
90
114
|
|
|
91
115
|
|
|
92
|
-
|
|
116
|
+
== v1.3.1 [2011-01-17] Michael Granger <ged@FaerieMUD.org>
|
|
93
117
|
|
|
94
118
|
Fixed a bug that caused DN attributes in objects created via Treequel::Model.new_from_entry to be doubled.
|
|
95
119
|
|
|
96
120
|
|
|
97
|
-
|
|
121
|
+
== v1.3.0 [2011-01-13] Michael Granger <ged@FaerieMUD.org>
|
|
98
122
|
|
|
99
123
|
Enhancements:
|
|
100
124
|
|
|
@@ -137,8 +161,8 @@ Bugfixes:
|
|
|
137
161
|
* Simplified and removed duplication from the logging code
|
|
138
162
|
* Fixed a bug in the proxy method for single-letter attribute names.
|
|
139
163
|
* Monkeypatched Date for LDAP time type conversions
|
|
140
|
-
* Change the return values of unset attributes to distinguish between
|
|
141
|
-
attributes
|
|
164
|
+
* Change the return values of unset attributes to distinguish between
|
|
165
|
+
SINGLE and non-SINGLE attributes
|
|
142
166
|
* Treequel::Branch
|
|
143
167
|
- Check for explicit nil DN in .new
|
|
144
168
|
- Check for nil parent_dn in #parent
|
|
@@ -146,14 +170,24 @@ Bugfixes:
|
|
|
146
170
|
- Don't cache attempts to fetch invalid attributes
|
|
147
171
|
|
|
148
172
|
|
|
149
|
-
|
|
173
|
+
== v1.2.2 [2010-12-14] Michael Granger <ged@FaerieMUD.org>
|
|
150
174
|
|
|
151
175
|
Bugfixes for Treequel::Branch, Treequel::Model.
|
|
152
176
|
|
|
153
177
|
|
|
154
|
-
|
|
178
|
+
== v1.2.1 [2010-12-13] Michael Granger <ged@FaerieMUD.org>
|
|
179
|
+
|
|
180
|
+
- Converted to Hoe.
|
|
181
|
+
|
|
182
|
+
Bugfix:
|
|
155
183
|
|
|
156
|
-
|
|
184
|
+
- objectClasses listed in Treequel::Model::ObjectClass.model_objectclasses
|
|
185
|
+
can be Strings, too.
|
|
157
186
|
|
|
158
|
-
|
|
187
|
+
== v1.2.0 [2010-11-30] Michael Granger <ged@FaerieMUD.org>
|
|
159
188
|
|
|
189
|
+
- Added hash-key conversion so Branches can be constructed with
|
|
190
|
+
Symbol-key hashargs.
|
|
191
|
+
- Adding 'Treequel::Branchset#from' mutator for changing the base DN.
|
|
192
|
+
- Fixed treequel shell's cp to support relative and absolute DNs
|
|
193
|
+
- Converted to RSpec 2.0
|
data/Manifest.txt
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.gemtest
|
|
2
2
|
ChangeLog
|
|
3
|
-
History.
|
|
3
|
+
History.rdoc
|
|
4
4
|
LICENSE
|
|
5
5
|
Manifest.txt
|
|
6
|
-
README.
|
|
6
|
+
README.rdoc
|
|
7
7
|
Rakefile
|
|
8
8
|
bin/treeirb
|
|
9
9
|
bin/treequel
|
|
@@ -39,8 +39,11 @@ lib/treequel/schema/objectclass.rb
|
|
|
39
39
|
lib/treequel/schema/table.rb
|
|
40
40
|
lib/treequel/sequel_integration.rb
|
|
41
41
|
lib/treequel/utils.rb
|
|
42
|
+
spec/data/ad_schema.yml
|
|
42
43
|
spec/data/objectClasses.yml
|
|
44
|
+
spec/data/opends.yml
|
|
43
45
|
spec/data/schema.yml
|
|
46
|
+
spec/data/ticket11.yml
|
|
44
47
|
spec/lib/constants.rb
|
|
45
48
|
spec/lib/helpers.rb
|
|
46
49
|
spec/lib/matchers.rb
|
data/{README.md → README.rdoc}
RENAMED
|
File without changes
|
data/Rakefile
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env rake
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
begin
|
|
4
|
+
require 'hoe'
|
|
5
|
+
rescue LoadError
|
|
6
|
+
abort "This Rakefile requires hoe (gem install hoe)"
|
|
7
|
+
end
|
|
4
8
|
|
|
5
9
|
Hoe.plugin :mercurial
|
|
6
10
|
Hoe.plugin :signing
|
|
7
|
-
Hoe.plugin :yard
|
|
8
11
|
Hoe.plugin :manualgen
|
|
9
12
|
|
|
10
13
|
Hoe.plugins.delete :rubyforge
|
|
11
14
|
|
|
12
15
|
hoespec = Hoe.spec 'treequel' do
|
|
13
|
-
self.
|
|
14
|
-
self.
|
|
15
|
-
self.
|
|
16
|
+
self.readme_file = 'README.rdoc'
|
|
17
|
+
self.history_file = 'History.rdoc'
|
|
18
|
+
self.extra_rdoc_files = Rake::FileList[ '*.rdoc' ]
|
|
16
19
|
|
|
17
20
|
self.developer 'Michael Granger', 'ged@FaerieMUD.org'
|
|
18
21
|
self.developer 'Mahlon E. Smith', 'mahlon@martini.nu'
|
|
19
22
|
|
|
20
|
-
|
|
21
|
-
'
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
if RUBY_PLATFORM == 'java'
|
|
24
|
+
self.dependency 'jruby-ldap', '~> 0.0.1'
|
|
25
|
+
else
|
|
26
|
+
self.dependency 'ruby-ldap', '~> 0.9'
|
|
27
|
+
end
|
|
28
|
+
self.dependency 'diff-lcs', '~> 1.1'
|
|
29
|
+
self.dependency 'rspec', '~> 2.6.0', :developer
|
|
30
|
+
self.dependency 'ruby-termios', '~> 0.9', :developer
|
|
31
|
+
self.dependency 'ruby-terminfo', '~> 0.1', :developer
|
|
32
|
+
self.dependency 'columnize', '~> 0.3', :developer
|
|
33
|
+
self.dependency 'sysexits', '~> 1.0', :developer
|
|
34
|
+
self.dependency 'sequel', '~> 3.20', :developer
|
|
32
35
|
|
|
33
36
|
self.spec_extras[:licenses] = ["BSD"]
|
|
34
37
|
self.spec_extras[:post_install_message] = [
|
|
@@ -43,12 +46,11 @@ hoespec = Hoe.spec 'treequel' do
|
|
|
43
46
|
"You can install them automatically if you use the --development flag when",
|
|
44
47
|
"installing Treequel."
|
|
45
48
|
].join( "\n" )
|
|
46
|
-
self.spec_extras[:signing_key] = '/Volumes/Keys/ged-private_gem_key.pem'
|
|
47
49
|
|
|
48
50
|
self.require_ruby_version( '>=1.8.7' )
|
|
49
51
|
|
|
50
|
-
self.rspec_options += ['-cfd'] if self.respond_to?( :rspec_options= )
|
|
51
52
|
self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
|
|
53
|
+
self.check_history_on_release = true if self.respond_to?( :check_history_on_release= )
|
|
52
54
|
self.manual_source_dir = 'src' if self.respond_to?( :manual_source_dir= )
|
|
53
55
|
|
|
54
56
|
self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
|
|
@@ -56,6 +58,38 @@ end
|
|
|
56
58
|
|
|
57
59
|
ENV['VERSION'] ||= hoespec.spec.version.to_s
|
|
58
60
|
|
|
59
|
-
#
|
|
60
|
-
task :
|
|
61
|
+
# Ensure the specs pass before checking in
|
|
62
|
+
task 'hg:precheckin' => [ :check_history, :check_manifest, :spec ]
|
|
63
|
+
|
|
64
|
+
### Make the ChangeLog update if the repo has changed since it was last built
|
|
65
|
+
file '.hg/branch'
|
|
66
|
+
file 'ChangeLog' => '.hg/branch' do |task|
|
|
67
|
+
$stderr.puts "Updating the changelog..."
|
|
68
|
+
content = make_changelog()
|
|
69
|
+
File.open( task.name, 'w', 0644 ) do |fh|
|
|
70
|
+
fh.print( content )
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Rebuild the ChangeLog immediately before release
|
|
75
|
+
task :prerelease => 'ChangeLog'
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
desc "Build a coverage report"
|
|
79
|
+
task :coverage do
|
|
80
|
+
ENV["COVERAGE"] = 'yes'
|
|
81
|
+
Rake::Task[:spec].invoke
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if Rake::Task.task_defined?( '.gemtest' )
|
|
85
|
+
Rake::Task['.gemtest'].clear
|
|
86
|
+
task '.gemtest' do
|
|
87
|
+
$stderr.puts "Not including a .gemtest until I'm confident the test suite is idempotent."
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# Add admin app testing directories to the clobber list
|
|
93
|
+
CLOBBER.include( 'ChangeLog' )
|
|
94
|
+
|
|
61
95
|
|
data/bin/treewhat
CHANGED
data/lib/treequel/branch.rb
CHANGED
|
@@ -266,7 +266,34 @@ class Treequel::Branch
|
|
|
266
266
|
### Return the entry's DN as an RFC1781-style UFN (User-Friendly Name).
|
|
267
267
|
### @return [String]
|
|
268
268
|
def to_ufn
|
|
269
|
-
|
|
269
|
+
if LDAP.respond_to?( :dn2ufn )
|
|
270
|
+
return LDAP.dn2ufn( self.dn )
|
|
271
|
+
|
|
272
|
+
# An implementation for LDAP libraries with no
|
|
273
|
+
# dn2ufn
|
|
274
|
+
else
|
|
275
|
+
ufn = ''
|
|
276
|
+
tuples = self.split_dn
|
|
277
|
+
|
|
278
|
+
# Separate the trailing domainComponents
|
|
279
|
+
dcs = []
|
|
280
|
+
dcs << tuples.pop while tuples.last =~ /^dc\s*=/i
|
|
281
|
+
|
|
282
|
+
# Append the non-dc tuples with their attributes stripped first
|
|
283
|
+
ufn << tuples.collect do |rdn|
|
|
284
|
+
rdn.
|
|
285
|
+
gsub(/\b#{ATTRIBUTE_TYPE}\s*=/, '').
|
|
286
|
+
gsub(/\s*\+\s*/, ' + ')
|
|
287
|
+
end.join( ', ' )
|
|
288
|
+
|
|
289
|
+
# Now append the DCs joined with dots
|
|
290
|
+
unless dcs.empty?
|
|
291
|
+
ufn << ', '
|
|
292
|
+
ufn << dcs.reverse.map {|rdn| rdn.sub(/dc\s*=\s*/i, '') }.join( '.' )
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
return ufn
|
|
296
|
+
end
|
|
270
297
|
end
|
|
271
298
|
|
|
272
299
|
|
data/lib/treequel/branchset.rb
CHANGED
|
@@ -366,6 +366,15 @@ class Treequel::Branchset
|
|
|
366
366
|
end
|
|
367
367
|
|
|
368
368
|
|
|
369
|
+
### Return a clone of the receiving Branchset that will fetch any operational attributes
|
|
370
|
+
### in addition to its own. This is exactly equivalent to:
|
|
371
|
+
###
|
|
372
|
+
### branchset.select( :+ ).
|
|
373
|
+
def with_operational_attributes
|
|
374
|
+
return self.select( :+ )
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
|
|
369
378
|
### If called with a +new_limit+, returns a clone of the receiving Branchset that will
|
|
370
379
|
### fetch (at most) +new_limit+ Branches. If no +new_limit+ argument is specified,
|
|
371
380
|
### returns the Branchset's current limit. A limit of '0' means that all Branches
|