rumai 3.2.2 → 3.2.3

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 (91) hide show
  1. data/CREDITS +27 -5
  2. data/bin/rumai +12 -37
  3. data/lib/rumai/inochi.rb +8 -17
  4. data/lib/rumai/irb.rb +21 -0
  5. data/man.html +914 -0
  6. data/man/man1/rumai.1.gz +0 -0
  7. metadata +19 -94
  8. data/HISTORY +0 -350
  9. data/INSTALL +0 -33
  10. data/MANUAL +0 -26
  11. data/README +0 -92
  12. data/USAGE +0 -297
  13. data/doc/ann.xml +0 -61
  14. data/doc/api/IO.html +0 -119
  15. data/doc/api/Integer.html +0 -171
  16. data/doc/api/Rumai.html +0 -1540
  17. data/doc/api/Rumai/Area.html +0 -1485
  18. data/doc/api/Rumai/Chain.html +0 -301
  19. data/doc/api/Rumai/Client.html +0 -2451
  20. data/doc/api/Rumai/ClientContainer.html +0 -301
  21. data/doc/api/Rumai/ExportInstanceMethods.html +0 -103
  22. data/doc/api/Rumai/IXP.html +0 -94
  23. data/doc/api/Rumai/IXP/Agent.html +0 -1625
  24. data/doc/api/Rumai/IXP/Agent/FidStream.html +0 -959
  25. data/doc/api/Rumai/IXP/Agent/RangedPool.html +0 -381
  26. data/doc/api/Rumai/IXP/Error.html +0 -110
  27. data/doc/api/Rumai/IXP/Fcall.html +0 -503
  28. data/doc/api/Rumai/IXP/Qid.html +0 -207
  29. data/doc/api/Rumai/IXP/Rattach.html +0 -148
  30. data/doc/api/Rumai/IXP/Rauth.html +0 -148
  31. data/doc/api/Rumai/IXP/Rclunk.html +0 -148
  32. data/doc/api/Rumai/IXP/Rcreate.html +0 -148
  33. data/doc/api/Rumai/IXP/Rerror.html +0 -148
  34. data/doc/api/Rumai/IXP/Rflush.html +0 -148
  35. data/doc/api/Rumai/IXP/Ropen.html +0 -148
  36. data/doc/api/Rumai/IXP/Rread.html +0 -148
  37. data/doc/api/Rumai/IXP/Rremove.html +0 -148
  38. data/doc/api/Rumai/IXP/Rstat.html +0 -148
  39. data/doc/api/Rumai/IXP/Rversion.html +0 -148
  40. data/doc/api/Rumai/IXP/Rwalk.html +0 -148
  41. data/doc/api/Rumai/IXP/Rwrite.html +0 -148
  42. data/doc/api/Rumai/IXP/Rwstat.html +0 -148
  43. data/doc/api/Rumai/IXP/Stat.html +0 -335
  44. data/doc/api/Rumai/IXP/Stream.html +0 -194
  45. data/doc/api/Rumai/IXP/Struct.html +0 -586
  46. data/doc/api/Rumai/IXP/Struct/ClassField.html +0 -242
  47. data/doc/api/Rumai/IXP/Struct/Field.html +0 -782
  48. data/doc/api/Rumai/IXP/Struct/Field/CounteeField.html +0 -227
  49. data/doc/api/Rumai/IXP/Struct/Field/CounterField.html +0 -153
  50. data/doc/api/Rumai/IXP/Struct/Integer8Field.html +0 -242
  51. data/doc/api/Rumai/IXP/Struct/StringField.html +0 -206
  52. data/doc/api/Rumai/IXP/Tattach.html +0 -148
  53. data/doc/api/Rumai/IXP/Tauth.html +0 -148
  54. data/doc/api/Rumai/IXP/Tclunk.html +0 -148
  55. data/doc/api/Rumai/IXP/Tcreate.html +0 -148
  56. data/doc/api/Rumai/IXP/Terror.html +0 -231
  57. data/doc/api/Rumai/IXP/Tflush.html +0 -148
  58. data/doc/api/Rumai/IXP/Topen.html +0 -240
  59. data/doc/api/Rumai/IXP/Tread.html +0 -148
  60. data/doc/api/Rumai/IXP/Tremove.html +0 -148
  61. data/doc/api/Rumai/IXP/Tstat.html +0 -148
  62. data/doc/api/Rumai/IXP/Tversion.html +0 -162
  63. data/doc/api/Rumai/IXP/Twalk.html +0 -148
  64. data/doc/api/Rumai/IXP/Twrite.html +0 -148
  65. data/doc/api/Rumai/IXP/Twstat.html +0 -148
  66. data/doc/api/Rumai/Node.html +0 -1406
  67. data/doc/api/Rumai/View.html +0 -1587
  68. data/doc/api/Rumai/WidgetImpl.html +0 -333
  69. data/doc/api/Rumai/WidgetNode.html +0 -246
  70. data/doc/api/String.html +0 -258
  71. data/doc/api/StringIO.html +0 -119
  72. data/doc/api/Time.html +0 -247
  73. data/doc/api/_index.html +0 -581
  74. data/doc/api/class_list.html +0 -36
  75. data/doc/api/css/common.css +0 -1
  76. data/doc/api/css/full_list.css +0 -50
  77. data/doc/api/css/style.css +0 -273
  78. data/doc/api/file.LICENSE.html +0 -73
  79. data/doc/api/file_list.html +0 -38
  80. data/doc/api/frames.html +0 -13
  81. data/doc/api/index.html +0 -73
  82. data/doc/api/js/app.js +0 -111
  83. data/doc/api/js/full_list.js +0 -117
  84. data/doc/api/js/jquery.js +0 -19
  85. data/doc/api/method_list.html +0 -1491
  86. data/doc/api/top-level-namespace.html +0 -89
  87. data/doc/index.html +0 -2655
  88. data/inochi.opts +0 -31
  89. data/test/rumai/ixp/message_test.rb +0 -245
  90. data/test/runner +0 -25
  91. data/test/test_helper.rb +0 -1
