facets 2.4.0 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/CHANGES +14 -6
  2. data/MANIFEST +35 -18
  3. data/NOTES +5 -15
  4. data/README +1 -11
  5. data/doc/{History.txt → history.rdoc} +0 -0
  6. data/doc/html/api/core/created.rid +1 -1
  7. data/doc/html/api/core/files/CHANGES.html +20 -4
  8. data/doc/html/api/core/files/NOTES.html +44 -15
  9. data/doc/html/api/more/created.rid +1 -1
  10. data/doc/html/api/more/files/CHANGES.html +20 -4
  11. data/doc/html/api/more/files/NOTES.html +46 -15
  12. data/doc/html/changes.html +19 -3
  13. data/doc/html/notes.html +43 -14
  14. data/doc/notes.rdoc +9 -0
  15. data/lib/facets/basex.rb +37 -0
  16. data/lib/facets/basicobject.rb +2 -2
  17. data/lib/facets/date.rb +16 -4
  18. data/lib/facets/exception.rb +1 -0
  19. data/lib/facets/exception/suppress.rb +21 -0
  20. data/lib/facets/hash/argumentize.rb +2 -1
  21. data/lib/facets/kernel.rb +9 -2
  22. data/lib/facets/kernel/__class__.rb +9 -0
  23. data/lib/facets/kernel/__get__.rb +10 -0
  24. data/lib/facets/kernel/__set__.rb +1 -0
  25. data/lib/facets/kernel/instance_assign.rb +41 -0
  26. data/lib/facets/kernel/instance_class.rb +24 -0
  27. data/lib/facets/kernel/instance_send.rb +7 -0
  28. data/lib/facets/kernel/instance_variables.rb +99 -0
  29. data/lib/facets/kernel/object_class.rb +10 -0
  30. data/lib/facets/kernel/object_hexid.rb +12 -0
  31. data/lib/facets/kernel/{object.rb → object_send.rb} +0 -21
  32. data/lib/facets/kernel/silence.rb +25 -19
  33. data/lib/facets/kernel/suppress.rb +18 -0
  34. data/lib/facets/module.rb +3 -0
  35. data/lib/facets/module/basename.rb +31 -0
  36. data/lib/facets/module/modspace.rb +22 -0
  37. data/lib/facets/module/nesting.rb +0 -66
  38. data/lib/facets/module/spacename.rb +25 -0
  39. data/lib/facets/net/smtp_tls.rb +5 -8
  40. data/lib/facets/openhash.rb +1 -0
  41. data/lib/facets/openobject.rb +2 -1
  42. data/lib/facets/paramix.rb +187 -0
  43. data/lib/facets/platform.rb +192 -0
  44. data/lib/facets/recorder.rb +1 -1
  45. data/lib/facets/string.rb +12 -0
  46. data/lib/facets/string/to_time.rb +1 -23
  47. data/lib/facets/style.rb +145 -64
  48. data/lib/facets/time.rb +5 -0
  49. data/lib/facets/time/to_time.rb +14 -0
  50. data/log/{Changelog-0.txt → changelog-0.rdoc} +0 -0
  51. data/log/{Changelog-1.txt → changelog-1.rdoc} +0 -0
  52. data/log/{Changelog.txt → changelog.rdoc} +18 -0
  53. data/log/{Fixme.txt → fixme.rdoc} +3 -3
  54. data/log/testlog.txt +645 -0
  55. data/log/{Todo.txt → todo.rdoc} +80 -89
  56. data/meta/project.yaml +14 -10
  57. data/meta/version +1 -1
  58. data/script/conflicts +28 -3
  59. data/script/methods +32 -43
  60. data/test/kernel/{test_instance.rb → test_instance_assign.rb} +2 -10
  61. data/test/kernel/test_instance_class.rb +12 -0
  62. data/test/kernel/{test_object.rb → test_object_class.rb} +2 -9
  63. data/test/kernel/test_object_hexid.rb +12 -0
  64. data/test/module/test_basename.rb +11 -0
  65. data/test/module/test_modspace.rb +13 -0
  66. data/test/module/test_nesting.rb +0 -17
  67. data/test/module/test_spacename.rb +14 -0
  68. data/test/test_date.rb +12 -0
  69. data/test/test_style.rb +1 -1
  70. data/test/{string → time}/test_to_time.rb +1 -9
  71. metadata +46 -26
  72. data/lib/facets/behavior.rb +0 -104
  73. data/lib/facets/kernel/instance.rb +0 -73
  74. data/lib/facets/string/stylize.rb +0 -73
  75. data/lib/facets/string/underscore.rb +0 -28
  76. data/log/Testlog.txt +0 -205
  77. data/meta/corelibs +0 -49
  78. data/test/string/test_stylize.rb +0 -52
  79. data/test/string/test_underscore.rb +0 -13
