treequel 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,26 +1,55 @@
1
+ 2011-02-25 Michael Granger <ged@FaerieMUD.org>
2
+
3
+ * .hgtags:
4
+ Added tag v1.5.1 for changeset b0945a1e6ee0
5
+ [f3dbf7033b58] [master, tip]
6
+
7
+ * .hgsigs:
8
+ Added signature for changeset 01662c7a2a07
9
+ [b0945a1e6ee0] [v1.5.1]
10
+
11
+ * Rakefile, lib/treequel.rb:
12
+ Remove YARD flags from gemspec, bump patch version.
13
+ [01662c7a2a07]
14
+
1
15
  2011-02-24 Michael Granger <ged@FaerieMUD.org>
2
16
 
17
+ * lib/treequel/branch.rb, lib/treequel/model/schemavalidations.rb,
18
+ spec/data/schema.yml, spec/lib/constants.rb,
19
+ spec/treequel/branch_spec.rb,
20
+ spec/treequel/model/schemavalidations_spec.rb,
21
+ spec/treequel/schema_spec.rb:
22
+ Adding handling of operational attributes to Treequel::Model schema
23
+ validations, updated the subschema test data to a recent OpenLDAP.
24
+ [ba5c542de616]
25
+
3
26
  * .hgtags:
4
27
  Added tag v1.5.0 for changeset 6addc39b422a
5
- [ae45276a5db6] [master, tip]
28
+ [ae45276a5db6]
6
29
 
7
30
  * .hgsigs:
8
31
  Added signature for changeset 0efb57ad19ad
9
32
  [6addc39b422a] [v1.5.0]
10
33
 
11
34
  * Merged with a299917323f8
12
- [0efb57ad19ad] [github/master]
35
+ [0efb57ad19ad]
13
36
 
14
37
  * .hgsigs:
15
38
  Added signature for changeset 76473835cff3
16
39
  [bc46034261cc]
17
40
 
41
+ 2011-02-17 Michael Granger <ged@FaerieMUD.org>
42
+
43
+ * Rakefile:
44
+ Adding the history file to the hoespec
45
+ [a299917323f8]
46
+
18
47
  2011-02-22 Michael Granger <ged@FaerieMUD.org>
19
48
 
20
49
  * lib/treequel/model/objectclass.rb,
21
50
  spec/treequel/model/objectclass_spec.rb:
22
51
  Make Treequel::Model::ObjectClass Enumerable, fix a spec error.
23
- [76473835cff3]
52
+ [76473835cff3] [github/master]
24
53
 
25
54
  * lib/treequel.rb, lib/treequel/branch.rb, lib/treequel/model.rb,
26
55
  lib/treequel/model/objectclass.rb,
@@ -35,12 +64,6 @@
35
64
  Treequel::Delegation
36
65
  [23ea792e2b86]
37
66
 
38
- 2011-02-17 Michael Granger <ged@FaerieMUD.org>
39
-
40
- * Rakefile:
41
- Adding the history file to the hoespec
42
- [a299917323f8]
43
-
44
67
  2011-02-16 Michael Granger <ged@FaerieMUD.org>
45
68
 
46
69
  * lib/treequel/branch.rb, lib/treequel/branchset.rb,
@@ -202,12 +225,6 @@
202
225
  Merged with 411:ddbb3c3bdd00
203
226
  [ba7895d4e64b]
204
227
 
205
- 2011-01-17 Michael Granger <ged@FaerieMUD.org>
206
-
207
- * History.md:
208
- Updated History
209
- [9c4db65b40d7]
210
-
211
228
  2011-01-18 Michael Granger <ged@FaerieMUD.org>
212
229
 
213
230
  * manual/layouts/default.erb, manual/resources/css/manual.css,
@@ -272,6 +289,10 @@
272
289
 
273
290
  2011-01-17 Michael Granger <ged@FaerieMUD.org>
274
291
 
292
+ * History.md:
293
+ Updated History
294
+ [9c4db65b40d7]
295
+
275
296
  * .hgtags:
276
297
  Added tag v1.3.1 for changeset a6ea030fc88f
277
298
  [4caac8976d00]