data/inochi.opts DELETED
@@ -1,31 +0,0 @@
1
- ##
2
- # Location where project documentation will be uploaded by `inochi pub:doc`.
3
- # This value can utilize any remote/destination syntax supported by `rsync`.
4
- #
5
- :pub_doc_target: ~/www/lib/rumai
6
-
7
- ##
8
- # Options for the `rsync` command used to upload this project's documentation.
9
- #
10
- :pub_doc_options: --verbose --compress --archive --update --delete
11
-
12
- ##
13
- # Arbitrary Ruby code that will configure this project's RubyGem before it
14
- # is built by `inochi gem`. This code has access to a local variable named
15
- # `gem` which holds a Gem::Specification object representing this project.
16
- #
17
- # @example
18
- #
19
- # :gem_spec_logic: |
20
- # # show the Inochi-provided specification for this project's RubyGem
21
- # puts gem
22
- #
23
- # # add files that are outside this project directory to the RubyGem
24
- # gem.files += FileList['/some/outside/**/*.files']
25
- #
26
- # # omit some files in this project's directory from the RubyGem
27
- # gem.files.exclude '{some*files,in_this,project/**/directory}'
28
- #
29
- # # and so on... anything is possible! use your imagination!
30
- #
31
- :gem_spec_logic: |
@@ -1,245 +0,0 @@
1
- require 'rumai/fs'
2
- require 'pp' if $DEBUG
3
-
4
- D 'IXP' do
5
- extend Rumai::IXP
6
-
7
- D .<< do
8
- # connect to the wmii IXP server
9
- @conn = UNIXSocket.new(Rumai::IXP_SOCK_ADDR)
10
-
11
- # at_exit do
12
- # puts "just making sure there is no more data in the pipe"
13
- # while c = @conn.getc
14
- # puts c
15
- # end
16
- # end
17
-
18
- D 'establish a new session' do
19
- request, response = talk(Tversion,
20
- :tag => Fcall::NOTAG,
21
- :msize => Tversion::MSIZE,
22
- :version => Tversion::VERSION
23
- )
24
- T { response.type == Rversion.type }
25
- T { response.version == request.version }
26
- end
27
- end
28
-
29
- D 'can read a directory' do
30
- D 'attach to FS root' do
31
- request, response = talk(Tattach,
32
- :tag => 0,
33
- :fid => 0,
34
- :afid => Fcall::NOFID,
35
- :uname => ENV['USER'],
36
- :aname => ''
37
- )
38
- T { response.type == Rattach.type }
39
- end
40
-
41
- D 'stat FS root' do
42
- request, response = talk(Tstat,
43
- :tag => 0,
44
- :fid => 0
45
- )
46
- T { response.type == Rstat.type }
47
- end
48
-
49
- D 'open the FS root for reading' do
50
- request, response = talk(Topen,
51
- :tag => 0,
52
- :fid => 0,
53
- :mode => Topen::OREAD
54
- )
55
- T { response.type == Ropen.type }
56
- end
57
-
58
- D 'fetch a Stat for every file in FS root' do
59
- request, response = talk(Tread,
60
- :tag => 0,
61
- :fid => 0,
62
- :offset => 0,
63
- :count => Tversion::MSIZE
64
- )
65
- T { response.type == Rread.type }
66
-
67
- if $DEBUG
68
- s = StringIO.new(response.data, 'r')
69
- a = []
70
-
71
- until s.eof?
72
- t = Stat.from_9p(s)
73
- a << t
74
- end
75
-
76
- pp a
77
- end
78
- end
79
-
80
- D 'close the fid for FS root' do
81
- request, response = talk(Tclunk,
82
- :tag => 0,
83
- :fid => 0
84
- )
85
- T { response.type == Rclunk.type }
86
- end
87
-
88
- D 'closed fid should not be readable' do
89
- request, response = talk(Tread,
90
- :tag => 0,
91
- :fid => 0,
92
- :offset => 0,
93
- :count => Tversion::MSIZE
94
- )
95
- T { response.type == Rerror.type }
96
- end
97
- end
98
-
99
- D 'can read & write a file' do
100
- D 'attach to /' do
101
- request, response = talk(Tattach,
102
- :tag => 0,
103
- :fid => 0,
104
- :afid => Fcall::NOFID,
105
- :uname => ENV['USER'],
106
- :aname => ''
107
- )
108
- T { response.type == Rattach.type }
109
- end
110
-
111
- file = %W[rbar temp#{$$}]
112
- root = file[0..-2]
113
- leaf = file.last
114
-
115
- D "walk to #{root.inspect}" do
116
- request, response = talk(Twalk,
117
- :tag => 0,
118
- :fid => 0,
119
- :newfid => 1,
120
- :wname => root
121
- )
122
- T { response.type == Rwalk.type }
123
- end
124
-
125
- D "create #{leaf.inspect}" do
126
- request, response = talk(Tcreate,
127
- :tag => 0,
128
- :fid => 1,
129
- :name => leaf,
130
- :perm => 0644,
131
- :mode => Topen::ORDWR
132
- )
133
- T { response.type == Rcreate.type }
134
- end
135
-
136
- D "close the fid for #{root.inspect}" do
137
- request, response = talk(Tclunk,
138
- :tag => 0,
139
- :fid => 1
140
- )
141
- T { response.type == Rclunk.type }
142
- end
143
-
144
- D "walk to #{file.inspect} from /" do
145
- request, response = talk(Twalk,
146
- :tag => 0,
147
- :fid => 0,
148
- :newfid => 1,
149
- :wname => file
150
- )
151
- T { response.type == Rwalk.type }
152
- end
153
-
154
- D 'close the fid for /' do
155
- request, response = talk(Tclunk,
156
- :tag => 0,
157
- :fid => 0
158
- )
159
- T { response.type == Rclunk.type }
160
- end
161
-
162
- D "open #{file.inspect} for writing" do
163
- request, response = talk(Topen,
164
- :tag => 0,
165
- :fid => 1,
166
- :mode => Topen::ORDWR
167
- )
168
- T { response.type == Ropen.type }
169
- end
170
-
171
- D "write to #{file.inspect}" do
172
- write_request, write_response = talk(Twrite,
173
- :tag => 0,
174
- :fid => 1,
175
- :offset => 0,
176
- :data => "#a1a2a3 #b1b2b3 #c1c2c3 hello world!!!"
177
- )
178
- T { write_response.type == Rwrite.type }
179
- T { write_response.count == write_request.data.length }
180
-
181
- D "verify the write" do
182
- read_request, read_response = talk(Tread,
183
- :tag => 0,
184
- :fid => 1,
185
- :offset => 0,
186
- :count => write_response.count
187
- )
188
- T { read_response.type == Rread.type }
189
- T { read_response.data == write_request.data }
190
- end
191
- end
192
-
193
- D "remove #{file.inspect}" do
194
- request, response = talk(Tremove,
195
- :tag => 0,
196
- :fid => 1
197
- )
198
- T { response.type == Rremove.type }
199
- end
200
-
201
- D "fid for #{file.inspect} should have been closed by Tremove" do
202
- request, response = talk(Tclunk,
203
- :tag => 0,
204
- :fid => 1
205
- )
206
- T { response.type == Rerror.type }
207
- end
208
- end
209
-
210
- ##
211
- # Transmits the given request and returns the received response.
212
- #
213
- def talk request_type, request_options
214
- request = request_type.new(request_options)
215
-
216
- # send the request
217
- if $DEBUG
218
- puts
219
- pp request
220
- pp request.to_9p
221
- end
222
-
223
- @conn << request.to_9p
224
-
225
- # receive the response
226
- response = Fcall.from_9p(@conn)
227
-
228
- if $DEBUG
229
- puts
230
- pp response
231
- pp response.to_9p
232
- end
233
-
234
- if response.type == Rerror.type
235
- T { response.kind_of? Rerror }
236
- else
237
- T { response.type == request.type + 1 }
238
- end
239
-
240
- T { response.tag == request.tag }
241
-
242
- # return the conversation
243
- [request, response]
244
- end
245
- end
data/test/runner DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # Adds the project library directory
4
- # and this test directory to Ruby's
5
- # load path and runs the given tests.
6
- #
7
- # Usage: ruby test/runner [TESTS_TO_RUN]
8
- #
9
- # Where: TESTS_TO_RUN is a list of files
10
- # or file globbing patterns that
11
- # describe a set of files to run.
12
- #
13
- # If this parameter is not given,
14
- # all *_test.rb files within or
15
- # beneath this directory are run.
16
-
17
- lib_dir = File.expand_path('../../lib', __FILE__)
18
- test_dir = File.expand_path('..', __FILE__)
19
- $LOAD_PATH.unshift lib_dir, test_dir
20
-
21
- require 'rumai/inochi'
22
- require 'test_helper'
23
-
24
- ARGV << "#{test_dir}/**/*_test.rb" if ARGV.empty?
25
- ARGV.each {|glob| Dir[glob].each {|test| load test } }
data/test/test_helper.rb DELETED
@@ -1 +0,0 @@
1
- Rumai.require 'dfect/auto'