@@ -1,15 +1,7 @@
1
- # Test for facets/kernel/instance
2
-
3
- require 'facets/kernel/instance.rb'
4
-
1
+ require 'facets/kernel/instance_assign.rb'
5
2
  require 'test/unit'
6
3
 
7
- class TestKernelInstance < Test::Unit::TestCase
8
-
9
- def test_instance_class
10
- o = Object.new
11
- assert_equal( (class << o; self; end), o.instance_class )
12
- end
4
+ class TestKernelInstanceAssign < Test::Unit::TestCase
13
5
 
14
6
  def test_instance_assign
15
7
  ahash = { "z"=>0, "@a"=>1, "@b"=>2 } #, "@@a"=>3 }
@@ -0,0 +1,12 @@
1
+ require 'facets/kernel/instance_class.rb'
2
+ require 'test/unit'
3
+
4
+ class TestKernelInstanceClass < Test::Unit::TestCase
5
+
6
+ def test_instance_class
7
+ o = Object.new
8
+ assert_equal( (class << o; self; end), o.instance_class )
9
+ end
10
+
11
+ end
12
+
@@ -1,7 +1,5 @@
1
- # Test for facets/kernel/object
2
-
3
- require 'facets/kernel/object.rb'
4
-
1
+ require 'facets/kernel/object_class.rb'
2
+ require 'facets/kernel/__class__.rb'
5
3
  require 'test/unit'
6
4
 
7
5
  class TCKernel < Test::Unit::TestCase
@@ -10,11 +8,6 @@ class TCKernel < Test::Unit::TestCase
10
8
  assert_equal( self.class, self.object_class )
11
9
  end
12
10
 
13
- def test_object_hexid
14
- o = Object.new
15
- assert( o.inspect.index(o.object_hexid) )
16
- end
17
-
18
11
  def test__class__
19
12
  assert_equal( self.class, self.__class__ )
20
13
  end
@@ -0,0 +1,12 @@
1
+ require 'facets/kernel/object_hexid.rb'
2
+ require 'test/unit'
3
+
4
+ class TCKernel < Test::Unit::TestCase
5
+
6
+ def test_object_hexid
7
+ o = Object.new
8
+ assert( o.inspect.index(o.object_hexid) )
9
+ end
10
+
11
+ end
12
+
@@ -0,0 +1,11 @@
1
+ require 'facets/module/basename.rb'
2
+ require 'test/unit'
3
+
4
+ class TestModuleBasename < Test::Unit::TestCase
5
+
6
+ def test_basename
7
+ assert_equal( "TestCase", ::Test::Unit::TestCase.basename )
8
+ end
9
+
10
+ end
11
+
@@ -0,0 +1,13 @@
1
+ require 'facets/module/modspace.rb'
2
+ require 'test/unit'
3
+
4
+ class TestModuleModSpace < Test::Unit::TestCase
5
+
6
+ def test_modspace
7
+ assert_equal( Test::Unit, Test::Unit::TestCase.modspace )
8
+ assert_equal( ::Test::Unit, ::Test::Unit::TestCase.modspace )
9
+ assert_equal( Object, ::Test.modspace )
10
+ end
11
+
12
+ end
13
+
@@ -3,23 +3,6 @@ require 'test/unit'
3
3
 
4
4
  class TestModuleNesting < Test::Unit::TestCase
5
5
 