@@ -380,14 +401,14 @@
380
401
  Automated merge with ssh://deveiate/Treequel
381
402
  [62e7348050eb]
382
403
 
383
- * bin/treequel, lib/treequel/model/objectclass.rb:
384
- Aesthetic cleanup
385
- [78e65cb8f30a]
386
-
387
404
  * bin/treequel:
388
405
  More logging constant fixes for the treequel shell.
389
406
  [6e159f32ed07]
390
407
 
408
+ * bin/treequel, lib/treequel/model/objectclass.rb:
409
+ Aesthetic cleanup
410
+ [78e65cb8f30a]
411
+
391
412
  2011-01-04 Michael Granger <ged@FaerieMUD.org>
392
413
 
393
414
  * bin/treequel:
@@ -1514,12 +1535,6 @@
1514
1535
  * Re-sorted the OID constants to be in OID order
1515
1536
  [8b2fb7415412]
1516
1537
 
1517
- 2010-01-13 Michael Granger <ged@FaerieMUD.org>
1518
-
1519
- * bin/treequel:
1520
- Make treequel shell's 'cat' command error for non-existant entries
1521
- [84087b01d473]
1522
-
1523
1538
  2010-01-24 Michael Granger <ged@FaerieMUD.org>
1524
1539
 
1525
1540
  * bin/treequel:
@@ -1528,6 +1543,10 @@
1528
1543
 
1529
1544
  2010-01-13 Michael Granger <ged@FaerieMUD.org>
1530
1545
 
1546
+ * bin/treequel:
1547
+ Make treequel shell's 'cat' command error for non-existant entries
1548
+ [84087b01d473]
1549
+
1531
1550
  * bin/treequel:
1532
1551
  Fix the 'grep' command in the Treequel shell.
1533
1552
  [669a09149f48]
@@ -1558,6 +1577,19 @@
1558
1577
  Updated build system
1559
1578
  [00ac1bc4e917]
1560
1579
 
1580
+ 2009-12-22 Michael Granger <ged@FaerieMUD.org>
1581
+
1582
+ * bin/treequel:
1583
+ Reworked LDIF display colors in the shell to be more visible.
1584
+ [d77a0bf26034]
1585
+
1586
+ * bin/treequel:
1587
+ Make the treequel shell fall back to plain connect (with a warning)
1588
+ if TLS fails.
1589
+ [9aeccec1ee84]
1590
+
1591
+ 2010-01-07 Michael Granger <ged@FaerieMUD.org>
1592
+
1561
1593
  * bin/treequel, lib/treequel/branch.rb, lib/treequel/constants.rb,
1562
1594
  lib/treequel/utils.rb:
1563
1595
  Improvements to the treequel shell, fixes for 1.9.1.
@@ -1579,15 +1611,6 @@
1579
1611
 
1580
1612
  2009-12-22 Michael Granger <ged@FaerieMUD.org>
1581
1613
 
1582
- * bin/treequel:
1583
- Reworked LDIF display colors in the shell to be more visible.
1584
- [d77a0bf26034]
1585
-
1586
- * bin/treequel:
1587
- Make the treequel shell fall back to plain connect (with a warning)
1588
- if TLS fails.
1589
- [9aeccec1ee84]
1590
-
1591
1614
  * examples/ldap-monitor.rb, examples/ldap-
1592
1615
  monitor/public/css/master.css, examples/ldap-
1593
1616
  monitor/public/images/card_small.png, examples/ldap-
@@ -1608,6 +1631,27 @@
1608
1631
  Automated merge with ssh://hg@deveiate/Treequel
1609
1632
  [3bdd645530fe]
1610
1633
 
1634
+ 2009-12-18 Michael Granger <ged@FaerieMUD.org>
1635
+
1636
+ * Merged with 5fd4033e1556
1637
+ [9571c9d8e4dd]
1638
+
1639
+ 2009-12-17 Michael Granger <ged@FaerieMUD.org>
1640
+
1641
+ * docs/openldap-oids.txt, lib/treequel/constants.rb,
1642
+ lib/treequel/controls/contentsync.rb,
1643
+ lib/treequel/controls/persistentsearch.rb,
1644
+ lib/treequel/directory.rb:
1645
+ More controls work, started several more control modules.
1646
+ * Adding a breakdown of all the controls the OpenLDAP server I have
1647
+ has, so I know which controls I can test against.
1648
+ * Added some control constants.
1649
+ * Added the ContentSyncControl and the PersistentSearchControl.
1650
+ * Added a Directory#supported_controls method.
1651
+ [ffc2ebacdfd0]
1652
+
1653
+ 2009-12-22 Michael Granger <ged@FaerieMUD.org>
1654
+
1611
1655
  * bin/treequel, examples/ldap-monitor.rb, examples/ldap-
