rio 0.3.3 → 0.3.4

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.
Files changed (88) hide show
  1. data/ChangeLog +225 -0
  2. data/README +12 -0
  3. data/Rakefile +1 -1
  4. data/VERSION +1 -1
  5. data/doc/ANNOUNCE +160 -71
  6. data/doc/RELEASE_NOTES +71 -2
  7. data/ex/colx.rb +1 -1
  8. data/ex/passwd_report.rb +4 -8
  9. data/ex/riocat +5 -5
  10. data/ex/riogunzip +1 -1
  11. data/ex/riogzip +6 -6
  12. data/ex/rioprompt.rb +6 -0
  13. data/lib/rio.rb +3 -13
  14. data/lib/rio/arycopy.rb +1 -1
  15. data/lib/rio/base.rb +1 -5
  16. data/lib/rio/construct.rb +75 -0
  17. data/lib/rio/constructor.rb +42 -11
  18. data/lib/rio/context.rb +1 -1
  19. data/lib/rio/context/dir.rb +50 -23
  20. data/lib/rio/context/methods.rb +5 -3
  21. data/lib/rio/{cxdir.rb → context/skip.rb} +24 -36
  22. data/lib/rio/context/stream.rb +38 -16
  23. data/lib/rio/cp.rb +24 -5
  24. data/lib/rio/dir.rb +8 -7
  25. data/lib/rio/doc/HOWTO.rb +33 -33
  26. data/lib/rio/doc/INTRO.rb +416 -256
  27. data/lib/rio/doc/MISC.rb +3 -1
  28. data/lib/rio/doc/SYNOPSIS.rb +28 -33
  29. data/lib/rio/entrysel.rb +76 -9
  30. data/lib/rio/file.rb +2 -1
  31. data/lib/rio/filter.rb +95 -0
  32. data/lib/rio/filter/closeoneof.rb +1 -1
  33. data/lib/rio/grande.rb +0 -74
  34. data/lib/rio/if.rb +2 -1
  35. data/lib/rio/if/basic.rb +1 -1
  36. data/lib/rio/if/csv.rb +1 -1
  37. data/lib/rio/if/dir.rb +1 -220
  38. data/lib/rio/if/fileordir.rb +26 -12
  39. data/lib/rio/if/grande.rb +55 -6
  40. data/lib/rio/if/grande_entry.rb +355 -0
  41. data/lib/rio/if/{methods.rb → grande_stream.rb} +69 -88
  42. data/lib/rio/if/path.rb +25 -3
  43. data/lib/rio/if/stream.rb +62 -37
  44. data/lib/rio/if/temp.rb +2 -2
  45. data/lib/rio/if/test.rb +23 -0
  46. data/lib/rio/impl/path.rb +5 -0
  47. data/lib/rio/match.rb +6 -3
  48. data/lib/rio/matchrecord.rb +50 -46
  49. data/lib/rio/{filter/chomp.rb → ops/construct.rb} +12 -20
  50. data/lib/rio/ops/create.rb +3 -0
  51. data/lib/rio/ops/dir.rb +12 -6
  52. data/lib/rio/ops/either.rb +17 -3
  53. data/lib/rio/ops/path.rb +4 -1
  54. data/lib/rio/ops/stream/input.rb +6 -1
  55. data/lib/rio/ops/stream/read.rb +1 -3
  56. data/lib/rio/{context/chomp.rb → prompt.rb} +17 -13
  57. data/lib/rio/rl/base.rb +1 -1
  58. data/lib/rio/rl/builder.rb +3 -1
  59. data/lib/rio/state.rb +7 -13
  60. data/lib/rio/stream.rb +8 -5
  61. data/lib/rio/stream/open.rb +1 -1
  62. data/lib/rio/version.rb +1 -1
  63. data/test/mswin32.rb +1 -1
  64. data/test/runtests_gem.rb +1 -1
  65. data/test/tc/all.rb +3 -0
  66. data/test/tc/copy-from.rb +13 -13
  67. data/test/tc/copy-to.rb +1 -1
  68. data/test/tc/copy.rb +1 -1
  69. data/test/tc/copydir.rb +0 -24
  70. data/test/tc/copysymlink.rb +39 -0
  71. data/test/tc/csv.rb +2 -2
  72. data/test/tc/csv2.rb +4 -4
  73. data/test/tc/misc.rb +16 -16
  74. data/test/tc/nolines.rb +26 -26
  75. data/test/tc/noqae.rb +74 -74
  76. data/test/tc/overload.rb +28 -28
  77. data/test/tc/riorl.rb +36 -0
  78. data/test/tc/selnosel.rb +36 -0
  79. data/test/tc/skip.rb +58 -0
  80. data/test/tc/skiplines.rb +42 -0
  81. data/test/tc/symlink.rb +1 -1
  82. data/test/tc/symlink0.rb +1 -1
  83. data/test/tc/temp.rb +1 -1
  84. data/test/tc/tempdir.rb +1 -1
  85. data/test/tc/testcase.rb +7 -1
  86. metadata +14 -8
  87. data/lib/rio/matchcolumns.rb +0 -266
  88. data/lib/rio/rangemath.rb +0 -44
