net-ldap-1 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. data/.autotest +11 -0
  2. data/.rspec +2 -0
  3. data/Contributors.rdoc +21 -0
  4. data/Hacking.rdoc +68 -0
  5. data/History.rdoc +186 -0
  6. data/License.rdoc +29 -0
  7. data/Manifest.txt +49 -0
  8. data/README.rdoc +52 -0
  9. data/Rakefile +74 -0
  10. data/autotest/discover.rb +1 -0
  11. data/lib/net-ldap.rb +2 -0
  12. data/lib/net/ber.rb +318 -0
  13. data/lib/net/ber/ber_parser.rb +168 -0
  14. data/lib/net/ber/core_ext.rb +62 -0
  15. data/lib/net/ber/core_ext/array.rb +96 -0
  16. data/lib/net/ber/core_ext/bignum.rb +22 -0
  17. data/lib/net/ber/core_ext/false_class.rb +10 -0
  18. data/lib/net/ber/core_ext/fixnum.rb +66 -0
  19. data/lib/net/ber/core_ext/string.rb +65 -0
  20. data/lib/net/ber/core_ext/true_class.rb +12 -0
  21. data/lib/net/ldap.rb +1618 -0
  22. data/lib/net/ldap/dataset.rb +154 -0
  23. data/lib/net/ldap/dn.rb +225 -0
  24. data/lib/net/ldap/entry.rb +185 -0
  25. data/lib/net/ldap/filter.rb +759 -0
  26. data/lib/net/ldap/password.rb +31 -0
  27. data/lib/net/ldap/pdu.rb +273 -0
  28. data/lib/net/snmp.rb +268 -0
  29. data/net-ldap-1.gemspec +58 -0
  30. data/spec/integration/ssl_ber_spec.rb +36 -0
  31. data/spec/spec.opts +2 -0
  32. data/spec/spec_helper.rb +5 -0
  33. data/spec/unit/ber/ber_spec.rb +109 -0
  34. data/spec/unit/ber/core_ext/string_spec.rb +51 -0
  35. data/spec/unit/ldap/dn_spec.rb +80 -0
  36. data/spec/unit/ldap/entry_spec.rb +51 -0
  37. data/spec/unit/ldap/filter_spec.rb +84 -0
  38. data/spec/unit/ldap_spec.rb +78 -0
  39. data/test/common.rb +3 -0
  40. data/test/test_entry.rb +59 -0
  41. data/test/test_filter.rb +122 -0
  42. data/test/test_ldap_connection.rb +24 -0
  43. data/test/test_ldif.rb +79 -0
  44. data/test/test_password.rb +17 -0
  45. data/test/test_rename.rb +77 -0
  46. data/test/test_snmp.rb +114 -0
  47. data/test/testdata.ldif +101 -0
  48. data/testserver/ldapserver.rb +210 -0
  49. data/testserver/testdata.ldif +101 -0
  50. metadata +197 -0