6
- def test_basename
7
- assert_equal( "TestCase", ::Test::Unit::TestCase.basename )
8
- end
9
-
10
- def test_spacename
11
- assert_equal( 'Test::Unit', Test::Unit::TestCase.spacename )
12
- assert_equal( 'Test::Unit', ::Test::Unit::TestCase.spacename )
13
- assert_equal( '', Test.spacename )
14
- assert_equal( '', ::Test.spacename )
15
- end
16
-
17
- def test_modspace
18
- assert_equal( Test::Unit, Test::Unit::TestCase.modspace )
19
- assert_equal( ::Test::Unit, ::Test::Unit::TestCase.modspace )
20
- assert_equal( Object, ::Test.modspace )
21
- end
22
-
23
6
  module M
24
7
  module N
25
8
  class C
@@ -0,0 +1,14 @@
1
+ require 'facets/module/spacename.rb'
2
+ require 'test/unit'
3
+
4
+ class TestModuleSpaceName < Test::Unit::TestCase
5
+
6
+ def test_spacename
7
+ assert_equal( 'Test::Unit', Test::Unit::TestCase.spacename )
8
+ assert_equal( 'Test::Unit', ::Test::Unit::TestCase.spacename )
9
+ assert_equal( '', Test.spacename )
10
+ assert_equal( '', ::Test.spacename )
11
+ end
12
+
13
+ end
14
+
@@ -43,3 +43,15 @@ class TC_Date < Test::Unit::TestCase
43
43
 
44
44
  end
45
45
 
46
+ class TC_String_Date < Test::Unit::TestCase
47
+
48
+ def test_to_date
49
+ s = "2005-10-31"
50
+ d = s.to_date
51
+ assert_equal( 31, d.day )
52
+ assert_equal( 10, d.month )
53
+ assert_equal( 2005, d.year )
54
+ end
55
+
56
+ end
57
+
@@ -41,7 +41,7 @@ class TestStylize < Test::Unit::TestCase
41
41
 
42
42
  def test_pathize
43
43
  assert_equal( 'my_module/my_class', 'MyModule::MyClass'.style(:pathize) )
44
- assert_equal( 'u_r_i', 'URI'.style(:pathize) )
44
+ assert_equal( 'uri', 'URI'.style(:pathize) ) # Hmm... this is reversible?
45
45
  assert_equal( '/my_class', '::MyClass'.style(:pathize) )
46
46
  assert_equal( '/my_module/my_class/', '/my_module/my_class/'.style(:pathize) )
47
47
  end
@@ -1,16 +1,8 @@
1
- require 'facets/string/to_time'
1
+ require 'facets/time/to_time'
2
2
  require 'test/unit'
3
3
 
4
4
  class TestStringToTime < Test::Unit::TestCase
5
5
 
6
- def test_to_date
7
- s = "2005-10-31"
8
- d = s.to_date
9
- assert_equal( 31, d.day )
10
- assert_equal( 10, d.month )
11
- assert_equal( 2005, d.year )
12
- end
13
-
14
6
  def test_to_time
15
7
  s = "2:31:15 PM"
16
8
  t = s.to_time
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facets
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Sawyer <transfire@gmail.com>
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-24 00:00:00 -04:00
12
+ date: 2008-04-03 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
- description: Facets is a large collection of core extension methods and standard additions for the Ruby programming language. The core extensions are unique by virtue of thier atomicity. Methods are stored in small, tightly related collections, allowing for highly granular control of requirements. The modules include a variety of useful classes, mixins and microframeworks, from the Functor to a complete Annotations system.
16
+ description: Facets is a single largest collection of core extension methods and standard class additions available for the Ruby programming language.
17
17
  email: transfire@gmail.com
18
18
  executables: []
19
19
 
@@ -28,6 +28,8 @@ extra_rdoc_files:
28
28
  - COPYING
29
29
  files:
30
30
  - doc
31
+ - doc/notes.rdoc
32
+ - doc/history.rdoc
31
33
  - doc/html
32
34
  - doc/html/manifest.html
33
35
  - doc/html/img
@@ -676,7 +678,6 @@ files:
676
678
  - doc/html/style-rdoc.css