@@ -36,26 +36,18 @@
36
36
 
37
37
 
38
38
  module RIO
39
- module Filter #:nodoc: all
40
- module Chomp
41
- module IOE
42
- def gets(*args) super.chomp end
43
- def readline(*args) super.chomp end
44
- def each_line(*args,&block)
45
- super { |l|
46
- yield l.chomp
47
- }
48
- end
49
- def readlines(*args) super.map(&:chomp) end
50
- end
51
- include IOE
52
- # def self.extend_object(ioh)
53
- # super
54
- # cio = ioh.ios.clone
55
- # cio.extend(IOE)
56
- # ioh.iostack.push(cio)
57
- # end
39
+ module Ops
40
+ module Construct
41
+ def strio(*args) new_rio(:strio,*args) end
42
+ def stdio(*args) new_rio(:stdio,*args) end
43
+ def stderr(*args) new_rio(:stderr,*args) end
44
+ def temp(*args) new_rio(:temp,*args) end
45
+ def tempfile(*args) new_rio(:tempfile,*args) end
46
+ def tempdir(*args) new_rio(:tempdir,*args) end
47
+ def tcp(*args) new_rio(:tcp,*args) end
48
+ def cmdio(*args) new_rio(:cmdio,*args) end
49
+ def sysio(*args) new_rio(:sysio,*args) end
50
+ def fd(*args) new_rio(:fd,*args) end
58
51
  end
59
52
  end
60
53
  end
61
- __END__
@@ -72,6 +72,9 @@ module RIO
72
72
  new_rio(Impl::U.rootdir(),*args,&block)
73
73
  end
74
74
  alias :root :rootpath
75
+ def cleanpath(*args)
76
+ new_rio(Impl::U.cleanpath(fspath,*args))
77
+ end
75
78
  end
76
79
  end
77
80
  end
@@ -122,7 +122,7 @@ module RIO
122
122
  module Dir
123
123
  module Existing
124
124
  def selective?
125
- %w[sel nosel stream_sel stream_nosel].any? { |k| cx.has_key?(k) }
125
+ %w[entry_sel stream_sel stream_nosel].any? { |k| cx.has_key?(k) }
126
126
  end
127
127
  def mkdir(*args) self end
128
128
  def mkpath(*args) self end
@@ -178,7 +178,7 @@ module RIO
178
178
  include Cp::Dir::Output
179
179
  public
180
180
 
181
- def entries(*args,&block) _set_select('entries','sel',:true?,*args,&block) end
181
+ def entries(*args,&block) _set_select('entries',*args,&block) end
182
182
 
183
183
  def each(*args,&block)
184
184
  # p callstr('each',*args)
@@ -217,10 +217,16 @@ module RIO
217
217
  nil
218
218
  end
219
219
  end
220
-
220
+ def handle_skipped
221
+ #return unless cx.has_key?('skip_args') or cx['skipping']
222
+ return self unless cx.has_key?('skip_args')
223
+ args = cx['skip_args'] || []
224
+ self.skipentries(*args)
225
+ end
221
226
  def each_(*args,&block)
222
227
  #p "#{callstr('each_',*args)} sel=#{cx['sel'].inspect} nosel=#{cx['nosel'].inspect}"
223
- sel = Match::Entry::Selector.new(cx['sel'],cx['nosel'])
228
+ handle_skipped()
229
+ sel = Match::Entry::Selector.new(cx['entry_sel'])
224
230
  selfstr = (self.to_s == '.' ? nil : self.to_s)
225
231
  self.ioh.each do |estr|
226
232
  next if estr =~ /^\.(\.)?$/
