activeldap 1.2.4 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/Gemfile +18 -0
  2. data/LICENSE +2 -1
  3. data/README.textile +137 -0
  4. data/doc/text/development.textile +50 -0
  5. data/{CHANGES → doc/text/news.textile} +256 -237
  6. data/doc/text/rails.textile +144 -0
  7. data/doc/text/tutorial.textile +1005 -0
  8. data/lib/active_ldap/adapter/base.rb +5 -3
  9. data/lib/active_ldap/adapter/net_ldap_ext.rb +1 -1
  10. data/lib/active_ldap/associations.rb +6 -2
  11. data/lib/active_ldap/base.rb +16 -71
  12. data/lib/active_ldap/callbacks.rb +52 -33
  13. data/lib/active_ldap/configuration.rb +2 -2
  14. data/lib/active_ldap/get_text/parser.rb +2 -2
  15. data/lib/active_ldap/human_readable.rb +5 -4
  16. data/lib/active_ldap/log_subscriber.rb +50 -0
  17. data/lib/active_ldap/persistence.rb +65 -0
  18. data/lib/active_ldap/railtie.rb +40 -0
  19. data/lib/active_ldap/railties/controller_runtime.rb +48 -0
  20. data/lib/active_ldap/user_password.rb +1 -0
  21. data/lib/active_ldap/validations.rb +34 -72
  22. data/lib/active_ldap.rb +13 -912
  23. data/{rails_generators/model_active_ldap → lib/rails/generators/active_ldap/model}/USAGE +2 -1
  24. data/lib/rails/generators/active_ldap/model/model_generator.rb +47 -0
  25. data/{rails_generators/model_active_ldap → lib/rails/generators/active_ldap/model}/templates/model_active_ldap.rb +0 -0
  26. data/lib/rails/generators/active_ldap/scaffold/scaffold_generator.rb +14 -0
  27. data/{rails_generators/scaffold_active_ldap → lib/rails/generators/active_ldap/scaffold}/templates/ldap.yml +1 -0
  28. data/test/test_base.rb +9 -0
  29. data/test/test_callback.rb +2 -6
  30. data/test/test_connection.rb +2 -2
  31. data/test/test_user.rb +2 -2
  32. data/test/test_validation.rb +11 -11
  33. metadata +165 -106
  34. data/README +0 -155
  35. data/Rakefile +0 -133
  36. data/rails/README +0 -54
  37. data/rails/init.rb +0 -33
  38. data/rails_generators/model_active_ldap/model_active_ldap_generator.rb +0 -69
  39. data/rails_generators/model_active_ldap/templates/unit_test.rb +0 -8
  40. data/rails_generators/scaffold_active_ldap/scaffold_active_ldap_generator.rb +0 -7
  41. data/test/al-test-utils.rb +0 -439
  42. data/test/command.rb +0 -112
  43. data/test/config.yaml.sample +0 -6
  44. data/test/fixtures/lower_case_object_class_schema.rb +0 -802
  45. data/test/run-test.rb +0 -44
data/Gemfile ADDED
@@ -0,0 +1,18 @@
1
+ # -*- ruby -*-
2
+
3
+ source "http://rubygems.org"
4
+
5
+ gem 'activemodel', '~> 3.1.0.rc4'
6
+ gem 'locale'
7
+ gem 'fast_gettext'
8
+ gem 'gettext_i18n_rails'
9
+
10
+ group :development, :test do
11
+ gem 'ruby-ldap'
12
+ gem 'net-ldap'
13
+ gem 'jeweler'
14
+ gem 'test-unit'
15
+ gem 'test-unit-notify'
16
+ gem "yard"
17
+ gem "RedCloth"
18
+ end
data/LICENSE CHANGED
@@ -1,4 +1,5 @@
1
- Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.co.jp>.
1
+ ActiveLdap is copyrighted free software by Will Drewry <will@alum.bu.edu>
2
+ and Kouhei Sutou <kou@clear-code.com>.
2
3
  You can redistribute it and/or modify it under either the terms of the GPL
