rubyslippers 1.01 → 1.02

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/Readme.txt +6 -0
  2. data/code/01rwdcore/01rwdcore.rb +16 -16
  3. data/code/01rwdcore/jumplinkcommand.rb +30 -0
  4. data/code/01rwdcore/openhelpwindow.rb +26 -26
  5. data/code/01rwdcore/returntomain.rb +8 -8
  6. data/code/01rwdcore/rwdtinkerversion.rb +12 -13
  7. data/code/01rwdcore/rwdwindowreturn.rb +3 -5
  8. data/code/01rwdcore/test_cases.rb +79 -90
  9. data/code/01rwdcore/test_harness.rb +7 -10
  10. data/code/01rwdcore/uploadreturns.rb +60 -60
  11. data/code/superant.com.rubyslippers/jumplinkupdate.rb +23 -0
  12. data/code/superant.com.rubyslippers/listgemremote.rb +3 -6
  13. data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +89 -92
  14. data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +15 -21
  15. data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +19 -18
  16. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +20 -19
  17. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +19 -18
  18. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +7 -7
  19. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +48 -49
  20. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +8 -7
  21. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +22 -26
  22. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +32 -31
  23. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -13
  24. data/code/superant.com.rwdtinkerbackwindow/network.rb +82 -82
  25. data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +18 -17
  26. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +37 -37
  27. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +20 -20
  28. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +33 -32
  29. data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +8 -9
  30. data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +10 -11
  31. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -18
  32. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +21 -20
  33. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +23 -20
  34. data/configuration/language.dist +1 -1
  35. data/configuration/rubyslippers.dist +2 -2
  36. data/configuration/rwdapplicationidentity.dist +2 -2
  37. data/configuration/rwdtinker.dist +3 -3
  38. data/configuration/tinkerwin2variables.dist +1 -1
  39. data/gui/frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd +2 -7
  40. data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd +15 -0
  41. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/94rwddiagnostics.rwd +0 -18
  42. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m90selectiontab.rwd +11 -0
  43. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m95jumplinkcommands.rwd +15 -0
  44. data/gui/{frontwindow0/superant.com.rubyslippers/m99menuend.rwd → tinkerbackwindows/superant.com.rubyslippersbackwindow/m99selection.rwd} +0 -0
  45. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
  46. data/init.rb +228 -228
  47. data/installed/rwdviewlogo-0.4.inf +4 -0
  48. data/rwd_files/HowTo_RubySlippers.txt +6 -0
  49. data/rwd_files/HowTo_Tinker.txt +6 -0
  50. data/rwd_files/remotegemlist.txt +58 -24
  51. data/rwdconfig.dist +1 -1
  52. data/tests/makedist.rb +36 -7
  53. data/tests/rubyslippers-1.01.gemspec +16 -0
  54. metadata +11 -19
  55. data/gui/frontwindow0/superant.com.rubyslippers/m01menubegin.rwd +0 -10
  56. data/gui/frontwindow0/superant.com.rubyslippers/m02menu.rwd +0 -60
  57. data/gui/frontwindow0/superant.com.rubyslippers/m03menu.rwd +0 -12
  58. data/gui/frontwindow0/superant.com.rubyslippers/m85menu.rwd +0 -21
  59. data/gui/frontwindow0/superant.com.rubyslippers/m88menu.rwd +0 -12
  60. data/gui/frontwindowselections/superant.com.rubyslippersselectiontab/rubyslippersselectiontab.rwd +0 -12
  61. data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +0 -12
  62. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m01menubegin.rwd +0 -10
  63. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m02menu.rwd +0 -60
  64. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m03menu.rwd +0 -12
  65. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m85menu.rwd +0 -21
  66. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m88menu.rwd +0 -12
  67. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m99menuend.rwd +0 -3
  68. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/v9returntab.rwd +0 -11
  69. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd +0 -11
data/init.rb CHANGED
@@ -24,42 +24,42 @@
24
24
  require "ev/rwd"
25
25
  require 'fileutils'
26
26
  require 'extras/rconftool'
27
-
27
+
28
28
  $progdir = File::expand_path( File.dirname(__FILE__))
29
29
 