@@ -234,7 +240,7 @@ module RIO
234
240
  end
235
241
 
236
242
  if cx.has_key?('all') and erio.directory?
237
- rsel = Match::Entry::Selector.new(cx['r_sel'],cx['r_nosel'])
243
+ rsel = Match::Entry::SelectorClassic.new(cx['r_sel'],cx['r_nosel'])
238
244
  _add_recurse_iter_cx(erio).each(&block) if rsel.match?(erio)
239
245
  end
240
246
 
@@ -277,7 +283,7 @@ module RIO
277
283
  }
278
284
  ario.cx = new_cx
279
285
  end
280
- CX_DIR_ITER_KEYS = %w[sel nosel]
286
+ CX_DIR_ITER_KEYS = %w[entry_sel]
281
287
  CX_STREAM_ITER_KEYS = %w[stream_rectype stream_itertype stream_sel stream_nosel]
282
288
  def _add_iter_cx(ario)
283
289
  if nostreamenum?
@@ -97,10 +97,24 @@ module RIO
97
97
  end
98
98
 
99
99
  def ss_type?
100
- return 'entries' if cx['ss_type'].nil?
101
- return cx['ss_type'] if %w[files dirs entries nofiles nodirs noentries].include?(cx['ss_type'])
102
- nil
100
+ case cx['ss_type']
101
+ when nil
102
+ 'entries'
103
+ when 'files', 'dirs', 'entries', 'skipfiles', 'skipdirs', 'skipentries'
104
+ cx['ss_type']
105
+ else
106
+ nil
107
+ end
108
+ end
109
+
110
+ require 'Pathname'
111
+ def realpath
112
+ new_rio(Impl::U.realpath(fspath))
113
+ end
114
+ def mountpoint?
115
+ Impl::U.mountpoint?(fspath)
103
116
  end
117
+
104
118
  end
105
119
 
106
120
  module ExistOrNot
@@ -75,6 +75,7 @@ module RIO
75
75
  def size(*args) Impl::U.size(self.to_s,*args) end
76
76
  def size?(*args) Impl::U.size?(self.to_s,*args) end
77
77
  def zero?(*args) Impl::U.zero?(self.to_s,*args) end
78
+ def root?(*args) Impl::U.root?(self.to_s) end
78
79
 
79
80
  end
80
81
  module URI
@@ -173,7 +174,7 @@ module RIO
173
174
  end
174
175
 
175
176
  def +(arg)
176
- new_rio(softreset.to_s + ensure_rio(arg).to_s)
177
+ new_rio(softreset.to_str + ensure_rio(arg).to_str)
177
178
  end
178
179
 
179
180
  private
@@ -256,12 +257,14 @@ module RIO
256
257
  end
257
258
  end
258
259
  require 'rio/ops/create'
260
+ require 'rio/ops/construct'
259
261
  module RIO
260
262
  module Ops
261
263
  module Path
262
264
  module Empty
263
265
  include Ops::Path::Create
264
266
  include Ops::Path::URI
267
+ include Ops::Construct
265
268
  end
266
269
  module ExistOrNot
267
270
  def symlink(d)
@@ -164,10 +164,15 @@ module RIO
164
164
 
165
165
  def each_record_init_
166
166
  end
167
-
167
+ def handle_skipped
168
+ return self unless cx.has_key?('skip_args')
169
+ args = cx['skip_args'] || []
170
+ self.skiprecords(*args)
171
+ end
168
172
  def create_selrej()
169
173
  sel_args = cx['stream_sel']
170
174
  nosel_args = cx['stream_nosel']
175
+ handle_skipped
171
176
  selrej = RIO::Match::Record::SelRej.new(self,sel_args,nosel_args)
172
177
  [selrej,selrej.rangetops]
173
178
  end
@@ -40,11 +40,9 @@ module RIO
40
40
  module Ops
41
41
  module Stream
42
42
  module Read
43
- def slurp()
43
+ def contents()
44
44
  auto { ioh.gets(nil) }
45
45
  end
46
- alias :to_string :slurp
47
- alias :contents :slurp
48
46
  def readlines(*args)
49
47
  auto { ioh.readlines(*args) }
50
48
  end
@@ -34,20 +34,24 @@
34
34
  # <b>Rio is pre-alpha software.
35
35
  # The documented interface and behavior is subject to change without notice.</b>
36
36
 
37
+ #
38
+
39
+ require 'rio'
37
40
 
