activesambaldap 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. data/NEWS.en +20 -18
  2. data/NEWS.ja +23 -21
  3. data/README.en +122 -95
  4. data/README.ja +125 -98
  5. data/Rakefile +29 -64
  6. data/bin/asl-groupadd +1 -1
  7. data/bin/asl-groupadd.help +1 -0
  8. data/bin/asl-groupdel +1 -1
  9. data/bin/asl-groupdel.help +1 -0
  10. data/bin/asl-groupmod +1 -1
  11. data/bin/asl-groupmod.help +1 -0
  12. data/bin/asl-groupshow +1 -1
  13. data/bin/asl-groupshow.help +1 -0
  14. data/bin/asl-passwd +1 -1
  15. data/bin/asl-passwd.help +1 -0
  16. data/bin/asl-populate +2 -2
  17. data/bin/asl-populate.help +1 -0
  18. data/bin/asl-purge +1 -1
  19. data/bin/asl-purge.help +1 -0
  20. data/bin/asl-samba-computeradd +1 -1
  21. data/bin/asl-samba-computeradd.help +1 -0
  22. data/bin/asl-samba-groupadd +1 -1
  23. data/bin/asl-samba-groupadd.help +1 -0
  24. data/bin/asl-samba-groupdel +1 -1
  25. data/bin/asl-samba-groupdel.help +1 -0
  26. data/bin/asl-samba-groupmod +1 -1
  27. data/bin/asl-samba-groupmod.help +1 -0
  28. data/bin/asl-samba-useradd +1 -1
  29. data/bin/asl-samba-useradd.help +1 -0
  30. data/bin/asl-samba-userdel +1 -1
  31. data/bin/asl-samba-userdel.help +1 -0
  32. data/bin/asl-samba-usermod +1 -1
  33. data/bin/asl-samba-usermod.help +1 -0
  34. data/bin/asl-useradd +1 -1
  35. data/bin/asl-useradd.help +6 -4
  36. data/bin/asl-userdel +1 -1
  37. data/bin/asl-userdel.help +1 -0
  38. data/bin/asl-usermod +1 -1
  39. data/bin/asl-usermod.help +2 -0
  40. data/bin/asl-usershow +1 -1
  41. data/bin/asl-usershow.help +1 -0
  42. data/data/locale/ja/LC_MESSAGES/active-samba-ldap.mo +0 -0
  43. data/lib/active_samba_ldap/version.rb +1 -1
  44. data/lib/active_samba_ldap.rb +1 -1
  45. data/po/ja/active-samba-ldap.po +5 -5
  46. data/rails/{plugin/active_samba_ldap/README → README} +0 -0
  47. data/rails/{plugin/active_samba_ldap/init.rb → init.rb} +1 -1
  48. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/scaffold_active_samba_ldap_generator.rb +0 -0
  49. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/computer.rb +0 -0
  50. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/dc.rb +0 -0
  51. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/group.rb +0 -0
  52. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/idmap.rb +0 -0
  53. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/ldap.yml +0 -0
  54. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/ou.rb +0 -0
  55. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/samba_controller.rb +0 -0
  56. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/samba_helper.rb +0 -0
  57. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/samba_index.rhtml +0 -0
  58. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/samba_populate.rhtml +0 -0
  59. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/samba_purge.rhtml +0 -0
  60. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/unix_id_pool.rb +0 -0
  61. data/{rails/plugin/active_samba_ldap/generators → rails_generators}/scaffold_active_samba_ldap/templates/user.rb +0 -0
  62. data/test/asl-test-utils.rb +2 -2
  63. data/test/test_asl_usershow.rb +2 -2
  64. data/test/test_password.rb +2 -2
  65. data/test/test_user_home_directory.rb +2 -2
  66. data/test-unit/History.txt +76 -1
  67. data/test-unit/README.txt +32 -12
  68. data/test-unit/Rakefile +19 -1
  69. data/test-unit/TODO +5 -0
  70. data/test-unit/lib/test/unit/assertions.rb +515 -88
  71. data/test-unit/lib/test/unit/autorunner.rb +93 -14
  72. data/test-unit/lib/test/unit/collector/load.rb +1 -1
  73. data/test-unit/lib/test/unit/collector.rb +1 -1
  74. data/test-unit/lib/test/unit/color-scheme.rb +86 -0
  75. data/test-unit/lib/test/unit/color.rb +40 -5
  76. data/test-unit/lib/test/unit/diff.rb +14 -0
  77. data/test-unit/lib/test/unit/fixture.rb +7 -16
  78. data/test-unit/lib/test/unit/notification.rb +9 -0
  79. data/test-unit/lib/test/unit/omission.rb +14 -0
  80. data/test-unit/lib/test/unit/pending.rb +16 -0
  81. data/test-unit/lib/test/unit/priority.rb +38 -3
  82. data/test-unit/lib/test/unit/runner/console.rb +8 -2
  83. data/test-unit/lib/test/unit/testcase.rb +263 -12
  84. data/test-unit/lib/test/unit/ui/console/testrunner.rb +58 -30
  85. data/test-unit/lib/test/unit/util/method-owner-finder.rb +28 -0
  86. data/test-unit/lib/test/unit/version.rb +1 -1
  87. data/test-unit/lib/test/unit.rb +62 -0
  88. data/test-unit/sample/test_user.rb +22 -0
  89. data/test-unit/test/collector/{test_descendant.rb → test-descendant.rb} +0 -0
  90. data/test-unit/test/collector/{test_load.rb → test-load.rb} +1 -1
  91. data/test-unit/test/{test_attribute.rb → test-attribute.rb} +0 -0
  92. data/test-unit/test/test-color-scheme.rb +56 -0
  93. data/test-unit/test/{test_color.rb → test-color.rb} +10 -0
  94. data/test-unit/test/{test_diff.rb → test-diff.rb} +0 -0
  95. data/test-unit/test/{test_emacs_runner.rb → test-emacs-runner.rb} +0 -0
  96. data/test-unit/test/test-fixture.rb +287 -0
  97. data/test-unit/test/{test_notification.rb → test-notification.rb} +4 -4
  98. data/test-unit/test/{test_omission.rb → test-omission.rb} +6 -6
  99. data/test-unit/test/{test_pending.rb → test-pending.rb} +12 -6
  100. data/test-unit/test/{test_priority.rb → test-priority.rb} +30 -0
  101. data/test-unit/test/{test_testcase.rb → test-testcase.rb} +100 -4
  102. data/test-unit/test/test_assertions.rb +462 -73
  103. data/test-unit/test/{testunit_test_util.rb → testunit-test-util.rb} +4 -2
  104. data/test-unit/test/ui/test_testrunmediator.rb +1 -1
  105. data/test-unit/test/util/test-method-owner-finder.rb +38 -0
  106. metadata +69 -79
  107. data/test-unit/test/test_fixture.rb +0 -275