677
679
  - doc/html/changes.html
678
680
  - doc/html/api.css
679
- - doc/History.txt
680
681
  - MANIFEST
681
682
  - test
682
683
  - test/integer
@@ -787,10 +788,12 @@ files:
787
788
  - test/kernel/test_constant.rb
788
789
  - test/kernel/test_populate.rb
789
790
  - test/kernel/test_callstack.rb
791
+ - test/kernel/test_instance_class.rb
790
792
  - test/kernel/test_silence.rb
791
- - test/kernel/test_instance.rb
793
+ - test/kernel/test_object_hexid.rb
792
794
  - test/kernel/test_in.rb
793
- - test/kernel/test_object.rb
795
+ - test/kernel/test_instance_assign.rb
796
+ - test/kernel/test_object_class.rb
794
797
  - test/kernel/test_returning.rb
795
798
  - test/kernel/test_here.rb
796
799
  - test/kernel/test_deepcopy.rb
@@ -828,16 +831,13 @@ files:
828
831
  - test/string/test_words.rb
829
832
  - test/string/test_camelcase.rb
830
833
  - test/string/test_nchar.rb
831
- - test/string/test_underscore.rb
832
834
  - test/string/test_cleave.rb
833
835
  - test/string/test_capitalized.rb
834
836
  - test/string/test_titlecase.rb
835
837
  - test/string/test_fold.rb
836
838
  - test/string/test_line_wrap.rb
837
- - test/string/test_to_time.rb
838
839
  - test/string/test_to_re.rb
839
840
  - test/string/test_range.rb
840
- - test/string/test_stylize.rb
841
841
  - test/string/test_align.rb
842
842
  - test/string/test_xor.rb
843
843
  - test/string/test_divide.rb
@@ -849,8 +849,11 @@ files:
849
849
  - test/string/test_bracket.rb
850
850
  - test/test_overload.rb
851
851
  - test/module
852
+ - test/module/test_spacename.rb
853
+ - test/module/test_basename.rb
852
854
  - test/module/test_nesting.rb
853
855
  - test/module/test_ancestor.rb
856
+ - test/module/test_modspace.rb
854
857
  - test/module/test_alias.rb
855
858
  - test/module/test_op.rb
856
859
  - test/module/test_revise.rb
@@ -861,6 +864,7 @@ files:
861
864
  - test/test_to_hash.rb
862
865
  - test/test_enumerablepass.rb
863
866
  - test/time
867
+ - test/time/test_to_time.rb
864
868
  - test/time/test_stamp.rb
865
869
  - test/time/test_change.rb
866
870
  - test/time/test_elapse.rb
@@ -914,7 +918,6 @@ files:
914
918
  - meta/created
915
919
  - meta/homepage
916
920
  - meta/project.yaml
917
- - meta/corelibs
918
921
  - meta/version
919
922
  - meta/unixname
920
923
  - meta/mailinglist
@@ -953,6 +956,7 @@ files:
953
956
  - lib/facets/integer/of.rb
954
957
  - lib/facets/file.rb
955
958
  - lib/facets/synchash.rb
959
+ - lib/facets/platform.rb
956
960
  - lib/facets/annotations.rb
957
961
  - lib/facets/pathname.rb
958
962
  - lib/facets/pathlist.rb
@@ -1022,6 +1026,7 @@ files:
1022
1026
  - lib/facets/indexable.rb
1023
1027
  - lib/facets/multipliers.rb
1024
1028
  - lib/facets/module.rb
1029
+ - lib/facets/basex.rb
1025
1030
  - lib/facets/typecast.rb
1026
1031
  - lib/facets/binding
1027
1032
  - lib/facets/binding/caller.rb
@@ -1112,19 +1117,28 @@ files:
1112
1117
  - lib/facets/kernel
1113
1118
  - lib/facets/kernel/here.rb
1114
1119
  - lib/facets/kernel/as.rb
1120
+ - lib/facets/kernel/__class__.rb
1115
1121
  - lib/facets/kernel/ask.rb