38
- require 'rio/context/cxx.rb'
39
41
  module RIO
40
- module Cx
41
- module Methods
42
- require 'rio/filter/chomp'
43
- def chomp(arg=true,&block)
44
- cx['chomp'] = arg
45
- add_filter(Filter::Chomp) if arg and self.ioh
46
- each(&block) if block_given?
47
- self
48
- end
49
- def chomp?() cxx?('chomp') end
50
- def nochomp(arg=false,&block) chomp(arg,&block) end
51
- end
42
+ def prompt(str="")
43
+ rio(?-).strip.print(str).gets
52
44
  end
45
+ module_function :prompt
46
+ end
47
+
48
+ if $0 == __FILE__
49
+ eval DATA.read, nil, $0, __LINE__+4
53
50
  end
51
+
52
+ __END__
53
+
54
+ puts
55
+ puts("Run the tests that came with the distribution")
56
+ puts("From the distribution directory use 'test/runtests.rb'")
57
+ puts
@@ -130,7 +130,7 @@ module RIO
130
130
  def to_s() self.fspath || '' end
131
131
  def ==(other) self.to_s == other.to_s end
132
132
  def ===(other) self == other end
133
- def =~(other) other =~ self.to_s end
133
+ def =~(other) other =~ self.to_str end
134
134
  def length() self.to_s.length end
135
135
  def fspath() nil end
136
136
  def path() nil end
@@ -113,7 +113,9 @@ module RIO
113
113
  cl = Factory.instance.riorl_class(a0.scheme)
114
114
  o = cl.new(a0,*a) unless cl.nil?
115
115
  return o
116
- when ?? , ?= , ?_ , ?",?[,?#,?`
116
+ when ::Symbol
117
+ a[0] = 'rio:' + a[0].to_s + ':'
118
+ when ?? , ?= , ?_ , ?", ?[, ?#, ?`
117
119
  a[0] = 'rio:'+CHMAP[a[0]]+':'
118
120
  when ?-
119
121
  a[0] = ( a.size == 1 ? 'rio:'+CHMAP[a[0]]+':' : 'rio:cmdio:' )
@@ -40,6 +40,7 @@ require 'rio/context'
40
40
  require 'rio/context/methods'
41
41
  require 'rio/ext'
42
42
  require 'rio/symantics'
43
+ require 'rio/filter'
43
44
  $trace_states = false
44
45
  module RIO
45
46
 
@@ -49,7 +50,7 @@ module RIO
49
50
  # the abstract state from which all are derived
50
51
  # this level handles
51
52
  # * some basic house keeping methods
52
- # * the methods to communicate with the fs object
53
+ # * the methods to communicate with the rio object
53
54
  # * the state changing mechanism
54
55
  # * and some basic error handling stubs
55
56
  class Base
@@ -88,6 +89,7 @@ module RIO
88
89
  def self.new_r(riorl)
89
90
  new.init(riorl,Cx::Vars.new( { 'closeoneof' => true, 'closeoncopy' => true } ))
90
91
  end
92
+
91
93
  def init(riorl,cntx,iohandle=nil)
92
94
  @rl = riorl
93
95
  @cx = cntx
@@ -108,7 +110,7 @@ module RIO
108
110
 
109
111
  # the method for changing states
110
112
  # it's job is create an instance of the next state
111
- # and change the value in the handle that is shared with the fs object
113
+ # and change the value in the handle that is shared with the rio object
112
114
  def become(new_class,*args)
113
115
  p "become : #{self.class.to_s} => #{new_class.to_s} (#{self.mode?})" if $trace_states
114
116
  #
@@ -121,9 +123,11 @@ module RIO
121
123
  raise
122
124
  end
123
125
  end
126
+
124
127
  def method_missing_trace_str(sym,*args)
125
128
  "missing: "+self.class.to_s+'['+self.to_url+']'+'.'+sym.to_s+'('+args.join(',')+')'
126
129
  end
130
+
127
131
  def method_missing(sym,*args,&block)
128
132
  p method_missing_trace_str(sym,*args) if $trace_states
129
133
 
@@ -166,21 +170,11 @@ module RIO
166
170
 
167
171
 
168
172
  extend Forwardable
169
- # def_instance_delegators(:rl,:path,:to_s,:fspath,:opaque,:host,:length)
170
173
  def_instance_delegators(:rl,:path,:to_s,:fspath,:length)
