rio 0.3.4 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +287 -0
- data/Rakefile +7 -9
- data/VERSION +1 -1
- data/doc/ANNOUNCE +20 -1
- data/doc/RELEASE_NOTES +41 -0
- data/doc/rdoc/classes/Kernel.html +181 -0
- data/doc/rdoc/classes/Kernel.src/M000214.html +18 -0
- data/doc/rdoc/classes/RIO.html +621 -0
- data/doc/rdoc/classes/RIO.src/M000001.html +18 -0
- data/doc/rdoc/classes/RIO.src/M000002.html +18 -0
- data/doc/rdoc/classes/RIO.src/M000003.html +18 -0
- data/doc/rdoc/classes/RIO/Doc.html +138 -0
- data/doc/rdoc/classes/RIO/Doc/HOWTO.html +1040 -0
- data/doc/rdoc/classes/RIO/Doc/INTRO.html +1613 -0
- data/doc/rdoc/classes/RIO/Doc/MISC.html +443 -0
- data/doc/rdoc/classes/RIO/Doc/SYNOPSIS.html +338 -0
- data/doc/rdoc/classes/RIO/IF.html +114 -0
- data/doc/rdoc/classes/RIO/IF/CSV.html +202 -0
- data/doc/rdoc/classes/RIO/IF/CSV.src/M000004.html +19 -0
- data/doc/rdoc/classes/RIO/IF/CSV.src/M000005.html +16 -0
- data/doc/rdoc/classes/RIO/IF/CSV.src/M000006.html +16 -0
- data/doc/rdoc/classes/RIO/IF/YAML.html +499 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000007.html +19 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000008.html +16 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000009.html +16 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000010.html +16 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000011.html +16 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000012.html +16 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000013.html +16 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000014.html +16 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000015.html +16 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000016.html +16 -0
- data/doc/rdoc/classes/RIO/IF/YAML.src/M000017.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.html +7121 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000018.html +18 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000019.html +20 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000020.html +27 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000021.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000023.html +19 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000024.html +20 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000025.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000026.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000027.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000028.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000029.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000030.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000031.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000032.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000033.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000034.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000035.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000036.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000037.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000038.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000039.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000040.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000041.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000042.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000043.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000044.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000045.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000046.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000047.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000048.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000049.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000050.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000051.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000052.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000053.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000054.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000055.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000056.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000057.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000058.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000059.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000060.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000061.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000062.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000063.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000064.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000065.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000066.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000067.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000068.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000069.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000070.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000071.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000072.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000073.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000074.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000075.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000076.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000077.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000078.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000079.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000080.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000081.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000082.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000083.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000084.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000085.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000086.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000087.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000088.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000089.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000090.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000091.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000092.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000093.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000094.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000095.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000096.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000097.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000098.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000099.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000100.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000101.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000102.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000103.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000104.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000105.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000106.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000107.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000108.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000109.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000110.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000111.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000112.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000113.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000114.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000115.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000116.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000117.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000118.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000119.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000120.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000121.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000122.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000123.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000124.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000125.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000126.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000127.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000128.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000129.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000130.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000131.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000132.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000133.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000134.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000135.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000136.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000137.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000138.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000139.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000140.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000141.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000142.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000143.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000144.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000145.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000146.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000147.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000148.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000149.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000150.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000151.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000152.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000153.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000154.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000155.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000156.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000157.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000158.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000159.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000160.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000161.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000162.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000163.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000164.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000165.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000166.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000167.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000168.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000169.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000170.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000171.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000172.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000173.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000174.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000175.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000176.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000177.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000178.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000179.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000180.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000181.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000182.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000183.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000184.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000185.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000186.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000187.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000188.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000189.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000190.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000191.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000192.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000193.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000194.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000195.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000196.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000197.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000198.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000199.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000200.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000201.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000202.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000203.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000204.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000205.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000206.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000207.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000208.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000209.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000210.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000211.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000212.html +16 -0
- data/doc/rdoc/classes/RIO/Rio.src/M000213.html +16 -0
- data/doc/rdoc/created.rid +1 -0
- data/doc/rdoc/files/README.html +243 -0
- data/doc/rdoc/files/lib/rio/constructor_rb.html +142 -0
- data/doc/rdoc/files/lib/rio/doc/HOWTO_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/doc/INTRO_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/doc/MISC_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/doc/SYNOPSIS_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/basic_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/csv_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/dir_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/file_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/fileordir_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/grande_entry_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/grande_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/grande_stream_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/internal_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/path_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/stream_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/string_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/temp_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/test_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/if/yaml_rb.html +135 -0
- data/doc/rdoc/files/lib/rio/kernel_rb.html +142 -0
- data/doc/rdoc/files/lib/rio_rb.html +154 -0
- data/doc/rdoc/fr_class_index.html +37 -0
- data/doc/rdoc/fr_file_index.html +49 -0
- data/doc/rdoc/fr_method_index.html +241 -0
- data/doc/rdoc/index.html +24 -0
- data/doc/rdoc/rdoc-style.css +384 -0
- data/lib/rio.rb +21 -5
- data/lib/rio/constructor.rb +13 -0
- data/lib/rio/context/copying.rb +56 -0
- data/lib/rio/context/methods.rb +1 -0
- data/lib/rio/cp.rb +53 -34
- data/lib/rio/doc/HOWTO.rb +9 -3
- data/lib/rio/doc/INTRO.rb +113 -3
- data/lib/rio/ext.rb +7 -1
- data/lib/rio/ext/csv.rb +17 -8
- data/lib/rio/ext/yaml.rb +182 -0
- data/lib/rio/factory.rb +11 -14
- data/lib/rio/filter/closeoneof.rb +12 -31
- data/lib/rio/filter/gzip.rb +7 -0
- data/lib/rio/if.rb +4 -1
- data/lib/rio/if/csv.rb +36 -35
- data/lib/rio/if/grande.rb +74 -5
- data/lib/rio/if/grande_stream.rb +11 -3
- data/lib/rio/if/path.rb +9 -8
- data/lib/rio/if/yaml.rb +218 -0
- data/lib/rio/ioh.rb +5 -3
- data/lib/rio/matchrecord.rb +9 -2
- data/lib/rio/ops/dir.rb +2 -1
- data/lib/rio/ops/either.rb +9 -9
- data/lib/rio/ops/file.rb +4 -1
- data/lib/rio/ops/path.rb +26 -20
- data/lib/rio/ops/stream.rb +1 -1
- data/lib/rio/ops/stream/input.rb +31 -9
- data/lib/rio/ops/stream/output.rb +7 -2
- data/lib/rio/ops/stream/read.rb +10 -10
- data/lib/rio/ops/stream/write.rb +10 -10
- data/lib/rio/path.rb +2 -2
- data/lib/rio/path/reset.rb +1 -1
- data/lib/rio/piper.rb +123 -0
- data/lib/rio/piper/cp.rb +81 -0
- data/lib/rio/rectype.rb +2 -2
- data/lib/rio/rl/base.rb +40 -17
- data/lib/rio/rl/builder.rb +8 -47
- data/lib/rio/rl/ioi.rb +3 -2
- data/lib/rio/rl/path.rb +101 -78
- data/lib/rio/rl/pathmethods.rb +95 -0
- data/lib/rio/rl/uri.rb +41 -51
- data/lib/rio/scheme/cmdio.rb +7 -1
- data/lib/rio/scheme/cmdpipe.rb +150 -0
- data/lib/rio/scheme/ftp.rb +0 -4
- data/lib/rio/scheme/http.rb +0 -2
- data/lib/rio/scheme/strio.rb +16 -0
- data/lib/rio/scheme/temp.rb +7 -7
- data/lib/rio/state.rb +23 -5
- data/lib/rio/stream.rb +4 -0
- data/lib/rio/stream/duplex.rb +1 -0
- data/lib/rio/stream/open.rb +8 -2
- data/lib/rio/version.rb +1 -1
- data/test/{runtests_gem.rb → gem_runtests.rb} +0 -0
- data/test/methods/path.rb +12 -0
- data/test/runtests.rb +2 -0
- data/test/tc/abs.rb +29 -27
- data/test/tc/all.rb +9 -3
- data/test/tc/base.rb +31 -0
- data/test/tc/cmdpipe.rb +146 -0
- data/test/tc/copydir.rb +2 -1
- data/test/tc/create.rb +10 -0
- data/test/tc/csv.rb +12 -12
- data/test/tc/csv2.rb +2 -2
- data/test/tc/csv_columns.rb +3 -3
- data/test/tc/each_break.rb +21 -8
- data/test/tc/expand_path.rb +21 -27
- data/test/tc/misc.rb +0 -1
- data/test/tc/noqae.rb +29 -21
- data/test/tc/overload.rb +14 -11
- data/test/tc/piper.rb +146 -0
- data/test/tc/riorl.rb +26 -17
- data/test/tc/route.rb +51 -0
- data/test/tc/skip.rb +8 -6
- data/test/tc/split.rb +70 -0
- data/test/tc/temp.rb +5 -5
- data/test/tc/testcase.rb +1 -0
- data/test/tc/yaml.rb +118 -0
- metadata +481 -229
- data/doc/README_MSWIN32.txt +0 -39
- data/ex/colx.rb +0 -8
- data/ex/findinruby +0 -23
- data/ex/findruby +0 -15
- data/ex/passwd_report.rb +0 -8
- data/ex/prompt.rb +0 -25
- data/ex/rgb.txt.gz +0 -0
- data/ex/riocat +0 -35
- data/ex/riogunzip +0 -31
- data/ex/riogzip +0 -24
- data/ex/rioprompt.rb +0 -6
- data/ex/tolf +0 -11
- data/test/mswin32.rb +0 -28
data/lib/rio/if/grande_stream.rb
CHANGED
@@ -99,8 +99,9 @@ module RIO
|
|
99
99
|
#
|
100
100
|
# Returns the Rio
|
101
101
|
#
|
102
|
-
# If no args are provided, all records are selected.
|
103
|
-
#
|
102
|
+
# If no args are provided, all records are selected.
|
103
|
+
# What constitutes a record is affected by Rio#lines,Rio#bytes,
|
104
|
+
# and extensions such as Rio#csv and Rio#yaml.
|
104
105
|
#
|
105
106
|
# If args are provided they may be one or more of the following:
|
106
107
|
# Regexp:: any matching record will be iterated over by Rio#each or returned by Rio#getrec
|
@@ -110,6 +111,13 @@ module RIO
|
|
110
111
|
# Symbol:: a symbol which will _sent_ to each record, records are included unless nil or false is returned
|
111
112
|
# Array:: an array of any of above. All must match for a line to be included
|
112
113
|
#
|
114
|
+
# Any other argument type is compared with the record using its <tt>===</tt> method.
|
115
|
+
#
|
116
|
+
# If the argument is a ::Proc it may be called with one, two or three paramaters.
|
117
|
+
# 1. the record
|
118
|
+
# 2. the recno (optional)
|
119
|
+
# 3. the rio (optional)
|
120
|
+
#
|
113
121
|
# Note in the following examples that since +lines+ is the default <tt>ario.records(*args)</tt>
|
114
122
|
# is effectively the same as <tt>ario.lines(*args)</tt>.
|
115
123
|
#
|
@@ -136,7 +144,7 @@ module RIO
|
|
136
144
|
# See also Rio#records, Rio#skiplines, Rio#lines
|
137
145
|
#
|
138
146
|
# If no args are provided, no records are rejected. What constitutes a record is affected by Rio#lines,Rio#bytes,
|
139
|
-
# and extensions such as Rio#csv.
|
147
|
+
# and extensions such as Rio#csv and Rio#yaml.
|
140
148
|
#
|
141
149
|
# If args are provided they may be one or more of the following:
|
142
150
|
# Regexp:: any matching record will not be processed
|
data/lib/rio/if/path.rb
CHANGED
@@ -40,13 +40,10 @@ module RIO
|
|
40
40
|
|
41
41
|
# Returns the path for the Rio, which is defined differently for different types of Rios.
|
42
42
|
#
|
43
|
-
# For Rios representing paths on the underlying file system this
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
47
|
-
#
|
48
|
-
# For Rios that have a URI representation this returns URI#path
|
49
|
-
#
|
43
|
+
# For Rios representing paths on the underlying file system this is an alias
|
44
|
+
# Rio#fspath. For Rios with paths that are not on the file system this is an
|
45
|
+
# alias for Rio#urlpath.
|
46
|
+
#
|
50
47
|
# Otherwise this returns nil.
|
51
48
|
#
|
52
49
|
def path(*args) target.path(*args) end
|
@@ -72,6 +69,10 @@ module RIO
|
|
72
69
|
# Returns nil if the Rio is not on the filesystem (i.e. stdin: or http: Rios)
|
73
70
|
def fspath(*args) target.fspath(*args) end
|
74
71
|
|
72
|
+
# Returns the path portion of the URL representation of the rio
|
73
|
+
# Returns nil if the Rio URL has no path (i.e. stdin: or http: Rios)
|
74
|
+
def urlpath(*args) target.urlpath(*args) end
|
75
|
+
|
75
76
|
# Proxy for File#expand_path
|
76
77
|
#
|
77
78
|
# Converts a pathname to an absolute pathname.
|
@@ -98,7 +99,7 @@ module RIO
|
|
98
99
|
# rio('/tmp/afile').rel('/tmp') #=> rio('afile')
|
99
100
|
# rio('zippy/afile').rel('zippy') #=> rio('afile')
|
100
101
|
#
|
101
|
-
def rel(other) target.rel(other) end
|
102
|
+
def rel(other=nil) target.rel(other) end
|
102
103
|
|
103
104
|
|
104
105
|
# Returns a new Rio whose path is the base path that is used by
|
data/lib/rio/if/yaml.rb
ADDED
@@ -0,0 +1,218 @@
|
|
1
|
+
#--
|
2
|
+
# ===============================================================================
|
3
|
+
# Copyright (c) 2005, Christopher Kleckner
|
4
|
+
# All rights reserved
|
5
|
+
#
|
6
|
+
# This file is part of the Rio library for ruby.
|
7
|
+
#
|
8
|
+
# Rio is free software; you can redistribute it and/or modify
|
9
|
+
# it under the terms of the GNU General Public License as published by
|
10
|
+
# the Free Software Foundation; either version 2 of the License, or
|
11
|
+
# (at your option) any later version.
|
12
|
+
#
|
13
|
+
# Rio is distributed in the hope that it will be useful,
|
14
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
+
# GNU General Public License for more details.
|
17
|
+
#
|
18
|
+
# You should have received a copy of the GNU General Public License
|
19
|
+
# along with Rio; if not, write to the Free Software
|
20
|
+
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
21
|
+
# ===============================================================================
|
22
|
+
#++
|
23
|
+
#
|
24
|
+
# To create the documentation for Rio run the command
|
25
|
+
# rake rdoc
|
26
|
+
# from the distribution directory. Then point your browser at the 'doc/rdoc' directory.
|
27
|
+
#
|
28
|
+
# Suggested Reading
|
29
|
+
# * RIO::Doc::SYNOPSIS
|
30
|
+
# * RIO::Doc::INTRO
|
31
|
+
# * RIO::Doc::HOWTO
|
32
|
+
# * RIO::Rio
|
33
|
+
#
|
34
|
+
# <b>Rio is pre-alpha software.
|
35
|
+
# The documented interface and behavior is subject to change without notice.</b>
|
36
|
+
|
37
|
+
|
38
|
+
module RIO
|
39
|
+
module IF
|
40
|
+
module YAML
|
41
|
+
#def file() target.file end
|
42
|
+
#def dir() target.dir end
|
43
|
+
|
44
|
+
# Puts a Rio in YAML mode.
|
45
|
+
#
|
46
|
+
#
|
47
|
+
# Rio uses the YAML class from the Ruby standard library to provide
|
48
|
+
# support for reading and writing YAML files. Normally using
|
49
|
+
# <tt>(skip)records</tt> is identical to <tt>(skip)lines</tt> because
|
50
|
+
# while +records+ only selects and does not specify the record-type,
|
51
|
+
# +lines+ is the default.
|
52
|
+
#
|
53
|
+
# The YAML extension distingishes between items selected using
|
54
|
+
# Rio#records, Rio#rows and Rio#lines. Rio returns objects loaded via
|
55
|
+
# YAML#load when +records+ is used; returns the YAML text as a String
|
56
|
+
# when +rows+ is used; and returns lines as Strings as normal when
|
57
|
+
# +lines+ is used. +records+ is the default. In yaml-mode,
|
58
|
+
# <tt>(skip)records</tt> can be called as <tt>(skip)objects</tt> and
|
59
|
+
# <tt>(skip)rows</tt> can be called as <tt>(skip)documents</tt>
|
60
|
+
#
|
61
|
+
# To read a single YAML document, Rio provides #getobj and #load For
|
62
|
+
# example, consider the following partial 'database.yml' from the rails
|
63
|
+
# distribution:
|
64
|
+
#
|
65
|
+
# development:
|
66
|
+
# adapter: mysql
|
67
|
+
# database: rails_development
|
68
|
+
#
|
69
|
+
# test:
|
70
|
+
# adapter: mysql
|
71
|
+
# database: rails_test
|
72
|
+
#
|
73
|
+
#
|
74
|
+
# To get the object represented in the yaml file:
|
75
|
+
#
|
76
|
+
# rio('database.yml').yaml.load
|
77
|
+
# ==>{"development"=>{"adapter"=>"mysql", "database"=>"rails_development"},
|
78
|
+
# "test"=>{"adapter"=>"mysql", "database"=>"rails_test"}}
|
79
|
+
#
|
80
|
+
# Or one could read parts of the file like so:
|
81
|
+
#
|
82
|
+
# rio('database.yml').yaml.getobj['development']['database']
|
83
|
+
# ==>"rails_development"
|
84
|
+
#
|
85
|
+
# Single objects can be written using #putobj and #putobj!
|
86
|
+
# which is aliased to #dump
|
87
|
+
#
|
88
|
+
# anobject = {
|
89
|
+
# 'production' => {
|
90
|
+
# 'adapter' => 'mysql',
|
91
|
+
# 'database' => 'rails_production',
|
92
|
+
# }
|
93
|
+
# }
|
94
|
+
# rio('afile.yaml').yaml.dump(anobject)
|
95
|
+
#
|
96
|
+
# The YAML extension changes the way the grande copy operators interpret
|
97
|
+
# their argument. Rio#< (copy-from) and Rio#<< (append-from) treat an
|
98
|
+
# array as an array of objects which are converted using their #to_yaml
|
99
|
+
# method before writing.
|
100
|
+
#
|
101
|
+
# rio('afile.yaml').yaml < [obj1, obj2, obj3]
|
102
|
+
#
|
103
|
+
# Because of this, copying an ::Array must be done like this:
|
104
|
+
#
|
105
|
+
# rio('afile.yaml').yaml < [anarray]
|
106
|
+
#
|
107
|
+
# If their argument is a Rio or ::IO it is iterate through as normal,
|
108
|
+
# with each record converted using its to_yaml method.
|
109
|
+
#
|
110
|
+
# For all other objects, the result of their +to_yaml+ operator is
|
111
|
+
# simply written.
|
112
|
+
#
|
113
|
+
# rio('afile.yaml').yaml < anobject
|
114
|
+
#
|
115
|
+
# Rio#> (copy-to) and Rio#>> (append-to) will fill an array with with
|
116
|
+
# all selected YAML documents in the Rio. For non-arrays, the yaml text
|
117
|
+
# is copied. (This may change if a useful reasonable alternative can be
|
118
|
+
# found) rio('afile.yaml').yaml > anarray # load all YAML documents from
|
119
|
+
# 'afile.yaml'
|
120
|
+
#
|
121
|
+
# Single objects can be written using Rio#putrec (aliased to Rio#putobj
|
122
|
+
# and Rio#dump)
|
123
|
+
#
|
124
|
+
# rio('afile.yaml').yaml.putobj(anobject)
|
125
|
+
#
|
126
|
+
# Single objects can be loaded using Rio#getrec (aliase to Rio#getobj
|
127
|
+
# and Rio#load)
|
128
|
+
#
|
129
|
+
# anobject = rio('afile.yaml').yaml.getobj
|
130
|
+
#
|
131
|
+
# Note that other than this redefinition of what a record is and how the
|
132
|
+
# copy operators interpret their argument, a Rio in yaml-mode is just
|
133
|
+
# like any other Rio. And all the things you can do with any Rio come
|
134
|
+
# for free. They can be iterated over using #each and read into an
|
135
|
+
# array using #[] just like any other Rio. All the selection criteria
|
136
|
+
# are identical also.
|
137
|
+
#
|
138
|
+
# Get the first three objects into an array:
|
139
|
+
#
|
140
|
+
# array_of_objects = rio('afile.yaml').yaml[0..2]
|
141
|
+
#
|
142
|
+
# Iterate over only YAML documents that are a kind_of ::Hash use:
|
143
|
+
#
|
144
|
+
# rio('afile.yaml').yaml(::Hash) {|ahash| ...}
|
145
|
+
#
|
146
|
+
# This takes advantage of the fact that the default for matching records
|
147
|
+
# is <tt>===</tt>
|
148
|
+
#
|
149
|
+
# Selecting records using a Proc can be used as normal:
|
150
|
+
#
|
151
|
+
# anarray = rio('afile.yaml').yaml(proc{|anobject| ...}).to_a
|
152
|
+
#
|
153
|
+
# One could even use the copy operator to convert a CSV file to a YAML
|
154
|
+
# representation of the same data:
|
155
|
+
#
|
156
|
+
# rio('afile.yaml').yaml < rio('afile.csv').csv
|
157
|
+
#
|
158
|
+
def yaml(&block)
|
159
|
+
target.yaml(&block);
|
160
|
+
self
|
161
|
+
end
|
162
|
+
|
163
|
+
|
164
|
+
# Queries if the Rio is in yaml-mode. See #yaml
|
165
|
+
def yaml?() target.yaml? end
|
166
|
+
|
167
|
+
|
168
|
+
# Select objects from a YAML file. See #yaml and RIO::Doc::INTRO
|
169
|
+
def objects(*selectors,&block) target.objects(*selectors,&block); self end
|
170
|
+
|
171
|
+
|
172
|
+
# Reject objects from a YAML file. See #yaml and RIO::Doc::INTRO
|
173
|
+
def skipobjects(*selectors,&block) target.skipobjects(*selectors,&block); self end
|
174
|
+
|
175
|
+
|
176
|
+
# Select documents from a YAML file. See #yaml and RIO::Doc::INTRO
|
177
|
+
def documents(*selectors,&block) target.documents(*selectors,&block); self end
|
178
|
+
|
179
|
+
|
180
|
+
# Reject documents from a YAML file. Calls #skiprows. See #yaml and RIO::Doc::INTRO
|
181
|
+
def skipdocuments(*selectors,&block) target.skipdocuments(*selectors,&block); self end
|
182
|
+
|
183
|
+
# Calls YAML.load.
|
184
|
+
#
|
185
|
+
# Loads a single YAML object from the stream referenced by the Rio
|
186
|
+
#
|
187
|
+
# rio('database.yml').yaml.getobj
|
188
|
+
#
|
189
|
+
# See #yaml and RIO::Doc::INTRO
|
190
|
+
#
|
191
|
+
def getobj() target.getobj() end
|
192
|
+
|
193
|
+
# Alias for #getobj
|
194
|
+
def load() target.load() end
|
195
|
+
|
196
|
+
# Alias for #getrec
|
197
|
+
#def getdoc() target.getdoc() end
|
198
|
+
|
199
|
+
|
200
|
+
# Calls YAML.dump, leaving the Rio open.
|
201
|
+
def putobj(obj) target.putobj(obj); self end
|
202
|
+
|
203
|
+
# Dumps an object to a Rio as with Rio#putobj, and closes the Rio.
|
204
|
+
#
|
205
|
+
# rio('afile.yaml').yaml.putobj!(anobject)
|
206
|
+
#
|
207
|
+
# is identical to
|
208
|
+
#
|
209
|
+
# rio('afile.yaml').yaml.putobj(anobject).close
|
210
|
+
#
|
211
|
+
def putobj!(obj) target.putobj!(obj); self end
|
212
|
+
|
213
|
+
# Alias for Rio#putobj!
|
214
|
+
def dump(obj) target.dump(obj); self end
|
215
|
+
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
data/lib/rio/ioh.rb
CHANGED
@@ -44,10 +44,11 @@ module RIO
|
|
44
44
|
def initialize(ios,*args)
|
45
45
|
@ios = ios
|
46
46
|
end
|
47
|
-
def initialize_copy(
|
48
|
-
#p callstr('ioh:initialize_copy'
|
47
|
+
def initialize_copy(other)
|
48
|
+
#p callstr('ioh:initialize_copy',other)
|
49
49
|
super
|
50
|
-
|
50
|
+
#p @ios
|
51
|
+
@ios = other.ios.clone unless other.ios.nil?
|
51
52
|
end
|
52
53
|
def callstr(func,*args)
|
53
54
|
self.class.to_s+'['+self.to_s+']'+'.'+func.to_s+'('+args.join(',')+')'
|
@@ -96,6 +97,7 @@ module RIO
|
|
96
97
|
:fileno,
|
97
98
|
:close_read,:close_write,
|
98
99
|
:fsync,:sync,:sync=,:fcntl,:ioctl)
|
100
|
+
|
99
101
|
def method_missing(sym,*args,&block)
|
100
102
|
#p callstr('method_missing',sym,*args)
|
101
103
|
handle.__send__(sym,*args,&block)
|
data/lib/rio/matchrecord.rb
CHANGED
@@ -84,7 +84,8 @@ module RIO
|
|
84
84
|
end
|
85
85
|
def match?(val,recno)
|
86
86
|
#p "match?(#{val},#{recno}) select_arg=#{@select_arg}"
|
87
|
-
|
87
|
+
args = [val,recno,@therio]
|
88
|
+
@select_arg.call(*args[0,@select_arg.arity])
|
88
89
|
end
|
89
90
|
end
|
90
91
|
class Symbol < Base
|
@@ -107,6 +108,12 @@ module RIO
|
|
107
108
|
@select_arg.all? { |sel| sel.match?(val,recno) }
|
108
109
|
end
|
109
110
|
end
|
111
|
+
class Case < Base
|
112
|
+
def match?(val,recno)
|
113
|
+
#p "match?(#{val},#{recno}) select_arg=#{@select_arg}"
|
114
|
+
@select_arg === val
|
115
|
+
end
|
116
|
+
end
|
110
117
|
def create(therio,arg)
|
111
118
|
case arg
|
112
119
|
when ::Regexp
|
@@ -122,7 +129,7 @@ module RIO
|
|
122
129
|
when ::Array
|
123
130
|
Match::Record::And.new(arg,therio)
|
124
131
|
else
|
125
|
-
|
132
|
+
Match::Record::Case.new(arg)
|
126
133
|
end
|
127
134
|
end
|
128
135
|
module_function :create
|
data/lib/rio/ops/dir.rb
CHANGED
@@ -38,6 +38,8 @@
|
|
38
38
|
require 'extensions/object'
|
39
39
|
require 'rio/grande'
|
40
40
|
require 'rio/cp'
|
41
|
+
require 'rio/ops/either'
|
42
|
+
|
41
43
|
module RIO
|
42
44
|
module Impl
|
43
45
|
module U
|
@@ -73,7 +75,6 @@ module RIO
|
|
73
75
|
module Ops
|
74
76
|
module Dir
|
75
77
|
module ExistOrNot
|
76
|
-
require 'rio/ops/either'
|
77
78
|
include ::RIO::Ops::FileOrDir::ExistOrNot
|
78
79
|
end
|
79
80
|
end
|
data/lib/rio/ops/either.rb
CHANGED
@@ -53,7 +53,15 @@ module RIO
|
|
53
53
|
end
|
54
54
|
module Ops
|
55
55
|
module FileOrDir
|
56
|
+
module ExistOrNot
|
57
|
+
end
|
58
|
+
module NonExisting
|
59
|
+
include ExistOrNot
|
60
|
+
end
|
61
|
+
|
56
62
|
module Existing
|
63
|
+
include ExistOrNot
|
64
|
+
|
57
65
|
def chmod(mod) rtn_self { Impl::U.chmod(mod,fspath) } end
|
58
66
|
def chown(owner,group) rtn_self { Impl::U.chown(owner,group,fspath) } end
|
59
67
|
def must_exist() self end
|
@@ -107,7 +115,7 @@ module RIO
|
|
107
115
|
end
|
108
116
|
end
|
109
117
|
|
110
|
-
require '
|
118
|
+
require 'pathname'
|
111
119
|
def realpath
|
112
120
|
new_rio(Impl::U.realpath(fspath))
|
113
121
|
end
|
@@ -117,14 +125,6 @@ module RIO
|
|
117
125
|
|
118
126
|
end
|
119
127
|
|
120
|
-
module ExistOrNot
|
121
|
-
end
|
122
|
-
module Existing
|
123
|
-
include ExistOrNot
|
124
|
-
end
|
125
|
-
module NonExisting
|
126
|
-
include ExistOrNot
|
127
|
-
end
|
128
128
|
end
|
129
129
|
end
|
130
130
|
end
|
data/lib/rio/ops/file.rb
CHANGED
@@ -36,6 +36,9 @@
|
|
36
36
|
|
37
37
|
|
38
38
|
require 'rio/cp'
|
39
|
+
require 'rio/piper/cp'
|
40
|
+
require 'rio/ops/either'
|
41
|
+
|
39
42
|
module RIO
|
40
43
|
module Impl
|
41
44
|
module U
|
@@ -58,7 +61,6 @@ module RIO
|
|
58
61
|
module Ops
|
59
62
|
module File
|
60
63
|
module ExistOrNot
|
61
|
-
require 'rio/ops/either'
|
62
64
|
include FileOrDir::ExistOrNot
|
63
65
|
end
|
64
66
|
module Existing
|
@@ -66,6 +68,7 @@ module RIO
|
|
66
68
|
include FileOrDir::Existing
|
67
69
|
include Cp::File::Output
|
68
70
|
include Cp::File::Input
|
71
|
+
include Piper::Cp::Input
|
69
72
|
|
70
73
|
def selective?
|
71
74
|
%w[stream_sel stream_nosel].any? { |k| cx.has_key?(k) }
|
data/lib/rio/ops/path.rb
CHANGED
@@ -81,7 +81,8 @@ module RIO
|
|
81
81
|
module URI
|
82
82
|
def abs(base=nil)
|
83
83
|
if base.nil?
|
84
|
-
new_rio(rl.abs)
|
84
|
+
nrio = new_rio(rl.abs)
|
85
|
+
nrio
|
85
86
|
else
|
86
87
|
new_rio(rl,ensure_rio(base).abs.to_uri).abs
|
87
88
|
end
|
@@ -93,8 +94,15 @@ module RIO
|
|
93
94
|
def route_from(other)
|
94
95
|
new_rio(rl.abs.route_from(ensure_rio(other).rl.abs))
|
95
96
|
end
|
96
|
-
def rel(other)
|
97
|
-
|
97
|
+
def rel(other=nil)
|
98
|
+
if other.nil?
|
99
|
+
base = self.abs.dirname
|
100
|
+
else
|
101
|
+
new_rio(self.rl.abs.route_from(ensure_rio(other).rl.abs))
|
102
|
+
end
|
103
|
+
base = other.nil? ? self.abs : ensure_rio(other).dup
|
104
|
+
base += '/' if base.directory? and base.to_s[-1] != '/'
|
105
|
+
route_from(base)
|
98
106
|
end
|
99
107
|
# def rel(other=nil)
|
100
108
|
# if other.nil?
|
@@ -131,15 +139,9 @@ module RIO
|
|
131
139
|
end
|
132
140
|
def split()
|
133
141
|
require 'rio/to_rio'
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
rooturi = rl.uri.clone
|
138
|
-
rooturi.path = '/'
|
139
|
-
parts[0] = rooturi
|
140
|
-
end
|
141
|
-
# give each rio the correct base
|
142
|
-
parts.inject([rio(parts.shift)]) { |ary,d| ary << rio(d,{ 'base' => ary[-1].abs.to_url+'/'} ) }.extend(ToRio::Array)
|
142
|
+
parts = self.rl.split
|
143
|
+
# map to rios and extend the array with to_array
|
144
|
+
parts.map { |arl| rio(arl) }.extend(ToRio::Array)
|
143
145
|
end
|
144
146
|
def basename(*args)
|
145
147
|
unless args.empty?
|
@@ -148,22 +150,26 @@ module RIO
|
|
148
150
|
end
|
149
151
|
#p self.ext?.inspect
|
150
152
|
fn = Impl::U.basename(rl.path_no_slash,self.ext?)
|
151
|
-
new_rio(fn,{
|
153
|
+
new_rio(fn,{:base => _calc_base()})
|
152
154
|
end
|
153
155
|
def filename()
|
154
156
|
fn = Impl::U.basename(rl.path_no_slash)
|
155
|
-
new_rio(fn,{
|
157
|
+
new_rio(fn,{:base => _calc_base()})
|
156
158
|
end
|
157
159
|
def _calc_base()
|
158
160
|
dn = Impl::U.dirname(rl.path_no_slash)
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
161
|
+
dn[0] == ?/ ? dn : self.base.to_url + dn + '/' #'
|
162
|
+
# if dn[0] == ?/
|
163
|
+
# dn
|
164
|
+
# else
|
165
|
+
# self.base.to_url + dn + '/'
|
166
|
+
# end
|
164
167
|
end
|
168
|
+
private :_calc_base
|
169
|
+
|
165
170
|
def dirname(*args)
|
166
|
-
new_rio(Impl::U.dirname(rl.path_no_slash,*args))
|
171
|
+
#new_rio(Impl::U.dirname(rl.path_no_slash,*args))
|
172
|
+
new_rio(rl.dirname)
|
167
173
|
end
|
168
174
|
|
169
175
|
def sub(re,arg)
|