1116
- - lib/facets/kernel/object.rb
1122
+ - lib/facets/kernel/suppress.rb
1117
1123
  - lib/facets/kernel/demo.rb
1118
1124
  - lib/facets/kernel/maybe.rb
1119
- - lib/facets/kernel/instance.rb
1125
+ - lib/facets/kernel/instance_send.rb
1126
+ - lib/facets/kernel/object_hexid.rb
1127
+ - lib/facets/kernel/object_class.rb
1128
+ - lib/facets/kernel/object_send.rb
1120
1129
  - lib/facets/kernel/ergo.rb
1121
1130
  - lib/facets/kernel/complete.rb
1131
+ - lib/facets/kernel/__get__.rb
1122
1132
  - lib/facets/kernel/not_nil.rb
1123
1133
  - lib/facets/kernel/deep_copy.rb
1124
1134
  - lib/facets/kernel/silence.rb
1125
1135
  - lib/facets/kernel/resc.rb
1136
+ - lib/facets/kernel/instance_variables.rb
1137
+ - lib/facets/kernel/instance_assign.rb
1126
1138
  - lib/facets/kernel/with.rb
1127
1139
  - lib/facets/kernel/d.rb
1140
+ - lib/facets/kernel/__set__.rb
1141
+ - lib/facets/kernel/instance_class.rb
1128
1142
  - lib/facets/kernel/instance_exec.rb
1129
1143
  - lib/facets/kernel/load.rb
1130
1144
  - lib/facets/kernel/attr_singleton.rb
@@ -1194,7 +1208,6 @@ files:
1194
1208
  - lib/facets/string/capitalized.rb
1195
1209
  - lib/facets/string/natcmp.rb
1196
1210
  - lib/facets/string/subtract.rb
1197
- - lib/facets/string/stylize.rb
1198
1211
  - lib/facets/string/titlecase.rb
1199
1212
  - lib/facets/string/words.rb
1200
1213
  - lib/facets/string/interpolate.rb
@@ -1207,7 +1220,6 @@ files:
1207
1220
  - lib/facets/string/rewrite.rb
1208
1221
  - lib/facets/string/nchar.rb
1209
1222
  - lib/facets/string/xor.rb
1210
- - lib/facets/string/underscore.rb
1211
1223
  - lib/facets/instantise.rb
1212
1224
  - lib/facets/uri.rb
1213
1225
  - lib/facets/ostruct.rb
@@ -1226,9 +1238,12 @@ files:
1226
1238
  - lib/facets/module/is.rb
1227
1239
  - lib/facets/module/nesting.rb
1228
1240
  - lib/facets/module/class.rb
1241
+ - lib/facets/module/modspace.rb
1229
1242
  - lib/facets/module/abstract.rb
1230
1243
  - lib/facets/module/clone.rb
1231
1244
  - lib/facets/module/revise.rb
1245
+ - lib/facets/module/spacename.rb
1246
+ - lib/facets/module/basename.rb
1232
1247
  - lib/facets/style.rb
1233
1248
  - lib/facets/nilstatus.rb
1234
1249
  - lib/facets/ziputils.rb
@@ -1243,6 +1258,7 @@ files:
1243
1258
  - lib/facets/time/ago.rb
1244
1259
  - lib/facets/time/hence.rb
1245
1260
  - lib/facets/time/set.rb
1261
+ - lib/facets/time/to_time.rb
1246
1262
  - lib/facets/time/change.rb
1247
1263
  - lib/facets/time/stamp.rb
1248
1264
  - lib/facets/elementor.rb
@@ -1262,7 +1278,6 @@ files:
1262
1278
  - lib/facets/unboundmethod.rb
1263
1279
  - lib/facets/filetest
1264
1280
  - lib/facets/filetest/root.rb
1265
- - lib/facets/behavior.rb
1266
1281
  - lib/facets/binreadable.rb
1267
1282
  - lib/facets/class
1268
1283
  - lib/facets/class/prepend.rb
@@ -1295,6 +1310,7 @@ files:
1295
1310
  - lib/facets/meta.rb
1296
1311
  - lib/facets/minitar.rb
