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/state.rb
CHANGED
@@ -41,7 +41,7 @@ require 'rio/context/methods'
|
|
41
41
|
require 'rio/ext'
|
42
42
|
require 'rio/symantics'
|
43
43
|
require 'rio/filter'
|
44
|
-
|
44
|
+
|
45
45
|
module RIO
|
46
46
|
|
47
47
|
|
@@ -55,7 +55,7 @@ module RIO
|
|
55
55
|
# * and some basic error handling stubs
|
56
56
|
class Base
|
57
57
|
KIOSYMS = [:gets,:open,:readline,:readlines,:chop,:to_a,:putc,:puts,:print,:printf,:split,
|
58
|
-
:=~,:===,:==,:eql?,:sub,:sub!,:gsub,:gsub
|
58
|
+
:=~,:===,:==,:eql?,:sub,:sub!,:gsub,:gsub!,:load]
|
59
59
|
@@kernel_cleaned ||= KIOSYMS.each { |sym| undef_method(sym) }
|
60
60
|
end
|
61
61
|
|
@@ -79,7 +79,7 @@ module RIO
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def initialize_copy(*args)
|
82
|
-
#p callstr('
|
82
|
+
#p callstr('initialize_copy',args[0].inspect)
|
83
83
|
super
|
84
84
|
@rl = @rl.clone unless @rl.nil?
|
85
85
|
@cx = @cx.clone unless @cx.nil?
|
@@ -89,7 +89,12 @@ module RIO
|
|
89
89
|
def self.new_r(riorl)
|
90
90
|
new.init(riorl,Cx::Vars.new( { 'closeoneof' => true, 'closeoncopy' => true } ))
|
91
91
|
end
|
92
|
-
|
92
|
+
def clone_rio()
|
93
|
+
cp = Rio.new(self.rl)
|
94
|
+
cp.cx = self.cx
|
95
|
+
cp.ioh = self.ioh.clone unless self.ioh.nil?
|
96
|
+
cp
|
97
|
+
end
|
93
98
|
def init(riorl,cntx,iohandle=nil)
|
94
99
|
@rl = riorl
|
95
100
|
@cx = cntx
|
@@ -106,6 +111,11 @@ module RIO
|
|
106
111
|
init(other.rl,other.cx,other.ioh)
|
107
112
|
end
|
108
113
|
|
114
|
+
alias :ior :ioh
|
115
|
+
alias :iow :ioh
|
116
|
+
|
117
|
+
|
118
|
+
|
109
119
|
# Section: State Switching
|
110
120
|
|
111
121
|
# the method for changing states
|
@@ -170,7 +180,7 @@ module RIO
|
|
170
180
|
|
171
181
|
|
172
182
|
extend Forwardable
|
173
|
-
def_instance_delegators(:rl,:path,:to_s,:fspath,:length)
|
183
|
+
def_instance_delegators(:rl,:path,:to_s,:fspath,:urlpath,:length)
|
174
184
|
|
175
185
|
def ==(other) @rl == other end
|
176
186
|
def ===(other) self == other end
|
@@ -200,6 +210,14 @@ module RIO
|
|
200
210
|
return arg0 if arg0.kind_of?(::RIO::Rio)
|
201
211
|
new_rio(arg0)
|
202
212
|
end
|
213
|
+
def ensure_cmd_rio(arg)
|
214
|
+
case arg
|
215
|
+
when ::String then new_rio(:cmdio,arg)
|
216
|
+
when ::Fixnum then new_rio(arg)
|
217
|
+
when Rio then arg.clone
|
218
|
+
else ensure_rio(arg)
|
219
|
+
end
|
220
|
+
end
|
203
221
|
|
204
222
|
include Symantics
|
205
223
|
|
data/lib/rio/stream.rb
CHANGED
@@ -43,6 +43,7 @@ require 'rio/ops/stream/output'
|
|
43
43
|
require 'rio/ext'
|
44
44
|
|
45
45
|
require 'rio/filter/gzip'
|
46
|
+
#require 'rio/filter/yaml'
|
46
47
|
#require 'rio/filter/chomp'
|
47
48
|
#require 'rio/filter/strip'
|
48
49
|
require 'rio/filter/closeoneof'
|
@@ -116,10 +117,12 @@ module RIO
|
|
116
117
|
end
|
117
118
|
|
118
119
|
def add_extensions()
|
120
|
+
#p callstr('add_extensions')
|
119
121
|
Ext::Input.add_extensions(self)
|
120
122
|
end
|
121
123
|
def add_filters
|
122
124
|
add_filter(Filter::GZipRead) if gzip?
|
125
|
+
#add_filter(Filter::YAML) if yaml?
|
123
126
|
add_line_filters()
|
124
127
|
if closeoneof?
|
125
128
|
add_filter(Filter::CloseOnEOF)
|
@@ -143,6 +146,7 @@ module RIO
|
|
143
146
|
end
|
144
147
|
def add_filters
|
145
148
|
add_filter(Filter::GZipWrite) if gzip?
|
149
|
+
#add_filter(Filter::YAML) if yaml?
|
146
150
|
self
|
147
151
|
end
|
148
152
|
|
data/lib/rio/stream/duplex.rb
CHANGED
data/lib/rio/stream/open.rb
CHANGED
@@ -40,6 +40,7 @@ require 'rio/stream/base'
|
|
40
40
|
require 'rio/ops/stream'
|
41
41
|
require 'rio/ops/path'
|
42
42
|
require 'rio/cp'
|
43
|
+
require 'rio/piper/cp'
|
43
44
|
|
44
45
|
module RIO
|
45
46
|
module Stream
|
@@ -50,6 +51,7 @@ module RIO
|
|
50
51
|
#include Ops::Path::Query
|
51
52
|
include Cp::Open::Output
|
52
53
|
include Cp::Open::Input
|
54
|
+
include Piper::Cp::Input
|
53
55
|
|
54
56
|
def check?() true end
|
55
57
|
|
@@ -73,6 +75,7 @@ module RIO
|
|
73
75
|
end
|
74
76
|
|
75
77
|
protected :open_
|
78
|
+
|
76
79
|
end
|
77
80
|
end
|
78
81
|
end
|
@@ -87,7 +90,7 @@ module RIO
|
|
87
90
|
end
|
88
91
|
OUTPUT_SYMS = [:print,:printf,:puts,:putc,:write,
|
89
92
|
:print!,:printf!,:puts!,:putc!,:write!,
|
90
|
-
:put_,:putrec
|
93
|
+
:put_,:putrec,:putrec!,:<,:<<
|
91
94
|
].build_hash { |sym| [sym.to_s,1] }
|
92
95
|
def sym_state(sym,im,om)
|
93
96
|
if OUTPUT_SYMS[sym.to_s] or RIO::Ext::OUTPUT_SYMS[sym.to_s]
|
@@ -140,11 +143,14 @@ module RIO
|
|
140
143
|
# TEMP
|
141
144
|
def dir?() false end
|
142
145
|
def stream_state(cl)
|
146
|
+
#p callstr('stream_state',cl)
|
143
147
|
#p "LOOP: retry:#{cx['retrystate']} => #{cl}"
|
144
148
|
return nil if cx['retrystate'] == cl
|
145
149
|
cx['retrystate'] = cl
|
146
150
|
|
147
|
-
become(cl).add_rec_methods.add_filters.
|
151
|
+
become(cl).add_rec_methods.add_extensions.add_filters.setup
|
152
|
+
#become(cl).add_rec_methods.add_filters.add_extensions.setup
|
153
|
+
#become(cl).add_extensions.add_rec_methods.add_filters.setup
|
148
154
|
#next_state.extend(Ops::Symlink::Existing) if symlink?
|
149
155
|
#next_state
|
150
156
|
end
|
data/lib/rio/version.rb
CHANGED
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/usr/local/bin/ruby
|
2
|
+
|
3
|
+
require 'rio'
|
4
|
+
rio('/a/b/c').path
|
5
|
+
rio('b/c').path
|
6
|
+
rio('C:/b/c').path
|
7
|
+
rio('//ahost/a/b').path
|
8
|
+
rio('file://ahost/a/b').path
|
9
|
+
rio('file:///a/b').path
|
10
|
+
rio('file://localhost/a/b').path
|
11
|
+
rio('http://ahost/index.html').path
|
12
|
+
rio('stdin:').path
|
data/test/runtests.rb
CHANGED
data/test/tc/abs.rb
CHANGED
@@ -3,10 +3,6 @@ if $0 == __FILE__
|
|
3
3
|
Dir.chdir File.dirname(__FILE__)+'/../'
|
4
4
|
$:.unshift File.expand_path('../lib/')
|
5
5
|
end
|
6
|
-
if $0 == __FILE__
|
7
|
-
Dir.chdir File.dirname(__FILE__)+'/../'
|
8
|
-
$:.unshift File.expand_path('../lib/')
|
9
|
-
end
|
10
6
|
require 'rio'
|
11
7
|
require 'test/unit'
|
12
8
|
require 'test/unit/testsuite'
|
@@ -22,7 +18,7 @@ class TC_RIO_abs < Test::Unit::TestCase
|
|
22
18
|
hduri = ::URI.parse(hdurl)
|
23
19
|
hd = rio(hduri)
|
24
20
|
assert_equal('/',hd.path)
|
25
|
-
|
21
|
+
assert_nil(hd.fspath)
|
26
22
|
assert_equal('http',hd.scheme)
|
27
23
|
assert_equal('localhost',hd.host)
|
28
24
|
assert_equal(true,hd.abs?)
|
@@ -32,7 +28,7 @@ class TC_RIO_abs < Test::Unit::TestCase
|
|
32
28
|
hdurl = 'http://localhost/'
|
33
29
|
hd = rio(hdurl)
|
34
30
|
assert_equal('/',hd.path)
|
35
|
-
|
31
|
+
assert_nil(hd.fspath)
|
36
32
|
assert_equal('http',hd.scheme)
|
37
33
|
assert_equal('localhost',hd.host)
|
38
34
|
assert_equal(true,hd.abs?)
|
@@ -43,7 +39,7 @@ class TC_RIO_abs < Test::Unit::TestCase
|
|
43
39
|
hduri = ::URI.parse(hdurl)
|
44
40
|
hd = rio(hduri)
|
45
41
|
assert_equal('/',hd.path)
|
46
|
-
|
42
|
+
assert_nil(hd.fspath)
|
47
43
|
assert_equal('http',hd.scheme)
|
48
44
|
assert_equal('localhost',hd.host)
|
49
45
|
assert_equal(true,hd.abs?)
|
@@ -53,7 +49,7 @@ class TC_RIO_abs < Test::Unit::TestCase
|
|
53
49
|
hdurl = 'http://localhost'
|
54
50
|
hd = rio(hdurl)
|
55
51
|
assert_equal('/',hd.path)
|
56
|
-
|
52
|
+
assert_nil(hd.fspath)
|
57
53
|
assert_equal('http',hd.scheme)
|
58
54
|
assert_equal('localhost',hd.host)
|
59
55
|
assert_equal(true,hd.abs?)
|
@@ -63,7 +59,7 @@ class TC_RIO_abs < Test::Unit::TestCase
|
|
63
59
|
hdurl = 'http://localhost/rio/hw.html'
|
64
60
|
hd = rio(hdurl)
|
65
61
|
assert_equal('/rio/hw.html',hd.path)
|
66
|
-
|
62
|
+
assert_nil(hd.fspath)
|
67
63
|
assert_equal('http',hd.scheme)
|
68
64
|
assert_equal('localhost',hd.host)
|
69
65
|
assert_equal(true,hd.abs?)
|
@@ -169,12 +165,12 @@ class TC_RIO_abs < Test::Unit::TestCase
|
|
169
165
|
hdurl = '/tmp/'
|
170
166
|
hd = rio(hdurl)
|
171
167
|
assert_equal('/tmp/',hd.path)
|
172
|
-
assert_equal('/tmp',hd.fspath)
|
168
|
+
assert_equal('/tmp/',hd.fspath)
|
173
169
|
assert_equal('file',hd.scheme)
|
174
170
|
assert_equal('',hd.host)
|
175
171
|
assert_equal(true,hd.abs?)
|
176
172
|
assert_equal(true,hd.absolute?)
|
177
|
-
assert_equal(hdurl
|
173
|
+
assert_equal(hdurl,hd.abs.to_s)
|
178
174
|
assert_equal('file:///tmp/',hd.to_url)
|
179
175
|
assert_equal('file:///tmp/',hd.abs.to_url)
|
180
176
|
|
@@ -188,23 +184,24 @@ class TC_RIO_abs < Test::Unit::TestCase
|
|
188
184
|
assert_nil(hd.host)
|
189
185
|
assert_equal(false,hd.abs?)
|
190
186
|
assert_equal(false,hd.absolute?)
|
191
|
-
cwd =
|
187
|
+
cwd = ::Dir.getwd
|
192
188
|
assert_equal(cwd+'/'+hdurl,hd.abs.to_s)
|
193
189
|
assert_equal('path:qp',hd.to_url)
|
194
|
-
|
190
|
+
|
191
|
+
assert_equal('file://'+RIO::RL.fs2url(cwd)+'/'+hdurl,hd.abs.to_url)
|
195
192
|
|
196
193
|
hdurl = 'qp/'
|
197
194
|
hd = rio(hdurl)
|
198
195
|
assert_equal('qp/',hd.path)
|
199
|
-
assert_equal('qp',hd.fspath)
|
196
|
+
assert_equal('qp/',hd.fspath)
|
200
197
|
assert_equal('path',hd.scheme)
|
201
198
|
assert_nil(hd.host)
|
202
199
|
assert_equal(false,hd.abs?)
|
203
200
|
assert_equal(false,hd.absolute?)
|
204
|
-
cwd =
|
205
|
-
assert_equal(cwd+'/'+hdurl
|
201
|
+
cwd = ::Dir.getwd
|
202
|
+
assert_equal(cwd+'/'+hdurl,hd.abs.to_s)
|
206
203
|
assert_equal('path:qp/',hd.to_url)
|
207
|
-
assert_equal('file://'+cwd+'/'+hdurl,hd.abs.to_url)
|
204
|
+
assert_equal('file://'+RIO::RL.fs2url(cwd)+'/'+hdurl,hd.abs.to_url)
|
208
205
|
|
209
206
|
# case qp dir exists
|
210
207
|
rio('qp').mkdir
|
@@ -217,23 +214,23 @@ class TC_RIO_abs < Test::Unit::TestCase
|
|
217
214
|
assert_nil(hd.host)
|
218
215
|
assert_equal(false,hd.abs?)
|
219
216
|
assert_equal(false,hd.absolute?)
|
220
|
-
cwd =
|
217
|
+
cwd = ::Dir.getwd
|
221
218
|
assert_equal(cwd+'/'+hdurl,hd.abs.to_s)
|
222
|
-
|
223
|
-
|
219
|
+
assert_equal('path:qp',hd.to_url)
|
220
|
+
assert_equal('file://'+RIO::RL.fs2url(cwd)+'/'+hdurl,hd.abs.to_url)
|
224
221
|
|
225
222
|
hdurl = 'qp/'
|
226
223
|
hd = rio(hdurl)
|
227
224
|
assert_equal('qp/',hd.path)
|
228
|
-
assert_equal('qp',hd.fspath)
|
225
|
+
assert_equal('qp/',hd.fspath)
|
229
226
|
assert_equal('path',hd.scheme)
|
230
227
|
assert_nil(hd.host)
|
231
228
|
assert_equal(false,hd.abs?)
|
232
229
|
assert_equal(false,hd.absolute?)
|
233
|
-
cwd =
|
234
|
-
assert_equal(cwd+'/'+hdurl
|
230
|
+
cwd = ::Dir.getwd
|
231
|
+
assert_equal(cwd+'/'+hdurl,hd.abs.to_s)
|
235
232
|
assert_equal('path:qp/',hd.to_url)
|
236
|
-
assert_equal('file://'+cwd+'/'+hdurl,hd.abs.to_url)
|
233
|
+
assert_equal('file://'+RIO::RL.fs2url(cwd)+'/'+hdurl,hd.abs.to_url)
|
237
234
|
|
238
235
|
# case qp file exists
|
239
236
|
rio('qp').rmtree.touch
|
@@ -246,10 +243,10 @@ class TC_RIO_abs < Test::Unit::TestCase
|
|
246
243
|
assert_nil(hd.host)
|
247
244
|
assert_equal(false,hd.abs?)
|
248
245
|
assert_equal(false,hd.absolute?)
|
249
|
-
cwd =
|
246
|
+
cwd = ::Dir.getwd
|
250
247
|
assert_equal(cwd+'/'+hdurl,hd.abs.to_s)
|
251
248
|
assert_equal('path:qp',hd.to_url)
|
252
|
-
assert_equal('file://'+cwd+'/'+hdurl,hd.abs.to_url)
|
249
|
+
assert_equal('file://'+RIO::RL.fs2url(cwd)+'/'+hdurl,hd.abs.to_url)
|
253
250
|
|
254
251
|
io = RIO.root
|
255
252
|
assert_kind_of(RIO::Rio,io)
|
@@ -263,7 +260,12 @@ class TC_RIO_abs < Test::Unit::TestCase
|
|
263
260
|
|
264
261
|
io = RIO.cwd
|
265
262
|
assert_kind_of(RIO::Rio,io)
|
266
|
-
cwd =
|
263
|
+
cwd = ::Dir.getwd
|
264
|
+
assert_equal(cwd,io.path)
|
265
|
+
|
266
|
+
io = RIO.cwd
|
267
|
+
assert_kind_of(RIO::Rio,io)
|
268
|
+
cwd = ::Dir.getwd
|
267
269
|
assert_equal(cwd,io.to_s)
|
268
270
|
|
269
271
|
io = RIO.root/'tmp'
|
data/test/tc/all.rb
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
require 'test/unit'
|
2
2
|
require 'tc/testcase'
|
3
3
|
|
4
|
+
#require 'tc/yaml'
|
5
|
+
require 'tc/piper'
|
6
|
+
require 'tc/cmdpipe'
|
7
|
+
require 'tc/base'
|
8
|
+
require 'tc/split'
|
9
|
+
require 'tc/route'
|
4
10
|
require 'tc/skip'
|
5
11
|
require 'tc/skiplines'
|
6
12
|
require 'tc/selnosel'
|
@@ -45,8 +51,8 @@ require 'tc/qae'
|
|
45
51
|
require 'tc/qae_riovar'
|
46
52
|
require 'tc/records'
|
47
53
|
require 'tc/rename'
|
48
|
-
require 'tc/symlink'
|
49
|
-
require 'tc/symlink0'
|
50
|
-
require 'tc/symlink1'
|
54
|
+
require 'tc/symlink' unless $mswin32
|
55
|
+
require 'tc/symlink0' unless $mswin32
|
56
|
+
require 'tc/symlink1' unless $mswin32
|
51
57
|
|
52
58
|
|
data/test/tc/base.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
#!/usr/local/bin/ruby
|
2
|
+
if $0 == __FILE__
|
3
|
+
Dir.chdir File.dirname(__FILE__)+'/../'
|
4
|
+
$:.unshift File.expand_path('../lib/')
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rio'
|
8
|
+
require 'tc/testcase'
|
9
|
+
|
10
|
+
class TC_base < Test::RIO::TestCase
|
11
|
+
@@once = false
|
12
|
+
def self.once
|
13
|
+
@@once = true
|
14
|
+
end
|
15
|
+
def setup
|
16
|
+
super
|
17
|
+
self.class.once unless @@once
|
18
|
+
end
|
19
|
+
def test_basic
|
20
|
+
r = rio('zippy',{:base => '/'})
|
21
|
+
assert_equal('/zippy',r.abs.path)
|
22
|
+
end
|
23
|
+
def test_2args
|
24
|
+
r = rio('tmp','zippy',{:base => '/'})
|
25
|
+
assert_equal('/tmp/zippy',r.abs.path)
|
26
|
+
end
|
27
|
+
def test_longer_base
|
28
|
+
r = rio('zippy',{:base => '/tmp'})
|
29
|
+
assert_equal('/tmp/zippy',r.abs.path)
|
30
|
+
end
|
31
|
+
end
|
data/test/tc/cmdpipe.rb
ADDED
@@ -0,0 +1,146 @@
|
|
1
|
+
#!/usr/local/bin/ruby
|
2
|
+
if $0 == __FILE__
|
3
|
+
Dir.chdir File.dirname(__FILE__)+'/../'
|
4
|
+
$:.unshift File.expand_path('../lib/')
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rio'
|
8
|
+
require 'tc/testcase'
|
9
|
+
|
10
|
+
class TC_cmdpipe < Test::RIO::TestCase
|
11
|
+
@@once = false
|
12
|
+
@@dname = 'd'
|
13
|
+
@@fnames = ['f0','f1','f2','g0','g1']
|
14
|
+
|
15
|
+
def self.once
|
16
|
+
@@once = true
|
17
|
+
rio(@@dname).rmtree.mkpath.chdir {
|
18
|
+
@@fnames.each { |fn|
|
19
|
+
make_lines_file(20,fn)
|
20
|
+
}
|
21
|
+
}
|
22
|
+
end
|
23
|
+
def setup
|
24
|
+
super
|
25
|
+
self.class.once unless @@once
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_cmd_out
|
29
|
+
ls = rio(?-,'ls d')
|
30
|
+
out = rio(?").chomp
|
31
|
+
exp = @@fnames
|
32
|
+
rtn = ls | out
|
33
|
+
assert_equal(exp,out[])
|
34
|
+
assert_equal(rtn,out)
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_cmd_cmd_out
|
38
|
+
ls = rio(?-,'ls d')
|
39
|
+
grep = rio(?-,'grep f')
|
40
|
+
out = rio(?").chomp
|
41
|
+
exp = @@fnames.select { |fn| fn =~ /f/ }
|
42
|
+
rtn = ls | grep | out
|
43
|
+
assert_equal(exp,out[])
|
44
|
+
assert_equal(rtn,out)
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_cmd_cmd_cmd_out
|
48
|
+
ls = rio(?-,'ls d')
|
49
|
+
cmd = rio(?-,'grep f')
|
50
|
+
cmd2 = rio(?-,'grep 1')
|
51
|
+
out = rio(?").chomp
|
52
|
+
exp = @@fnames.select { |fn| fn =~ /f1/ }
|
53
|
+
rtn = ls | cmd | cmd2 | out
|
54
|
+
assert_equal(exp,out[])
|
55
|
+
assert_equal(rtn,out)
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_file_out
|
59
|
+
inp = rio('d/f2')
|
60
|
+
out = rio(?")
|
61
|
+
rtn = inp | out
|
62
|
+
exp = inp[]
|
63
|
+
assert_equal(exp,out[])
|
64
|
+
assert_equal(rtn,out)
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_file_cmd_out
|
68
|
+
inp = rio('d/f2')
|
69
|
+
cmd = rio(?-,'grep 1')
|
70
|
+
out = rio(?")
|
71
|
+
rtn = inp | cmd | out
|
72
|
+
exp = inp[/1/]
|
73
|
+
assert_equal(exp,out[])
|
74
|
+
assert_equal(rtn,out)
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_file_cmd_cmd_out
|
78
|
+
inp = rio('d/f2')
|
79
|
+
cmd = rio(?-,'grep 1')
|
80
|
+
cmd2 = rio(?-,'grep 0')
|
81
|
+
out = rio(?")
|
82
|
+
rtn = inp | cmd | cmd2 | out
|
83
|
+
exp = inp[/10/]
|
84
|
+
assert_equal(exp,out[])
|
85
|
+
assert_equal(rtn,out)
|
86
|
+
end
|
87
|
+
|
88
|
+
def test_file_cmdpipe_out2
|
89
|
+
inp = rio('d/f2')
|
90
|
+
cmd = rio(?-,'grep 1')
|
91
|
+
cmd2 = rio(?-,'grep 0')
|
92
|
+
|
93
|
+
cmdpipe = inp | cmd | cmd2
|
94
|
+
assert_equal('cmdpipe',cmdpipe.scheme)
|
95
|
+
|
96
|
+
out = rio(?")
|
97
|
+
rtn = cmdpipe | out
|
98
|
+
exp = inp[/10/]
|
99
|
+
assert_equal(exp,out[])
|
100
|
+
assert_equal(rtn,out)
|
101
|
+
|
102
|
+
out = rio(?")
|
103
|
+
rtn = cmdpipe | out
|
104
|
+
exp = inp[/10/]
|
105
|
+
assert_equal(exp,out[])
|
106
|
+
assert_equal(rtn,out)
|
107
|
+
end
|
108
|
+
|
109
|
+
def test_file_cmdpipe_out
|
110
|
+
inp = rio('d/f2')
|
111
|
+
cmd = rio(?-,'grep 1')
|
112
|
+
cmd2 = rio(?-,'grep 0')
|
113
|
+
out = rio(?")
|
114
|
+
|
115
|
+
cmdpipe = cmd | cmd2
|
116
|
+
assert_equal('cmdpipe',cmdpipe.scheme)
|
117
|
+
|
118
|
+
rtn = inp | cmdpipe | out
|
119
|
+
exp = inp[/10/]
|
120
|
+
assert_equal(exp,out[])
|
121
|
+
assert_equal(rtn,out)
|
122
|
+
end
|
123
|
+
|
124
|
+
def test_cmdpipe_without
|
125
|
+
cmd = rio(?-,'grep 1')
|
126
|
+
cmd2 = rio(?-,'grep 0')
|
127
|
+
out = rio(?")
|
128
|
+
|
129
|
+
cmdpipe = rio(?|,cmd,cmd2,out)
|
130
|
+
assert_equal('cmdpipe',cmdpipe.scheme)
|
131
|
+
|
132
|
+
inp = rio('d/f2')
|
133
|
+
rtn = inp | cmdpipe
|
134
|
+
exp = inp[/10/]
|
135
|
+
assert_equal(exp,out[])
|
136
|
+
assert_equal(rtn,out)
|
137
|
+
|
138
|
+
inp = rio('d/f1')
|
139
|
+
rtn = inp | cmdpipe
|
140
|
+
exp = inp[[/1/,/0/]]
|
141
|
+
assert_equal(exp,out[])
|
142
|
+
assert_equal(rtn,out)
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
end
|