30
- $tempdoc = " "
31
-
32
- def findfiles(d)
33
- a = Array.new(Dir[d].entries.sort)
34
- #loop through and get the files names
35
- a.each do |x|
36
- #adjust the filters to the files you want to see...
37
- if(!test(?d,x))
38
- # only rwd files
39
- if x =~ /rb|rwd|txt/
40
- fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
41
- $tempdoc+=fileA.read #reads the file into the doc string
42
- fileA.close
43
- end
44
- end
45
- end
46
- end
47
- def loadguifile(d)
48
- a = Array.new(Dir[d].entries.sort)
49
- #loop through and get the files names
50
- a.each do |x|
51
- #adjust the filters to the files you want to see...
52
- if(!test(?d,x))
53
- # only rwd files
54
- if x =~ /rb|rwd|txt/
55
-
56
- load x #opens the file thats in fileName and reads it
57
- $tempdoc += $rwdguivar # adds the file into the doc string
58
- end
59
- end
60
- end
61
- end
62
-
30
+ $tempdoc = " "
31
+
32
+ def findfiles(d)
33
+ a = Array.new(Dir[d].entries.sort)
34
+ #loop through and get the files names
35
+ a.each do |x|
36
+ #adjust the filters to the files you want to see...
37
+ if(!test(?d,x))
38
+ # only rwd files
39
+ if x =~ /rb|rwd|txt/
40
+ fileA=File.open("#{x}","r") #opens the file thats in fileName as read only
41
+ $tempdoc+=fileA.read #reads the file into the doc string
42
+ fileA.close
43
+ end
44
+ end
45
+ end
46
+ end
47
+ def loadguifile(d)
48
+ a = Array.new(Dir[d].entries.sort)
49
+ #loop through and get the files names
50
+ a.each do |x|
51
+ #adjust the filters to the files you want to see...
52
+ if(!test(?d,x))
53
+ # only rwd files
54
+ if x =~ /rb|rwd|txt/
55
+
56
+ load x #opens the file thats in fileName and reads it
57
+ $tempdoc += $rwdguivar # adds the file into the doc string
58
+ end
59
+ end
60
+ end
61
+ end
62
+
63
63
  # integrate the new configuration files
64
64
  MAINconfignew = "rwdconfig.cnf"
65
65
  MAINconfigdist = "rwdconfig.dist"
@@ -68,210 +68,210 @@ Rconftool::install(MAINconfigdist,MAINconfignew)
68
68
  #load main config file
69
69
  load 'rwdconfig.cnf'
70
70
 
71
- Dir.chdir("configuration") #changes the current working directory
72
-
73
- fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /dist$/) } #creates an Array separated with \n
74
- @doc = ""
75
- fileList.length.times{ #opening of a block
76
- configdist =fileList.pop #pops the first item out of the Array
71
+ Dir.chdir("configuration") #changes the current working directory
72
+
73
+ fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /dist$/) } #creates an Array separated with \n
74
+ @doc = ""
75
+ fileList.length.times{ #opening of a block
76
+ configdist =fileList.pop #pops the first item out of the Array
77
77
  tempconfigfile = configdist.gsub(/\.dist$/, "")
78
78
  confignew = tempconfigfile + ".cnf"
79
79
  Rconftool::install(configdist,confignew) #integrates new file with old
80
80
  } #closing block
