activesambaldap 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS.en +6 -1
- data/NEWS.ja +6 -1
- data/README.en +3 -2
- data/README.ja +3 -2
- data/Rakefile +21 -2
- data/bin/asl-groupadd +0 -0
- data/bin/asl-groupadd.help +15 -0
- data/bin/asl-groupdel +0 -0
- data/bin/asl-groupdel.help +12 -0
- data/bin/asl-groupmod +0 -0
- data/bin/asl-groupmod.help +18 -0
- data/bin/asl-groupshow +0 -0
- data/bin/asl-groupshow.help +10 -0
- data/bin/asl-passwd +0 -0
- data/bin/asl-passwd.help +14 -0
- data/bin/asl-populate +0 -0
- data/bin/asl-populate.help +27 -0
- data/bin/asl-purge +0 -0
- data/bin/asl-purge.help +10 -0
- data/bin/asl-samba-computeradd +0 -0
- data/bin/asl-samba-computeradd.help +12 -0
- data/bin/asl-samba-groupadd +0 -0
- data/bin/asl-samba-groupadd.help +10 -0
- data/bin/asl-samba-groupdel +0 -0
- data/bin/asl-samba-groupdel.help +10 -0
- data/bin/asl-samba-groupmod +0 -0
- data/bin/asl-samba-groupmod.help +14 -0
- data/bin/asl-samba-useradd +0 -0
- data/bin/asl-samba-useradd.help +12 -0
- data/bin/asl-samba-userdel +0 -0
- data/bin/asl-samba-userdel.help +10 -0
- data/bin/asl-samba-usermod +0 -0
- data/bin/asl-samba-usermod.help +14 -0
- data/bin/asl-useradd +0 -0
- data/bin/asl-useradd.help +47 -0
- data/bin/asl-userdel +0 -0
- data/bin/asl-userdel.help +17 -0
- data/bin/asl-usermod +0 -0
- data/bin/asl-usermod.help +45 -0
- data/bin/asl-usershow +0 -0
- data/bin/asl-usershow.help +10 -0
- data/lib/active_samba_ldap.rb +9 -3
- data/lib/active_samba_ldap/account_entry.rb +1 -1
- data/lib/active_samba_ldap/group_entry.rb +3 -5
- data/lib/active_samba_ldap/reloadable.rb +2 -0
- data/lib/active_samba_ldap/samba_group_entry.rb +1 -1
- data/lib/active_samba_ldap/version.rb +1 -1
- data/misc/rd2html.rb +1 -1
- data/rails/plugin/active_samba_ldap/init.rb +15 -0
- data/test-unit/History.txt +32 -0
- data/test-unit/README.txt +32 -0
- data/test-unit/Rakefile +22 -0
- data/test-unit/bin/testrb +5 -0
- data/test-unit/lib/test/unit.rb +280 -0
- data/test-unit/lib/test/unit/assertionfailederror.rb +14 -0
- data/test-unit/lib/test/unit/assertions.rb +722 -0
- data/test-unit/lib/test/unit/attribute.rb +125 -0
- data/test-unit/lib/test/unit/autorunner.rb +250 -0
- data/test-unit/lib/test/unit/collector.rb +43 -0
- data/test-unit/lib/test/unit/collector/descendant.rb +23 -0
- data/test-unit/lib/test/unit/collector/dir.rb +108 -0
- data/test-unit/lib/test/unit/collector/load.rb +135 -0
- data/test-unit/lib/test/unit/collector/objectspace.rb +34 -0
- data/test-unit/lib/test/unit/color.rb +61 -0
- data/test-unit/lib/test/unit/diff.rb +524 -0
- data/test-unit/lib/test/unit/error.rb +124 -0
- data/test-unit/lib/test/unit/exceptionhandler.rb +39 -0
- data/test-unit/lib/test/unit/failure.rb +110 -0
- data/test-unit/lib/test/unit/fixture.rb +185 -0
- data/test-unit/lib/test/unit/notification.rb +116 -0
- data/test-unit/lib/test/unit/omission.rb +129 -0
- data/test-unit/lib/test/unit/pending.rb +130 -0
- data/test-unit/lib/test/unit/priority.rb +146 -0
- data/test-unit/lib/test/unit/runner/console.rb +46 -0
- data/test-unit/lib/test/unit/runner/emacs.rb +8 -0
- data/test-unit/lib/test/unit/testcase.rb +174 -0
- data/test-unit/lib/test/unit/testresult.rb +89 -0
- data/test-unit/lib/test/unit/testsuite.rb +110 -0
- data/test-unit/lib/test/unit/ui/console/outputlevel.rb +14 -0
- data/test-unit/lib/test/unit/ui/console/testrunner.rb +195 -0
- data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +49 -0
- data/test-unit/lib/test/unit/ui/testrunner.rb +20 -0
- data/test-unit/lib/test/unit/ui/testrunnermediator.rb +77 -0
- data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +41 -0
- data/test-unit/lib/test/unit/util/backtracefilter.rb +41 -0
- data/test-unit/lib/test/unit/util/observable.rb +90 -0
- data/test-unit/lib/test/unit/util/procwrapper.rb +48 -0
- data/test-unit/lib/test/unit/version.rb +7 -0
- data/test-unit/sample/adder.rb +13 -0
- data/test-unit/sample/subtracter.rb +12 -0
- data/test-unit/sample/tc_adder.rb +18 -0
- data/test-unit/sample/tc_subtracter.rb +18 -0
- data/test-unit/sample/ts_examples.rb +7 -0
- data/test-unit/test/collector/test_descendant.rb +135 -0
- data/test-unit/test/collector/test_dir.rb +406 -0
- data/test-unit/test/collector/test_load.rb +333 -0
- data/test-unit/test/collector/test_objectspace.rb +98 -0
- data/test-unit/test/run-test.rb +13 -0
- data/test-unit/test/test_assertions.rb +693 -0
- data/test-unit/test/test_attribute.rb +86 -0
- data/test-unit/test/test_color.rb +37 -0
- data/test-unit/test/test_diff.rb +477 -0
- data/test-unit/test/test_emacs_runner.rb +60 -0
- data/test-unit/test/test_error.rb +26 -0
- data/test-unit/test/test_failure.rb +33 -0
- data/test-unit/test/test_fixture.rb +275 -0
- data/test-unit/test/test_notification.rb +33 -0
- data/test-unit/test/test_omission.rb +81 -0
- data/test-unit/test/test_pending.rb +64 -0
- data/test-unit/test/test_priority.rb +89 -0
- data/test-unit/test/test_testcase.rb +411 -0
- data/test-unit/test/test_testresult.rb +113 -0
- data/test-unit/test/test_testsuite.rb +129 -0
- data/test-unit/test/testunit_test_util.rb +12 -0
- data/test-unit/test/ui/test_testrunmediator.rb +20 -0
- data/test-unit/test/util/test_backtracefilter.rb +41 -0
- data/test-unit/test/util/test_observable.rb +102 -0
- data/test-unit/test/util/test_procwrapper.rb +36 -0
- data/test/asl-test-utils.rb +0 -1
- data/test/run-test.rb +8 -12
- data/test/test_asl_groupmod.rb +3 -1
- data/test/test_asl_useradd.rb +3 -3
- data/test/test_samba_encrypt.rb +0 -1
- metadata +225 -88
- data/po/active-samba-ldap.pot +0 -459
- data/test/test-unit-ext.rb +0 -4
- data/test/test-unit-ext/always-show-result.rb +0 -28
- data/test/test-unit-ext/backtrace-filter.rb +0 -17
- data/test/test-unit-ext/long-display-for-emacs.rb +0 -25
- data/test/test-unit-ext/priority.rb +0 -186
data/test/test-unit-ext.rb
DELETED
@@ -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
|