1297
1312
  - lib/facets/kernel.rb
1313
+ - lib/facets/paramix.rb
1298
1314
  - lib/facets/regexp
1299
1315
  - lib/facets/regexp/to_re.rb
1300
1316
  - lib/facets/regexp/arity.rb
@@ -1304,6 +1320,7 @@ files:
1304
1320
  - lib/facets/class_extension.rb
1305
1321
  - lib/facets/crypt.rb
1306
1322
  - lib/facets/exception
1323
+ - lib/facets/exception/suppress.rb
1307
1324
  - lib/facets/exception/detail.rb
1308
1325
  - lib/facets/string.rb
1309
1326
  - lib/facets/binding.rb
@@ -1316,12 +1333,12 @@ files:
1316
1333
  - lib/facets/tracepoint.rb
1317
1334
  - lib/facets.rb
1318
1335
  - log
1319
- - log/Changelog.txt
1320
- - log/Changelog-1.txt
1321
- - log/Fixme.txt
1322
- - log/Changelog-0.txt
1323
- - log/Todo.txt
1324
- - log/Testlog.txt
1336
+ - log/changelog-0.rdoc
1337
+ - log/todo.rdoc
1338
+ - log/changelog.rdoc
1339
+ - log/changelog-1.rdoc
1340
+ - log/fixme.rdoc
1341
+ - log/testlog.txt
1325
1342
  - script
1326
1343
  - script/methods
1327
1344
  - script/document
@@ -1467,10 +1484,12 @@ test_files:
1467
1484
  - test/kernel/test_constant.rb
1468
1485
  - test/kernel/test_populate.rb
1469
1486
  - test/kernel/test_callstack.rb
1487
+ - test/kernel/test_instance_class.rb
1470
1488
  - test/kernel/test_silence.rb
1471
- - test/kernel/test_instance.rb
1489
+ - test/kernel/test_object_hexid.rb
1472
1490
  - test/kernel/test_in.rb
1473
- - test/kernel/test_object.rb
1491
+ - test/kernel/test_instance_assign.rb
1492
+ - test/kernel/test_object_class.rb
1474
1493
  - test/kernel/test_returning.rb
1475
1494
  - test/kernel/test_here.rb
1476
1495
  - test/kernel/test_deepcopy.rb
@@ -1508,16 +1527,13 @@ test_files:
1508
1527
  - test/string/test_words.rb
1509
1528
  - test/string/test_camelcase.rb
1510
1529
  - test/string/test_nchar.rb
1511
- - test/string/test_underscore.rb
1512
1530
  - test/string/test_cleave.rb
1513
1531
  - test/string/test_capitalized.rb
1514
1532
  - test/string/test_titlecase.rb
1515
1533
  - test/string/test_fold.rb
1516
1534
  - test/string/test_line_wrap.rb
1517
- - test/string/test_to_time.rb
1518
1535
  - test/string/test_to_re.rb
1519
1536
  - test/string/test_range.rb
1520
- - test/string/test_stylize.rb
1521
1537
  - test/string/test_align.rb
1522
1538
  - test/string/test_xor.rb
1523
1539
  - test/string/test_divide.rb
@@ -1529,8 +1545,11 @@ test_files:
1529
1545
  - test/string/test_bracket.rb
1530
1546
  - test/test_overload.rb
1531
1547
  - test/module
1548
+ - test/module/test_spacename.rb
1549
+ - test/module/test_basename.rb
1532
1550
  - test/module/test_nesting.rb
1533
1551
  - test/module/test_ancestor.rb
1552
+ - test/module/test_modspace.rb
1534
1553
  - test/module/test_alias.rb
1535
1554
  - test/module/test_op.rb
1536
1555
  - test/module/test_revise.rb
@@ -1541,6 +1560,7 @@ test_files:
1541
1560
  - test/test_to_hash.rb
1542
1561
  - test/test_enumerablepass.rb
1543
1562
  - test/time
1563
+ - test/time/test_to_time.rb
1544
1564
  - test/time/test_stamp.rb
1545
1565
  - test/time/test_change.rb
1546
1566
  - test/time/test_elapse.rb