net-ldap 0.1.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of net-ldap might be problematic. Click here for more details.

Files changed (58) 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.txt → History.rdoc} +65 -1
  7. data/License.rdoc +29 -0
  8. data/Manifest.txt +25 -14
  9. data/README.rdoc +52 -0
  10. data/Rakefile +52 -96
  11. data/autotest/discover.rb +1 -0
  12. data/lib/net-ldap.rb +1 -0
  13. data/lib/net/ber.rb +302 -81
  14. data/lib/net/ber/ber_parser.rb +153 -97
  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 +48 -0
  21. data/lib/net/ber/core_ext/true_class.rb +12 -0
  22. data/lib/net/ldap.rb +1455 -1475
  23. data/lib/net/ldap/dataset.rb +134 -79
  24. data/lib/net/ldap/dn.rb +225 -0
  25. data/lib/net/ldap/entry.rb +168 -249
  26. data/lib/net/ldap/filter.rb +654 -387
  27. data/lib/net/ldap/password.rb +31 -0
  28. data/lib/net/ldap/pdu.rb +232 -233
  29. data/lib/net/snmp.rb +4 -31
  30. data/net-ldap.gemspec +59 -0
  31. data/spec/integration/ssl_ber_spec.rb +3 -0
  32. data/spec/spec_helper.rb +2 -2
  33. data/spec/unit/ber/ber_spec.rb +82 -6
  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 +48 -0
  39. data/test/test_entry.rb +54 -2
  40. data/test/test_filter.rb +93 -54
  41. data/test/test_ldap_connection.rb +24 -0
  42. data/test/test_ldif.rb +31 -23
  43. data/test/test_rename.rb +77 -0
  44. data/test/test_snmp.rb +34 -33
  45. metadata +88 -52
  46. data/COPYING +0 -272
  47. data/LICENSE +0 -56
  48. data/README.txt +0 -68
  49. data/lib/net/ldap/core_ext/all.rb +0 -43
  50. data/lib/net/ldap/core_ext/array.rb +0 -42
  51. data/lib/net/ldap/core_ext/bignum.rb +0 -25
  52. data/lib/net/ldap/core_ext/false_class.rb +0 -11
  53. data/lib/net/ldap/core_ext/fixnum.rb +0 -74
  54. data/lib/net/ldap/core_ext/string.rb +0 -40
  55. data/lib/net/ldap/core_ext/true_class.rb +0 -11
  56. data/lib/net/ldap/psw.rb +0 -57
  57. data/lib/net/ldif.rb +0 -34
  58. data/test/test_ber.rb +0 -78
@@ -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]
@@ -1,7 +1,71 @@
1
+ === Net::LDAP 0.2 / 2011-03-__
2
+ * Major Enhancements:
3
+ * Net::LDAP::Filter changes:
4
+ * Filters can only be constructed using our custom constructors (eq, ge,
5
+ etc.). Cleaned up the code to reflect the private new.
6
+ * Fixed #to_ber to output a BER representation for :ne filters. Simplified
7
+ the BER construction for substring matching.
8
+ * Added Filter.join(left, right), Filter.intersect(left, right), and
9
+ Filter.negate(filter) to match Filter#&, Filter#|, and Filter#~@ to
10
+ prevent those operators from having problems with the private new.
11
+ * Added Filter.present and Filter.present? aliases for the method
12
+ previously only known as Filter.pres.
13
+ * Added Filter.escape to escape strings for use in filters, based on
14
+ rfc4515.
15
+ * Added Filter.equals, Filter.begins, Filter.ends and Filter.contains,
16
+ which automatically escape input for use in a filter string.
17
+ * Cleaned up Net::LDAP::Filter::FilterParser to handle branches better.
18
+ Fixed some of the regular expressions to be more canonically defined.
19
+ * Correctly handles single-branch branches.
20
+ * Cleaned up the string representation of Filter objects.
21
+ * Added experimental support for RFC4515 extensible matching (e.g.,
22
+ "(cn:caseExactMatch:=Fred Flintstone)"); provided by "nowhereman".
23
+ * Net::LDAP::DN class representing an automatically escaping/unescaping
24
+ distinguished name for LDAP queries.
25
+ * Minor Enhancements:
26
+ * SSL capabilities will be enabled or disabled based on whether we can load
27
+ OpenSSL successfully or not.
28
+ * Moved the core class extensions extensions from being in the Net::LDAP
29
+ hierarchy to the Net::BER hierarchy as most of the methods therein are
30
+ related to BER-encoding values. This will make extracting Net::BER from
31
+ Net::LDAP easier in the future.
32
+ * Added some unit tests for the BER core extensions.
33
+ * Paging controls are only sent where they are supported.
34
+ * Documentation Changes:
35
+ * Core class extension methods under Net::BER.
36
+ * Extensive changes to Net::BER documentation.
37
+ * Cleaned up some rdoc oddities, suppressed empty documentation sections
38
+ where possible.
39
+ * Added a document describing how to contribute to Net::LDAP most
40
+ effectively.
41
+ * Added a document recognizing contributors to Net::LDAP.
42
+ * Extended unit testing:
43
+ * Added some unit tests for the BER core extensions.
44
+ * The LDIF test data file was split for Ruby 1.9 regexp support.
45
+ * Added a cruisecontrol.rb task.
46
+ * Converted some test/unit tests to specs.
47
+ * Code clean-up:
48
+ * Made the formatting of code consistent across all files.
49
+ * Removed Net::BER::BERParser::TagClasses as it does not appear to be used.
50
+ * Replaced calls to #to_a with calls to Kernel#Array; since Ruby 1.8.3, the
51
+ default #to_a implementation has been deprecated and should be replaced
52
+ either with calls to Kernel#Array or [value].flatten(1).
53
+ * Modified #add and #modify to return a Pdu#result_code instead of a
54
+ Pdu#result. This may be changed in Net::LDAP 1.0 to return the full
55
+ Pdu#result, but if we do so, it will be that way for all LDAP calls
56
+ involving Pdu objects.
57
+ * Renamed Net::LDAP::Psw to Net::LDAP::Password with a corresponding filename
58
+ change.
59
+ * Removed the stub file lib/net/ldif.rb and class Net::LDIF.
60
+ * Project Management:
61
+ * Changed the license from Ruby + GPL to MIT with the agreement of the
62
+ original author (Francis Cianfrocca) and the named contributors. Versions
63
+ prior to 0.2.0 are still available under the Ruby + GPL license.
64
+
1
65
  === Net::LDAP 0.1.1 / 2010-03-18
