ruby_ex 0.4.6.2 → 0.5.5.0
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.
- data/NEWS +17 -0
- data/README +1 -0
- data/SPEC.gemspec +14 -0
- data/SPEC.yml +10 -6
- data/lib/abstract.rb +3 -4
- data/lib/d_logger.rb +3 -3
- data/lib/drb/observable_pool.rb +5 -2
- data/lib/drb_ex.rb +1 -6
- data/lib/exp_mod.rb +48 -0
- data/lib/file_type.rb +82 -97
- data/lib/kill_all.rb +3 -3
- data/lib/{module → module_extensions}/autoload_tree.rb +5 -10
- data/lib/{module → module_extensions}/hierarchy.rb +11 -5
- data/lib/{module → module_extensions}/instance_method_visibility.rb +7 -5
- data/lib/{ordered_hash.rb → o_hash.rb} +8 -13
- data/lib/probability_distributions/gaussian_distribution.rb +34 -0
- data/lib/probability_distributions/probability_distribution.rb +16 -0
- data/lib/probability_distributions/uniform_distribution.rb +12 -0
- data/lib/random_generators.rb +1 -3
- data/lib/ruby_ex.rb +4 -4
- data/lib/sendmail.rb +7 -4
- data/lib/sym_tbl_gsub.rb +48 -17
- data/lib/uri/file.rb +5 -10
- data/lib/uri/ftp_ex.rb +4 -4
- data/lib/uri/generic_ex.rb +11 -7
- data/lib/uri/http_ex.rb +4 -4
- data/lib/uri/mysql.rb +3 -5
- data/lib/uri/pgsql.rb +3 -5
- data/lib/uri/rsync.rb +2 -4
- data/lib/uri/ssh.rb +3 -6
- data/lib/uri/svn.rb +10 -12
- data/lib/{yaml → yaml_extensions}/chop_header.rb +3 -3
- data/lib/{yaml → yaml_extensions}/transform.rb +4 -4
- data/lib/{yaml → yaml_extensions}/yregexpath.rb +3 -3
- metadata +89 -105
- data/lib/commands.rb +0 -27
- data/lib/commands/command.rb +0 -545
- data/lib/commands/datas.rb +0 -11
- data/lib/commands/datas/composite.rb +0 -55
- data/lib/commands/datas/data.rb +0 -160
- data/lib/commands/datas/factory.rb +0 -74
- data/lib/commands/datas/pipe.rb +0 -52
- data/lib/commands/datas/temp.rb +0 -24
- data/lib/commands/factory.rb +0 -65
- data/lib/commands/helpers.rb +0 -76
- data/lib/commands/pipe.rb +0 -114
- data/lib/commands/runners.rb +0 -11
- data/lib/commands/runners/exec.rb +0 -46
- data/lib/commands/runners/fork.rb +0 -104
- data/lib/commands/runners/mockable.rb +0 -63
- data/lib/commands/runners/no_run.rb +0 -44
- data/lib/commands/runners/popen.rb +0 -49
- data/lib/commands/runners/runner.rb +0 -177
- data/lib/commands/runners/system.rb +0 -54
- data/lib/commands/seq.rb +0 -31
- data/lib/hookable.rb +0 -294
- data/lib/hooker.rb +0 -52
data/lib/hooker.rb
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
# Copyright:: Copyright (c) 2005 Nicolas Pouillard. All rights reserved.
|
2
|
-
# Author:: Nicolas Pouillard <ertai@lrde.epita.fr>.
|
3
|
-
# License:: Gnu General Public License.
|
4
|
-
# Revision:: $Id: /w/fey/ruby_ex/trunk/lib/hooker.rb 7944 2005-09-06T23:27:27.929371Z ertai $
|
5
|
-
|
6
|
-
require 'active_support/class_inheritable_attributes'
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
module Hooker
|
11
|
-
|
12
|
-
def self.included ( aClass )
|
13
|
-
super
|
14
|
-
|
15
|
-
aClass.class_eval do
|
16
|
-
|
17
|
-
class_inheritable_accessor :default_hook
|
18
|
-
|
19
|
-
|
20
|
-
def self.hook_default_method ( method )
|
21
|
-
raise unless method.is_a? Symbol
|
22
|
-
self.default_hook = method
|
23
|
-
end
|
24
|
-
|
25
|
-
|
26
|
-
def hook_method ( *a )
|
27
|
-
@@generic_hook_method[method(:instance_eval), *a]
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
def self.hook_method ( *a )
|
32
|
-
@@generic_hook_method[method(:module_eval), *a]
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
@@generic_hook_method = lambda do |eval_meth, method, *hook_names|
|
37
|
-
raise unless method.is_a? Symbol
|
38
|
-
hook_names.each do |hook_name|
|
39
|
-
raise unless hook_name.is_a? Symbol
|
40
|
-
eval_meth[%Q{
|
41
|
-
def #{hook_name} ( *a, &b )
|
42
|
-
#{method}(*a, &b)
|
43
|
-
end
|
44
|
-
}]
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
|
50
|
-
end
|
51
|
-
|
52
|
-
end # module Hooker
|