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/test/run-test.rb DELETED
@@ -1,44 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- $VERBOSE = true
4
-
5
- $KCODE = 'u' if RUBY_VERSION < "1.9"
6
-
7
- require 'yaml'
8
-
9
- base_dir = File.expand_path(File.dirname(__FILE__))
10
- top_dir = File.expand_path(File.join(base_dir, ".."))
11
- $LOAD_PATH.unshift(File.join(top_dir, "lib"))
12
- $LOAD_PATH.unshift(File.join(top_dir, "test"))
13
-
14
- test_unit_lib_dir = File.join(top_dir, "test-unit", "lib")
15
- if File.exist?(test_unit_lib_dir)
16
- $LOAD_PATH.unshift(test_unit_lib_dir)
17
- else
18
- require 'rubygems'
19
- gem "test-unit", "> 2"
20
- end
21
- require "test/unit"
22
- ARGV.unshift("--priority-mode")
23
-
24
- test_file = "test/test_*.rb"
25
- Dir.glob(test_file) do |file|
26
- require file
27
- end
28
-
29
- target_adapters = [nil]
30
- # target_adapters << "ldap"
31
- # target_adapters << "net-ldap"
32
- # target_adapters << "jndi"
33
- target_adapters.each do |adapter|
34
- ENV["ACTIVE_LDAP_TEST_ADAPTER"] = adapter
35
- puts "using adapter: #{adapter ? adapter : 'default'}"
36
- args = [File.dirname($0), ARGV.dup]
37
- if Test::Unit::AutoRunner.respond_to?(:standalone?)
38
- args.unshift(false)
39
- else
40
- args.unshift($0)
41
- end
42
- Test::Unit::AutoRunner.run(*args)
43
- puts
44
- end