2
66
  * Fixing a critical problem with sockets.
3
67
 
4
- === Net::LDAP 0.1.0 / 2010-03-17
68
+ === Net::LDAP 0.1 / 2010-03-17
5
69
  * Small fixes throughout, more to come.
6
70
  * Ruby 1.9 support added.
7
71
  * Ruby 1.8.6 and below support removed. If we can figure out a compatible way
@@ -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.
@@ -1,37 +1,48 @@
1
- COPYING
2
- History.txt
3
- LICENSE
1
+ .autotest
2
+ .rspec
3
+ Contributors.rdoc
4
+ Hacking.rdoc
5
+ History.rdoc
6
+ License.rdoc
4
7
  Manifest.txt
5
- README.txt
8
+ README.rdoc
6
9
  Rakefile
10
+ autotest/discover.rb
7
11
  lib/net-ldap.rb
8
12
  lib/net/ber.rb
9
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
10
21
  lib/net/ldap.rb
11
- lib/net/ldap/core_ext/all.rb
12
- lib/net/ldap/core_ext/array.rb
13
- lib/net/ldap/core_ext/bignum.rb
14
- lib/net/ldap/core_ext/false_class.rb
15
- lib/net/ldap/core_ext/fixnum.rb
16
- lib/net/ldap/core_ext/string.rb
17
- lib/net/ldap/core_ext/true_class.rb
18
22
  lib/net/ldap/dataset.rb
23
+ lib/net/ldap/dn.rb
19
24
  lib/net/ldap/entry.rb
20
25
  lib/net/ldap/filter.rb
26
+ lib/net/ldap/password.rb
21
27
  lib/net/ldap/pdu.rb
22
- lib/net/ldap/psw.rb
23
- lib/net/ldif.rb
24
28
  lib/net/snmp.rb
29
+ net-ldap.gemspec
25
30
  spec/integration/ssl_ber_spec.rb
26
31
  spec/spec.opts
27
32
  spec/spec_helper.rb
28
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
29
39
  test/common.rb
30
- test/test_ber.rb
31
40
  test/test_entry.rb
32
41
  test/test_filter.rb
42
+ test/test_ldap_connection.rb
33
43
  test/test_ldif.rb
34
44
  test/test_password.rb
45
+ test/test_rename.rb
35
46
  test/test_snmp.rb
36
47
  test/testdata.ldif
37
48
  testserver/ldapserver.rb
@@ -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
data/Rakefile CHANGED
@@ -1,118 +1,74 @@
1
+ # -*- ruby encoding: utf-8 -*-
2
+
1
3
  require "rubygems"
2
4
  require 'hoe'
3
5
 
4
- $LOAD_PATH.unshift('lib')
6
+ Hoe.plugin :doofus
7
+ Hoe.plugin :git
8
+ Hoe.plugin :gemspec
5
9
 
6
- require 'net/ldap'
10
+ Hoe.spec 'net-ldap' do |spec|
11
+ spec.rubyforge_name = spec.name
7
12
 
8
- PKG_NAME = 'net-ldap'
9
- PKG_VERSION = Net::LDAP::VERSION
10
- PKG_DIST = "#{PKG_NAME}-#{PKG_VERSION}"
11
- PKG_TAR = "pkg/#{PKG_DIST}.tar.gz"
12
- MANIFEST = File.read("Manifest.txt").split
13
- MINRUBY = "1.8.7"
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")
14
18
 
15
- Hoe.plugin :git
19
+ spec.remote_rdoc_dir = ''
20
+ spec.rsync_args << ' --exclude=statsvn/'
16
21
 
17
- Hoe.spec PKG_NAME do
18
- self.version = PKG_VERSION
19
- self.rubyforge_name = PKG_NAME
22
+ spec.url = %W(http://net-ldap.rubyforge.org/ https://github.com/ruby-ldap/ruby-net-ldap)
20
23
 
21
- developer "Francis Cianfrocca", "blackhedd@rubyforge.org"
22
- developer "Emiel van de Laar", "gemiel@gmail.com"
23
- developer "Rory O'Connell", "rory.ocon@gmail.com"
24
- developer "Kaspar Schiess", "kaspar.schiess@absurd.li"
25
- developer "Austin Ziegler", "austin@rubyforge.org"
24
+ spec.history_file = 'History.rdoc'
25
+ spec.readme_file = 'README.rdoc'
26
26
 
27
- self.remote_rdoc_dir = ''
28
- rsync_args << ' --exclude=statsvn/'
27
+ spec.extra_rdoc_files = FileList["*.rdoc"].to_a
29
28
 
30
- self.url = %W(http://net-ldap.rubyforge.org/ http://github.com/RoryO/ruby-net-ldap)
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" ]
31
34
 
32
- self.summary = "Pure Ruby LDAP support library with most client features and some server features."
33
- self.changes = paragraphs_of(self.history_file, 0..1).join("\n\n")
34
- self.description = paragraphs_of(self.readme_file, 2..2).join("\n\n")
35
+ spec.clean_globs << "coverage"
35
36
 
36
- extra_dev_deps << [ "archive-tar-minitar", "~>0.5.1" ]
37
- extra_dev_deps << [ "hanna", "~>0.1.2" ]
38
- extra_dev_deps << [ "hoe-git", "~>1" ]
39
- clean_globs << "coverage"
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
40
 
41
- spec_extras[:required_ruby_version] = ">= #{MINRUBY}"
42
- multiruby_skip << "1.8.6"
43
- multiruby_skip << "1_8_6"
44
-
45
- # This is a lie because I will continue to use Archive::Tar::Minitar.
46
- self.need_tar = false
41
+ spec.need_tar = true
47
42
  end
48
43
 
49
- desc "Build a Net-LDAP .tar.gz distribution."
50
- task :tar => [ PKG_TAR ]
51
- file PKG_TAR => [ :test ] do |t|
52
- require 'archive/tar/minitar'
53
- require 'zlib'
54
- files = MANIFEST.map { |f|
55
- fn = File.join(PKG_DIST, f)
56
- tm = File.stat(f).mtime
57
-
58
- if File.directory?(f)
59
- { :name => fn, :mode => 0755, :dir => true, :mtime => tm }
60
- else
61
- mode = if f =~ %r{^bin}
62
- 0755
63
- else
64
- 0644
65
- end
66
- data = File.read(f)
67
- { :name => fn, :mode => mode, :data => data, :size => data.size,
68
- :mtime => tm }
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{^\./}, '')
69
61
  end
70
- }
71
62
 
72
- begin
73
- unless File.directory?(File.dirname(t.name))
74
- require 'fileutils'
75
- File.mkdir_p File.dirname(t.name)
76
- end
77
- tf = File.open(t.name, 'wb')
78
- gz = Zlib::GzipWriter.new(tf)
79
- tw = Archive::Tar::Minitar::Writer.new(gz)
80
-
81
- files.each do |entry|
82
- if entry[:dir]
83
- tw.mkdir(entry[:name], entry)
84
- else
85
- tw.add_file_simple(entry[:name], entry) { |os|
86
- os.write(entry[:data])
87
- }
88
- end
63
+ File.open("Manifest.txt", "w") do |f|
64
+ f.puts paths.sort.join("\n")
89
65
  end
90
- ensure
91
- tw.close if tw
92
- gz.close if gz
66
+
67
+ puts paths.sort.join("\n")
93
68
  end
94
69
  end
95
- task :package => [ PKG_TAR ]
96
-
97
- desc "Build the manifest file from the current set of files."
98
- task :build_manifest do |t|
99
- require 'find'
100
-
101
- paths = []
102
- Find.find(".") do |path|
103
- next if File.directory?(path)
104
- next if path =~ /\.svn/
105
- next if path =~ /\.git/
106
- next if path =~ /\.hoerc/
107
- next if path =~ /\.swp$/
108
- next if path =~ %r{coverage/}
109
- next if path =~ /~$/
110
- paths << path.sub(%r{^\./}, '')
111
- end
112
70
 
113
- File.open("Manifest.txt", "w") do |f|
114
- f.puts paths.sort.join("\n")
115
- end
71
+ desc "Run a full set of integration and unit tests"
72
+ task :cruise => [:test, :spec]
116
73
 
117
- puts paths.sort.join("\n")
118
- end
74
+ # vim: syntax=ruby