81
- # END of configuration integration
82
- Dir.chdir($progdir)
83
-
84
- # Read in the configuration files
85
- Dir.chdir("configuration") #changes the current working directory
86
-
87
- fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /cnf$/) } #creates an Array separated with \n
88
- @doc = ""
89
- fileList.length.times{ #opening of a block
90
- fileName=fileList.pop #pops the first item out of the Array
91
- load fileName #loads the the config file thats in fileName
81
+ # END of configuration integration
82
+ Dir.chdir($progdir)
83
+
84
+ # Read in the configuration files
85
+ Dir.chdir("configuration") #changes the current working directory
86
+
87
+ fileList = Dir.new(".").entries.sort.reverse.delete_if { |x| ! (x =~ /cnf$/) } #creates an Array separated with \n
88
+ @doc = ""
89
+ fileList.length.times{ #opening of a block
90
+ fileName=fileList.pop #pops the first item out of the Array
91
+ load fileName #loads the the config file thats in fileName
92
92
  } #closing block
93
- # END of configuration reading
94
-
95
- Dir.chdir($progdir) # change back to top program directory
96
-
97
- # build the English Language hash file from the parts
98
- languagehashvariable = 'Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Message not found: #{kk.inspect}."; hh[kk] }
99
- langmessage = {' + "\n"
100
- startlangdir = File.join(LangDir,"en")
101
- #get a list of the files and subdirectories on the starting directory only
102
- alanghash = Array.new(Dir[startlangdir].entries.sort)
103
- #loop through the list, ignore the files and add all new directories found
104
- alanghash.each do |x|
105
- #if a directory...
106
- if(test(?d,x))
107
- # add to the original list of directories
108
- @@tmproot = x + "/**"
109
- #adds the new ones to the array
110
- blanghash = Dir[@@tmproot].entries.sort
111
- blanghash.each do |x|
112
- if(test(?d,x))
113
- alanghash.push(x) #appends to the end of the array...
114
- end
115
- end
116
- end
117
- end
118
- alanghash.each do |x|
119
- #if it is a file...
120
- if(!test(?d,x))
121
- alanghash.delete(x)
122
- else #it is a directory...
123
- findfiles(x + "/**")
124
- end
125
- end
126
-
127
-
128
- #writes the contents of doc into the languagehashvariable
93
+ # END of configuration reading
94
+
95
+ Dir.chdir($progdir) # change back to top program directory
96
+
97
+ # build the English Language hash file from the parts
98
+ languagehashvariable = 'Message = Hash.new { |hh, kk| hh[kk] = "ERROR: Message not found: #{kk.inspect}."; hh[kk] }
99
+ langmessage = {' + "\n"
100
+ startlangdir = File.join(LangDir,"en")
101
+ #get a list of the files and subdirectories on the starting directory only
102
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
103
+ #loop through the list, ignore the files and add all new directories found
104
+ alanghash.each do |x|
105
+ #if a directory...
106
+ if(test(?d,x))
107
+ # add to the original list of directories
108
+ @@tmproot = x + "/**"
109
+ #adds the new ones to the array
110
+ blanghash = Dir[@@tmproot].entries.sort
111
+ blanghash.each do |x|
112
+ if(test(?d,x))
113
+ alanghash.push(x) #appends to the end of the array...
114
+ end
115
+ end
116
+ end
117
+ end
118
+ alanghash.each do |x|
119
+ #if it is a file...
120
+ if(!test(?d,x))
121
+ alanghash.delete(x)
122
+ else #it is a directory...
123
+ findfiles(x + "/**")
124
+ end
125
+ end
126
+
127
+
128
+ #writes the contents of doc into the languagehashvariable
129
129
  languagehashvariable = languagehashvariable + $tempdoc + "} ; langmessage.each { |kk, vv| Message[kk] = vv }"
130
-
131
- # END of en Lang building
130
+
131
+ # END of en Lang building
132
132
  $tempdoc = " "
133
133
  Dir.chdir($progdir) # change back to top program directory
134
-
135
- # build the local Language hash file from the parts
136
- startlangdir = File.join(LangDir,$lang)
137
- #get a list of the files and subdirectories on the starting directory only
138
- alanghash = Array.new(Dir[startlangdir].entries.sort)
139
- #loop through the list, ignore the files and add all new directories found
140
- alanghash.each do |x|
141
- #if a directory...
142
- if(test(?d,x))
143
- # add to the original list of directories
144
- @@tmproot = x + "/**"
145
- #adds the new ones to the array
146
- blanghash = Dir[@@tmproot].entries.sort
147
- blanghash.each do |x|
148
- if(test(?d,x))
149
- alanghash.push(x) #appends to the end of the array...
150
- end
151
- end
152
- end
153
- end
154
- alanghash.each do |x|
155
- #if it is a file...
156
- if(!test(?d,x))
157
- alanghash.delete(x)
158
- else #it is a directory...
159
- findfiles(x + "/**")
160
- end
161
- end
162
-
163
-
164
- #writes the contents of doc into the variable
134
+
135
+ # build the local Language hash file from the parts
136
+ startlangdir = File.join(LangDir,$lang)
137
+ #get a list of the files and subdirectories on the starting directory only
138
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
139
+ #loop through the list, ignore the files and add all new directories found
140
+ alanghash.each do |x|
141
+ #if a directory...
142
+ if(test(?d,x))
143
+ # add to the original list of directories
144
+ @@tmproot = x + "/**"
145
+ #adds the new ones to the array
146
+ blanghash = Dir[@@tmproot].entries.sort
147
+ blanghash.each do |x|
148
+ if(test(?d,x))
149
+ alanghash.push(x) #appends to the end of the array...
150
+ end
151
+ end
152
+ end
153
+ end
154
+ alanghash.each do |x|
155
+ #if it is a file...
156
+ if(!test(?d,x))
157
+ alanghash.delete(x)
158
+ else #it is a directory...
159
+ findfiles(x + "/**")
160
+ end
161
+ end
162
+
163
+
164
+ #writes the contents of doc into the variable
165
165
  languagehashvariable = languagehashvariable + " ; Message.update(" + $tempdoc + ' :rwdtinker => "Rwdtinker" ) '
166
-
167
166
 
168
- $tempdoc = " "
169
-
170
- Dir.chdir($progdir) # change back to top program directory
171
-
172
- temp = eval( languagehashvariable )
173
-
174
- $tempdoc = " "
175
-
176
- # build the actual program from the code parts
177
- #get a list of the files and subdirectories on the starting directory only
178
- a = Array.new(Dir[CodeDir].entries.sort)
179
- #loop through the list, ignore the files and add all new directories found
180
- a.each do |x|
181
- #if a directory...
182
- if(test(?d,x))
183
- # add to the original list of directories
184
- @@root = x + "/**"
185
- #adds the new ones to the array
186
- b = Dir[@@root].entries.sort
187
- b.each do |x|
188
- if(test(?d,x))
189
- a.push(x) #appends to the end of the array...
190
- end
191
- end
192
- end
193
- end
194
- a.each do |x|
195
- #if it is a file...
196
- if(!test(?d,x))
197
- a.delete(x)
198
- else #it is a directory...
199
- findfiles(x + "/**")
200
- end
201
- end
202
-
203
-
204
- # load the program file
205
- tempcoderesult = eval( $tempdoc )
206
-
207
- # build the actual GUI from the gui parts
208
- $tempdoc = " "
209
- #get a list of the files and subdirectories on the starting directory only
210
- a = Array.new(Dir[GuiDir].entries.sort)
211
- #loop through the list, ignore the files and add all new directories found
212
- a.each do |x|
213
- #if a directory...
214
- if(test(?d,x))
215
- #use this new dir find to add to the original list of directories
216
- @@root = x + "/**"
217
- #adds the new ones to the array
218
- b = Dir[@@root].entries.sort
219
- b.each do |x|
220
- if(test(?d,x))
221
- a.push(x) #appends to the end of the array...
222
- end
223
- end
224
- end
225
- end
226
- a.each do |x|
227
- #if it is a file...
228
- if(!test(?d,x))
229
- a.delete(x)
230
-
231
- else #it is a directory...
232
- loadguifile(x + "/**")
233
- end
234
- end
235
-
236
- # gui variable is done
237
- guiRWD = $tempdoc
238
-
239
- require 'socket' # Network stuff
240
- host = "127.0.0.1"
241
- port = $port
242
-
243
- # Create a socket to listen on and bind it to the host and port
244
- freeportfound = false
245
- until freeportfound
246
- begin
247
- @socket = UDPSocket::new()
248
- @socket.bind(host, port)
249
- freeportfound = true
250
- $port = port
251
- # Rescue the "Address in use" error
252
- rescue Errno::EADDRINUSE
253
- puts "RWD Startup: Port #{port} on host #{host} is already in use."
254
- port=port +1
255
- puts "trying port: #{port}"
256
- # Rescue the "Address not available' error
257
- rescue Errno::EADDRNOTAVAIL
258
- puts "RWD Startup: Address #{host} is not available to bind."
259
- port =port + 1
260
- puts "trying port: #{port}"
261
- # Rescue "permission denied errors
262
- rescue Errno::EACCES
263
- puts "RWD Startup: Access denied when binding interface addresses. ?"
264
- port =port + 1
265
- puts "trying port: #{port}"
266
- # Rescue all other errors
267
- rescue
268
- puts "RWD Startup: An error occured."
269
- port =port + 1
270
- puts "trying port: #{port}"
271
- # Rescue all other errors
272
- end
273
167
 
274
- end
168
+ $tempdoc = " "
169
+
170
+ Dir.chdir($progdir) # change back to top program directory
171
+
172
+ temp = eval( languagehashvariable )
173
+
174
+ $tempdoc = " "
175
+
176
+ # build the actual program from the code parts
177
+ #get a list of the files and subdirectories on the starting directory only
178
+ a = Array.new(Dir[CodeDir].entries.sort)
179
+ #loop through the list, ignore the files and add all new directories found
180
+ a.each do |x|
181
+ #if a directory...
182
+ if(test(?d,x))
183
+ # add to the original list of directories
184
+ @@root = x + "/**"
185
+ #adds the new ones to the array
186
+ b = Dir[@@root].entries.sort
187
+ b.each do |x|
188
+ if(test(?d,x))
189
+ a.push(x) #appends to the end of the array...
190
+ end
191
+ end
192
+ end
193
+ end
194
+ a.each do |x|
195
+ #if it is a file...
196
+ if(!test(?d,x))
197
+ a.delete(x)
198
+ else #it is a directory...
199
+ findfiles(x + "/**")
200
+ end
201
+ end
202
+
203
+
204
+ # load the program file
205
+ tempcoderesult = eval( $tempdoc )
206
+
207
+ # build the actual GUI from the gui parts
208
+ $tempdoc = " "
209
+ #get a list of the files and subdirectories on the starting directory only
210
+ a = Array.new(Dir[GuiDir].entries.sort)
211
+ #loop through the list, ignore the files and add all new directories found
212
+ a.each do |x|
213
+ #if a directory...
214
+ if(test(?d,x))
215
+ #use this new dir find to add to the original list of directories
216
+ @@root = x + "/**"
217
+ #adds the new ones to the array
218
+ b = Dir[@@root].entries.sort
219
+ b.each do |x|
220
+ if(test(?d,x))
221
+ a.push(x) #appends to the end of the array...
222
+ end
223
+ end
224
+ end
225
+ end
226
+ a.each do |x|
227
+ #if it is a file...
228
+ if(!test(?d,x))
229
+ a.delete(x)
230
+
231
+ else #it is a directory...
232
+ loadguifile(x + "/**")
233
+ end
234
+ end
235
+
236
+ # gui variable is done
237
+ guiRWD = $tempdoc
238
+
239
+ require 'socket' # Network stuff
240
+ host = "127.0.0.1"
241
+ port = $port
242
+
243
+ # Create a socket to listen on and bind it to the host and port
244
+ freeportfound = false
245
+ until freeportfound
246
+ begin
247
+ @socket = UDPSocket::new()
248
+ @socket.bind(host, port)
249
+ freeportfound = true
250
+ $port = port
251
+ # Rescue the "Address in use" error
252
+ rescue Errno::EADDRINUSE
253
+ puts "RWD Startup: Port #{port} on host #{host} is already in use."
254
+ port=port +1
255
+ puts "trying port: #{port}"
256
+ # Rescue the "Address not available' error
257
+ rescue Errno::EADDRNOTAVAIL
258
+ puts "RWD Startup: Address #{host} is not available to bind."
259
+ port =port + 1
260
+ puts "trying port: #{port}"
261
+ # Rescue "permission denied errors
262
+ rescue Errno::EACCES
263
+ puts "RWD Startup: Access denied when binding interface addresses. ?"
264
+ port =port + 1
265
+ puts "trying port: #{port}"
266
+ # Rescue all other errors
267
+ rescue
268
+ puts "RWD Startup: An error occured."
269
+ port =port + 1
270
+ puts "trying port: #{port}"
271
+ # Rescue all other errors
272
+ end
273
+
274
+ end
275
275
 
276
276
 
277
- RwdTinker.new( guiRWD).serve(port) # start the main class and program
277
+ RwdTinker.new( guiRWD).serve(port) # start the main class and program