facets 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +3 -3
- data/README +6 -7
- data/lib/core/facets.rb +1 -46
- data/lib/core/facets/array.rb +3 -0
- data/lib/core/facets/array/indexable.rb +6 -1
- data/lib/core/facets/array/only.rb +20 -0
- data/lib/core/facets/dir/multiglob.rb +12 -1
- data/lib/core/facets/enumerable.rb +0 -1
- data/lib/core/facets/enumerable/collect.rb +1 -0
- data/lib/core/facets/enumerable/combination.rb +44 -90
- data/lib/core/facets/facets.rb +46 -0
- data/lib/core/facets/file/write.rb +46 -58
- data/lib/core/facets/hash.rb +2 -0
- data/lib/core/facets/hash/select.rb +14 -0
- data/lib/core/facets/integer/multiples.rb +12 -55
- data/lib/core/facets/kernel/val.rb +14 -0
- data/lib/core/facets/module/alias.rb +28 -9
- data/lib/core/facets/module/methods.rb +18 -0
- data/lib/core/facets/module/traits.rb +65 -70
- data/lib/core/facets/proc/compose.rb +15 -12
- data/lib/core/facets/stackable.rb +3 -2
- data/lib/core/facets/string/format.rb +4 -6
- data/lib/core/facets/string/tabs.rb +34 -0
- data/lib/core/facets/symbol.rb +1 -0
- data/lib/core/facets/symbol/succ.rb +1 -42
- data/lib/core/facets/symbol/to_proc.rb +34 -0
- data/lib/methods/facets/array/contains.rb +1 -0
- data/lib/methods/facets/facets/require_core.rb +1 -0
- data/lib/methods/facets/file/writelines.rb +1 -0
- data/lib/methods/facets/io/writelines.rb +1 -0
- data/lib/methods/facets/kernel/not_nil.rb +1 -0
- data/lib/methods/facets/module/conflict.rb +1 -0
- data/lib/methods/facets/module/instance_method_defined.rb +1 -0
- data/lib/methods/facets/module/module_method_defined.rb +1 -0
- data/lib/methods/facets/module/private_conflict.rb +1 -0
- data/lib/methods/facets/module/protected_conflict.rb +1 -0
- data/lib/methods/facets/module/public_conflict.rb +1 -0
- data/lib/methods/facets/string/expand_tabs.rb +1 -0
- data/lib/methods/facets/string/outdent.rb +1 -0
- data/lib/methods/facets/string/taballto.rb +1 -0
- data/lib/more/facets/arguments.rb +1 -1
- data/lib/more/facets/association.rb +0 -46
- data/lib/more/facets/autoarray.rb +0 -28
- data/lib/more/facets/command.rb +341 -8
- data/lib/more/facets/dictionary.rb +25 -131
- data/lib/more/facets/downloader.rb +1 -1
- data/lib/more/facets/infinity.rb +3 -3
- data/lib/more/facets/interval.rb +0 -161
- data/lib/more/facets/multiton.rb +16 -12
- data/lib/more/facets/namespace.rb +1 -1
- data/lib/more/facets/ostruct.rb +46 -10
- data/lib/more/facets/overload.rb +0 -51
- data/lib/more/facets/paramix.rb +0 -97
- data/lib/more/facets/pp_s.rb +30 -0
- data/lib/more/facets/progressbar.rb +18 -10
- data/lib/more/facets/prototype.rb +1 -40
- data/lib/more/facets/random.rb +1 -0
- data/lib/more/facets/rbsystem.rb +4 -1
- data/lib/more/facets/snapshot.rb +8 -1
- data/lib/more/facets/stylize.rb +2 -0
- data/meta/{project.yaml → facets-2.0.3.roll} +22 -14
- data/meta/manifest.txt +38 -8
- data/task/{config.yaml → config/general.yaml} +7 -2
- data/task/{rdoc.yaml → config/rdoc.yaml} +1 -1
- data/task/crosstest +309 -0
- data/task/isotest +293 -0
- data/task/loadtest +28 -0
- data/task/methods +4 -4
- data/task/prepare +5 -0
- data/task/publish +2 -2
- data/task/rdoc +1 -0
- data/task/syntax +29 -0
- data/task/test +0 -1
- data/task/testeach +42 -0
- data/task/testpairs +50 -0
- data/test/lib/rq.rb +15 -0
- data/test/unit/array/test_merge.rb +21 -43
- data/test/unit/array/test_only.rb +21 -0
- data/test/unit/enumerable/test_collect.rb +1 -21
- data/test/unit/enumerable/test_combination.rb +50 -44
- data/test/unit/file/test_topath.rb +48 -57
- data/test/unit/file/test_write.rb +82 -0
- data/test/unit/hash/test_select.rb +43 -0
- data/test/unit/integer/test_multiples.rb +28 -32
- data/test/unit/kernel/test_report.rb +9 -12
- data/test/unit/kernel/test_val.rb +50 -45
- data/test/unit/module/test_include.rb +56 -57
- data/test/unit/module/test_name.rb +42 -55
- data/test/unit/module/test_traits.rb +46 -47
- data/test/unit/string/test_filter.rb +19 -34
- data/test/unit/string/test_format.rb +87 -96
- data/test/unit/string/test_regesc.rb +18 -26
- data/test/unit/string/test_tabs.rb +226 -119
- data/test/unit/symbol/test_succ.rb +14 -23
- data/test/unit/symbol/test_to_proc.rb +41 -0
- data/test/unit/test_association.rb +38 -47
- data/test/unit/test_attributes.rb +24 -33
- data/test/unit/test_autoarray.rb +23 -32
- data/test/unit/test_command.rb +26 -0
- data/test/unit/test_dictionary.rb +123 -117
- data/test/unit/test_infinity.rb +41 -47
- data/test/unit/test_inheritor.rb +133 -142
- data/test/unit/test_interval.rb +129 -93
- data/test/unit/test_ostruct.rb +148 -101
- data/test/unit/test_overload.rb +8 -15
- data/test/unit/test_paramix.rb +67 -73
- data/test/unit/test_pp_s.rb +23 -0
- data/test/unit/test_prototype.rb +28 -38
- metadata +47 -11
- data/lib/core/facets/enumerable/instance_map.rb +0 -0
- data/lib/more/facets/command_options.rb +0 -328
- data/meta/version.txt +0 -1
- data/task/load +0 -39
- data/test/unit/test_command_options.rb +0 -29
data/meta/version.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.0.2 stable (2007-10-03)
|
data/task/load
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ratch
|
2
|
-
|
3
|
-
# Load check all libs.
|
4
|
-
|
5
|
-
#
|
6
|
-
|
7
|
-
require 'benchmark'
|
8
|
-
|
9
|
-
$:.unshift('lib')
|
10
|
-
|
11
|
-
scripts_core, scripts_more = [], []
|
12
|
-
Dir.chdir('lib') do
|
13
|
-
scripts_more = glob('facets/*.rb')
|
14
|
-
scripts_more.collect!{ |s| File.expand_path(s) }
|
15
|
-
scripts_more.uniq!
|
16
|
-
|
17
|
-
scripts_core = glob('facets/*/*.rb')
|
18
|
-
scripts_core.collect!{ |s| File.expand_path(s) }
|
19
|
-
scripts_core.uniq!
|
20
|
-
end
|
21
|
-
|
22
|
-
$VERBOSE = nil
|
23
|
-
|
24
|
-
def require_scripts(scripts)
|
25
|
-
scripts.each do |file|
|
26
|
-
begin
|
27
|
-
require file
|
28
|
-
rescue Exception => e
|
29
|
-
puts file
|
30
|
-
puts e.message
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
Benchmark.bm do |x|
|
36
|
-
x.report("core"){ require_scripts(scripts_core) }
|
37
|
-
x.report("more"){ require_scripts(scripts_more) }
|
38
|
-
end
|
39
|
-
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'facets/command_options.rb'
|
2
|
-
|
3
|
-
require 'test/unit'
|
4
|
-
require 'stringio'
|
5
|
-
|
6
|
-
class TestCommandOptions < Test::Unit::TestCase
|
7
|
-
|
8
|
-
class MyOptions < CommandOptions
|
9
|
-
attr_reader :a, :b
|
10
|
-
def a! ; @a = true ; end
|
11
|
-
def b=(x) ; @b = x ; end
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_myoptions1
|
15
|
-
opts = MyOptions.parse("-a -b hi")
|
16
|
-
assert_equal( true, opts.a)
|
17
|
-
end
|
18
|
-
|
19
|
-
def test_myoptions2
|
20
|
-
opts = MyOptions.parse("-a -b hi")
|
21
|
-
assert_equal('hi', opts.b)
|
22
|
-
end
|
23
|
-
|
24
|
-
def test_usage
|
25
|
-
opts = MyOptions.parse("-a -b hi")
|
26
|
-
assert_equal('[-a] [-b value]', opts.usage)
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|