171
174
 
172
- # def fspath() @rl.fspath end
173
- # def path() @rl.path() end
174
- # def opaque() @rl.opaque() end
175
- # def scheme() @rl.scheme() end
176
- # def host() @rl.host() end
177
- # def to_s() @rl.to_s() end
178
- # def length() @rl.length end
179
-
180
-
181
175
  def ==(other) @rl == other end
182
176
  def ===(other) self == other end
183
- def =~(other) other =~ self.to_s end
177
+ def =~(other) other =~ self.to_str end
184
178
  def to_url() @rl.url end
185
179
  def to_uri() @rl.uri end
186
180
  alias to_str to_s
@@ -43,13 +43,13 @@ require 'rio/ops/stream/output'
43
43
  require 'rio/ext'
44
44
 
45
45
  require 'rio/filter/gzip'
46
- require 'rio/filter/chomp'
46
+ #require 'rio/filter/chomp'
47
+ #require 'rio/filter/strip'
47
48
  require 'rio/filter/closeoneof'
48
49
 
49
50
  module RIO
50
51
 
51
52
  module Stream #:nodoc: all
52
-
53
53
  class Reset < Base
54
54
  # Mixin the appropriate ops
55
55
  #include Ops::Path::Str
@@ -108,6 +108,7 @@ module RIO
108
108
  class Input < IOBase
109
109
  include Ops::Stream::Input
110
110
  include Ini
111
+ include Filters
111
112
  def initialize_copy(*args)
112
113
  #p callstr('enter Input:initialize_copy',*args)
113
114
  super
@@ -117,10 +118,9 @@ module RIO
117
118
  def add_extensions()
118
119
  Ext::Input.add_extensions(self)
119
120
  end
120
-
121
121
  def add_filters
122
122
  add_filter(Filter::GZipRead) if gzip?
123
- add_filter(Filter::Chomp) if chomp?
123
+ add_line_filters()
124
124
  if closeoneof?
125
125
  add_filter(Filter::CloseOnEOF)
126
126
  ioh.oncloseproc = proc { self.on_closeoneof }
@@ -152,6 +152,7 @@ module RIO
152
152
  include Ops::Stream::Input
153
153
  include Ops::Stream::Output
154
154
  include Ini
155
+ include Filters
155
156
 
156
157
  def initialize_copy(*args)
157
158
  super
@@ -166,8 +167,10 @@ module RIO
166
167
  Ext::Input.add_extensions(self)
167
168
  Ext::Output.add_extensions(self)
168
169
  end
170
+
169
171
  def add_filters
170
- add_filter(Filter::Chomp) if chomp?
172
+ add_line_filters()
173
+
171
174
  if closeoneof?
172
175
  add_filter(Filter::CloseOnEOF)
173
176
  ioh.oncloseproc = proc { self.on_closeoneof }
@@ -83,7 +83,7 @@ module RIO
83
83
  module Stream
84
84
  class Open < Base
85
85
  def size()
86
- self.slurp.size
86
+ self.contents.size
87
87
  end