data/README.ja CHANGED
@@ -1,14 +1,12 @@
1
- # -*- rd -*-
2
-
3
1
  = README.ja
4
2
 
5
- $Id: README.ja 145 2008-06-14 14:30:20Z kou $
3
+ $Id: README.ja 165 2009-07-17 22:35:02Z kou $
6
4
 
7
5
  == 名前
8
6
 
9
7
  ActiveSambaLdap
10
8
 
11
- == なにこれ?
9
+ == 説明
12
10
 
13
11
  ActiveSambaLdapはSamba用LDAPエントリを管理するための
14
12
  ActiveRecord風なライブラリです.また,smbldap-toolsのような
@@ -16,36 +14,35 @@ ActiveRecord風なライブラリです.また,smbldap-toolsのような
16
14
 
17
15
  == 作者
18
16
 
19
- Kouhei Sutou <kou@cozmixng.org>
17
+ Kouhei Sutou <tt><kou@clear-code.com></tt>
20
18
 
21
19
  == ライセンス
22
20
 
23
21
  Ruby's.
24
22
 
23
+ == 依存ライブラリ
24
+
25
+ * ActiveLdap >= 1.1.0
26
+
27
+ == インストール
28
+
29
+ % sudo gem install activesambaldap
30
+
25
31
  == メーリングリスト
26
32
 
27
33
  asl-devel-ja@rubyforge.org
28
34
 
