Skip to content

Commit b3f5aff

Browse files
author
Austin Ziegler
committed
Making this all work with Hoe.
History has been collapsed Manifest is modern. Textile README is changed to Markdown because Hoe complains less.
1 parent 427c797 commit b3f5aff

File tree

6 files changed

+179
-81
lines changed

6 files changed

+179
-81
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
pkg/
2-
*.gemspec
2+
*.swp
3+
html/
4+
doc/
5+
publish/
6+
coverage/
7+
coverage.info
8+
.rake_tasks~

History.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
=== Net::LDAP 0.1.0 / 2010-03-08
2-
32
* Ruby 1.9 support. Should now run with rubies starting 1.8.2 upwards.
4-
53
* New maintainers, new project repository location. Please see the README.txt.
64

75
=== Net::LDAP 0.0.5 / 2009-03-xx
8-
96
* 13 minor enhancements:
107
* Added Net::LDAP::Entry#to_ldif
118
* Supported rootDSE searches with a new API.
@@ -27,7 +24,6 @@
2724
* Added support for binary values in Net::LDAP::Entry LDIF conversions
2825
and marshalling.
2926
* Migrated to 'hoe' as the new project droid.
30-
3127
* 14 bugs fixed:
3228
* Silenced some annoying warnings in filter.rb. Thanks to "barjunk"
3329
for pointing this out.
@@ -53,7 +49,6 @@
5349
* Minor bug fixes here and there.
5450

5551
=== Net::LDAP 0.0.4 / 2006-08-15
56-
5752
* Undeprecated Net::LDAP#modify. Thanks to Justin Forder for
5853
providing the rationale for this.
5954
* Added a much-expanded set of special characters to the parser
@@ -66,12 +61,10 @@
6661
called more than one on a given Net::LDAP object.
6762

6863
=== Net::LDAP 0.0.3 / 2006-07-26
69-
7064
* Added simple TLS encryption.
7165
Thanks to Garett Shulman for suggestions and for helping test.
7266

7367
=== Net::LDAP 0.0.2 / 2006-07-12
74-
7568
* Fixed malformation in distro tarball and gem.
7669
* Improved documentation.
7770
* Supported "paged search control."
@@ -86,7 +79,6 @@
8679
* Added support for RFC-2254 filter syntax.
8780

8881
=== Net::LDAP 0.0.1 / 2006-05-01
89-
9082
* Initial release.
9183
* Client functionality is near-complete, although the APIs
9284
are not guaranteed and may change depending on feedback

LICENSE

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Net::LDAP is copyrighted free software by Francis Cianfrocca
2-
<garbagecat10@gmail.com>. You can redistribute it and/or modify it under either
3-
the terms of the GPL (see the file COPYING), or the conditions below:
2+
<garbagecat10@gmail.com> and other contributors. You can redistribute it and/or
3+
modify it under either the terms of the GPL (see the file COPYING), or the
4+
conditions below:
45

56
1. You may make and give away verbatim copies of the source form of the
67
software without restriction, provided that you duplicate all of the

Manifest.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
COPYING
2+
History.txt
3+
LICENSE
4+
Manifest.txt
5+
README.markdown
6+
README.textile
7+
Rakefile
8+
lib/net.rb
9+
lib/net/ber.rb
10+
lib/net/ber/ber_parser.rb
11+
lib/net/ldap.rb
12+
lib/net/ldap/core_ext/all.rb
13+
lib/net/ldap/core_ext/array.rb
14+
lib/net/ldap/core_ext/bignum.rb
15+
lib/net/ldap/core_ext/false_class.rb
16+
lib/net/ldap/core_ext/fixnum.rb
17+
lib/net/ldap/core_ext/string.rb
18+
lib/net/ldap/core_ext/true_class.rb
19+
lib/net/ldap/dataset.rb
20+
lib/net/ldap/entry.rb
21+
lib/net/ldap/filter.rb
22+
lib/net/ldap/pdu.rb
23+
lib/net/ldap/psw.rb
24+
lib/net/ldif.rb
25+
lib/net/snmp.rb
26+
spec/integration/ssl_ber_spec.rb
27+
spec/spec.opts
28+
spec/spec_helper.rb
29+
spec/unit/ber/ber_spec.rb
30+
test/common.rb
31+
test/test_ber.rb
32+
test/test_entry.rb
33+
test/test_filter.rb
34+
test/test_ldif.rb
35+
test/test_password.rb
36+
test/test_snmp.rb
37+
test/testdata.ldif
38+
testserver/ldapserver.rb
39+
testserver/testdata.ldif

README.textile renamed to README.markdown

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
h1. Net::LDAP for Ruby
1+
# Net::LDAP for Ruby
22

3-
Issues & Project Homepage
3+
## DESCRIPTION
44

5-
"http://rubyforge.org/projects/net-ldap":http://rubyforge.org/projects/net-ldap
5+
Pure Ruby LDAP library.
66

7-
Code
7+
## Where
88

9-
"git://github.com/RoryO/ruby-net-ldap.git":git://github.com/RoryO/ruby-net-ldap.git
9+
### Issues & Project Homepage
1010

11-
h2. DESCRIPTION
11+
[http://rubyforge.org/projects/net-ldap][http://rubyforge.org/projects/net-ldap]
1212

13-
Pure Ruby LDAP library.
13+
### Code
14+
15+
[git://github.com/RoryO/ruby-net-ldap.git][git://github.com/RoryO/ruby-net-ldap.git]
1416

15-
h2. FEATURES/PROBLEMS
17+
## FEATURES/PROBLEMS
1618

1719
The Lightweight Directory Access Protocol (LDAP) is an Internet protocol for
1820
accessing distributed directory services.
@@ -23,15 +25,15 @@ LDAP client features and a subset of server features as well.
2325
* Standards-based (going for RFC 4511)
2426
* Portable: 100% Ruby
2527

26-
h2. SYNOPSIS
28+
## SYNOPSIS
2729

2830
See Net::LDAP for documentation and usage samples.
2931

30-
h2. REQUIREMENTS
32+
## REQUIREMENTS
3133

3234
Net::LDAP requires Ruby 1.8.7-compliant interpreter or better.
3335

34-
h2. INSTALL
36+
## INSTALL
3537

3638
Net::LDAP is a pure Ruby library. It does not require any external libraries.
3739
You can install the RubyGems version of Net::LDAP available from the usual
@@ -42,20 +44,20 @@ sources.
4244
There is no installation required if using a source release. Simply
4345
unarchive and require 'lib/net'.
4446

45-
h2. CREDITS
47+
## CREDITS
4648

4749
Net::LDAP was originally developed by:
4850

4951
* Francis Cianfrocca <garbagecat10@gmail.com>
5052

5153
Contributions since:
5254

53-
* Austin Ziegler <halostatue@gmail.com>
5455
* Emiel van de Laar <gemiel@gmail.com>
5556
* Rory O'Connell <rory.ocon@gmail.com>
5657
* Kaspar Schiess <kaspar.schiess@absurd.li>
58+
* Austin Ziegler <austin@rubyforge.com>
5759

58-
h2. LICENSE
60+
## LICENSE
5961

6062
Copyright (C) 2006 by Francis Cianfrocca
6163

Rakefile

Lines changed: 114 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,125 @@
11
require "rubygems"
2+
require 'hanna/rdoctask'
3+
require 'hoe'
4+
5+
$LOAD_PATH.unshift('lib')
6+
7+
require 'net/ldap'
8+
29
require "rake/gempackagetask"
310
require "rake/rdoctask"
411

5-
require "rake/testtask"
6-
Rake::TestTask.new do |t|
7-
t.libs << "test"
8-
t.test_files = FileList["test/test_*.rb"]
9-
t.verbose = true
10-
end
12+
PKG_NAME = 'net-ldap'
13+
PKG_VERSION = Net::LDAP::VERSION
14+
PKG_DIST = "#{PKG_NAME}-#{PKG_VERSION}"
15+
PKG_TAR = "pkg/#{PKG_DIST}.tar.gz"
16+
MANIFEST = File.read("Manifest.txt").split
1117

12-
require 'spec/rake/spectask'
13-
Spec::Rake::SpecTask.new
14-
15-
task :default => ["test", 'spec']
16-
17-
# This builds the actual gem. For details of what all these options
18-
# mean, and other ones you can add, check the documentation here:
19-
#
20-
# http://rubygems.org/read/chapter/20
21-
#
22-
spec = Gem::Specification.new do |s|
23-
24-
# Change these as appropriate
25-
s.name = "net-ldap"
26-
s.version = "0.1.0"
27-
s.summary = "Net::LDAP is an LDAP support library written in pure Ruby. It supports most LDAP client features and a subset of server features as well."
28-
s.authors = [
29-
"Francis Cianfrocca",
30-
"Austin Ziegler",
31-
"Emiel van de Laar",
32-
"Rory O\'Connell",
33-
"Kaspar Schiess"]
34-
35-
s.description = "Pure Ruby LDAP library"
36-
37-
# Add any extra files to include in the gem
38-
s.files = %w(COPYING History.txt LICENSE Rakefile README.txt) + Dir.glob("{spec,test,lib/**/*}")
39-
s.require_paths = ["lib"]
40-
end
18+
Hoe.spec PKG_NAME do
19+
self.readme_file = "README.markdown"
20+
self.version = PKG_VERSION
21+
self.rubyforge_name = PKG_NAME
4122

42-
# This task actually builds the gem. We also regenerate a static
43-
# .gemspec file, which is useful if something (i.e. GitHub) will
44-
# be automatically building a gem for this project. If you're not
45-
# using GitHub, edit as appropriate.
46-
#
47-
# To publish your gem online, install the 'gemcutter' gem; Read more
48-
# about that here: http://gemcutter.org/pages/gem_docs
49-
Rake::GemPackageTask.new(spec) do |pkg|
50-
pkg.gem_spec = spec
51-
52-
# Generate the gemspec file for github.
53-
file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
54-
File.open(file, "w") {|f| f << spec.to_ruby }
23+
developer "Francis Cianfrocca", "blackhedd@rubyforge.org"
24+
developer "Emiel van de Laar", "gemiel@gmail.com"
25+
developer "Rory O'Connell", "rory.ocon@gmail.com"
26+
developer "Kaspar Schiess", "kaspar.schiess@absurd.li"
27+
developer "Austin Ziegler", "austin@rubyforge.org"
28+
29+
self.url = %W(http://net-ldap.rubyforge.org/ http://github.com/RoryO/ruby-net-ldap)
30+
31+
self.summary = "Pure Ruby LDAP support library with most client features and some server features."
32+
self.changes = paragraphs_of(self.history_file, 0..1).join("\n\n")
33+
self.description = paragraphs_of(self.readme_file, 2..2).join("\n\n")
34+
35+
extra_dev_deps << [ "archive-tar-minitar", "~>0.5.1" ]
36+
extra_dev_deps << [ "hanna", "~>0.1.2" ]
37+
clean_globs << "coverage"
38+
39+
# This is a lie because I will continue to use Archive::Tar::Minitar.
40+
self.need_tar = false
5541
end
5642

57-
# Generate documentation
58-
Rake::RDocTask.new do |rd|
59-
rd.main = "README.txt"
60-
rd.rdoc_files.include("README.txt", "lib/**/*.rb")
61-
rd.rdoc_dir = "rdoc"
43+
desc "Build a Net-LDAP .tar.gz distribution."
44+
task :tar => [ PKG_TAR ]
45+
file PKG_TAR => [ :test ] do |t|
46+
require 'archive/tar/minitar'
47+
require 'zlib'
48+
files = MANIFEST.map { |f|
49+
fn = File.join(PKG_DIST, f)
50+
tm = File.stat(f).mtime
51+
52+
if File.directory?(f)
53+
{ :name => fn, :mode => 0755, :dir => true, :mtime => tm }
54+
else
55+
mode = if f =~ %r{^bin}
56+
0755
57+
else
58+
0644
59+
end
60+
data = File.read(f)
61+
{ :name => fn, :mode => mode, :data => data, :size => data.size,
62+
:mtime => tm }
63+
end
64+
}
65+
66+
begin
67+
unless File.directory?(File.dirname(t.name))
68+
require 'fileutils'
69+
File.mkdir_p File.dirname(t.name)
70+
end
71+
tf = File.open(t.name, 'wb')
72+
gz = Zlib::GzipWriter.new(tf)
73+
tw = Archive::Tar::Minitar::Writer.new(gz)
74+
75+
files.each do |entry|
76+
if entry[:dir]
77+
tw.mkdir(entry[:name], entry)
78+
else
79+
tw.add_file_simple(entry[:name], entry) { |os|
80+
os.write(entry[:data])
81+
}
82+
end
83+
end
84+
ensure
85+
tw.close if tw
86+
gz.close if gz
87+
end
6288
end
89+
task :package => [ PKG_TAR ]
90+
91+
desc "Build the manifest file from the current set of files."
92+
task :build_manifest do |t|
93+
require 'find'
94+
95+
paths = []
96+
Find.find(".") do |path|
97+
next if File.directory?(path)
98+
next if path =~ /\.svn/
99+
next if path =~ /\.git/
100+
next if path =~ /\.hoerc/
101+
next if path =~ /\.swp$/
102+
next if path =~ %r{coverage/}
103+
next if path =~ /~$/
104+
paths << path.sub(%r{^\./}, '')
105+
end
106+
107+
File.open("Manifest.txt", "w") do |f|
108+
f.puts paths.sort.join("\n")
109+
end
63110

64-
desc 'Clear out RDoc and generated packages'
65-
task :clean => [:clobber_rdoc, :clobber_package] do
66-
rm "#{spec.name}.gemspec"
111+
puts paths.sort.join("\n")
67112
end
113+
114+
# require "rake/testtask"
115+
# Rake::TestTask.new do |t|
116+
# t.libs << "test"
117+
# t.test_files = FileList["test/test_*.rb"]
118+
# t.verbose = true
119+
# end
120+
121+
# require 'spec/rake/spectask'
122+
# Spec::Rake::SpecTask.new
123+
124+
# task :default => ["test", 'spec']
125+

0 commit comments

Comments
 (0)