1612
1656
  monitor/public/css/master.css, examples/ldap-
1613
1657
  monitor/public/images/card_small.png, examples/ldap-
@@ -1636,25 +1680,6 @@
1636
1680
  * Bumped the version to 1.0.2.
1637
1681
  [31c326800cc6]
1638
1682
 
1639
- 2009-12-18 Michael Granger <ged@FaerieMUD.org>
1640
-
1641
- * Merged with 5fd4033e1556
1642
- [9571c9d8e4dd]
1643
-
1644
- 2009-12-17 Michael Granger <ged@FaerieMUD.org>
1645
-
1646
- * docs/openldap-oids.txt, lib/treequel/constants.rb,
1647
- lib/treequel/controls/contentsync.rb,
1648
- lib/treequel/controls/persistentsearch.rb,
1649
- lib/treequel/directory.rb:
1650
- More controls work, started several more control modules.
1651
- * Adding a breakdown of all the controls the OpenLDAP server I have
1652
- has, so I know which controls I can test against.
1653
- * Added some control constants.
1654
- * Added the ContentSyncControl and the PersistentSearchControl.
1655
- * Added a Directory#supported_controls method.
1656
- [ffc2ebacdfd0]
1657
-
1658
1683
  2009-12-16 Michael Granger <ged@FaerieMUD.org>
1659
1684
 
1660
1685
  * Rakefile, lib/treequel/mixins.rb, project.yml:
@@ -2749,16 +2774,6 @@
2749
2774
  Merged. Someday I'll get the hang of this.
2750
2775
  [a5e715f5f877]
2751
2776
 
2752
- 2009-07-29 Michael Granger <ged@FaerieMUD.org>
2753
-
2754
- * .hgignore, Rakefile, docs/manual/src/index.page,
2755
- lib/treequel/filter.rb, project.yml, spec/treequel/filter_spec.rb:
2756
- * Adding coverage cache to the ignorefile.
2757
- * Added ruby-ldap dependency. Yay!
2758
- * More work on the manual.
2759
- * Made Treequel::Branch#filter treat a Hash like an array of tuples.
2760
- [46e6dce0c011]
2761
-
2762
2777
  2009-07-28 Michael Granger <ged@FaerieMUD.org>
2763
2778
 
2764
2779
  * .hgignore, Rakefile:
@@ -2769,6 +2784,16 @@
2769
2784
  Manual rewording, .hgignore updates
2770
2785
  [89f74035c67d]
2771
2786
 
2787
+ 2009-07-29 Michael Granger <ged@FaerieMUD.org>
2788
+
2789
+ * .hgignore, Rakefile, docs/manual/src/index.page,
2790
+ lib/treequel/filter.rb, project.yml, spec/treequel/filter_spec.rb:
2791
+ * Adding coverage cache to the ignorefile.
2792
+ * Added ruby-ldap dependency. Yay!
2793
+ * More work on the manual.
2794
+ * Made Treequel::Branch#filter treat a Hash like an array of tuples.
2795
+ [46e6dce0c011]
2796
+
2772
2797
  2009-07-27 Michael Granger <ged@FaerieMUD.org>
2773
2798
 
2774
2799
  * .hgignore, Rakefile:
@@ -2780,10 +2805,6 @@
2780
2805
 
2781
2806
  2009-07-24 Michael Granger <ged@FaerieMUD.org>
2782
2807
 
2783
- * .hgsub, .hgsubstate:
2784
- Unlinking the subrepo, as it doesn't behave well enough quite yet.
2785
- [fc3c3bac2c22]
2786
-
2787
2808
  * .hgsub, .hgsubstate:
2788
2809
  Merging build system fixes
2789
2810
  [b7a919b2ad5d]
@@ -2796,6 +2817,10 @@
2796
2817
  Removing subrepo, as it doesn't work quite the way I'd hoped.
2797
2818
  [f631900a9ad8] <build-system-fixes>
2798
2819
 
2820
+ * .hgsub, .hgsubstate:
2821
+ Unlinking the subrepo, as it doesn't behave well enough quite yet.
2822
+ [fc3c3bac2c22]
2823
+
2799
2824
  * .hgignore, .hgsubstate, Rakefile, Rakefile.local, project.yml:
2800
2825
  Initial commit of Mercurial-based tasks
2801
2826
  [65236b2101e5] <build-system-fixes>
data/Rakefile CHANGED
@@ -50,8 +50,6 @@ hoespec = Hoe.spec 'treequel' do
50
50
  self.rspec_options += ['-cfd'] if self.respond_to?( :rspec_options= )
51
51
  self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
52
52
  self.manual_source_dir = 'src' if self.respond_to?( :manual_source_dir= )
53
- self.yard_opts = [ '--use-cache', '--protected', '--verbose' ] if
54
- self.respond_to?( :yard_opts= )
55
53
 
56
54
  self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
57
55
  end
@@ -547,7 +547,10 @@ class Treequel::Branch
547
547
  ### Return OIDs (numeric OIDs as Strings, named OIDs as Symbols) for each of the
548
548
  ### receiver's operational attributes.
549
549
  def operational_attribute_oids
550
- return self.operational_attribute_types.map( &:oid )
550
+ return self.operational_attribute_types.inject([]) do |oids, attrtype|
551
+ oids.push( *attrtype.names )
552
+ oids << attrtype.oid
553
+ end
551
554
  end
552
555
 
553
556
 
@@ -7,6 +7,14 @@ require 'treequel/model'
7
7
  # A collection of schema-based validations for LDAP model objects.
8
8
  module Treequel::Model::SchemaValidations
9
9
 
10
+ # OpenLDAP servers with syncrepl include 'entryCSN' and 'contextCSN' attributes, but
11
+ # don't define its attribute type in the subschema. This is a list of operational
12
+ # attribute types that don't appear in the subschema that shouldn't be considered when
13
+ # validating MUST and MAY attributes.
14
+ # (http://www.openldap.org/its/index.cgi/Development?id=5573)
15
+ IGNORED_OPERATIONAL_ATTRS = [ :entryCSN, :contextCSN ]
16
+
17
+
10
18
  ### Entrypoint -- run all the validations, adding any errors to the
11
19
  ### object's #error collector.
12
20
  def validate( options={} )
@@ -46,7 +54,9 @@ module Treequel::Model::SchemaValidations
46
54
  def validate_may_attributes
47
55
  hash = (self.entry || {} ).merge( @values )
48
56
  attributes = hash.keys.map( &:to_sym ).uniq
49
- valid_attributes = self.valid_attribute_oids
57
+ valid_attributes = self.valid_attribute_oids +
58
+ self.operational_attribute_oids +
59
+ IGNORED_OPERATIONAL_ATTRS
50
60
 
51
61
  self.log.debug "Validating MAY attributes: %p against the list of valid OIDs: %p" %
52
62
  [ attributes, valid_attributes ]
data/lib/treequel.rb CHANGED
@@ -25,7 +25,7 @@ end
25
25
 
26
26
  # A library for interacting with LDAP modelled after Sequel.
27
27
  #
28
- # @version 1.5.0
28
+ # @version 1.5.1
29
29
  #
30
30
  # @example
31
31
  # # Connect to the directory at the specified URL
@@ -53,10 +53,10 @@ end
53
53
  module Treequel
54
54
 
55
55
  # Library version
56
- VERSION = '1.5.0'
56
+ VERSION = '1.5.1'
57
57
 
58
58
  # VCS revision
59
- REVISION = %q$Revision: fb6b6fc03dea $
59
+ REVISION = %q$Revision: 01662c7a2a07 $
60
60
 
61
61
  # Common paths for ldap.conf
62
62
  COMMON_LDAP_CONF_PATHS = %w[