facets 2.8.1 → 2.8.2
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/HISTORY.rdoc +121 -91
- data/NOTES +13 -1
- data/demo/scenario_require.rdoc +0 -5
- data/lib/core/facets.rb +6 -382
- data/lib/core/facets/array.rb +4 -3
- data/lib/core/facets/array/product.rb +0 -9
- data/lib/core/facets/array/uniq_by.rb +18 -0
- data/lib/core/facets/binding/caller.rb +14 -18
- data/lib/core/facets/boolean.rb +75 -78
- data/lib/core/facets/denumerable.rb +3 -3
- data/lib/core/facets/dir/ascend.rb +2 -1
- data/lib/core/facets/enumerable/collapse.rb +12 -0
- data/lib/core/facets/enumerable/compact_map.rb +8 -4
- data/lib/core/facets/enumerable/defer.rb +3 -2
- data/lib/core/facets/enumerable/each_with_object.rb +38 -0
- data/lib/core/facets/enumerable/every.rb +4 -4
- data/lib/core/facets/enumerable/ewise.rb +22 -16
- data/lib/core/facets/enumerable/exclude.rb +13 -0
- data/lib/core/facets/enumerable/filter.rb +18 -8
- data/lib/core/facets/enumerable/find_yield.rb +37 -0
- data/lib/core/facets/enumerable/map_detect.rb +1 -28
- data/lib/core/facets/enumerable/map_with_index.rb +2 -2
- data/lib/core/facets/enumerable/per.rb +2 -2
- data/lib/core/facets/enumerable/purge.rb +43 -0
- data/lib/core/facets/enumerator.rb +70 -0
- data/lib/core/facets/enumerator/fx.rb +20 -0
- data/lib/core/facets/integer/multiple.rb +6 -2
- data/lib/core/facets/kernel/false.rb +2 -0
- data/lib/core/facets/kernel/true.rb +26 -0
- data/lib/core/facets/numeric/length.rb +2 -2
- data/lib/core/facets/numeric/spacing.rb +20 -0
- data/lib/core/facets/proc/bind_to.rb +9 -0
- data/lib/core/facets/string/exclude.rb +10 -0
- data/lib/core/facets/string/expand_tab.rb +6 -6
- data/lib/core/facets/time/future.rb +14 -0
- data/lib/core/facets/time/past.rb +1 -0
- data/lib/core/facets/unboundmethod/name.rb +22 -18
- data/lib/more/facets/date.rb +38 -3
- data/lib/more/facets/fileutils/cp_rx.rb +42 -0
- data/lib/more/facets/pathname.rb +1 -1
- data/meta/homepage +1 -1
- data/meta/released +1 -1
- data/meta/version +1 -1
- data/test/core/array/test_product.rb +0 -5
- data/test/core/enumerable/test_find_yield.rb +75 -0
- data/test/core/numeric/test_spacing.rb +12 -0
- data/test/core/unboundmethod/test_name.rb +3 -3
- metadata +36 -23
- data/MANIFEST +0 -756
- data/lib/core/facets/enumerable/collect.rb +0 -4
- data/lib/core/facets/enumerable/inject.rb +0 -30
- data/lib/core/facets/numeric/size.rb +0 -10
- data/lib/more/facets/enumerator.rb +0 -62
- data/lib/more/facets/tracepoint.rb +0 -209
- data/test/core/enumerable/test_map_detect.rb +0 -75
@@ -8,12 +8,12 @@ class String
|
|
8
8
|
#
|
9
9
|
# Thanks to GGaramuno for a more efficient algorithm. Very nice.
|
10
10
|
#
|
11
|
-
# TODO: Don't much care for the name String#expand_tab.
|
12
|
-
# What about a more concise name like #detab?
|
13
|
-
#
|
14
11
|
# CREDIT: Gavin Sinclair, Noah Gibbs, GGaramuno
|
12
|
+
#
|
13
|
+
# TODO: Don't much care for the name String#expand_tabs.
|
14
|
+
# What about a more concise name like #detab?
|
15
15
|
|
16
|
-
def
|
16
|
+
def expand_tabs(n=8)
|
17
17
|
n = n.to_int
|
18
18
|
raise ArgumentError, "n must be >= 0" if n < 0
|
19
19
|
return gsub(/\t/, "") if n == 0
|
@@ -28,8 +28,8 @@ class String
|
|
28
28
|
str
|
29
29
|
end
|
30
30
|
|
31
|
-
#
|
32
|
-
alias_method :
|
31
|
+
# Singular form of #expand_tabs.
|
32
|
+
alias_method :expand_tab, :expand_tabs
|
33
33
|
|
34
34
|
end
|
35
35
|
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'facets/time/future'
|
@@ -1,24 +1,28 @@
|
|
1
1
|
class UnboundMethod
|
2
2
|
|
3
|
-
|
4
|
-
#
|
5
|
-
# Be aware that in ruby 1.9 UnboundMethod#name is defined already,
|
6
|
-
# but it returns a Symbol not a String.
|
7
|
-
#
|
8
|
-
# class X
|
9
|
-
# def foo; end
|
10
|
-
# end
|
11
|
-
#
|
12
|
-
# meth = X.instance_method(:foo)
|
13
|
-
#
|
14
|
-
# meth.name #=> "foo"
|
15
|
-
#
|
16
|
-
# CREDIT: Trans
|
3
|
+
unless method_defined?(:name) # 1.8.7+
|
17
4
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
5
|
+
# Return the name of the method.
|
6
|
+
#
|
7
|
+
# Be aware that in ruby 1.9 UnboundMethod#name is defined already,
|
8
|
+
# but it returns a Symbol not a String.
|
9
|
+
#
|
10
|
+
# class X
|
11
|
+
# def foo; end
|
12
|
+
# end
|
13
|
+
#
|
14
|
+
# meth = X.instance_method(:foo)
|
15
|
+
#
|
16
|
+
# meth.name #=> :foo
|
17
|
+
#
|
18
|
+
# CREDIT: Trans
|
19
|
+
|
20
|
+
def name
|
21
|
+
i = to_s.rindex('#')
|
22
|
+
to_s.slice(i+1...-1).to_sym
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
22
26
|
|
23
27
|
end
|
24
28
|
|
data/lib/more/facets/date.rb
CHANGED
@@ -76,6 +76,7 @@ class Date
|
|
76
76
|
#::Time.send("#{form}_time", year, month, day)
|
77
77
|
end
|
78
78
|
|
79
|
+
#
|
79
80
|
def xmlschema
|
80
81
|
to_time.xmlschema
|
81
82
|
end
|
@@ -198,17 +199,25 @@ class DateTime
|
|
198
199
|
::Time.local(2007).utc_offset.to_r / 86400
|
199
200
|
end
|
200
201
|
|
202
|
+
def future?
|
203
|
+
self > ::DateTime.current
|
204
|
+
end
|
205
|
+
|
206
|
+
def past?
|
207
|
+
self < ::DateTime.current
|
208
|
+
end
|
209
|
+
|
201
210
|
# Converts self to a Ruby Date object; time portion is discarded
|
202
211
|
def to_date
|
203
212
|
::Date.new(year, month, day)
|
204
213
|
end
|
205
214
|
|
206
215
|
# Attempts to convert self to a Ruby Time object; returns self if
|
207
|
-
# out of range of Ruby Time class
|
216
|
+
# out of range of Ruby Time class. If self has an offset other than 0,
|
208
217
|
# self will just be returned unaltered, since there's no clean way
|
209
|
-
# to map it to a Time
|
218
|
+
# to map it to a Time.
|
210
219
|
def to_time
|
211
|
-
self.offset == 0 ? ::Time.
|
220
|
+
self.offset == 0 ? ::Time.utc_time(year, month, day, hour, min, sec) : self
|
212
221
|
end
|
213
222
|
|
214
223
|
# To be able to keep Times, Dates and DateTimes interchangeable on conversions
|
@@ -309,6 +318,7 @@ class DateTime
|
|
309
318
|
#
|
310
319
|
# DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600
|
311
320
|
# DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 +0000
|
321
|
+
#
|
312
322
|
def utc
|
313
323
|
new_offset(0)
|
314
324
|
end
|
@@ -340,6 +350,24 @@ end
|
|
340
350
|
|
341
351
|
class Time
|
342
352
|
|
353
|
+
#
|
354
|
+
def self.local_time(*args)
|
355
|
+
time_with_datetime_fallback(:local, *args)
|
356
|
+
end
|
357
|
+
|
358
|
+
#
|
359
|
+
def self.utc_time(*args)
|
360
|
+
time_with_datetime_fallback(:utc, *args)
|
361
|
+
end
|
362
|
+
|
363
|
+
#
|
364
|
+
def self.time_with_datetime_fallback(utc_or_local, year, month=1, day=1, hour=0, min=0, sec=0, usec=0)
|
365
|
+
::Time.send(utc_or_local, year, month, day, hour, min, sec, usec)
|
366
|
+
rescue
|
367
|
+
offset = utc_or_local.to_sym == :local ? ::DateTime.local_offset : 0
|
368
|
+
::DateTime.civil(year, month, day, hour, min, sec, offset)
|
369
|
+
end
|
370
|
+
|
343
371
|
public :to_date
|
344
372
|
public :to_datetime
|
345
373
|
|
@@ -350,6 +378,7 @@ class Time
|
|
350
378
|
#
|
351
379
|
# your_time = Time.parse("1/13/2009 1:13:03 P.M.") # => Tue Jan 13 13:13:03 -0500 2009
|
352
380
|
# your_time.to_date # => Tue, 13 Jan 2009
|
381
|
+
#
|
353
382
|
def to_date
|
354
383
|
::Date.new(year, month, day)
|
355
384
|
end
|
@@ -371,6 +400,7 @@ class Time
|
|
371
400
|
#
|
372
401
|
# your_time = Time.parse("1/13/2009 1:13:03 P.M.") # => Tue Jan 13 13:13:03 -0500 2009
|
373
402
|
# your_time.to_datetime # => Tue, 13 Jan 2009 13:13:03 -0500
|
403
|
+
#
|
374
404
|
def to_datetime
|
375
405
|
::DateTime.civil(year, month, day, hour, min, sec, Rational(utc_offset, 86400))
|
376
406
|
end
|
@@ -380,6 +410,11 @@ end
|
|
380
410
|
|
381
411
|
class String
|
382
412
|
|
413
|
+
#
|
414
|
+
def to_time(form = :utc)
|
415
|
+
::Time.__send__("#{form}_time", *::Date._parse(self, false).values_at(:year, :mon, :mday, :hour, :min, :sec).map{|arg| arg || 0 })
|
416
|
+
end
|
417
|
+
|
383
418
|
# Convert string to DateTime.
|
384
419
|
def to_datetime
|
385
420
|
date = ::Date._parse(self, false).values_at(:year, :mon, :mday, :hour, :min, :sec).map { |arg| arg || 0 }
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module FileUtils
|
2
|
+
|
3
|
+
# Both of these are modified from the implementations in fileutils.rb from Ruby 1.9.1p378.
|
4
|
+
|
5
|
+
# Like FileUtils.cp_r, but takes a filter proc that can return false to skip a file.
|
6
|
+
#
|
7
|
+
# cp_rx "bigDirectoryTree", "dest", {:noop => true} do |name|
|
8
|
+
# /dontCopyThis$/.match(name)
|
9
|
+
# end
|
10
|
+
#
|
11
|
+
# Note that if the filter rejects a subdirectory then everything within that
|
12
|
+
# subdirectory is automatically skipped as well.
|
13
|
+
|
14
|
+
def cp_rx(src, dest, options = {}, &filter)
|
15
|
+
fu_check_options(options, OPT_TABLE['cp_r'])
|
16
|
+
if options[:verbose]
|
17
|
+
fu_output_message("cp -r#{options[:preserve] ? 'p' : ''}#{options[:remove_destination] ? ' --remove-destination' : ''} #{[src,dest].flatten.join ' '}")
|
18
|
+
end
|
19
|
+
return if options[:noop]
|
20
|
+
fu_each_src_dest(src, dest) do |s, d|
|
21
|
+
copy_entryx(s, d, filter, options[:preserve], options[:dereference_root], options[:remove_destination])
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
# Like FileUtils.copy_entry, but takes a filter proc that can return false to skip a file.
|
26
|
+
#
|
27
|
+
# Note that if the filter rejects a subdirectory then everything within that
|
28
|
+
# subdirectory is automatically skipped as well.
|
29
|
+
|
30
|
+
def copy_entryx(src, dest, filter, preserve = false, dereference_root = false, remove_destination = false)
|
31
|
+
Entry_.new(src, nil, dereference_root).traverse do |ent|
|
32
|
+
if filter.call(ent.path) then
|
33
|
+
destent = Entry_.new(dest, ent.rel, false)
|
34
|
+
File.unlink destent.path if remove_destination && File.file?(destent.path)
|
35
|
+
ent.copy destent.path
|
36
|
+
ent.copy_metadata(destent.path) if preserve
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
data/lib/more/facets/pathname.rb
CHANGED
data/meta/homepage
CHANGED
@@ -1 +1 @@
|
|
1
|
-
http://
|
1
|
+
http://rubyworks.github.com/facets
|
data/meta/released
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
2010-02-22
|
data/meta/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.8.
|
1
|
+
2.8.2
|
@@ -19,11 +19,6 @@ class TC_Array_Product < Test::Unit::TestCase
|
|
19
19
|
assert_equal( r, z )
|
20
20
|
end
|
21
21
|
|
22
|
-
def test_op_product
|
23
|
-
a = [1,2,3] ** [4,5,6]
|
24
|
-
assert_equal( [[1, 4],[1, 5],[1, 6],[2, 4],[2, 5],[2, 6],[3, 4],[3, 5],[3, 6]], a )
|
25
|
-
end
|
26
|
-
|
27
22
|
#def test_product_01
|
28
23
|
# i = [[1,2], [4], ["apple", "banana"]]
|
29
24
|
# o = [[1, 4, "apple"], [1, 4, "banana"], [2, 4, "apple"], [2, 4, "banana"]]
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'facets/enumerable/find_yield'
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
class TestEnumerable < Test::Unit::TestCase
|
5
|
+
|
6
|
+
def test_find_yields_a_value
|
7
|
+
assert_equal true, [true].find_yield { |value| value }
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_find_yield_detects_correct_value
|
11
|
+
assert_equal 1, [1].find_yield { |value| value }
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_find_yield_returns_value_of_block
|
15
|
+
assert_equal 4, [1].find_yield { |v| v + 3 }
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_find_yield_detects_first_truthy_value
|
19
|
+
assert_equal 1, [false, false, 1].find_yield { |value| value }
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_find_yield_returns_value_when_block_is_true
|
23
|
+
assert_equal true, [false].find_yield { |value| true }
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_find_yield_returns_early_when_block_is_true
|
27
|
+
val1 = lambda { :something }
|
28
|
+
val2 = lambda { raise "This shouldn't be called" }
|
29
|
+
|
30
|
+
assert_equal :something, [val1, val2].find_yield { |obj| obj.call }
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_find_yield_returns_nil_when_block_returns_false_for_all_elements
|
34
|
+
assert_equal nil, [1,2,3,4].find_yield { |value| false }
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_find_yield_returns_nil_when_no_elements_in_collection
|
38
|
+
assert_equal nil, [].find_yield { |v| }
|
39
|
+
end
|
40
|
+
|
41
|
+
def test_find_yield_can_have_return_value_specified_when_block_isnt_true
|
42
|
+
assert_equal :a_value, [1,2,3].find_yield(:a_value) { |value| false }
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_find_yield_documentation_correct
|
46
|
+
obj1, obj2 = Object.new, Object.new
|
47
|
+
|
48
|
+
class << obj1
|
49
|
+
def foo?
|
50
|
+
false
|
51
|
+
end
|
52
|
+
|
53
|
+
def foo
|
54
|
+
raise
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class << obj2
|
59
|
+
def foo?
|
60
|
+
true
|
61
|
+
end
|
62
|
+
|
63
|
+
def foo
|
64
|
+
"a value"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
assert_equal false, obj1.foo?
|
69
|
+
assert_equal true, obj2.foo?
|
70
|
+
assert_equal "a value", obj2.foo
|
71
|
+
|
72
|
+
result = [obj1, obj2].find_yield { |obj| obj.foo if obj.foo? }
|
73
|
+
assert_equal result, "a value"
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'facets/numeric/spacing'
|
2
|
+
require 'test/unit'
|
3
|
+
|
4
|
+
class TC_Numeric_spacing < Test::Unit::TestCase
|
5
|
+
def test_spacing
|
6
|
+
samples = [-10.5, -3, 3, 1.0e14, 10000, 14.5e10]
|
7
|
+
samples.each do |numeric_item|
|
8
|
+
assert numeric_item.to_s.size == numeric_item.spacing
|
9
|
+
assert numeric_item.spacing.kind_of?(Integer)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -3,13 +3,13 @@ require 'facets/unboundmethod/name'
|
|
3
3
|
class Test_UnboundMethod_Name < Test::Unit::TestCase
|
4
4
|
|
5
5
|
class X
|
6
|
-
def foo; end
|
6
|
+
def foo; "bar"; end
|
7
7
|
end
|
8
8
|
|
9
9
|
def test_name
|
10
10
|
meth = X.instance_method(:foo)
|
11
|
-
assert_equal(
|
12
|
-
end
|
11
|
+
assert_equal(:foo, meth.name.to_sym)
|
12
|
+
end
|
13
13
|
|
14
14
|
end
|
15
15
|
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: facets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 2
|
7
|
+
- 8
|
8
|
+
- 2
|
9
|
+
version: 2.8.2
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Thomas Sawyer <transfire@gmail.com>
|
@@ -9,7 +14,7 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date:
|
17
|
+
date: 2010-02-26 00:00:00 -05:00
|
13
18
|
default_executable:
|
14
19
|
dependencies: []
|
15
20
|
|
@@ -27,19 +32,13 @@ description: |-
|
|
27
32
|
The modules include a variety of useful classes, mixins
|
28
33
|
and microframeworks, from the Functor to a complete
|
29
34
|
Annotations system.
|
30
|
-
email:
|
35
|
+
email:
|
31
36
|
executables: []
|
32
37
|
|
33
38
|
extensions: []
|
34
39
|
|
35
|
-
extra_rdoc_files:
|
36
|
-
|
37
|
-
- HISTORY.rdoc
|
38
|
-
- MANIFEST
|
39
|
-
- NOTES
|
40
|
-
- README.rdoc
|
41
|
-
- AUTHORS
|
42
|
-
- COPYING
|
40
|
+
extra_rdoc_files: []
|
41
|
+
|
43
42
|
files:
|
44
43
|
- demo/hook.rdoc
|
45
44
|
- demo/scenario_require.rdoc
|
@@ -62,6 +61,7 @@ files:
|
|
62
61
|
- lib/core/facets/array/splice.rb
|
63
62
|
- lib/core/facets/array/stackable.rb
|
64
63
|
- lib/core/facets/array/traverse.rb
|
64
|
+
- lib/core/facets/array/uniq_by.rb
|
65
65
|
- lib/core/facets/array.rb
|
66
66
|
- lib/core/facets/binding/caller.rb
|
67
67
|
- lib/core/facets/binding/callstack.rb
|
@@ -105,7 +105,7 @@ files:
|
|
105
105
|
- lib/core/facets/duplicable.rb
|
106
106
|
- lib/core/facets/enumerable/accumulate.rb
|
107
107
|
- lib/core/facets/enumerable/cluster_by.rb
|
108
|
-
- lib/core/facets/enumerable/
|
108
|
+
- lib/core/facets/enumerable/collapse.rb
|
109
109
|
- lib/core/facets/enumerable/collect_with_index.rb
|
110
110
|
- lib/core/facets/enumerable/commonality.rb
|
111
111
|
- lib/core/facets/enumerable/compact_map.rb
|
@@ -114,14 +114,16 @@ files:
|
|
114
114
|
- lib/core/facets/enumerable/divide.rb
|
115
115
|
- lib/core/facets/enumerable/duplicates.rb
|
116
116
|
- lib/core/facets/enumerable/each_by.rb
|
117
|
+
- lib/core/facets/enumerable/each_with_object.rb
|
117
118
|
- lib/core/facets/enumerable/entropy.rb
|
118
119
|
- lib/core/facets/enumerable/every.rb
|
119
120
|
- lib/core/facets/enumerable/ewise.rb
|
121
|
+
- lib/core/facets/enumerable/exclude.rb
|
120
122
|
- lib/core/facets/enumerable/filter.rb
|
123
|
+
- lib/core/facets/enumerable/find_yield.rb
|
121
124
|
- lib/core/facets/enumerable/frequency.rb
|
122
125
|
- lib/core/facets/enumerable/graph.rb
|
123
126
|
- lib/core/facets/enumerable/group_by.rb
|
124
|
-
- lib/core/facets/enumerable/inject.rb
|
125
127
|
- lib/core/facets/enumerable/map_detect.rb
|
126
128
|
- lib/core/facets/enumerable/map_send.rb
|
127
129
|
- lib/core/facets/enumerable/map_with_index.rb
|
@@ -133,11 +135,14 @@ files:
|
|
133
135
|
- lib/core/facets/enumerable/one.rb
|
134
136
|
- lib/core/facets/enumerable/per.rb
|
135
137
|
- lib/core/facets/enumerable/probability.rb
|
138
|
+
- lib/core/facets/enumerable/purge.rb
|
136
139
|
- lib/core/facets/enumerable/split.rb
|
137
140
|
- lib/core/facets/enumerable/sum.rb
|
138
141
|
- lib/core/facets/enumerable/take.rb
|
139
142
|
- lib/core/facets/enumerable/uniq_by.rb
|
140
143
|
- lib/core/facets/enumerable.rb
|
144
|
+
- lib/core/facets/enumerator/fx.rb
|
145
|
+
- lib/core/facets/enumerator.rb
|
141
146
|
- lib/core/facets/exception/detail.rb
|
142
147
|
- lib/core/facets/exception/raised.rb
|
143
148
|
- lib/core/facets/exception/suppress.rb
|
@@ -234,6 +239,7 @@ files:
|
|
234
239
|
- lib/core/facets/kernel/ergo.rb
|
235
240
|
- lib/core/facets/kernel/extend.rb
|
236
241
|
- lib/core/facets/kernel/extension.rb
|
242
|
+
- lib/core/facets/kernel/false.rb
|
237
243
|
- lib/core/facets/kernel/here.rb
|
238
244
|
- lib/core/facets/kernel/identical.rb
|
239
245
|
- lib/core/facets/kernel/in.rb
|
@@ -266,6 +272,7 @@ files:
|
|
266
272
|
- lib/core/facets/kernel/singleton_class.rb
|
267
273
|
- lib/core/facets/kernel/source_location.rb
|
268
274
|
- lib/core/facets/kernel/tap.rb
|
275
|
+
- lib/core/facets/kernel/true.rb
|
269
276
|
- lib/core/facets/kernel/try.rb
|
270
277
|
- lib/core/facets/kernel/val.rb
|
271
278
|
- lib/core/facets/kernel/with.rb
|
@@ -315,12 +322,13 @@ files:
|
|
315
322
|
- lib/core/facets/numeric/distance.rb
|
316
323
|
- lib/core/facets/numeric/length.rb
|
317
324
|
- lib/core/facets/numeric/round.rb
|
318
|
-
- lib/core/facets/numeric/
|
325
|
+
- lib/core/facets/numeric/spacing.rb
|
319
326
|
- lib/core/facets/numeric.rb
|
320
327
|
- lib/core/facets/objectspace/classes.rb
|
321
328
|
- lib/core/facets/objectspace/op_fetch.rb
|
322
329
|
- lib/core/facets/objectspace.rb
|
323
330
|
- lib/core/facets/proc/bind.rb
|
331
|
+
- lib/core/facets/proc/bind_to.rb
|
324
332
|
- lib/core/facets/proc/compose.rb
|
325
333
|
- lib/core/facets/proc/curry.rb
|
326
334
|
- lib/core/facets/proc/to_method.rb
|
@@ -352,6 +360,7 @@ files:
|
|
352
360
|
- lib/core/facets/string/each_word.rb
|
353
361
|
- lib/core/facets/string/edit_distance.rb
|
354
362
|
- lib/core/facets/string/end_with.rb
|
363
|
+
- lib/core/facets/string/exclude.rb
|
355
364
|
- lib/core/facets/string/expand_tab.rb
|
356
365
|
- lib/core/facets/string/file.rb
|
357
366
|
- lib/core/facets/string/fold.rb
|
@@ -412,7 +421,9 @@ files:
|
|
412
421
|
- lib/core/facets/time/ago.rb
|
413
422
|
- lib/core/facets/time/change.rb
|
414
423
|
- lib/core/facets/time/elapse.rb
|
424
|
+
- lib/core/facets/time/future.rb
|
415
425
|
- lib/core/facets/time/hence.rb
|
426
|
+
- lib/core/facets/time/past.rb
|
416
427
|
- lib/core/facets/time/round.rb
|
417
428
|
- lib/core/facets/time/set.rb
|
418
429
|
- lib/core/facets/time/stamp.rb
|
@@ -441,11 +452,11 @@ files:
|
|
441
452
|
- lib/more/facets/dictionary.rb
|
442
453
|
- lib/more/facets/duration.rb
|
443
454
|
- lib/more/facets/enumargs.rb
|
444
|
-
- lib/more/facets/enumerator.rb
|
445
455
|
- lib/more/facets/equitable.rb
|
446
456
|
- lib/more/facets/erb.rb
|
447
457
|
- lib/more/facets/expirable.rb
|
448
458
|
- lib/more/facets/filelist.rb
|
459
|
+
- lib/more/facets/fileutils/cp_rx.rb
|
449
460
|
- lib/more/facets/fileutils/head.rb
|
450
461
|
- lib/more/facets/fileutils/safe_ln.rb
|
451
462
|
- lib/more/facets/fileutils/slice.rb
|
@@ -506,7 +517,6 @@ files:
|
|
506
517
|
- lib/more/facets/succ.rb
|
507
518
|
- lib/more/facets/thread.rb
|
508
519
|
- lib/more/facets/timer.rb
|
509
|
-
- lib/more/facets/tracepoint.rb
|
510
520
|
- lib/more/facets/tuple.rb
|
511
521
|
- lib/more/facets/uri.rb
|
512
522
|
- lib/more/facets/version.rb
|
@@ -572,10 +582,10 @@ files:
|
|
572
582
|
- test/core/enumerable/test_entropy.rb
|
573
583
|
- test/core/enumerable/test_every.rb
|
574
584
|
- test/core/enumerable/test_ewise.rb
|
585
|
+
- test/core/enumerable/test_find_yield.rb
|
575
586
|
- test/core/enumerable/test_frequency.rb
|
576
587
|
- test/core/enumerable/test_group_by.rb
|
577
588
|
- test/core/enumerable/test_inject.rb
|
578
|
-
- test/core/enumerable/test_map_detect.rb
|
579
589
|
- test/core/enumerable/test_map_with_index.rb
|
580
590
|
- test/core/enumerable/test_mash.rb
|
581
591
|
- test/core/enumerable/test_modulate.rb
|
@@ -683,6 +693,7 @@ files:
|
|
683
693
|
- test/core/numeric/test_approx.rb
|
684
694
|
- test/core/numeric/test_distance.rb
|
685
695
|
- test/core/numeric/test_round.rb
|
696
|
+
- test/core/numeric/test_spacing.rb
|
686
697
|
- test/core/proc/test_bind.rb
|
687
698
|
- test/core/proc/test_compose.rb
|
688
699
|
- test/core/proc/test_curry.rb
|
@@ -796,9 +807,8 @@ files:
|
|
796
807
|
- README.rdoc
|
797
808
|
- AUTHORS
|
798
809
|
- COPYING
|
799
|
-
- MANIFEST
|
800
810
|
has_rdoc: true
|
801
|
-
homepage: http://
|
811
|
+
homepage: http://rubyworks.github.com/facets
|
802
812
|
licenses: []
|
803
813
|
|
804
814
|
post_install_message:
|
@@ -812,18 +822,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
812
822
|
requirements:
|
813
823
|
- - ">="
|
814
824
|
- !ruby/object:Gem::Version
|
825
|
+
segments:
|
826
|
+
- 0
|
815
827
|
version: "0"
|
816
|
-
version:
|
817
828
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
818
829
|
requirements:
|
819
830
|
- - ">="
|
820
831
|
- !ruby/object:Gem::Version
|
832
|
+
segments:
|
833
|
+
- 0
|
821
834
|
version: "0"
|
822
|
-
version:
|
823
835
|
requirements: []
|
824
836
|
|
825
837
|
rubyforge_project: facets
|
826
|
-
rubygems_version: 1.3.
|
838
|
+
rubygems_version: 1.3.6.pre.3
|
827
839
|
signing_key:
|
828
840
|
specification_version: 3
|
829
841
|
summary: Premium Core Extensions and Standard Additions
|
@@ -872,10 +884,10 @@ test_files:
|
|
872
884
|
- test/core/enumerable/test_entropy.rb
|
873
885
|
- test/core/enumerable/test_every.rb
|
874
886
|
- test/core/enumerable/test_ewise.rb
|
887
|
+
- test/core/enumerable/test_find_yield.rb
|
875
888
|
- test/core/enumerable/test_frequency.rb
|
876
889
|
- test/core/enumerable/test_group_by.rb
|
877
890
|
- test/core/enumerable/test_inject.rb
|
878
|
-
- test/core/enumerable/test_map_detect.rb
|
879
891
|
- test/core/enumerable/test_map_with_index.rb
|
880
892
|
- test/core/enumerable/test_mash.rb
|
881
893
|
- test/core/enumerable/test_modulate.rb
|
@@ -983,6 +995,7 @@ test_files:
|
|
983
995
|
- test/core/numeric/test_approx.rb
|
984
996
|
- test/core/numeric/test_distance.rb
|
985
997
|
- test/core/numeric/test_round.rb
|
998
|
+
- test/core/numeric/test_spacing.rb
|
986
999
|
- test/core/proc/test_bind.rb
|
987
1000
|
- test/core/proc/test_compose.rb
|
988
1001
|
- test/core/proc/test_curry.rb
|