Top Level Namespace
Defined Under Namespace
Modules: MultiTkIp_PseudoToplevel_Evaluable, TclTkLib, Tk, TkBgError, TkBindCore, TkCanvasItemConfig, TkClipboard, TkComm, TkComposite, TkConfigMethod, TkConsole, TkCore, TkEvent, TkGrid, TkItemConfigMethod, TkItemConfigOptkeys, TkItemFontOptkeys, TkKinput, TkListItemConfig, TkManageFocus, TkMenuEntryConfig, TkMenuSpec, TkOptionDB, TkPack, TkPackage, TkPalette, TkPlace, TkSelection, TkTextTagConfig, TkTreatFont, TkTreatItemFont, TkTreatTagFont, TkUtil, TkValidation, TkWinfo, TkXIM, TkcTagAccess
Classes: MultiTkIp, MultiTkIp_OK, Object, RemoteTkIp, TclTkIp, TkBindTag, TkBindTagAll, TkBitmapImage, TkCallbackEntry, TkDatabaseClass, TkDialog, TkDialogObj, TkFont, TkImage, TkKernel, TkMenubar, TkMsgCatalog, TkNamedFont, TkNamespace, TkObject, TkPhotoImage, TkPixmapImage, TkRTTimer, TkScrollbox, TkTextImage, TkTextMark, TkTextMarkAnchor, TkTextMarkCurrent, TkTextMarkInsert, TkTextNamedMark, TkTextNamedTag, TkTextTag, TkTextTagSel, TkTextWin, TkTextWindow, TkTimer, TkValidateCommand, TkVarAccess, TkVariable, TkVirtualEvent, TkWarning, TkWarningObj, TkWindow, TkcArc, TkcBitmap, TkcGroup, TkcImage, TkcItem, TkcLine, TkcOval, TkcPolygon, TkcRectangle, TkcTag, TkcTagAll, TkcTagCurrent, TkcTagString, TkcText, TkcWindow
Constant Summary
collapse
Tk::SystemMenu
- TkRoot =
Tk::Root
- TopLevel =
TkToplevel
- Frame =
TkFrame
- Label =
TkLabel
- Button =
TkButton
- Radiobutton =
TkRadioButton
- Checkbutton =
TkCheckButton
- Message =
TkMessage
- Entry =
TkEntry
- Spinbox =
TkSpinbox
- Text =
TkText
- Scale =
TkScale
- Scrollbar =
TkScrollbar
- Listbox =
TkListbox
TkMenu
TkMenubutton
- Canvas =
TkCanvas
- Arc =
TkcArc
- Bitmap =
TkcBitmap
- Line =
TkcLine
- Oval =
TkcOval
- Polygon =
TkcPolygon
- Rectangle =
TkcRectangle
- TextItem =
TkcText
- WindowItem =
TkcWindow
- BitmapImage =
TkBitmapImage
- PhotoImage =
TkPhotoImage
- Selection =
TkSelection
- Winfo =
TkWinfo
- Pack =
TkPack
- Grid =
TkGrid
- Place =
TkPlace
- Variable =
TkVariable
- Font =
TkFont
- VirtualEvent =
TkVirtualEvent
- TkAfter =
TkTimer
- TkDialog2 =
TkDialogObj
- TkWarning2 =
TkWarningObj
- TkMsgCat =
TkMsgCatalog
- TktTag =
TkTextTag
- TktNamedTag =
TkTextNamedTag
- TktTagSel =
TkTextTagSel
- TkOption =
TkOptionDB
- TkResourceDB =
TkOptionDB
- TktMark =
TkTextMark
- TktNamedMark =
TkTextNamedMark
- TktMarkInsert =
TkTextMarkInsert
- TktMarkCurrent =
TkTextMarkCurrent
- TktMarkAnchor =
TkTextMarkAnchor
- TkcNamedTag =
TkcTagString
- TktImage =
TkTextImage
- TkNamedVirtualEvent =
TkVirtualEvent::PreDefVirtEvent
- TktWindow =
TkTextWindow
- Ttk =
Tk::Tile
- TkWidget =
TkWindow
Class Method Summary
collapse
Instance Method Summary
collapse
-
#check_pkg(file, verbose = false) ⇒ Object
-
#check_tcltk_version(version) ⇒ Object
-
#find_framework(tcl_hdr, tk_hdr) ⇒ Object
-
#find_tcl(tcllib, stubs, version, *opt_paths) ⇒ Object
-
#find_tcltk_header(tclver, tkver) ⇒ Object
-
#find_tk(tklib, stubs, version, *opt_paths) ⇒ Object
-
#find_X11(*opt_paths) ⇒ Object
-
#get_pkg_list(file) ⇒ Object
-
#help_msg ⇒ Object
-
#Mainloop ⇒ Object
-
#parse_tclConfig(file) ⇒ Object
-
#pthread_check ⇒ Object
-
#subdir_check(dir, verbose = false) ⇒ Object
-
#TkGrid(*args) ⇒ Object
-
#TkPack(*args) ⇒ Object
-
#TkPlace(*args) ⇒ Object
Class Method Details
1205
1206
1207
|
# File 'ext/lib/tk.rb', line 1205
def INTERP.__getip
self
end
|
.add_tk_procs(name, args = nil, body = nil) ⇒ Object
1309
1310
1311
1312
1313
1314
1315
1316
1317
|
# File 'ext/lib/tk.rb', line 1309
def INTERP.add_tk_procs(name, args = nil, body = nil)
if name.kind_of?(Array)
name.each{|param| self.add_tk_procs(*param)}
else
name = name.to_s
@add_tk_procs << [name, args, body]
self._invoke('proc', name, args, body) if args && body
end
end
|
.cb_entry_class ⇒ Object
1258
1259
1260
|
# File 'ext/lib/tk.rb', line 1258
def INTERP.cb_entry_class
@cb_entry_class
end
|
.create_table ⇒ Object
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
|
# File 'ext/lib/tk.rb', line 1284
def INTERP.create_table
id = @tk_table_list.size
(tbl = {}).tainted? || tbl.taint
@tk_table_list << tbl
Tk_OBJECT_TABLE.new(id)
end
|
.default_master? ⇒ Boolean
1208
1209
1210
|
# File 'ext/lib/tk.rb', line 1208
def INTERP.default_master?
true
end
|
.get_cb_entry(cmd) ⇒ Object
1298
1299
1300
|
# File 'ext/lib/tk.rb', line 1298
def INTERP.get_cb_entry(cmd)
@cb_entry_class.new(__getip, cmd).freeze
end
|
.init_ip_env(script = Proc.new) ⇒ Object
1305
1306
1307
1308
|
# File 'ext/lib/tk.rb', line 1305
def INTERP.init_ip_env(script = Proc.new)
@init_ip_env << script
script.call(self)
end
|
.init_ip_internal ⇒ Object
1327
1328
1329
1330
1331
|
# File 'ext/lib/tk.rb', line 1327
def INTERP.init_ip_internal
ip = self
@init_ip_env.each{|script| script.call(ip)}
@add_tk_procs.each{|name,args,body| ip._invoke('proc',name,args,body)}
end
|
.remove_tk_procs(*names) ⇒ Object
1318
1319
1320
1321
1322
1323
1324
1325
1326
|
# File 'ext/lib/tk.rb', line 1318
def INTERP.remove_tk_procs(*names)
names.each{|name|
name = name.to_s
@add_tk_procs.delete_if{|elem|
elem.kind_of?(Array) && elem[0].to_s == name
}
self._invoke('rename', name, '')
}
end
|
.tk_cmd_tbl ⇒ Object
1261
1262
1263
|
# File 'ext/lib/tk.rb', line 1261
def INTERP.tk_cmd_tbl
@tk_cmd_tbl
end
|
.tk_object_table(id) ⇒ Object
1281
1282
1283
|
# File 'ext/lib/tk.rb', line 1281
def INTERP.tk_object_table(id)
@tk_table_list[id]
end
|
.tk_windows ⇒ Object
1264
1265
1266
|
# File 'ext/lib/tk.rb', line 1264
def INTERP.tk_windows
@tk_windows
end
|
Instance Method Details
#check_pkg(file, verbose = false) ⇒ Object
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
# File 'ext/lib/tkextlib/pkg_checker.rb', line 91
def check_pkg(file, verbose=false)
pkg_list = get_pkg_list(file)
error_list = []
success_list = {}
pkg_list.each{|name, type|
next if success_list[name]
begin
case type
when :package
ver = TkPackage.require(name)
success_list[name] = ver
error_list.delete_if{|n, t| n == name}
when :library
Tk.load_tcllibrary(name)
success_list[name] = :library
error_list.delete_if{|n, t| n == name}
when :script
Tk.load_tclscript(name)
success_list[name] = :script
error_list.delete_if{|n, t| n == name}
when :require_ruby_lib
require name
end
rescue => e
if verbose
error_list << [name, type, e.message]
else
error_list << [name, type]
end
end
}
success_list.dup.each{|name, ver|
unless ver.kind_of?(String)
begin
ver = TkPackage.require(name)
sccess_list[name] = ver
rescue
end
end
}
[success_list, error_list]
end
|
#check_tcltk_version(version) ⇒ Object
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# File 'ext/extconf.rb', line 79
def check_tcltk_version(version)
return [nil, nil] unless version
version = version.strip
tclver = version.dup
tkver = version.dup
major = dot = minor = dot = plvl = ext = nil
if version =~ /^(\d)(\.?)(\d)(\.?)(\d*)(.*)$/
major = $1; minor_dot = $2; minor = $3; plvl_dot = $4; plvl = $5; ext = $6
dot = ! minor_dot.empty?
if plvl_dot.empty? && ! plvl.empty?
minor << plvl
end
elsif version =~ /^(\d)(\.?)(\d?)(.*)$/
major = $1; minor_dot = $2; minor = $3; ext = $4
dot = ! minor_dot.empty?
else return [tclver, tkver]
end
if major == "7" tkver = "4" + ((dot)? ".": "") + ((minor.empty)? "": "2") + ext
elsif major == "4" tclver = "7" + ((dot)? ".": "") + ((minor.empty)? "": "6") + ext
end
[tclver, tkver]
end
|
#find_framework(tcl_hdr, tk_hdr) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'ext/extconf.rb', line 14
def find_framework(tcl_hdr, tk_hdr)
if framework_dir = with_config("tcltk-framework")
paths = [framework_dir]
else
unless tcl_hdr || tk_hdr ||
enable_config("tcltk-framework", false) ||
enable_config("mac-tcltk-framework", false)
return false
end
paths = ["/Library/Frameworks", "/System/Library/Frameworks"]
end
checking_for('Tcl/Tk Framework') {
paths.find{|dir|
dir.strip!
dir.chomp!('/')
(tcl_hdr || FileTest.directory?(dir + "/Tcl.framework/") ) &&
(tk_hdr || FileTest.directory?(dir + "/Tk.framework/") )
}
}
end
|
#find_tcl(tcllib, stubs, version, *opt_paths) ⇒ Object
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
# File 'ext/extconf.rb', line 114
def find_tcl(tcllib, stubs, version, *opt_paths)
default_paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"]
default_paths << "/Tcl/lib"
if (paths = opt_paths.compact).empty?
paths = default_paths
end
if stubs
func = "Tcl_InitStubs"
lib = "tclstub"
else
func = "Tcl_FindExecutable"
lib = "tcl"
end
if version && ! version.empty?
versions = [version]
else
versions = %w[8.4 8.7 8.6 8.5 8.3 8.2 8.1 8.0 7.6]
end
if tcllib
st = find_library(tcllib, func, *paths)
else
st = versions.find { |ver|
find_library("#{lib}#{ver}", func, *paths) or
find_library("#{lib}#{ver.delete('.')}", func, *paths) or
find_library("#{lib}#{ver}g", func, *paths) or
find_library("#{lib}#{ver.delete('.')}g", func, *paths) or
find_library("tcl#{ver}", func, *paths) or
find_library("tcl#{ver.delete('.')}", func, *paths) or
find_library("tcl#{ver}g", func, *paths) or
find_library("tcl#{ver.delete('.')}g", func, *paths)
} || (!version && find_library(lib, func, *paths))
end
unless st
puts("Warning:: cannot find Tcl library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options.")
end
st
end
|
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
# File 'ext/extconf.rb', line 200
def (tclver, tkver)
base_dir = ['/usr/local/include', '/usr/pkg/include', '/usr/include']
base_dir << '/Tcl/include'
unless have_tcl_h = ('tcl.h')
if tclver && ! tclver.empty?
versions = [tclver]
else
versions = %w[8.4 8.7 8.6 8.5 8.3 8.2 8.1 8.0 7.6]
end
paths = base_dir.dup
versions.each{|ver| paths.concat(base_dir.map{|dir| dir + '/tcl' + ver})}
have_tcl_h = ('tcl.h', *paths)
end
unless have_tk_h = ("tk.h")
if tkver && ! tkver.empty?
versions = [tkver]
else
versions = %w[8.4 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 4.2]
end
paths = base_dir.dup
versions.each{|ver| paths.concat(base_dir.map{|dir| dir + '/tk' + ver})}
have_tk_h = ('tk.h', *paths)
end
have_tcl_h && have_tk_h
end
|
#find_tk(tklib, stubs, version, *opt_paths) ⇒ Object
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
# File 'ext/extconf.rb', line 157
def find_tk(tklib, stubs, version, *opt_paths)
default_paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"]
default_paths << "/Tcl/lib"
if (paths = opt_paths.compact).empty?
paths = default_paths
end
if stubs
func = "Tk_InitStubs"
lib = "tkstub"
else
func = "Tk_Init"
lib = "tk"
end
if version && ! version.empty?
versions = [version]
else
versions = %w[8.4 8.7 8.6 8.5 8.4 8.3 8.2 8.1 8.0 4.2]
end
if tklib
st = find_library(tklib, func, *paths)
else
st = versions.find { |ver|
find_library("#{lib}#{ver}", func, *paths) or
find_library("#{lib}#{ver.delete('.')}", func, *paths) or
find_library("#{lib}#{ver}g", func, *paths) or
find_library("#{lib}#{ver.delete('.')}g", func, *paths) or
find_library("tk#{ver}", func, *paths) or
find_library("tk#{ver.delete('.')}", func, *paths) or
find_library("tk#{ver}g", func, *paths) or
find_library("tk#{ver.delete('.')}g", func, *paths)
} || (!version && find_library(lib, func, *paths))
end
unless st
puts("Warning:: cannot find Tk library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options.")
end
st
end
|
#find_X11(*opt_paths) ⇒ Object
229
230
231
232
233
234
235
236
237
238
|
# File 'ext/extconf.rb', line 229
def find_X11(*opt_paths)
default_paths =
[ "/usr/X11/lib", "/usr/lib/X11", "/usr/X11R6/lib", "/usr/openwin/lib" ]
paths = opt_paths.compact.concat(default_paths)
st = find_library("X11", "XOpenDisplay", *paths)
unless st
puts("Warning:: cannot find X11 library. tcltklib will not be compiled (tcltklib is disabled on your Ruby == Ruby/Tk will not work). Please check configure options. If your Tcl/Tk don't require X11, please try --without-X11.")
end
st
end
|
#get_pkg_list(file) ⇒ Object
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# File 'ext/lib/tkextlib/pkg_checker.rb', line 66
def get_pkg_list(file)
pkg_list = []
File.foreach(file){|l|
if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)TkPackage\s*\.\s*require\s*\(?\s*(["'])((\w|:)+)\1/
pkg = [$2, :package]
pkg_list << pkg unless pkg_list.member?(pkg)
end
if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)Tk\s*\.\s*load_tcllibrary\s*\(?\s*(["'])((\w|:)+)\1/
pkg = [$2, :library]
pkg_list << pkg unless pkg_list.member?(pkg)
end
if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)Tk\s*\.\s*load_tclscript\s*\(?\s*(["'])((\w|:)+)\1/
pkg = [$2, :script]
pkg_list << pkg unless pkg_list.member?(pkg)
end
if l =~ /^(?:[^#]+\s|\s*)(?:|;\s*)require\s*\(?\s*(["'])((\w|\/|:)+)\1/
pkg = [$2, :require_ruby_lib]
pkg_list << pkg unless pkg_list.member?(pkg)
end
}
pkg_list
end
|
16
17
18
19
20
21
22
23
24
25
|
# File 'ext/lib/tkextlib/pkg_checker.rb', line 16
def help_msg
print "Usage: #{$0} [-l] [-v] [-h] [--] [dir]\n"
print "\tIf dir is omitted, check the directry that this command exists.\n"
print "\tAvailable options are \n"
print "\t -l : Add dir to $LOAD_PATH\n"
print "\t (If dir == '<parent>/tkextlib', add <parent> also.)\n"
print "\t -v : Verbose mode (show reason of fail)\n"
print "\t -h : Show this message\n"
print "\t -- : End of options\n"
end
|
45
46
47
|
# File 'ext/lib/tkclass.rb', line 45
def Mainloop
Tk.mainloop
end
|
#parse_tclConfig(file) ⇒ Object
67
68
69
70
71
72
73
74
75
76
77
|
# File 'ext/extconf.rb', line 67
def parse_tclConfig(file)
tbl = {}
IO.foreach(file){|line|
line.strip!
next if line !~ /^([^\#=][^=]*)=(['"]|)(.*)\2$/
key, val = $1, $3
tbl[key] = val.gsub(/\$\{([^}]+)\}/){|s| tbl[$1]} rescue nil
}
tbl
end
|
#pthread_check ⇒ Object
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
|
# File 'ext/extconf.rb', line 240
def pthread_check()
tcl_major_ver = nil
tcl_minor_ver = nil
case enable_config("tcl-thread")
when true
tcl_enable_thread = true
when false
tcl_enable_thread = false
else
tcl_enable_thread = nil
end
if (tclConfig = with_config("tclConfig-file"))
if tcl_enable_thread == true
puts("Warning: --with-tclConfig-file option is ignored, because --enable-tcl-thread option is given.")
elsif tcl_enable_thread == false
puts("Warning: --with-tclConfig-file option is ignored, because --disable-tcl-thread option is given.")
else
begin
tbl = parse_tclConfig(tclConfig)
if tbl['TCL_THREADS']
tcl_enable_thread = (tbl['TCL_THREADS'] == "1")
else
tcl_major_ver = tbl['TCL_MAJOR_VERSION'].to_i
tcl_minor_ver = tbl['TCL_MINOR_VERSION'].to_i
if tcl_major_ver < 8 || (tcl_major_ver == 8 && tcl_minor_ver == 0)
tcl_enable_thread = false
end
end
if tcl_enable_thread == nil
if tcl_major_ver
puts("Warning: '#{tclConfig}' doesn't include TCL_THREADS definition.")
else
puts("Warning: '#{tclConfig}' may not be a tclConfig file.")
end
tclConfig = false
end
rescue Exception
puts("Warning: fail to read '#{tclConfig}'!! --> ignore the file")
tclConfig = false
end
end
end
if tcl_enable_thread == nil && !tclConfig
begin
try_run_available = try_run("int main() { exit(0); }")
rescue Exception
puts(%Q'\
*****************************************************************************
**
** PTHREAD SUPPORT CHECK WARNING:
**
** We cannot check the consistency of pthread support between Ruby
** and the Tcl/Tk library in your environment (are you perhaps
** cross-compiling?). If pthread support for these 2 packages is
** inconsistent you may find you get errors when running Ruby/Tk
** (e.g. hangs or segmentation faults). We strongly recommend
** you to check the consistency manually.
**
*****************************************************************************
')
return true
end
end
if tcl_enable_thread == nil
if try_run(<<EOF)
#include <tcl.h>
int main() {
Tcl_Interp *ip;
ip = Tcl_CreateInterp();
exit((Tcl_Eval(ip, "set tcl_platform(threaded)") == TCL_OK)? 0: 1);
}
EOF
tcl_enable_thread = true
elsif try_run(<<EOF)
#include <tcl.h>
static Tcl_ThreadDataKey dataKey;
int main() { exit((Tcl_GetThreadData(&dataKey, 1) == dataKey)? 1: 0); }
EOF
tcl_enable_thread = true
else
tcl_enable_thread = false
end
end
if (macro_defined?('HAVE_NATIVETHREAD', '#include "ruby.h"'))
unless tcl_enable_thread
puts(%Q'\
*****************************************************************************
**
** PTHREAD SUPPORT MODE WARNING:
**
** Ruby is compiled with --enable-pthread, but your Tcl/Tk library
** seems to be compiled without pthread support. Although you can
** create the tcltklib library, this combination may cause errors
** (e.g. hangs or segmentation faults). If you have no reason to
** keep the current pthread support status, we recommend you reconfigure
** and recompile the libraries so that both or neither support pthreads.
**
** If you want change the status of pthread support, please recompile
** Ruby without "--enable-pthread" configure option or recompile Tcl/Tk
** with "--enable-threads" configure option (if your Tcl/Tk is later
** than or equal to Tcl/Tk 8.1).
**
*****************************************************************************
')
end
if tcl_enable_thread
$CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=1'
else
$CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=0'
end
return true
else
if tcl_enable_thread
puts(%Q'\
*****************************************************************************
**
** PTHREAD SUPPORT MODE ERROR:
**
** Ruby is not compiled with --enable-pthread, but your Tcl/Tk
** library seems to be compiled with pthread support. This
** combination may cause frequent hang or segmentation fault
** errors when Ruby/Tk is working. We recommend that you NEVER
** create the library with such a combination of pthread support.
**
** Please recompile Ruby with the "--enable-pthread" configure option
** or recompile Tcl/Tk with the "--disable-threads" configure option.
**
*****************************************************************************
')
$CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=1'
return false
else
$CPPFLAGS += ' -DWITH_TCL_ENABLE_THREAD=0'
return true
end
end
end
|
#subdir_check(dir, verbose = false) ⇒ Object
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
# File 'ext/lib/tkextlib/pkg_checker.rb', line 143
def subdir_check(dir, verbose=false)
Dir.foreach(dir){|f|
next if f == '.' || f == '..'
if File.directory?(f)
subdir_check(File.join(dir, f))
elsif File.extname(f) == '.rb'
path = File.join(dir, f)
suc, err = check_pkg(path, verbose)
if err.empty?
print 'Ready : ', path, ' : require->', suc.inspect, "\n"
else
print '*LACK : ', path, ' : require->', suc.inspect,
' FAIL->', err.inspect, "\n"
end
end
}
end
|