3
4
  (see COPYING file), or the conditions below:
4
5
 
data/README.textile ADDED
@@ -0,0 +1,137 @@
1
+ h1. ActiveLdap
2
+
3
+ A ruby library for object-oriented LDAP interface.
4
+
5
+ * Copyright (C) 2004-2006 Will Drewry _<will@alum.bu.edu>_
6
+ * Copyright (C) 2006-2011 Kouhei Sutou _<kou@clear-code.com>_
7
+
8
+ h2. Description
9
+
10
+ 'ActiveLdap' is a ruby extension library which provides a
11
+ clean objected oriented interface to LDAP library. It was
12
+ inspired by ActivRecord. This is not nearly as clean or as
13
+ flexible as ActiveRecord, but it is still trivial to define
14
+ new objects and manipulate them with minimal difficulty.
15
+
16
+ For example and usage - read the
17
+ "document":http://ruby-activeldap.rubyforge.org/.
18
+
19
+ h2. Prerequisites
20
+
21
+ - Ruby intepreter :=
22
+ One of them:
23
+ * "Ruby":http://www.ruby-lang.org (1.8.x or 1.9.x)
24
+ * "JRuby":http://www.jruby.org/
25
+
26
+ See the above links for installation.
27
+ =:
28
+ - LDAP client :=
29
+ JRuby doesn't need to install new library because JRuby
30
+ has builtin LDAP support. Ruby users need one of them:
31
+
32
+ * "Ruby/LDAP":http://rubyforge.org/projects/ruby-ldap/
33
+ * "Net::LDAP":http://rubyforge.org/projects/net-ldap/
34
+
35
+ See the above links for installation.
36
+ =:
37
+ - ActiveModel :=
38
+ A toolkit for building modeling frameworks like Active
39
+ Record and Active Resource.
40
+ =:
41
+
42
+ h2. Notes
43
+
44
+ * Only GSSAPI SASL support exists due to Ruby/LDAP limitations
45
+
46
+ h2. Rails
47
+
48
+ See "Rails":files.rails.html page for Rails integration.
49
+
50
+ h2. Licence
51
+
52
+ This program is free software; you can redistribute it and/or modify it. It is
53
+ dual licensed under Ruby's license and under the terms of the GNU General
54
+ Public License as published by the Free Software Foundation; either version 2,
55
+ or (at your option) any later version.
56
+
57
+ Please see the file LICENSE for the terms of the licence.
58
+
59
+ h2. Thanks
60
+
61
+ This list may not be correct. If you notice mistakes of this
62
+ list, please point out.
63
+
64
+ * Dick Davies
65
+ * Nathan Kinder
66
+ * Patrick Cole
67
+ * Google Inc.
68
+ * Nobody: Bug reports and API improveent ideas.
69
+ * James Hughes: Bug reports and advices and documentations.
70
+ * Buzz Chopra: Documentations.
71
+ * Christoph Lipp:
72
+ ** Bug reports.
73
+ ** Tell us character escape syntax.
74
+ * Jeff Hall: Bug reports.
75
+ * Ernie Miller: Bug reports and advices.
76
+ * Daniel Pfile: Patches.
77
+ * Jacob Wilkins: Bug reports.
78
+ * Ace Suares:
79
+ ** Bug reports.
80
+ ** Nederlands translations.
81
+ * Iain Pople: Bug reports and API improvement ideas.
82
+ * Kevin McCarthy: Patches.
83
+ * Perry Smith: Patches, bug reports and indications.
84
+ * Marc Dequènes: API suggestions.
85
+ * Jeremy Pruitt: Bug reports.
86
+ * Bodaniel Jeanes:
87
+ ** A suggestion for behavior on simple bind with empty password.
88
+ ** Bug reports.
89
+ * Naoto Morishima: Bug reports.
90
+ * David Morton:
91
+ ** An API improvement idea.
92
+ ** Bug reports.
93
+ * Lennon Day-Reynolds: Bug reports.
94
+ * Tilo: A bug report.
95
+ * Matt Mencel: Bug reports.
96
+ * CultureSpy:
97
+ ** Bug reports.
98
+ ** Bug fixes.
99
+ * gwarf12: A bug report.
100
+ * Baptiste Grenier: API improvement ideas.
101
+ * Richard 3 Nicholas: API improvement ideas.
102
+ * Kazuhiro NISHIYAMA: A bug report.
103
+ * Grzegorz Marszałek: A bug report.
104
+ * しまさわらさん: A suggesetion.
105
+ * Ted Lepich: A suggestion.
106
+ * danger1986: A suggestion.
107
+ * michael.j.konopka: Bug reports.
108
+ * ingersoll: A suggestion.
109
+ * Alexey.Chebotar: Bug reports.
110
+ * ery.lee: A bug report.
111
+ * id:dicdak: A bug report.
112
+ * Raiko Mitsu: A bug report.
113
+ * Kazuaki Takase: Documents in Japanese.
114
+ * Tim Hermans: A bug report.
115
+ * Joe Francis: A suggestion.
116
+ * Tiago Fernandes: Bug reports.
117
+ * achemze: A suggestion.
118
+ * George Montana Harkin: A suggestion.
119
+ * Marc Dequènes: Bug reports.
120
+ * brad@lucky-dip.net: A bug report.
121
+ * Hideyuki Yasuda: Bug reports.
122
+ * zachwily: A bug report.
123
+ * syrius.ml@no-log.org: A bug report.
124
+ * Tim Hermans: A bug report.
125
+ * Anthony M. Martinez: Helped SASL options support
126
+ * ilusi0n.x: A bug report.
127
+ * projekttabla: A suggestion.
128
+ * christian.pennaforte: A bug report.
129
+ * planetmcd: A bug report.
130
+ * spoidar: Rails 3 support.
131
+ * Kris Wehner: Rails 2.3.8 support.
132
+ * Ryan Tandy:
133
+ ** A test bug fix.
134
+ ** Rails 3 support.
135
+ * rbq: A bug report.
136
+ * Narihiro Nakamura: Rails 3 support.
137
+ * Hidetoshi Yoshimoto: Rails 3 support.
@@ -0,0 +1,50 @@
1
+ h1. Development
2
+
3
+ Here is information for developers.
4
+
5
+ h2. Repository
6
+
7
+ ActiveLdap uses ["git repository on
8
+ GitHub":https://github.com/activeldap]. Here is a
9
+ list to get each source code.
10
+
11
+ - "activeldap":https://github.com/activeldap/activeldap :=
12
+ <pre class="command">
13
+ % git clone https://github.com/activeldap/activeldap.git
14
+ </pre>
15
+ =:
16
+ - "al-admin":https://github.com/activeldap/al-admin :=
17
+ <pre class="command">
18
+ % git clone https://github.com/activeldap/al-admin.git
19
+ </pre>
20
+ =:
21
+
22
+ h2. Issues
23
+
24
+ ActiveLdap uses "Issues on
25
+ GitHub":https://github.com/activeldap/activeldap/issues for
26
+ issue tracking. Please submit a issue when you find an
27
+ issue.
28
+
29
+ h2. Rails 3 support
30
+
31
+ Here is design about Rails 3 support.
32
+
33
+ h3. must
34
+
35
+ * We target to Rails 3.1.0. (Yes, it's not released yet
36
+ but it will be released before we support Rails 3.x.)
37
+ * We update the documentation and ensure that the procedure
38
+ for including ActiveLdap in a Rails 3 project is correct.
39
+
40
+ h3. may
41
+
42
+ * We support Warden.
43
+ * We support Devise
44
+ * We support OmniAuth. (instead of Warden)
45
+
46
+ h3. DONE
47
+ * We don't support Rails 3.0.x.
48
+ * We provide active_ldap/railtie to initialize ActiveLdap.
49
+ * We remove ActiveRecord dependency.
50
+ * We depend on ActiveModel instead of ActiveRecord.