@@ -0,0 +1,11 @@
1
+ require 'rubygems'
2
+ #require 'redgreen/autotest'
3
+ require 'autotest/timestamp'
4
+
5
+ Autotest.add_hook :initialize do |autotest|
6
+ %w{.git .hg .DS_Store ._* tmp log doc}.each do |exception|
7
+ autotest.add_exception(exception)
8
+ end
9
+ end
10
+
11
+ # vim: syntax=ruby
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --colour
2
+ --format documentation
@@ -0,0 +1,21 @@
1
+ == Contributors
2
+
3
+ Net::LDAP was originally developed by:
4
+
5
+ * Francis Cianfrocca (garbagecat)
6
+
7
+ Contributions since:
8
+
9
+ * Emiel van de Laar (emiel)
10
+ * Rory O'Connell (roryo)
11
+ * Kaspar Schiess (kschiess)
12
+ * Austin Ziegler (halostatue)
13
+ * Dimitrij Denissenko (dim)
14
+ * James Hewitt (jamstah)
15
+ * Kouhei Sutou (kou)
16
+ * Lars Tobias Skjong-Børsting (larstobi)
17
+ * Rory O'Connell (roryo)
18
+ * Tony Headford (tonyheadford)
19
+ * Derek Harmel (derekharmel)
20
+ * Erik Hetzner (egh)
21
+ * nowhereman
@@ -0,0 +1,68 @@
1
+ = Hacking on Net::LDAP
2
+
3
+ We welcome your contributions to Net::LDAP. We accept most contributions, but
4
+ there are ways to increase the chance of your patch being accepted quickly.
5
+
6
+ == Licensing
7
+
8
+ Net::LDAP 0.2 and later are be licensed under an MIT-style license; any
9
+ contributions after 2010-04-20 must be under this license to be accepted.
10
+
11
+ == Formatting
12
+
13
+ * Your patches should be formatted like the rest of Net::LDAP.
14
+ * We use a text wrap of 76–78 characters, especially for documentation
15
+ contents.
16
+ * Operators should have spaces around them.
17
+ * Method definitions should have parentheses around arguments (and no
18
+ parentheses if there are no arguments).
19
+ * Indentation should be kept as flat as possible; this may mean being more
20
+ explicit with constants.
21
+
22
+
23
+ We welcome your contributions to Net::LDAP. To increase the chances of your
24
+ patches being accepted, we recommend that you follow the guidelines below:
25
+
26
+ == Documentation
27
+
28
+ * Documentation: {net-ldap}[http://net-ldap.rubyforge.org/]
29
+
30
+ It is very important that, if you add new methods or objects, your code is
31
+ well-documented. The purpose of the changes should be clearly described so that
32
+ even if this is a feature we do not use, we can understand its purpose.
33
+
34
+ We also encourage documentation-only contributions that improve the
35
+ documentation of Net::LDAP.
36
+
37
+ We encourage you to provide a good summary of your as a modification to
38
+ +History.rdoc+, and if you're not yet named as a contributor, include a
39
+ modification to +Contributors.rdoc+ to add yourself.
40
+
41
+ == Tests
42
+
43
+ The Net::LDAP team uses RSpec for unit testing; all changes must have rspec
44
+ tests for any new or changed features.
45
+
46
+ Your changes should have been tested against at least one real LDAP server; the
47
+ current tests are not sufficient to find all possible bugs. It's unlikely that
48
+ they will ever be sufficient given the variations in LDAP server behaviour.
49
+
50
+ If you're introducing a new feature, it would be preferred for you to provide
51
+ us with a sample LDIF data file for importing into LDAP servers for testing.
52
+
53
+ == Development Dependencies
54
+
55
+ Net::LDAP uses several libraries during development, all of which can be
56
+ installed using RubyGems.
57
+
58
+ * *hoe*
59
+ * *hoe-git*
60
+ * *metaid*
61
+ * *rspec*
62
+ * *flexmock*
63
+
64
+ == Participation
65
+
66
+ * RubyForge: {net-ldap}[http://rubyforge.org/projects/net-ldap]
67
+ * GitHub: {ruby-ldap/ruby-net-ldap}[https://github.com/ruby-ldap/ruby-net-ldap/]
68
+ * Group: {ruby-ldap}[http://groups.google.com/group/ruby-ldap]
@@ -0,0 +1,186 @@
1
+ === Net::LDAP 0.3.1 / 2012-02-15
2
+ * Bug Fixes:
3
+ * Bundler should now work again
4
+
5
+ === Net::LDAP 0.3.0 / 2012-02-14
6
+ * Major changes:
7
+ * Now uses UTF-8 strings instead of ASCII-8 per the LDAP RFC
8
+ * Major Enhancements:
9
+ * Adding continuation reference processing
10
+ * Bug Fixes:
11
+ * Fixes usupported object type #139
12
+ * Fixes Net::LDAP namespace errors
13
+ * Return nil instead of an empty array if the search fails
14
+
15
+ === Net::LDAP 0.2.2 / 2011-03-26
16
+ * Bug Fixes:
17
+ * Fixed the call to Net::LDAP.modify_ops from Net::LDAP#modify.
18
+
19
+ === Net::LDAP 0.2.1 / 2011-03-23
20
+ * Bug Fixes:
21
+ * Net::LDAP.modify_ops was broken and is now fixed.
22
+
23
+ === Net::LDAP 0.2 / 2011-03-22
24
+ * Major Enhancements:
25
+ * Net::LDAP::Filter changes:
26
+ * Filters can only be constructed using our custom constructors (eq, ge,
27
+ etc.). Cleaned up the code to reflect the private new.
28
+ * Fixed #to_ber to output a BER representation for :ne filters. Simplified
29
+ the BER construction for substring matching.
30
+ * Added Filter.join(left, right), Filter.intersect(left, right), and
31
+ Filter.negate(filter) to match Filter#&, Filter#|, and Filter#~@ to
32
+ prevent those operators from having problems with the private new.
33
+ * Added Filter.present and Filter.present? aliases for the method
34
+ previously only known as Filter.pres.
35
+ * Added Filter.escape to escape strings for use in filters, based on
36
+ rfc4515.
37
+ * Added Filter.equals, Filter.begins, Filter.ends and Filter.contains,
38
+ which automatically escape input for use in a filter string.
39
+ * Cleaned up Net::LDAP::Filter::FilterParser to handle branches better.
40
+ Fixed some of the regular expressions to be more canonically defined.
41
+ * Correctly handles single-branch branches.
42
+ * Cleaned up the string representation of Filter objects.
43
+ * Added experimental support for RFC4515 extensible matching (e.g.,
44
+ "(cn:caseExactMatch:=Fred Flintstone)"); provided by "nowhereman".
45
+ * Net::LDAP::DN class representing an automatically escaping/unescaping
46
+ distinguished name for LDAP queries.
47
+ * Minor Enhancements:
48
+ * SSL capabilities will be enabled or disabled based on whether we can load
49
+ OpenSSL successfully or not.
50
+ * Moved the core class extensions extensions from being in the Net::LDAP
51
+ hierarchy to the Net::BER hierarchy as most of the methods therein are
52
+ related to BER-encoding values. This will make extracting Net::BER from
53
+ Net::LDAP easier in the future.
54
+ * Added some unit tests for the BER core extensions.
55
+ * Paging controls are only sent where they are supported.
56
+ * Documentation Changes:
57
+ * Core class extension methods under Net::BER.
58
+ * Extensive changes to Net::BER documentation.
59
+ * Cleaned up some rdoc oddities, suppressed empty documentation sections
60
+ where possible.
61
+ * Added a document describing how to contribute to Net::LDAP most
62
+ effectively.
63
+ * Added a document recognizing contributors to Net::LDAP.
64
+ * Extended unit testing:
65
+ * Added some unit tests for the BER core extensions.
66
+ * The LDIF test data file was split for Ruby 1.9 regexp support.
67
+ * Added a cruisecontrol.rb task.
68
+ * Converted some test/unit tests to specs.
69
+ * Code clean-up:
70
+ * Made the formatting of code consistent across all files.
71
+ * Removed Net::BER::BERParser::TagClasses as it does not appear to be used.
72
+ * Replaced calls to #to_a with calls to Kernel#Array; since Ruby 1.8.3, the
73
+ default #to_a implementation has been deprecated and should be replaced
74
+ either with calls to Kernel#Array or [value].flatten(1).
75
+ * Modified #add and #modify to return a Pdu#result_code instead of a
76
+ Pdu#result. This may be changed in Net::LDAP 1.0 to return the full
77
+ Pdu#result, but if we do so, it will be that way for all LDAP calls
78
+ involving Pdu objects.
79
+ * Renamed Net::LDAP::Psw to Net::LDAP::Password with a corresponding filename
80
+ change.
81
+ * Removed the stub file lib/net/ldif.rb and class Net::LDIF.
82
+ * Project Management:
83
+ * Changed the license from Ruby + GPL to MIT with the agreement of the
84
+ original author (Francis Cianfrocca) and the named contributors. Versions
85
+ prior to 0.2.0 are still available under the Ruby + GPL license.
86
+
87
+ === Net::LDAP 0.1.1 / 2010-03-18
88
+ * Fixing a critical problem with sockets.
89
+
90
+ === Net::LDAP 0.1 / 2010-03-17
91
+ * Small fixes throughout, more to come.
92
+ * Ruby 1.9 support added.
93
+ * Ruby 1.8.6 and below support removed. If we can figure out a compatible way
94
+ to reintroduce this, we will.
95
+ * New maintainers, new project repository location. Please see the README.txt.
96
+
97
+ === Net::LDAP 0.0.5 / 2009-03-xx
98
+ * 13 minor enhancements:
99
+ * Added Net::LDAP::Entry#to_ldif
100
+ * Supported rootDSE searches with a new API.
101
+ * Added [preliminary (still undocumented) support for SASL authentication.
102
+ * Supported several constructs from the server side of the LDAP protocol.
103
+ * Added a "consuming" String#read_ber! method.
104
+ * Added some support for SNMP data-handling.
105
+ * Belatedly added a patch contributed by Kouhei Sutou last October.
106
+ The patch adds start_tls support.
107
+ * Added Net::LDAP#search_subschema_entry
108
+ * Added Net::LDAP::Filter#parse_ber, which constructs Net::LDAP::Filter
109
+ objects directly from BER objects that represent search filters in
110
+ LDAP SearchRequest packets.
111
+ * Added Net::LDAP::Filter#execute, which allows arbitrary processing
112
+ based on LDAP filters.
113
+ * Changed Net::LDAP::Entry so it can be marshalled and unmarshalled.
114
+ Thanks to an anonymous feature requester who only left the name
115
+ "Jammy."
116
+ * Added support for binary values in Net::LDAP::Entry LDIF conversions
117
+ and marshalling.
118
+ * Migrated to 'hoe' as the new project droid.
119
+ * 14 bugs fixed:
120
+ * Silenced some annoying warnings in filter.rb. Thanks to "barjunk"
121
+ for pointing this out.
122
+ * Some fairly extensive performance optimizations in the BER parser.
123
+ * Fixed a bug in Net::LDAP::Entry::from_single_ldif_string noticed by
124
+ Matthias Tarasiewicz.
125
+ * Removed an erroneous LdapError value, noticed by Kouhei Sutou.
126
+ * Supported attributes containing blanks (cn=Babs Jensen) to
127
+ Filter#construct. Suggested by an anonymous Rubyforge user.
128
+ * Added missing syntactic support for Filter ANDs, NOTs and a few other
129
+ things.
130
+ * Extended support for server-reported error messages. This was provisionally
131
+ added to Net::LDAP#add, and eventually will be added to other methods.
132
+ * Fixed bug in Net::LDAP#bind. We were ignoring the passed-in auth parm.
133
+ Thanks to Kouhei Sutou for spotting it.
134
+ * Patched filter syntax to support octal \XX codes. Thanks to Kouhei Sutou
135
+ for the patch.
136
+ * Applied an additional patch from Kouhei.
137
+ * Allowed comma in filter strings, suggested by Kouhei.
138
+ * 04Sep07, Changed four error classes to inherit from StandardError rather
139
+ Exception, in order to be friendlier to irb. Suggested by Kouhei.
140
+ * Ensure connections are closed. Thanks to Kristian Meier.
141
+ * Minor bug fixes here and there.
142
+
143
+ === Net::LDAP 0.0.4 / 2006-08-15
144
+ * Undeprecated Net::LDAP#modify. Thanks to Justin Forder for
145
+ providing the rationale for this.
146
+ * Added a much-expanded set of special characters to the parser
147
+ for RFC-2254 filters. Thanks to Andre Nathan.
148
+ * Changed Net::LDAP#search so you can pass it a filter in string form.
149
+ The conversion to a Net::LDAP::Filter now happens automatically.
150
+ * Implemented Net::LDAP#bind_as (preliminary and subject to change).
151
+ Thanks for Simon Claret for valuable suggestions and for helping test.
152
+ * Fixed bug in Net::LDAP#open that was preventing #open from being
153
+ called more than one on a given Net::LDAP object.
154
+
155
+ === Net::LDAP 0.0.3 / 2006-07-26
156
+ * Added simple TLS encryption.
157
+ Thanks to Garett Shulman for suggestions and for helping test.
158
+
159
+ === Net::LDAP 0.0.2 / 2006-07-12
160
+ * Fixed malformation in distro tarball and gem.
161
+ * Improved documentation.
162
+ * Supported "paged search control."
163
+ * Added a range of API improvements.
164
+ * Thanks to Andre Nathan, andre@digirati.com.br, for valuable
165
+ suggestions.
166
+ * Added support for LE and GE search filters.
167
+ * Added support for Search referrals.
168
+ * Fixed a regression with openldap 2.2.x and higher caused
169
+ by the introduction of RFC-2696 controls. Thanks to Andre
170
+ Nathan for reporting the problem.
171
+ * Added support for RFC-2254 filter syntax.
172
+
173
+ === Net::LDAP 0.0.1 / 2006-05-01
174
+ * Initial release.
175
+ * Client functionality is near-complete, although the APIs
176
+ are not guaranteed and may change depending on feedback
177
+ from the community.
178
+ * We're internally working on a Ruby-based implementation
179
+ of a full-featured, production-quality LDAP server,
180
+ which will leverage the underlying LDAP and BER functionality
181
+ in Net::LDAP.
182
+ * Please tell us if you would be interested in seeing a public
183
+ release of the LDAP server.
184
+ * Grateful acknowledgement to Austin Ziegler, who reviewed
185
+ this code and provided the release framework, including
186
+ minitar.
@@ -0,0 +1,29 @@
1
+ == License
2
+
3
+ This software is available under the terms of the MIT license.
4
+
5
+ Copyright 2006–2011 by Francis Cianfrocca and other contributors.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining
8
+ a copy of this software and associated documentation files (the
9
+ "Software"), to deal in the Software without restriction, including
10
+ without limitation the rights to use, copy, modify, merge, publish,
11
+ distribute, sublicense, and/or sell copies of the Software, and to
12
+ permit persons to whom the Software is furnished to do so, subject to
13
+ the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be
16
+ included in all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
+
26
+ === Notice of License Change
27
+
28
+ Versions prior to 0.2 were under Ruby's dual license with the GNU GPL. With
29
+ this release (0.2), Net::LDAP is now under the MIT license.
@@ -0,0 +1,49 @@
1
+ .autotest
2
+ .rspec
3
+ Contributors.rdoc
4
+ Hacking.rdoc
5
+ History.rdoc
6
+ License.rdoc
7
+ Manifest.txt
8
+ README.rdoc
9
+ Rakefile
10
+ autotest/discover.rb
11
+ lib/net-ldap.rb
12
+ lib/net/ber.rb
13
+ lib/net/ber/ber_parser.rb
14
+ lib/net/ber/core_ext.rb
15
+ lib/net/ber/core_ext/array.rb
16
+ lib/net/ber/core_ext/bignum.rb
17
+ lib/net/ber/core_ext/false_class.rb
18
+ lib/net/ber/core_ext/fixnum.rb
19
+ lib/net/ber/core_ext/string.rb
20
+ lib/net/ber/core_ext/true_class.rb
21
+ lib/net/ldap.rb
22
+ lib/net/ldap/dataset.rb
23
+ lib/net/ldap/dn.rb
24
+ lib/net/ldap/entry.rb
25
+ lib/net/ldap/filter.rb
26
+ lib/net/ldap/password.rb
27
+ lib/net/ldap/pdu.rb
28
+ lib/net/snmp.rb
29
+ net-ldap.gemspec
30
+ spec/integration/ssl_ber_spec.rb
31
+ spec/spec.opts
32
+ spec/spec_helper.rb
33
+ spec/unit/ber/ber_spec.rb
34
+ spec/unit/ber/core_ext/string_spec.rb
35
+ spec/unit/ldap/dn_spec.rb
36
+ spec/unit/ldap/entry_spec.rb
37
+ spec/unit/ldap/filter_spec.rb
38
+ spec/unit/ldap_spec.rb
39
+ test/common.rb
40
+ test/test_entry.rb
41
+ test/test_filter.rb
42
+ test/test_ldap_connection.rb
43
+ test/test_ldif.rb
44
+ test/test_password.rb
45
+ test/test_rename.rb
46
+ test/test_snmp.rb
47
+ test/testdata.ldif
48
+ testserver/ldapserver.rb
49
+ testserver/testdata.ldif
@@ -0,0 +1,52 @@
1
+ = Net::LDAP for Ruby
2
+
3
+ == Description
4
+
5
+ Net::LDAP for Ruby (also called net-ldap) implements client access for the
6
+ Lightweight Directory Access Protocol (LDAP), an IETF standard protocol for
7
+ accessing distributed directory services. Net::LDAP is written completely in
8
+ Ruby with no external dependencies. It supports most LDAP client features and a
9
+ subset of server features as well.
10
+
11
+ Net::LDAP has been tested against modern popular LDAP servers including
12
+ OpenLDAP and Active Directory. The current release is mostly compliant with
13
+ earlier versions of the IETF LDAP RFCs (2251–2256, 2829–2830, 3377, and 3771).
14
+ Our roadmap for Net::LDAP 1.0 is to gain full <em>client</em> compliance with
15
+ the most recent LDAP RFCs (4510–4519, plus portions of 4520–4532).
16
+
17
+ == Where
18
+
19
+ * {RubyForge}[http://rubyforge.org/projects/net-ldap]
20
+ * {GitHub}[https://github.com/ruby-ldap/ruby-net-ldap]
21
+ * {ruby-ldap@googlegroups.com}[http://groups.google.com/group/ruby-ldap]
22
+ * {Documentation}[http://net-ldap.rubyforge.org/]
23
+
24
+ The Net::LDAP for Ruby documentation, project description, and main downloads
25
+ can currently be found on {RubyForge}[http://rubyforge.org/projects/net-ldap].
26
+
27
+ == Synopsis
28
+
29
+ See Net::LDAP for documentation and usage samples.
30
+
31
+ == Requirements
32
+
33
+ Net::LDAP requires a Ruby 1.8.7 interpreter or better.
34
+
35
+ == Install
36
+
37
+ Net::LDAP is a pure Ruby library. It does not require any external libraries.
38
+ You can install the RubyGems version of Net::LDAP available from the usual
39
+ sources.
40
+
41
+ gem install net-ldap
42
+
43
+ Simply require either 'net-ldap' or 'net/ldap'.
44
+
45
+ For non-RubyGems installations of Net::LDAP, you can use Minero Aoki's
46
+ {setup.rb}[http://i.loveruby.net/en/projects/setup/] as the layout of
47
+ Net::LDAP is compliant. The setup installer is not included in the
48
+ Net::LDAP repository.
49
+
50
+ :include: Contributors.rdoc
51
+
52
+ :include: License.rdoc
@@ -0,0 +1,74 @@
1
+ # -*- ruby encoding: utf-8 -*-
2
+
3
+ require "rubygems"
4
+ require 'hoe'
5
+
6
+ Hoe.plugin :doofus
7
+ Hoe.plugin :git
8
+ Hoe.plugin :gemspec
9
+
10
+ Hoe.spec 'net-ldap-1' do |spec|
11
+ spec.rubyforge_name = spec.name
12
+
13
+ spec.developer("Francis Cianfrocca", "blackhedd@rubyforge.org")
14
+ spec.developer("Emiel van de Laar", "gemiel@gmail.com")
15
+ spec.developer("Rory O'Connell", "rory.ocon@gmail.com")
16
+ spec.developer("Kaspar Schiess", "kaspar.schiess@absurd.li")
17
+ spec.developer("Austin Ziegler", "austin@rubyforge.org")
18
+
19
+ spec.remote_rdoc_dir = ''
20
+ spec.rsync_args << ' --exclude=statsvn/'
21
+
22
+ spec.url = %W(http://rubyldap.com/ https://github.com/krogebry/ruby-net-ldap-1)
23
+
24
+ spec.history_file = 'History.rdoc'
25
+ spec.readme_file = 'README.rdoc'
26
+
27
+ spec.extra_rdoc_files = FileList["*.rdoc"].to_a
28
+
29
+ spec.extra_dev_deps << [ "hoe-git", "~> 1" ]
30
+ spec.extra_dev_deps << [ "hoe-gemspec", "~> 1" ]
31
+ spec.extra_dev_deps << [ "metaid", "~> 1" ]
32
+ spec.extra_dev_deps << [ "flexmock", "~> 0.9.0" ]
33
+ spec.extra_dev_deps << [ "rspec", "~> 2.0" ]
34
+
35
+ spec.clean_globs << "coverage"
36
+
37
+ spec.spec_extras[:required_ruby_version] = ">= 1.8.7"
38
+ spec.multiruby_skip << "1.8.6"
39
+ spec.multiruby_skip << "1_8_6"
40
+
41
+ spec.need_tar = true
42
+ end
43
+
44
+ # I'm not quite ready to get rid of this, but I think "rake git:manifest" is
45
+ # sufficient.
46
+ namespace :old do
47
+ desc "Build the manifest file from the current set of files."
48
+ task :build_manifest do |t|
49
+ require 'find'
50
+
51
+ paths = []
52
+ Find.find(".") do |path|
53
+ next if File.directory?(path)
54
+ next if path =~ /\.svn/
55
+ next if path =~ /\.git/
56
+ next if path =~ /\.hoerc/
57
+ next if path =~ /\.swp$/
58
+ next if path =~ %r{coverage/}
59
+ next if path =~ /~$/
60
+ paths << path.sub(%r{^\./}, '')
61
+ end
62
+
63
+ File.open("Manifest.txt", "w") do |f|
64
+ f.puts paths.sort.join("\n")
65
+ end
66
+
67
+ puts paths.sort.join("\n")
68
+ end
69
+ end
70
+
71
+ desc "Run a full set of integration and unit tests"
72
+ task :cruise => [:test, :spec]
73
+
74
+ # vim: syntax=ruby