activesambaldap 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. data/NEWS.en +6 -1
  2. data/NEWS.ja +6 -1
  3. data/README.en +3 -2
  4. data/README.ja +3 -2
  5. data/Rakefile +21 -2
  6. data/bin/asl-groupadd +0 -0
  7. data/bin/asl-groupadd.help +15 -0
  8. data/bin/asl-groupdel +0 -0
  9. data/bin/asl-groupdel.help +12 -0
  10. data/bin/asl-groupmod +0 -0
  11. data/bin/asl-groupmod.help +18 -0
  12. data/bin/asl-groupshow +0 -0
  13. data/bin/asl-groupshow.help +10 -0
  14. data/bin/asl-passwd +0 -0
  15. data/bin/asl-passwd.help +14 -0
  16. data/bin/asl-populate +0 -0
  17. data/bin/asl-populate.help +27 -0
  18. data/bin/asl-purge +0 -0
  19. data/bin/asl-purge.help +10 -0
  20. data/bin/asl-samba-computeradd +0 -0
  21. data/bin/asl-samba-computeradd.help +12 -0
  22. data/bin/asl-samba-groupadd +0 -0
  23. data/bin/asl-samba-groupadd.help +10 -0
  24. data/bin/asl-samba-groupdel +0 -0
  25. data/bin/asl-samba-groupdel.help +10 -0
  26. data/bin/asl-samba-groupmod +0 -0
  27. data/bin/asl-samba-groupmod.help +14 -0
  28. data/bin/asl-samba-useradd +0 -0
  29. data/bin/asl-samba-useradd.help +12 -0
  30. data/bin/asl-samba-userdel +0 -0
  31. data/bin/asl-samba-userdel.help +10 -0
  32. data/bin/asl-samba-usermod +0 -0
  33. data/bin/asl-samba-usermod.help +14 -0
  34. data/bin/asl-useradd +0 -0
  35. data/bin/asl-useradd.help +47 -0
  36. data/bin/asl-userdel +0 -0
  37. data/bin/asl-userdel.help +17 -0
  38. data/bin/asl-usermod +0 -0
  39. data/bin/asl-usermod.help +45 -0
  40. data/bin/asl-usershow +0 -0
  41. data/bin/asl-usershow.help +10 -0
  42. data/lib/active_samba_ldap.rb +9 -3
  43. data/lib/active_samba_ldap/account_entry.rb +1 -1
  44. data/lib/active_samba_ldap/group_entry.rb +3 -5
  45. data/lib/active_samba_ldap/reloadable.rb +2 -0
  46. data/lib/active_samba_ldap/samba_group_entry.rb +1 -1
  47. data/lib/active_samba_ldap/version.rb +1 -1
  48. data/misc/rd2html.rb +1 -1
  49. data/rails/plugin/active_samba_ldap/init.rb +15 -0
  50. data/test-unit/History.txt +32 -0
  51. data/test-unit/README.txt +32 -0
  52. data/test-unit/Rakefile +22 -0
  53. data/test-unit/bin/testrb +5 -0
  54. data/test-unit/lib/test/unit.rb +280 -0
  55. data/test-unit/lib/test/unit/assertionfailederror.rb +14 -0
  56. data/test-unit/lib/test/unit/assertions.rb +722 -0
  57. data/test-unit/lib/test/unit/attribute.rb +125 -0
  58. data/test-unit/lib/test/unit/autorunner.rb +250 -0
  59. data/test-unit/lib/test/unit/collector.rb +43 -0
  60. data/test-unit/lib/test/unit/collector/descendant.rb +23 -0
  61. data/test-unit/lib/test/unit/collector/dir.rb +108 -0
  62. data/test-unit/lib/test/unit/collector/load.rb +135 -0
  63. data/test-unit/lib/test/unit/collector/objectspace.rb +34 -0
  64. data/test-unit/lib/test/unit/color.rb +61 -0
  65. data/test-unit/lib/test/unit/diff.rb +524 -0
  66. data/test-unit/lib/test/unit/error.rb +124 -0
  67. data/test-unit/lib/test/unit/exceptionhandler.rb +39 -0
  68. data/test-unit/lib/test/unit/failure.rb +110 -0
  69. data/test-unit/lib/test/unit/fixture.rb +185 -0
  70. data/test-unit/lib/test/unit/notification.rb +116 -0
  71. data/test-unit/lib/test/unit/omission.rb +129 -0
  72. data/test-unit/lib/test/unit/pending.rb +130 -0
  73. data/test-unit/lib/test/unit/priority.rb +146 -0
  74. data/test-unit/lib/test/unit/runner/console.rb +46 -0
  75. data/test-unit/lib/test/unit/runner/emacs.rb +8 -0
  76. data/test-unit/lib/test/unit/testcase.rb +174 -0
  77. data/test-unit/lib/test/unit/testresult.rb +89 -0
  78. data/test-unit/lib/test/unit/testsuite.rb +110 -0
  79. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +14 -0
  80. data/test-unit/lib/test/unit/ui/console/testrunner.rb +195 -0
  81. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +49 -0
  82. data/test-unit/lib/test/unit/ui/testrunner.rb +20 -0
  83. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +77 -0
  84. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +41 -0
  85. data/test-unit/lib/test/unit/util/backtracefilter.rb +41 -0
  86. data/test-unit/lib/test/unit/util/observable.rb +90 -0
  87. data/test-unit/lib/test/unit/util/procwrapper.rb +48 -0
  88. data/test-unit/lib/test/unit/version.rb +7 -0
  89. data/test-unit/sample/adder.rb +13 -0
  90. data/test-unit/sample/subtracter.rb +12 -0
  91. data/test-unit/sample/tc_adder.rb +18 -0
  92. data/test-unit/sample/tc_subtracter.rb +18 -0
  93. data/test-unit/sample/ts_examples.rb +7 -0
  94. data/test-unit/test/collector/test_descendant.rb +135 -0
  95. data/test-unit/test/collector/test_dir.rb +406 -0
  96. data/test-unit/test/collector/test_load.rb +333 -0
  97. data/test-unit/test/collector/test_objectspace.rb +98 -0
  98. data/test-unit/test/run-test.rb +13 -0
  99. data/test-unit/test/test_assertions.rb +693 -0
  100. data/test-unit/test/test_attribute.rb +86 -0
  101. data/test-unit/test/test_color.rb +37 -0
  102. data/test-unit/test/test_diff.rb +477 -0
  103. data/test-unit/test/test_emacs_runner.rb +60 -0
  104. data/test-unit/test/test_error.rb +26 -0
  105. data/test-unit/test/test_failure.rb +33 -0
  106. data/test-unit/test/test_fixture.rb +275 -0
  107. data/test-unit/test/test_notification.rb +33 -0
  108. data/test-unit/test/test_omission.rb +81 -0
  109. data/test-unit/test/test_pending.rb +64 -0
  110. data/test-unit/test/test_priority.rb +89 -0
  111. data/test-unit/test/test_testcase.rb +411 -0
  112. data/test-unit/test/test_testresult.rb +113 -0
  113. data/test-unit/test/test_testsuite.rb +129 -0
  114. data/test-unit/test/testunit_test_util.rb +12 -0
  115. data/test-unit/test/ui/test_testrunmediator.rb +20 -0
  116. data/test-unit/test/util/test_backtracefilter.rb +41 -0
  117. data/test-unit/test/util/test_observable.rb +102 -0
  118. data/test-unit/test/util/test_procwrapper.rb +36 -0
  119. data/test/asl-test-utils.rb +0 -1
  120. data/test/run-test.rb +8 -12
  121. data/test/test_asl_groupmod.rb +3 -1
  122. data/test/test_asl_useradd.rb +3 -3
  123. data/test/test_samba_encrypt.rb +0 -1
  124. metadata +225 -88
  125. data/po/active-samba-ldap.pot +0 -459
  126. data/test/test-unit-ext.rb +0 -4
  127. data/test/test-unit-ext/always-show-result.rb +0 -28
  128. data/test/test-unit-ext/backtrace-filter.rb +0 -17
  129. data/test/test-unit-ext/long-display-for-emacs.rb +0 -25
  130. data/test/test-unit-ext/priority.rb +0 -186
@@ -1,4 +0,0 @@
1
- require "test-unit-ext/always-show-result"
2
- require "test-unit-ext/priority"
3
- require "test-unit-ext/backtrace-filter"
4
- require "test-unit-ext/long-display-for-emacs"
@@ -1,28 +0,0 @@
1
- require "test/unit/ui/testrunnermediator"
2
-
3
- module Test
4
- module Unit
5
- module UI
6
- class TestRunnerMediator
7
- alias_method :original_run_suite, :run_suite
8
- def run_suite
9
- @notified_finished = false
10
- begin_time = Time.now
11
- original_run_suite
12
- rescue Interrupt
13
- unless @notified_finished
14
- end_time = Time.now
15
- elapsed_time = end_time - begin_time
16
- notify_listeners(FINISHED, elapsed_time)
17
- end
18
- raise
19
- end
20
-
21
- def notify_listeners(channel_name, *arguments)
22
- @notified_finished = true if channel_name == FINISHED
23
- super
24
- end
25
- end
26
- end
27
- end
28
- end
@@ -1,17 +0,0 @@
1
- require 'test/unit/util/backtracefilter'
2
-
3
- module Test
4
- module Unit
5
- module Util
6
- module BacktraceFilter
7
- TEST_UNIT_EXT_PREFIX = File.dirname(__FILE__)
8
-
9
- alias_method :original_filter_backtrace, :filter_backtrace
10
- def filter_backtrace(backtrace, prefix=nil)
11
- original_result = original_filter_backtrace(backtrace, prefix)
12
- original_filter_backtrace(original_result, TEST_UNIT_EXT_PREFIX)
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,25 +0,0 @@
1
- require 'test/unit/failure'
2
- require 'test/unit/error'
3
-
4
- module Test
5
- module Unit
6
- BACKTRACE_INFO_RE = /.+:\d+:in `.+?'/
7
- class Failure
8
- alias_method :original_long_display, :long_display
9
- def long_display
10
- extract_backtraces_re =
11
- /^ \[(#{BACKTRACE_INFO_RE}(?:\n #{BACKTRACE_INFO_RE})+)\]:$/
12
- original_long_display.gsub(extract_backtraces_re) do |backtraces|
13
- $1.gsub(/^ (#{BACKTRACE_INFO_RE})/, '\1') + ':'
14
- end
15
- end
16
- end
17
-
18
- class Error
19
- alias_method :original_long_display, :long_display
20
- def long_display
21
- original_long_display.gsub(/^ (#{BACKTRACE_INFO_RE})/, '\1')
22
- end
23
- end
24
- end
25
- end
@@ -1,186 +0,0 @@
1
- require "test/unit"
2
-
3
- require "fileutils"
4
-
5
- module Test
6
- module Unit
7
- class TestCase
8
- class << self
9
- def inherited(sub)
10
- super
11
- sub.instance_variable_set("@priority_initialized", true)
12
- sub.instance_variable_set("@priority_table", {})
13
- sub.priority :normal
14
- end
15
-
16
- def include(*args)
17
- args.reverse_each do |mod|
18
- super(mod)
19
- next unless defined?(@priority_initialized)
20
- mod.instance_methods(false).each do |name|
21
- set_priority(name)
22
- end
23
- end
24
- end
25
-
26
- alias_method :method_added_without_priority, :method_added
27
- def method_added(name)
28
- method_added_without_priority(name)
29
- set_priority(name) if defined?(@priority_initialized)
30
- end
31
-
32
- def priority(name, *tests)
33
- singleton_class = (class << self; self; end)
34
- priority_check_method = priority_check_method_name(name)
35
- unless singleton_class.private_method_defined?(priority_check_method)
36
- raise ArgumentError, "unknown priority: #{name}"
37
- end
38
- if tests.empty?
39
- @current_priority = name
40
- else
41
- tests.each do |test|
42
- set_priority(test, name)
43
- end
44
- end
45
- end
46
-
47
- def need_to_run?(test_name)
48
- normalized_test_name = normalize_test_name(test_name)
49
- priority = @priority_table[normalized_test_name]
50
- return true unless priority
51
- __send__(priority_check_method_name(priority), test_name)
52
- end
53
-
54
- private
55
- def priority_check_method_name(priority_name)
56
- "run_priority_#{priority_name}?"
57
- end
58
-
59
- def normalize_test_name(test_name)
60
- "test_#{test_name.to_s.sub(/^test_/, '')}"
61
- end
62
-
63
- def set_priority(name, priority=@current_priority)
64
- @priority_table[normalize_test_name(name)] = priority
65
- end
66
-
67
- def run_priority_must?(test_name)
68
- true
69
- end
70
-
71
- def run_priority_important?(test_name)
72
- rand > 0.1
73
- end
74
-
75
- def run_priority_high?(test_name)
76
- rand > 0.3
77
- end
78
-
79
- def run_priority_normal?(test_name)
80
- rand > 0.5
81
- end
82
-
83
- def run_priority_low?(test_name)
84
- rand > 0.75
85
- end
86
-
87
- def run_priority_never?(test_name)
88
- false
89
- end
90
- end
91
-
92
- def need_to_run?
93
- !previous_test_success? or self.class.need_to_run?(@method_name)
94
- end
95
-
96
- alias_method :original_run, :run
97
- def run(result, &block)
98
- original_run(result, &block)
99
- ensure
100
- if passed?
101
- FileUtils.touch(passed_file)
102
- else
103
- FileUtils.rm_f(passed_file)
104
- end
105
- end
106
-
107
- private
108
- def previous_test_success?
109
- File.exist?(passed_file)
110
- end
111
-
112
- def result_dir
113
- components = [".test-result", self.class.name, @method_name.to_s]
114
- dir = File.join(File.dirname($0), *components)
115
- dir = File.expand_path(dir)
116
- begin
117
- FileUtils.mkdir_p(dir)
118
- rescue Errno::EACCES
119
- retry_dir = File.join(File.dirname(__FILE__), "..", *components)
120
- retry_dir = File.expand_path(retry_dir)
121
- raise if retry_dir == dir
122
- dir = retry_dir
123
- retry
124
- end
125
- dir
126
- end
127
-
128
- def passed_file
129
- File.join(result_dir, "passed")
130
- end
131
-
132
- def escaped_method_name
133
- @method_name.to_s.gsub(/[!?]$/) do |matched|
134
- case matched
135
- when "!"
136
- ".destructive"
137
- when "?"
138
- ".predicate"
139
- end
140
- end
141
- end
142
- end
143
-
144
- class TestSuite
145
- @@priority_mode = false
146
-
147
- class << self
148
- def priority_mode=(bool)
149
- @@priority_mode = bool
150
- end
151
- end
152
-
153
- alias_method :original_run, :run
154
- def run(*args, &block)
155
- priority_mode = @@priority_mode
156
- if priority_mode
157
- @original_tests = @tests
158
- apply_priority
159
- end
160
- original_run(*args, &block)
161
- ensure
162
- @tests = @original_tests if priority_mode
163
- end
164
-
165
- def apply_priority
166
- @tests = @tests.reject {|test| !test.need_to_run?}
167
- end
168
-
169
- def need_to_run?
170
- apply_priority
171
- !@tests.empty?
172
- end
173
- end
174
-
175
- class AutoRunner
176
- alias_method :options_without_priority, :options
177
- def options
178
- opts = options_without_priority
179
- opts.on("--[no-]priority", "use priority mode") do |bool|
180
- TestSuite.priority_mode = bool
181
- end
182
- opts
183
- end
184
- end
185
- end
186
- end