29
- ((<URL:http://rubyforge.org/mailman/listinfo/asl-devel-ja/>))
35
+ http://rubyforge.org/mailman/listinfo/asl-devel-ja/
30
36
 
31
37
  == リファレンスマニュアル
32
38
 
33
- ((<URL:http://asl.rubyforge.org/activesambaldap/>))
34
-
35
- == 依存ライブラリ
36
-
37
- * ActiveLdap >= 1.0.1
39
+ http://asl.rubyforge.org/activesambaldap/
38
40
 
39
41
  == 使用法
40
42
 
41
43
  === Railsと使う
42
44
 
43
- まず,Rails用プラグインをインストールします.以下のURLは
44
- trunk用ですので,環境にあわせて変更してください.
45
-
46
- % script/plugin install svn://rubyforge.org/var/svn/asl/trunk/rails/plugin/active_samba_ldap
47
-
48
- 次に,Rails用ActiveSambaLdap環境を構築します.
45
+ Rails用ActiveSambaLdap環境を構築します.
49
46
 
50
47
  % script/generate scaffold_active_samba_ldap
51
48
 
@@ -90,10 +87,10 @@ asl-populateを使うとこうなります.
90
87
  ファイルで上書きされます.上記の例だと,以下の順序で読み込ま
91
88
  れていきます.
92
89
 
93
- * /etc/activesambaldap/config.yaml
94
- * /etc/activesambaldap/bind.yaml
95
- * /home/kou/.activesambaldap.conf
96
- * /home/kou/.activesambaldap.bind
90
+ * /etc/activesambaldap/config.yaml
91
+ * /etc/activesambaldap/bind.yaml
92
+ * /home/kou/.activesambaldap.conf
93
+ * /home/kou/.activesambaldap.bind
97
94
 
98
95
  config.yamlや*.confの後にbind.yamlや*.bindを読み込んでいるの
99
96
  はセキュリティ上の配慮です.ホスト名などの見られてもよい情報
@@ -146,108 +143,137 @@ sidを設定しておかないと,毎回net getlocalsidをするため,効
146
143
 
147
144
  設定可能なオプションは以下の通りです.
148
145
 
149
- : base
150
- ActiveLdap::Base.establish_connectionのオプションと同じ.
151
- : host
152
- ActiveLdap::Base.establish_connectionのオプションと同じ.
153
- : port
154
- ActiveLdap::Base.establish_connectionのオプションと同じ.
155
- : scope
156
- ActiveLdap::Base.establish_connectionのオプションと同じ.
157
- : bind_dn
158
- ActiveLdap::Base.establish_connectionのオプションと同じ.
159
- : password
160
- ActiveLdap::Base.establish_connectionのオプションと同じ.
161
- : method
162
- ActiveLdap::Base.establish_connectionのオプションと同じ.
163
- : allow_anonymous
164
- ActiveLdap::Base.establish_connectionのオプションと同じ.
165
-
166
- : sid
146
+ [_base_]
147
+ ActiveLdap::Base.setup_connectionのオプションと同じ.
148
+ [_host_]
149
+ ActiveLdap::Base.setup_connectionのオプションと同じ.
150
+ [_port_]
151
+ ActiveLdap::Base.setup_connectionのオプションと同じ.
152
+ [_scope_]
153
+ ActiveLdap::Base.setup_connectionのオプションと同じ.
154
+ [_bind_dn_]
155
+ ActiveLdap::Base.setup_connectionのオプションと同じ.
156
+ [_password_]
157
+ ActiveLdap::Base.setup_connectionのオプションと同じ.
158
+ [_method_]
159
+ ActiveLdap::Base.setup_connectionのオプションと同じ.
160
+ [_allow_anonymous_]
161
+ ActiveLdap::Base.setup_connectionのオプションと同じ.
162
+
163
+ [_sid_]
167
164
  SambaサーバのSID(Security Identifier).
168
- : smb_conf
165
+ [_smb_conf_]
169
166
  Sambaの設定ファイルsmb.confがあるパス.
170
- : samba_domain
167
+ [_samba_domain_]
171
168
  Sambaサーバのドメイン
172
- : samba_netbios_name
169
+ [_samba_netbios_name_]
173
170
  SambaサーバのNetBIOS名
174
171
 
175
- : password_hash_type
172
+ [_password_hash_type_]
176
173
  LDAP上のパスワードをハッシュ化する時に使用するアルゴリズ
177
- ム.指定できるのは:crypt, :md5, :smd5, :sha, :sshaで,デ
178
- フォルトは:sshaです.
174
+ ム.指定できるの
175
+ は+:crypt+, +:md5+, +:smd5+, +:sha+, +:ssha+です。
179
176
 
180
177
  LDAP上のパスワードはSambaの認証時ではなく,UNIX上のユーザ
181
178
  の認証時に利用されます.
182
179
 
183
- : users_suffix
180
+ デフォルト: +:ssha+
181
+
182
+ [_users_suffix_]
184
183
  LDAP上のユーザエントリを格納するツリー.baseからの相対パ
185
- スを指定する.例: ou=Users
186
- : groups_suffix
184
+ スを指定する.
185
+
186
+ 例: <tt>"ou=Users"</tt>
187
+
188
+ [_groups_suffix_]
187
189
  LDAP上のグループエントリを格納するツリー.baseからの相対パ
188
- スを指定する.例: ou=Groups
189
- : computers_suffix
190
+ スを指定する.
191
+
192
+ 例: <tt>"ou=Groups"</tt>
193
+
194
+ [_computers_suffix_]
190
195
  LDAP上のコンピュータエントリを格納するツリー.baseからの相対パ
191
- スを指定する.例: ou=Computers
192
- : idmap_suffix
196
+ スを指定する.
197
+
198
+ 例: <tt>"ou=Computers"</tt>
199
+
200
+ [_idmap_suffix_]
193
201
  LDAP上のidmapエントリを格納するツリー.baseからの相対パ
194
- スを指定する.例: ou=Idmap
202
+ スを指定する.
195
203
 
196
- : start_uid
204
+ 例: <tt>"ou=Idmap"</tt>
205
+
206
+ [_start_uid_]
197
207
  新しいユーザを作ったときに,はじめに使用するUID(User
198
- Identifier).以降のUIDは1ずつ増えていく.デフォルトは
199
- 10000.
208
+ Identifier).以降のUIDは1ずつ増えていく.
209
+
210
+ デフォルト: +10000+
200
211
 
201
- : start_gid
212
+ [_start_gid_]
202
213
  新しいユーザを作ったときに,はじめに使用するGID(Group
203
- Identifier).以降のGIDは1ずつ増えていく.デフォルトは
204
- 10000.
214
+ Identifier).以降のGIDは1ずつ増えていく.
205
215
 
206
- : user_login_shell
207
- 新しく作成したユーザのログインシェル.デフォルトは
208
- /bin/false.
209
- : user_home_directory
216
+ デフォルト: +10000+
217
+
218
+ [_user_login_shell_]
219
+ 新しく作成したユーザのログインシェル.
220
+
221
+ デフォルト: <tt>"/bin/false"</tt>
222
+
223
+ [_user_home_directory_]
210
224
  新しく作成したユーザのホームディレクトリ.%Uはユーザ名に
211
- 置換される.デフォルトは/home/%U.
212
- : user_home_directory_mode
225
+ 置換される.
226
+
227
+ デフォルト: <tt>"/home/%U"</tt>
228
+
229
+ [_user_home_directory_mode_]
213
230
  ユーザのホームディレクトリを作成する際に設定するパーミッ
214
- ション用のモード.デフォルトは0755(8進数).
231
+ ション用のモード.
232
+
233
+ デフォルト: +0755+(8進数)
215
234
 
216
- : user_gecos
235
+ [_user_gecos_]
217
236
  ユーザのGECOSフィールドの値.%Uはユーザ名に置換される.
218
237
 
219
- : user_home_unc
238
+ [_user_home_unc_]
220
239
  Windowsから見たときのユーザのホームへのパス.
221
240
  UNC(Universal Naming Convention)で記述する.%Uはユーザ名
222
- に置換される.デフォルトは\\SambaサーバのNetBIOS名\%U.
241
+ に置換される.
223
242
 
224
- : user_profile
243
+ デフォルト: <tt>"\\\\SambaサーバのNetBIOS名\\%U"</tt>
244
+
245
+ [_user_profile_]
225
246
  ユーザプロファイルへのパス.
226
247
  UNC(Universal Naming Convention)で記述する.%Uはユーザ名
227
- に置換される.デフォルトは\\SambaサーバのNetBIOS名\profiles\%U.
248
+ に置換される.
249
+
250
+ デフォルト: <tt>"\\\\SambaサーバのNetBIOS名\\profiles\\%U"</tt>
228
251
 
229
- : user_home_drive
230
- ユーザのホームを割り当てるドライブ名.デフォルトはH:.
252
+ [_user_home_drive_]
253
+ ユーザのホームを割り当てるドライブ名.
231
254
 
232
- : user_logon_script
255
+ デフォルト: <tt>"H:"</tt>
256
+
257
+ [_user_logon_script_]
233
258
  ユーザがログオンしたときに実行するスクリプトファイル名.
234
- デフォルトはlogon.bat.
235
259
 
236
- # : mail_domain
260
+ デフォルト: <tt>"logon.bat"</tt>
237
261
 
238
- : skeleton_directory
262
+ [_skeleton_directory_]
239
263
  ユーザのホームディレクトリを作成する時に雛型とするディレ
240
- クトリ.デフォルトは/etc/skel.
264
+ クトリ.
265
+
266
+ デフォルト: <tt>"/etc/skel"</tt>
267
+
268
+ [_default_user_gid_]
269
+ デフォルトでユーザが所属するグループ.
241
270
 
242
- : default_user_gid
243
- デフォルトでユーザが所属するグループ.デフォルトはDomain
244
- Usersグループ.
271
+ デフォルト: <tt>"Domain Users"</tt>グループ
245
272
 
246
- : default_computer_gid
247
- デフォルトでコンピュータが所属するグループ.デフォルトは
248
- Domain Computersグループ.
273
+ [_default_computer_gid_]
274
+ デフォルトでコンピュータが所属するグループ.
249
275
 
250
- # : default_max_password_age
276
+ デフォルト: <tt>"Domain Computers"</tt>グループ
251
277
 
252
278
  ==== 初期化
253
279
 
@@ -258,7 +284,7 @@ asl-populateを起動してLDAPサーバに基本的なエントリを追加し
258
284
  % sudo asl-populate
259
285
 
260
286
  もし,root権限が無くても実行できるのであれば以下のようにする
261
- とよいでしょう((-root権限チェックは必要ないかもしれない-)).
287
+ とよいでしょう.(root権限チェックは必要ないかもしれない)
262
288
 
263
289
  % fakeroot asl-populate
264
290
 
@@ -270,10 +296,10 @@ asl-purge, asl-passwordを使って管理してください.各コマンド
270
296
 
271
297
  ==== smb.confの設定
272
298
 
273
- ((<Srvtools|URL:http://support.microsoft.com/kb/173673/>))を
274
- 使ってWindowsからユーザ管理を行いたい場合は,また,Sambaをド
275
- メインコントローラとして動作させたい場合は,以下のように
276
- smb.confを設定します.ここでは,asl-samba-*を使います.
299
+ Srvtools[http://support.microsoft.com/kb/173673/]を使って
300
+ Windowsからユーザ管理を行いたい場合は,また,Sambaをドメイン
301
+ コントローラとして動作させたい場合は,以下のようにsmb.confを
302
+ 設定します.ここでは,asl-samba-*を使います.
277
303
 
278
304
  (ドメインコントローラとして動作させるけど,Srvtools でユー
279
305
  ザ管理を行わない場合はadd machine script以外のなんとかscript
@@ -314,16 +340,17 @@ LDAP管理ユーザのパスワードを設定しておく必要があります
314
340
  もし、asl-populateした後なのに上記のコマンドでひとつもグルー
315
341
  プがでない場合は以下のことを確認してください。
316
342
 
317
- * samba.schemaが古くないか
343
+ * samba.schemaが古くないか
318
344
 
319
- sambaSIDのエントリに以下の設定がない場合は古い
320
- samba.schemaである可能性があります。最新のものに更新して
321
- ください。
345
+ sambaSIDのエントリに以下の設定がない場合は古い
346
+ samba.schemaである可能性があります。最新のものに更新して
347
+ ください。
322
348
 
323
- SUBSTR caseExactIA5SubstringsMatch
349
+ SUBSTR caseExactIA5SubstringsMatch
324
350
 
325
351
  == 感謝
326
352
 
327
- * Henrik Krög: バグを報告してくれました。
328
- * Olivier DIRRENBERGER: バグを報告してくれました。
329
- * Francesco Malvezzi: バグを報告してくれました。
353
+ * Henrik Krög: バグを報告してくれました。
354
+ * Olivier DIRRENBERGER: バグを報告してくれました。
355
+ * Francesco Malvezzi: バグを報告してくれました。
356
+ * Kazuhiro NISHIYAMA: バグを報告してくれました。
data/Rakefile CHANGED
@@ -43,19 +43,6 @@ def cleanup_white_space(entry)
43
43
  entry.gsub(/(\A\n+|\n+\z)/, '') + "\n"
44
44
  end
45
45
 
46
- class Hoe
47
- attr_accessor :full_name
48
-
49
- alias_method :announcement_original, :announcement
50
- def announcement
51
- name_orig = name
52
- self.name = full_name
53
- announcement_original
54
- ensure
55
- self_name = name_orig
56
- end
57
- end
58
-
59
46
  # For Hoe's no user friendly default behavior. :<
60
47
  File.open("README.txt", "w") {|file| file << "= Dummy README\n== XXX\n"}
61
48
  FileUtils.cp("NEWS.en", "History.txt")
@@ -65,22 +52,22 @@ at_exit do
65
52
  end
66
53
 
67
54
  ENV["VERSION"] = ActiveSambaLdap::VERSION
68
- project = Hoe.new("activesambaldap", ActiveSambaLdap::VERSION) do |p|
69
- p.rubyforge_name = "asl"
70
- p.full_name = "ActiveSambaLdap"
71
- p.summary = "Samba+LDAP administration tools"
72
- p.extra_deps << ["activeldap", required_active_ldap_version]
73
- p.email = "kou@cozmixng.org"
74
- p.author = "Kouhei Sutou"
75
- p.url = "http://asl.rubyforge.org/"
76
- p.rdoc_pattern = /^(lib|bin)|txt$|\.(en|ja)$/
55
+ project = Hoe.spec("activesambaldap") do
56
+ self.version = ActiveSambaLdap::VERSION
57
+ self.rubyforge_name = "asl"
58
+ # self.name = "ActiveSambaLdap"
59
+ self.summary = "Samba+LDAP administration tools"
60
+ self.extra_deps << ["activeldap", required_active_ldap_version]
61
+ self.email = ["kou@clear-code.com"]
62
+ self.author = "Kouhei Sutou"
63
+ self.url = "http://asl.rubyforge.org/"
77
64
 
78
65
  news_of_current_release = File.read("NEWS.en").split(/^==\s.*$/)[1]
79
- p.changes = cleanup_white_space(news_of_current_release)
66
+ self.changes = cleanup_white_space(news_of_current_release)
80
67
 
81
68
  entries = File.read("README.en").split(/^==\s(.*)$/)
82
- whats_this = cleanup_white_space(entries[entries.index("What\'s this?") + 1])
83
- p.summary, p.description, = whats_this.split(/\n\n+/, 3)
69
+ whats_this = cleanup_white_space(entries[entries.index("Description") + 1])
70
+ self.summary, self.description, = whats_this.split(/\n\n+/, 3)
84
71
  end
85
72
 
86
73
 
@@ -93,9 +80,9 @@ end
93
80
  rdoc_task.main = rdoc_main
94
81
  rdoc_task.options.delete("-d")
95
82
  rdoc_task.options << "--charset=UTF-8"
96
- rdoc_task.template = "kilmer"
97
- rdoc_task.rdoc_files -= project.bin_files
98
- rdoc_task.rdoc_files += project.bin_files.collect {|x| "#{x}.help"}
83
+ rdoc_task.rdoc_files -= project.spec.executables
84
+ rdoc_task.rdoc_files += project.spec.executables.collect {|x| "bin/#{x}.help"}
85
+ rdoc_task.rdoc_files += project.spec.files.find_all {|x| /\.(en|ja)\z/ =~ x}
99
86
  rdoc_task.rdoc_files.reject! {|file| /\Atest-unit\// =~ file}
100
87
 
101
88
  rdoc_options = rdoc_task.option_list
@@ -104,8 +91,8 @@ rdoc_options[output_option_index, 2] = nil
104
91
  project.spec.rdoc_options = rdoc_options
105
92
  project.spec.extra_rdoc_files = rdoc_task.rdoc_files
106
93
 
107
-
108
- project.bin_files.each do |bin|
94
+ project.spec.executables.each do |bin|
95
+ bin = "bin/#{bin}"
109
96
  bin_help = "#{bin}.help"
110
97
  File.open(bin_help, "w") do |f|
111
98
  lang = ENV["LANG"]
@@ -118,6 +105,18 @@ project.bin_files.each do |bin|
118
105
  end
119
106
  end
120
107
 
108
+ task :docs do
109
+ css_file = "doc/rdoc.css"
110
+ css = File.read(css_file)
111
+ reset_spacing = Regexp.escape("*{ padding: 0; margin: 0; }")
112
+ customized_css = css.sub(/#{reset_spacing}/, '')
113
+ if css != customized_css
114
+ File.open(css_file, "w") do |output|
115
+ output.print(customized_css)
116
+ end
117
+ end
118
+ end
119
+
121
120
  desc 'Tag the repository for release.'
122
121
  task :tag do
123
122
  version = ActiveSambaLdap::VERSION
@@ -129,40 +128,6 @@ end
129
128
  desc "Distribute new release."
130
129
  task :dist => [:publish_docs, :release, :tag, :announce]
131
130
 
132
- # # fix Hoe's incorrect guess.
133
- # project.spec.executables.clear
134
- # project.bin_files = project.spec.files.grep(/^bin/)
135
-
136
- # fix Hoe's install and uninstall task.
137
- task(:install).instance_variable_get("@actions").clear
138
- task(:uninstall).instance_variable_get("@actions").clear
139
-
140
- task :install do
141
- [
142
- [project.lib_files, "lib", Hoe::RUBYLIB, 0444],
143
- [project.bin_files, "bin", File.join(Hoe::PREFIX, 'bin'), 0555]
144
- ].each do |files, prefix, dest, mode|
145
- FileUtils.mkdir_p dest unless test ?d, dest
146
- files.each do |file|
147
- base = File.dirname(file.sub(/^#{prefix}#{File::SEPARATOR}/, ''))
148
- _dest = File.join(dest, base)
149
- FileUtils.mkdir_p _dest unless test ?d, _dest
150
- install file, _dest, :mode => mode
151
- end
152
- end
153
- end
154
-
155
- desc 'Uninstall the package.'
156
- task :uninstall do
157
- Dir.chdir Hoe::RUBYLIB do
158
- rm_f project.lib_files.collect {|f| f.sub(/^lib#{File::SEPARATOR}/, '')}
159
- end
160
- Dir.chdir File.join(Hoe::PREFIX, 'bin') do
161
- rm_f project.bin_files.collect {|f| f.sub(/^bin#{File::SEPARATOR}/, '')}
162
- end
163
- end
164
-
165
-
166
131
  desc "Update *.po/*.pot files and create *.mo from *.po files"
167
132
  task :gettext => ["gettext:po:update", "gettext:mo:create"]
168
133
 
data/bin/asl-groupadd CHANGED
@@ -34,7 +34,7 @@ unless Process.uid.zero?
34
34
  exit 1
35
35
  end
36
36
 
37
- ActiveSambaLdap::Base.establish_connection("update")
37
+ ActiveSambaLdap::Base.setup_connection("update")
38
38
 
39
39
  class Group < ActiveSambaLdap::Group
40
40
  ldap_mapping
@@ -4,6 +4,7 @@ Usage: asl-groupadd [options] GROUP_NAME
4
4
  (domain)
5
5
  -p, --[no-]print-gid-number print the gid number to stdout
6
6
  (false)
7
+
7
8
  Common options:
8
9
  --config=CONFIG Specify configuration file
9
10
  Default configuration files:
data/bin/asl-groupdel CHANGED
@@ -28,7 +28,7 @@ unless Process.uid.zero?
28
28
  exit 1
29
29
  end
30
30
 
31
- ActiveSambaLdap::Base.establish_connection("update")
31
+ ActiveSambaLdap::Base.setup_connection("update")
32
32
 
33
33
  class Group < ActiveSambaLdap::Group
34
34
  ldap_mapping
@@ -1,6 +1,7 @@
1
1
  Usage: asl-groupdel [options] GROUP_NAME
2
2
  -f, --[no-]force force delete group
3
3
  (false)
4
+
4
5
  Common options:
5
6
  --config=CONFIG Specify configuration file
6
7
  Default configuration files:
data/bin/asl-groupmod CHANGED
@@ -41,7 +41,7 @@ unless Process.uid.zero?
41
41
  exit 1
42
42
  end
43
43
 
44
- ActiveSambaLdap::Base.establish_connection("update")
44
+ ActiveSambaLdap::Base.setup_connection("update")
45
45
 
46
46
  class Group < ActiveSambaLdap::Group
47
47
  ldap_mapping
@@ -7,6 +7,7 @@ Usage: asl-groupmod [options] GROUP_NAME
7
7
  --add-members
8
8
  -d=MEMBER1,MEMBER2,MEBMER3 delete members (comma delimited)
9
9
  --delete-members
10
+
10
11
  Common options:
11
12
  --config=CONFIG Specify configuration file
12
13
  Default configuration files:
data/bin/asl-groupshow CHANGED
@@ -17,7 +17,7 @@ else
17
17
  exit 1
18
18
  end
19
19
 
20
- ActiveSambaLdap::Base.establish_connection("reference")
20
+ ActiveSambaLdap::Base.setup_connection("reference")
21
21
 
22
22
  class Group < ActiveSambaLdap::Group
23
23
  ldap_mapping
@@ -1,4 +1,5 @@
1
1
  Usage: asl-groupshow [options] GROUP_NAME
2
+
2
3
  Common options:
3
4
  --config=CONFIG Specify configuration file
4
5
  Default configuration files:
data/bin/asl-passwd CHANGED
@@ -42,7 +42,7 @@ if !options.update_samba_password and !options.update_unix_password
42
42
  exit
43
43
  end
44
44
 
45
- ActiveSambaLdap::Base.establish_connection("update")
45
+ ActiveSambaLdap::Base.setup_connection("update")
46
46
 
47
47
  class User < ActiveSambaLdap::User
48
48
  ldap_mapping
data/bin/asl-passwd.help CHANGED
@@ -3,6 +3,7 @@ Usage: asl-passwd [options] [USER_NAME]
3
3
  (true)
4
4
  -u, --[no-]unix-password update UNIX password
5
5
  (true)
6
+
6
7
  Common options:
7
8
  --config=CONFIG Specify configuration file
8
9
  Default configuration files:
data/bin/asl-populate CHANGED
@@ -41,7 +41,7 @@ argv, opts, options = ActiveSambaLdap::Command.parse_options do |opts, options|
41
41
  opts.on("--administrator-gid=GID", Integer,
42
42
  _("administrator's gid number"),
43
43
  "(#{options.administrator_gid})") {|options.administrator_gid|}
44
- opts.on("-g", "--guest=NAME",
44
+ opts.on("--guest=NAME",
45
45
  _("guest login name"),
46
46
  "(#{options.guest})") {|options.guest|}
47
47
  opts.on("--guest-uid=UID", Integer,
@@ -61,7 +61,7 @@ unless Process.uid.zero?
61
61
  exit 1
62
62
  end
63
63
 
64
- ActiveSambaLdap::Base.establish_connection("update")
64
+ ActiveSambaLdap::Base.setup_connection("update")
65
65
 
66
66
  entries, opts = ActiveSambaLdap::Base.populate(options.marshal_dump)
67
67
 
@@ -16,6 +16,7 @@ Usage: asl-populate [options]
16
16
  --guest-gid=GID guest's gid number
17
17
  (514)
18
18
  -e, --export-ldif=LDIF export LDIF file
19
+
19
20
  Common options:
20
21
  --config=CONFIG Specify configuration file
21
22
  Default configuration files:
data/bin/asl-purge CHANGED
@@ -17,7 +17,7 @@ unless Process.uid.zero?
17
17
  exit 1
18
18
  end
19
19
 
20
- ActiveSambaLdap::Base.establish_connection("update")
20
+ ActiveSambaLdap::Base.setup_connection("update")
21
21
 
22
22
  ActiveSambaLdap::Base.purge
23
23
 
data/bin/asl-purge.help CHANGED
@@ -1,4 +1,5 @@
1
1
  Usage: asl-purge [options]
2
+
2
3
  Common options:
3
4
  --config=CONFIG Specify configuration file
4
5
  Default configuration files:
@@ -34,7 +34,7 @@ unless Process.uid.zero?
34
34
  exit 1
35
35
  end
36
36
 
37
- ActiveSambaLdap::Base.establish_connection("update")
37
+ ActiveSambaLdap::Base.setup_connection("update")
38
38
 
39
39
 
40
40
  class User < ActiveSambaLdap::User
@@ -1,6 +1,7 @@
1
1
  Usage: asl-samba-computeradd [options] COMPUTER_NAME
2
2
  -o, --ou=OU add the user in the organizational unit OU
3
3
  (relative to the user suffix)
4
+
4
5
  Common options:
5
6
  --config=CONFIG Specify configuration file
6
7
  Default configuration files:
@@ -22,7 +22,7 @@ unless Process.uid.zero?
22
22
  exit 1
23
23
  end
24
24
 
25
- ActiveSambaLdap::Base.establish_connection("update")
25
+ ActiveSambaLdap::Base.setup_connection("update")
26
26
 
27
27
  class Group < ActiveSambaLdap::Group
28
28
  ldap_mapping :recommended_classes => []
@@ -1,4 +1,5 @@
1
1
  Usage: asl-samba-groupadd [options] GROUP_NAME
2
+
2
3
  Common options:
3
4
  --config=CONFIG Specify configuration file
4
5
  Default configuration files:
@@ -22,7 +22,7 @@ unless Process.uid.zero?
22
22
  exit 1
23
23
  end
24
24
 
25
- ActiveSambaLdap::Base.establish_connection("update")
25
+ ActiveSambaLdap::Base.setup_connection("update")
26
26
 
27
27
  class Group < ActiveSambaLdap::Group
28
28
  ldap_mapping :recommended_classes => []
@@ -1,4 +1,5 @@
1
1
  Usage: asl-samba-groupdel [options] GROUP_NAME
2
+
2
3
  Common options:
3
4
  --config=CONFIG Specify configuration file
4
5
  Default configuration files: