prathe_net-ldap 0.2.20110317223538

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. data/.autotest +11 -0
  2. data/.gemtest +0 -0
  3. data/.rspec +2 -0
  4. data/Contributors.rdoc +21 -0
  5. data/Hacking.rdoc +68 -0
  6. data/History.rdoc +172 -0
  7. data/License.rdoc +29 -0
  8. data/Manifest.txt +49 -0
  9. data/README.rdoc +52 -0
  10. data/Rakefile +75 -0
  11. data/autotest/discover.rb +1 -0
  12. data/lib/net-ldap.rb +2 -0
  13. data/lib/net/ber.rb +318 -0
  14. data/lib/net/ber/ber_parser.rb +168 -0
  15. data/lib/net/ber/core_ext.rb +62 -0
  16. data/lib/net/ber/core_ext/array.rb +82 -0
  17. data/lib/net/ber/core_ext/bignum.rb +22 -0
  18. data/lib/net/ber/core_ext/false_class.rb +10 -0
  19. data/lib/net/ber/core_ext/fixnum.rb +66 -0
  20. data/lib/net/ber/core_ext/string.rb +60 -0
  21. data/lib/net/ber/core_ext/true_class.rb +12 -0
  22. data/lib/net/ldap.rb +1556 -0
  23. data/lib/net/ldap/dataset.rb +154 -0
  24. data/lib/net/ldap/dn.rb +225 -0
  25. data/lib/net/ldap/entry.rb +185 -0
  26. data/lib/net/ldap/filter.rb +759 -0
  27. data/lib/net/ldap/password.rb +31 -0
  28. data/lib/net/ldap/pdu.rb +256 -0
  29. data/lib/net/snmp.rb +268 -0
  30. data/net-ldap.gemspec +59 -0
  31. data/spec/integration/ssl_ber_spec.rb +36 -0
  32. data/spec/spec.opts +2 -0
  33. data/spec/spec_helper.rb +5 -0
  34. data/spec/unit/ber/ber_spec.rb +109 -0
  35. data/spec/unit/ber/core_ext/string_spec.rb +51 -0
  36. data/spec/unit/ldap/dn_spec.rb +80 -0
  37. data/spec/unit/ldap/entry_spec.rb +51 -0
  38. data/spec/unit/ldap/filter_spec.rb +84 -0
  39. data/spec/unit/ldap_spec.rb +48 -0
  40. data/test/common.rb +3 -0
  41. data/test/test_entry.rb +59 -0
  42. data/test/test_filter.rb +122 -0
  43. data/test/test_ldap_connection.rb +24 -0
  44. data/test/test_ldif.rb +79 -0
  45. data/test/test_password.rb +17 -0
  46. data/test/test_rename.rb +77 -0
  47. data/test/test_snmp.rb +114 -0
  48. data/test/testdata.ldif +101 -0
  49. data/testserver/ldapserver.rb +210 -0
  50. data/testserver/testdata.ldif +101 -0
  51. metadata +206 -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
File without changes
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,172 @@
1
+ === Net::LDAP 0.2.2 / 2011-03-26
2
+ * Bug Fixes:
3
+ * Fixed the call to Net::LDAP.modify_ops from Net::LDAP#modify.
4
+
5
+ === Net::LDAP 0.2.1 / 2011-03-23
6
+ * Bug Fixes:
7
+ * Net::LDAP.modify_ops was broken and is now fixed.
8
+
9
+ === Net::LDAP 0.2 / 2011-03-22
10
+ * Major Enhancements:
11
+ * Net::LDAP::Filter changes:
12
+ * Filters can only be constructed using our custom constructors (eq, ge,
13
+ etc.). Cleaned up the code to reflect the private new.
14
+ * Fixed #to_ber to output a BER representation for :ne filters. Simplified
15
+ the BER construction for substring matching.
16
+ * Added Filter.join(left, right), Filter.intersect(left, right), and
17
+ Filter.negate(filter) to match Filter#&, Filter#|, and Filter#~@ to
18
+ prevent those operators from having problems with the private new.
19
+ * Added Filter.present and Filter.present? aliases for the method
20
+ previously only known as Filter.pres.
21
+ * Added Filter.escape to escape strings for use in filters, based on
22
+ rfc4515.
23
+ * Added Filter.equals, Filter.begins, Filter.ends and Filter.contains,
24
+ which automatically escape input for use in a filter string.
25
+ * Cleaned up Net::LDAP::Filter::FilterParser to handle branches better.
26
+ Fixed some of the regular expressions to be more canonically defined.
27
+ * Correctly handles single-branch branches.
28
+ * Cleaned up the string representation of Filter objects.
29
+ * Added experimental support for RFC4515 extensible matching (e.g.,
30
+ "(cn:caseExactMatch:=Fred Flintstone)"); provided by "nowhereman".
31
+ * Net::LDAP::DN class representing an automatically escaping/unescaping
32
+ distinguished name for LDAP queries.
33
+ * Minor Enhancements:
34
+ * SSL capabilities will be enabled or disabled based on whether we can load
35
+ OpenSSL successfully or not.
36
+ * Moved the core class extensions extensions from being in the Net::LDAP
37
+ hierarchy to the Net::BER hierarchy as most of the methods therein are
38
+ related to BER-encoding values. This will make extracting Net::BER from
39
+ Net::LDAP easier in the future.
40
+ * Added some unit tests for the BER core extensions.
41
+ * Paging controls are only sent where they are supported.
42
+ * Documentation Changes:
43
+ * Core class extension methods under Net::BER.
44
+ * Extensive changes to Net::BER documentation.
45
+ * Cleaned up some rdoc oddities, suppressed empty documentation sections
46
+ where possible.
47
+ * Added a document describing how to contribute to Net::LDAP most
48
+ effectively.
49
+ * Added a document recognizing contributors to Net::LDAP.
50
+ * Extended unit testing:
51
+ * Added some unit tests for the BER core extensions.
52
+ * The LDIF test data file was split for Ruby 1.9 regexp support.
53
+ * Added a cruisecontrol.rb task.
54
+ * Converted some test/unit tests to specs.
55
+ * Code clean-up:
56
+ * Made the formatting of code consistent across all files.
57
+ * Removed Net::BER::BERParser::TagClasses as it does not appear to be used.
58
+ * Replaced calls to #to_a with calls to Kernel#Array; since Ruby 1.8.3, the
59
+ default #to_a implementation has been deprecated and should be replaced
60
+ either with calls to Kernel#Array or [value].flatten(1).
61
+ * Modified #add and #modify to return a Pdu#result_code instead of a
62
+ Pdu#result. This may be changed in Net::LDAP 1.0 to return the full
63
+ Pdu#result, but if we do so, it will be that way for all LDAP calls
64
+ involving Pdu objects.
65
+ * Renamed Net::LDAP::Psw to Net::LDAP::Password with a corresponding filename
66
+ change.
67
+ * Removed the stub file lib/net/ldif.rb and class Net::LDIF.
68
+ * Project Management:
69
+ * Changed the license from Ruby + GPL to MIT with the agreement of the
70
+ original author (Francis Cianfrocca) and the named contributors. Versions
71
+ prior to 0.2.0 are still available under the Ruby + GPL license.
72
+
73
+ === Net::LDAP 0.1.1 / 2010-03-18
74
+ * Fixing a critical problem with sockets.
75
+
76
+ === Net::LDAP 0.1 / 2010-03-17
77
+ * Small fixes throughout, more to come.
78
+ * Ruby 1.9 support added.
79
+ * Ruby 1.8.6 and below support removed. If we can figure out a compatible way
80
+ to reintroduce this, we will.
81
+ * New maintainers, new project repository location. Please see the README.txt.
82
+
83
+ === Net::LDAP 0.0.5 / 2009-03-xx
84
+ * 13 minor enhancements:
85
+ * Added Net::LDAP::Entry#to_ldif
86
+ * Supported rootDSE searches with a new API.
87
+ * Added [preliminary (still undocumented) support for SASL authentication.
88
+ * Supported several constructs from the server side of the LDAP protocol.
89
+ * Added a "consuming" String#read_ber! method.
90
+ * Added some support for SNMP data-handling.
91
+ * Belatedly added a patch contributed by Kouhei Sutou last October.
92
+ The patch adds start_tls support.
93
+ * Added Net::LDAP#search_subschema_entry
94
+ * Added Net::LDAP::Filter#parse_ber, which constructs Net::LDAP::Filter
95
+ objects directly from BER objects that represent search filters in
96
+ LDAP SearchRequest packets.
97
+ * Added Net::LDAP::Filter#execute, which allows arbitrary processing
98
+ based on LDAP filters.
99
+ * Changed Net::LDAP::Entry so it can be marshalled and unmarshalled.
100
+ Thanks to an anonymous feature requester who only left the name
101
+ "Jammy."
102
+ * Added support for binary values in Net::LDAP::Entry LDIF conversions
103
+ and marshalling.
104
+ * Migrated to 'hoe' as the new project droid.
105
+ * 14 bugs fixed:
106
+ * Silenced some annoying warnings in filter.rb. Thanks to "barjunk"
107
+ for pointing this out.
108
+ * Some fairly extensive performance optimizations in the BER parser.
109
+ * Fixed a bug in Net::LDAP::Entry::from_single_ldif_string noticed by
110
+ Matthias Tarasiewicz.
111
+ * Removed an erroneous LdapError value, noticed by Kouhei Sutou.
112
+ * Supported attributes containing blanks (cn=Babs Jensen) to
113
+ Filter#construct. Suggested by an anonymous Rubyforge user.
114
+ * Added missing syntactic support for Filter ANDs, NOTs and a few other
115
+ things.
116
+ * Extended support for server-reported error messages. This was provisionally
117
+ added to Net::LDAP#add, and eventually will be added to other methods.
118
+ * Fixed bug in Net::LDAP#bind. We were ignoring the passed-in auth parm.
119
+ Thanks to Kouhei Sutou for spotting it.
120
+ * Patched filter syntax to support octal \XX codes. Thanks to Kouhei Sutou
121
+ for the patch.
122
+ * Applied an additional patch from Kouhei.
123
+ * Allowed comma in filter strings, suggested by Kouhei.
124
+ * 04Sep07, Changed four error classes to inherit from StandardError rather
125
+ Exception, in order to be friendlier to irb. Suggested by Kouhei.
126
+ * Ensure connections are closed. Thanks to Kristian Meier.
127
+ * Minor bug fixes here and there.
128
+
129
+ === Net::LDAP 0.0.4 / 2006-08-15
130
+ * Undeprecated Net::LDAP#modify. Thanks to Justin Forder for
131
+ providing the rationale for this.
132
+ * Added a much-expanded set of special characters to the parser
133
+ for RFC-2254 filters. Thanks to Andre Nathan.
134
+ * Changed Net::LDAP#search so you can pass it a filter in string form.
135
+ The conversion to a Net::LDAP::Filter now happens automatically.
136
+ * Implemented Net::LDAP#bind_as (preliminary and subject to change).
137
+ Thanks for Simon Claret for valuable suggestions and for helping test.
138
+ * Fixed bug in Net::LDAP#open that was preventing #open from being
139
+ called more than one on a given Net::LDAP object.
140
+
141
+ === Net::LDAP 0.0.3 / 2006-07-26
142
+ * Added simple TLS encryption.
143
+ Thanks to Garett Shulman for suggestions and for helping test.
144
+
145
+ === Net::LDAP 0.0.2 / 2006-07-12
146
+ * Fixed malformation in distro tarball and gem.
147
+ * Improved documentation.
148
+ * Supported "paged search control."
149
+ * Added a range of API improvements.
150
+ * Thanks to Andre Nathan, andre@digirati.com.br, for valuable
151
+ suggestions.
152
+ * Added support for LE and GE search filters.
153
+ * Added support for Search referrals.
154
+ * Fixed a regression with openldap 2.2.x and higher caused
155
+ by the introduction of RFC-2696 controls. Thanks to Andre
156
+ Nathan for reporting the problem.
157
+ * Added support for RFC-2254 filter syntax.
158
+
159
+ === Net::LDAP 0.0.1 / 2006-05-01
160
+ * Initial release.
161
+ * Client functionality is near-complete, although the APIs
162
+ are not guaranteed and may change depending on feedback
163
+ from the community.
164
+ * We're internally working on a Ruby-based implementation
165
+ of a full-featured, production-quality LDAP server,
166
+ which will leverage the underlying LDAP and BER functionality
167
+ in Net::LDAP.
168
+ * Please tell us if you would be interested in seeing a public
169
+ release of the LDAP server.
170
+ * Grateful acknowledgement to Austin Ziegler, who reviewed
171
+ this code and provided the release framework, including
172
+ 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,75 @@
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
+ Hoe.plugin :rubyforge
10
+
11
+ Hoe.spec 'net-ldap' do |spec|
12
+ spec.rubyforge_name = spec.name
13
+
14
+ spec.developer("Francis Cianfrocca", "blackhedd@rubyforge.org")
15
+ spec.developer("Emiel van de Laar", "gemiel@gmail.com")
16
+ spec.developer("Rory O'Connell", "rory.ocon@gmail.com")
17
+ spec.developer("Kaspar Schiess", "kaspar.schiess@absurd.li")
18
+ spec.developer("Austin Ziegler", "austin@rubyforge.org")
19
+
20
+ spec.remote_rdoc_dir = ''
21
+ spec.rsync_args << ' --exclude=statsvn/'
22
+
23
+ spec.url = %W(http://net-ldap.rubyforge.org/ https://github.com/ruby-ldap/ruby-net-ldap)
24
+
25
+ spec.history_file = 'History.rdoc'
26
+ spec.readme_file = 'README.rdoc'
27
+
28
+ spec.extra_rdoc_files = FileList["*.rdoc"].to_a
29
+
30
+ spec.extra_dev_deps << [ "hoe-git", "~> 1" ]
31
+ spec.extra_dev_deps << [ "hoe-gemspec", "~> 1" ]
32
+ spec.extra_dev_deps << [ "metaid", "~> 1" ]
33
+ spec.extra_dev_deps << [ "flexmock", "~> 0.9.0" ]
34
+ spec.extra_dev_deps << [ "rspec", "~> 2.0" ]
35
+
36
+ spec.clean_globs << "coverage"
37
+
38
+ spec.spec_extras[:required_ruby_version] = ">= 1.8.7"
39
+ spec.multiruby_skip << "1.8.6"
40
+ spec.multiruby_skip << "1_8_6"
41
+
42
+ spec.need_tar = true
43
+ end
44
+
45
+ # I'm not quite ready to get rid of this, but I think "rake git:manifest" is
46
+ # sufficient.
47
+ namespace :old do
48
+ desc "Build the manifest file from the current set of files."
49
+ task :build_manifest do |t|
50
+ require 'find'
51
+
52
+ paths = []
53
+ Find.find(".") do |path|
54
+ next if File.directory?(path)
55
+ next if path =~ /\.svn/
56
+ next if path =~ /\.git/
57
+ next if path =~ /\.hoerc/
58
+ next if path =~ /\.swp$/
59
+ next if path =~ %r{coverage/}
60
+ next if path =~ /~$/
61
+ paths << path.sub(%r{^\./}, '')
62
+ end
63
+
64
+ File.open("Manifest.txt", "w") do |f|
65
+ f.puts paths.sort.join("\n")
66
+ end
67
+
68
+ puts paths.sort.join("\n")
69
+ end
70
+ end
71
+
72
+ desc "Run a full set of integration and unit tests"
73
+ task :cruise => [:test, :spec]
74
+
75
+ # vim: syntax=ruby