88
88
  OUTPUT_SYMS = [:print,:printf,:puts,:putc,:write,
89
89
  :print!,:printf!,:puts!,:putc!,:write!,
@@ -39,7 +39,7 @@
39
39
  module RIO
40
40
  # :stopdoc:
41
41
  module Version #:nodoc: all
42
- VERSION = '0.3.3'
42
+ VERSION = '0.3.4'
43
43
 
44
44
  N = VERSION.split('.').freeze
45
45
  MAJOR = N[0].freeze
@@ -17,7 +17,7 @@ require 'tc/misc'
17
17
  require 'tc/pa'
18
18
  require 'tc/paths'
19
19
  require 'tc/qae'
20
- require 'tc/nolines'
20
+ require 'tc/skiplines'
21
21
  require 'tc/records'
22
22
  require 'tc/expand_path'
23
23
  require 'tc/clearsel'
@@ -3,7 +3,7 @@ Dir.chdir File.dirname(__FILE__)
3
3
  #$:.unshift File.expand_path('../lib/')
4
4
 
5
5
  require 'rubygems'
6
- require_gem 'rio'
6
+ require 'rio'
7
7
 
8
8
 
9
9
  #require 'rio'
@@ -1,6 +1,9 @@
1
1
  require 'test/unit'
2
2
  require 'tc/testcase'
3
3
 
4
+ require 'tc/skip'
5
+ require 'tc/skiplines'
6
+ require 'tc/selnosel'
4
7
  require 'tc/csv'
5
8
  require 'tc/csv2'
6
9
  require 'tc/csv_columns'
@@ -43,18 +43,18 @@ class TC_copyfrom < Test::RIO::TestCase
43
43
  str = "HelloWorld\n"
44
44
  ario < str
45
45
  assert(ario.closed?,"Rio closes after copy-from string")
46
- assert_equal(str,ario.slurp)
46
+ assert_equal(str,ario.contents)
47
47
  ario << str
48
- assert_equal(str+str,ario.slurp)
48
+ assert_equal(str+str,ario.contents)
49
49
  end
50
50
 
51
51
  def test_arrayofstrings_file
52
52
  ario = rio('oua').delete!.puts!("If you are seeing this, rio < array is broken")
53
53
  str = "HelloWorld\n"
54
54
  ario < [str]
55
- assert_equal(str,ario.slurp)
55
+ assert_equal(str,ario.contents)
56
56
  ario << [str]
57
- assert_equal(str+str,ario.slurp)
57
+ assert_equal(str+str,ario.contents)
58
58
  end
59
59
 
60
60
 
@@ -85,7 +85,7 @@ class TC_copyfrom < Test::RIO::TestCase
85
85
  str = "HelloWorld\n"
86
86
  ario < str
87
87
  assert(ario.file?,"Copy from string creates a file")
88
- assert_equal(str,ario.slurp)
88
+ assert_equal(str,ario.contents)
89
89
  end
90
90
 
91
91
  def test_arrayofstrings_nonex
@@ -93,7 +93,7 @@ class TC_copyfrom < Test::RIO::TestCase
93
93
  str = "HelloWorld\n"
94
94
  ario < [str]
95
95
  assert(ario.file?,"Copy from array of strings creates a file")
96
- assert_equal(str,ario.slurp)
96
+ assert_equal(str,ario.contents)
97
97
  end
98
98
 
99
99
  def test_simple_rio0
@@ -129,8 +129,8 @@ class TC_copyfrom < Test::RIO::TestCase
129
129
  url = 'http://localhost/rio/hw.html'
130
130
  urio = rio(url)
131
131
  ario < urio
132
- exp = urio.slurp
133
- assert_equal(exp,ario.slurp)
132
+ exp = urio.contents
133
+ assert_equal(exp,ario.contents)
134
134
  end
135
135
  def test_uri_rio_to_dir
136
136
  ario = rio('ud').delete!.mkdir
@@ -141,7 +141,7 @@ class TC_copyfrom < Test::RIO::TestCase
141
141
  $trace_states = false
142
142
  drio = rio(ario,urio.filename)
143
143
  assert(drio.file?)
144
- assert(urio.slurp,drio.slurp)
144
+ assert(urio.contents,drio.contents)
145
145
  end
146
146
  def test_uri_string_to_dir
147
147
  ario = rio('uds').delete!.mkdir
@@ -152,28 +152,28 @@ class TC_copyfrom < Test::RIO::TestCase
152
152
  $trace_states = false
153
153
  drio = rio(ario,urio.filename)
154
154
  assert(drio.file?)
155
- assert(urio.slurp,drio.slurp)
155
+ assert(urio.contents,drio.contents)
156
156
  end
157
157
  def test_url_string_to_file
158
158
  ario = rio('out').delete!.touch
159
159
  url = 'http://localhost/rio/hw.html'
160
160
  ario < url
161
161
  exp = url
162
- assert_equal(exp,ario.slurp)
162
+ assert_equal(exp,ario.contents)
163
163
  end
164
164
  def test_url_array_to_file
165
165
  ario = rio('out').delete!.touch
166
166
  url = 'http://localhost/rio/hw.html'
167
167
  ario < [url]
168
168
  exp = url
169
- assert_equal(exp,ario.slurp)
169
+ assert_equal(exp,ario.contents)
170
170
  end
171
171
  def test_url_string_to_nonex
172
172
  ario = rio('outz').delete!
173
173
  url = 'http://localhost/rio/hw.html'
174
174
  ario < url
175
175
  exp = url
176
- assert_equal(exp,ario.slurp)
176
+ assert_equal(exp,ario.contents)
177
177
  end
178
178
  def test_simple_ary
179
179
  dst = rio('dst').delete!.mkpath