tinkerbell 0.01

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 (171) hide show
  1. data/Readme.txt +475 -0
  2. data/bin/tinkerbell +19 -0
  3. data/code/01rwdcore/01rwdcore.rb +29 -0
  4. data/code/01rwdcore/02helptexthashbegin.rb +4 -0
  5. data/code/01rwdcore/03helptexthash.rb +23 -0
  6. data/code/01rwdcore/04helptextend.rb +6 -0
  7. data/code/01rwdcore/jumplinkcommand.rb +26 -0
  8. data/code/01rwdcore/openhelpwindow.rb +31 -0
  9. data/code/01rwdcore/returntomain.rb +10 -0
  10. data/code/01rwdcore/rundocuments.rb +10 -0
  11. data/code/01rwdcore/runeditconfiguration.rb +10 -0
  12. data/code/01rwdcore/runhelpabout.rb +10 -0
  13. data/code/01rwdcore/runopentinkerdocument.rb +7 -0
  14. data/code/01rwdcore/rwdtinkerversion.rb +22 -0
  15. data/code/01rwdcore/rwdwindowreturn.rb +9 -0
  16. data/code/01rwdcore/selectiontab.rb +9 -0
  17. data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
  18. data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
  19. data/code/01rwdcore/test_cases.rb +109 -0
  20. data/code/01rwdcore/test_harness.rb +13 -0
  21. data/code/01rwdcore/uploadreturns.rb +62 -0
  22. data/code/dd0viewphoto/dd0viewphoto.rb +3 -0
  23. data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
  24. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
  25. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +240 -0
  26. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +34 -0
  27. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +20 -0
  28. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
  29. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +53 -0
  30. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +12 -0
  31. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +33 -0
  32. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +22 -0
  33. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -0
  34. data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
  35. data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +19 -0
  36. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +38 -0
  37. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
  38. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +46 -0
  39. data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +52 -0
  40. data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
  41. data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +15 -0
  42. data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
  43. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -0
  44. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +22 -0
  45. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
  46. data/code/superant.com.sandbox/tabone.rb +1 -0
  47. data/code/superant.com.sandbox/tabthree.rb +54 -0
  48. data/code/superant.com.sandbox/tabtwo.rb +1 -0
  49. data/code/superant.com.tinkerbell/0uninstallapplet.rb +9 -0
  50. data/code/superant.com.tinkerbell/clearguiscreen.rb +15 -0
  51. data/code/superant.com.tinkerbell/helptexthashrwdhypernote.rb +30 -0
  52. data/code/superant.com.tinkerbell/initiateapplets.rb +148 -0
  53. data/code/superant.com.tinkerbell/launchtinkerbellnew.rb +19 -0
  54. data/code/superant.com.tinkerbell/listcodefiles.rb +8 -0
  55. data/code/superant.com.tinkerbell/listoptions.rb +7 -0
  56. data/code/superant.com.tinkerbell/loadcode01.rb +19 -0
  57. data/code/superant.com.tinkerbell/loadconfigurationrecord.rb +22 -0
  58. data/code/superant.com.tinkerbell/loadconfigurationvariables.rb +15 -0
  59. data/code/superant.com.tinkerbell/loadtab01.rb +50 -0
  60. data/code/superant.com.tinkerbell/openhelpwindow.rb +30 -0
  61. data/code/superant.com.tinkerbell/runrwdapplet.rb +14 -0
  62. data/code/superant.com.tinkerbell/rwdtinkerversion.rb +10 -0
  63. data/code/superant.com.tinkerbell/savecoderecord.rb +18 -0
  64. data/code/superant.com.tinkerbell/saveconfigurationrecord.rb +20 -0
  65. data/code/superant.com.tinkerbell/saveguirecord.rb +22 -0
  66. data/code/superant.com.tinkerbellback/helptexthashshell.rb +18 -0
  67. data/code/superant.com.tinkerbellback/rubyeval.rb +23 -0
  68. data/code/zz0applicationend/zz0end.rb +4 -0
  69. data/configuration/language.dist +8 -0
  70. data/configuration/rwdapplicationidentity.dist +3 -0
  71. data/configuration/rwdtinker.dist +18 -0
  72. data/configuration/tinkerbellw-0.01.dist +8 -0
  73. data/configuration/tinkerwin2variables.dist +17 -0
  74. data/gui/00coreguibegin/applicationguitop.rwd +4 -0
  75. data/gui/frontwindow0/cc0openphoto.rwd +22 -0
  76. data/gui/frontwindowselections/00selectiontabbegin.rwd +11 -0
  77. data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
  78. data/gui/frontwindowselections/wwselectionend.rwd +3 -0
  79. data/gui/frontwindowtdocuments/00documentbegin.rwd +6 -0
  80. data/gui/frontwindowtdocuments/tinkerdocuments.rwd +14 -0
  81. data/gui/frontwindowtdocuments/zzdocumentend.rwd +8 -0
  82. data/gui/helpaboutbegin/zzzrwdlasttab.rwd +6 -0
  83. data/gui/helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
  84. data/gui/helpaboutbegin/zzzzzzhelpabouttab.rwd +15 -0
  85. data/gui/helpaboutzend/helpscreenend.rwd +3 -0
  86. data/gui/helpaboutzend/zhelpscreenstart2.rwd +3 -0
  87. data/gui/helpaboutzend/zzzzhelpabout2.rwd +15 -0
  88. data/gui/helpaboutzend/zzzzhelpscreen2end.rwd +3 -0
  89. data/gui/tinkerbackwindows/superant.com.sandbox/10appletbegin.rwd +4 -0
  90. data/gui/tinkerbackwindows/superant.com.sandbox/11tabone.rwd +12 -0
  91. data/gui/tinkerbackwindows/superant.com.sandbox/22tabtwo.rwd +12 -0
  92. data/gui/tinkerbackwindows/superant.com.sandbox/33tabthree.rwd +23 -0
  93. data/gui/tinkerbackwindows/superant.com.sandbox/98jumplinkcommands.rwd +17 -0
  94. data/gui/tinkerbackwindows/superant.com.sandbox/9end.rwd +6 -0
  95. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
  96. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +41 -0
  97. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
  98. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
  99. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +30 -0
  100. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
  101. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
  102. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
  103. data/gui/tinkerbackwindows/superant.com.tinkerbell/10appletbegin.rwd +4 -0
  104. data/gui/tinkerbackwindows/superant.com.tinkerbell/10guiedit.rwd +37 -0
  105. data/gui/tinkerbackwindows/superant.com.tinkerbell/15codeedit.rwd +37 -0
  106. data/gui/tinkerbackwindows/superant.com.tinkerbell/67viewconfiguration.rwd +27 -0
  107. data/gui/tinkerbackwindows/superant.com.tinkerbell/81jumplinkcommands.rwd +17 -0
  108. data/gui/tinkerbackwindows/superant.com.tinkerbell/9end.rwd +6 -0
  109. data/gui/tinkerbackwindows/superant.com.tinkerbellback/1appname.rwd +4 -0
  110. data/gui/tinkerbackwindows/superant.com.tinkerbellback/1rwdrubyeval.rwd +15 -0
  111. data/gui/tinkerbackwindows/superant.com.tinkerbellback/2rwdrubyeval.rwd +17 -0
  112. data/gui/tinkerbackwindows/superant.com.tinkerbellback/77jumplinkcommands.rwd +17 -0
  113. data/gui/tinkerbackwindows/superant.com.tinkerbellback/z9end.rwd +6 -0
  114. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
  115. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
  116. data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
  117. data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
  118. data/gui/zzcoreguiend/yy9rwdend.rwd +4 -0
  119. data/init.rb +277 -0
  120. data/installed/temp.rb +1 -0
  121. data/installed/tinkerbellw-0.01.inf +13 -0
  122. data/lang/en/rwdcore/languagefile.rb +58 -0
  123. data/lang/es/rwdcore/languagefile-es.rb +62 -0
  124. data/lang/fr/rwdcore/languagefile.rb +64 -0
  125. data/lang/jp/rwdcore/languagefile.rb +72 -0
  126. data/lang/nl/rwdcore/languagefile.rb +75 -0
  127. data/lib/rconftool.rb +380 -0
  128. data/lib/rwd/browser.rb +123 -0
  129. data/lib/rwd/ftools.rb +174 -0
  130. data/lib/rwd/mime.rb +328 -0
  131. data/lib/rwd/net.rb +866 -0
  132. data/lib/rwd/ruby.rb +889 -0
  133. data/lib/rwd/rwd.rb +1405 -0
  134. data/lib/rwd/sgml.rb +236 -0
  135. data/lib/rwd/thread.rb +63 -0
  136. data/lib/rwd/tree.rb +371 -0
  137. data/lib/rwd/xml.rb +101 -0
  138. data/lib/rwdthemes/default.rwd +317 -0
  139. data/lib/rwdthemes/pda.rwd +72 -0
  140. data/lib/rwdthemes/windowslike.rwd +171 -0
  141. data/lib/zip/ioextras.rb +114 -0
  142. data/lib/zip/stdrubyext.rb +111 -0
  143. data/lib/zip/tempfile_bugfixed.rb +195 -0
  144. data/lib/zip/zip.rb +1378 -0
  145. data/lib/zip/zipfilesystem.rb +558 -0
  146. data/lib/zip/ziprequire.rb +61 -0
  147. data/rwd_files/HowTo_Tinker.txt +475 -0
  148. data/rwd_files/HowTo_TinkerBell.txt +110 -0
  149. data/rwd_files/HowTo_TinkerWin2.txt +202 -0
  150. data/rwd_files/Readme.txt +57 -0
  151. data/rwd_files/RubyWebDialogs.html +6 -0
  152. data/rwd_files/favicon.ico +0 -0
  153. data/rwd_files/rdoc-style.css +175 -0
  154. data/rwd_files/rwdapplications.html +54 -0
  155. data/rwd_files/tinker.png +0 -0
  156. data/rwdconfig.dist +21 -0
  157. data/rwdtinker.rb +1 -0
  158. data/tests/RubyGauge.rb +179 -0
  159. data/tests/checkdepends.sh +4 -0
  160. data/tests/cleancnf.sh +6 -0
  161. data/tests/makedist-tinkerbell.rb +56 -0
  162. data/tests/makedist.rb +69 -0
  163. data/tests/rdep.rb +354 -0
  164. data/tests/totranslate.lang +93 -0
  165. data/tinkerbell-0.01.gem +0 -0
  166. data/zips/rwdwaddresses-1.05.zip +0 -0
  167. data/zips/rwdwgutenberg-0.09.zip +0 -0
  168. data/zips/temp.rb +1 -0
  169. data/zips/tinkerbellw-0.01.zip +0 -0
  170. data/zips/wrubyslippers-1.06.zip +0 -0
  171. metadata +231 -0
@@ -0,0 +1,9 @@
1
+ # this code is to return to the window back from the help window
2
+ def rwdwindowreturn
3
+
4
+ @rwd_window = "#{$previouswindow}"
5
+ @rwd_tab = "#{$previoustab}"
6
+ end
7
+
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # this code is to return to the window back from the help window
2
+ def runselectiontab
3
+
4
+
5
+ @rwd_tab = "selectiontab"
6
+ end
7
+
8
+
9
+
@@ -0,0 +1,13 @@
1
+ # help about option setup for rwdtinker application
2
+ def setuphelpaboutoptions
3
+
4
+ @rwd_window = "tinkerhelpabout"
5
+ @helpaboutoptions = $tinkerhelpaboutarray.rwd_options
6
+ end
7
+
8
+ def setuphelpaboutoptionspassive
9
+
10
+
11
+ @helpaboutoptions = $tinkerhelpaboutarray.rwd_options
12
+ end
13
+
@@ -0,0 +1,6 @@
1
+ # Bind document names to rwdtinker document tab
2
+ def setuptinkerdocuments
3
+
4
+ @tinkerdocumentsarray = $tinkerdocumentsarray.rwd_options
5
+ end
6
+
@@ -0,0 +1,109 @@
1
+ # test harness
2
+
3
+
4
+ require 'test/unit/testcase'
5
+ require 'test/unit/assertions'
6
+ include Test::Unit::Assertions
7
+ include Test::Unit
8
+ def rwdtinker_all_tests
9
+ print "in rwdtinker all tests\n"
10
+ $testrwdtinkertestcase = TestSuite.new
11
+ test_runrwdtinkerbackwindow
12
+ end
13
+
14
+ def test_runrwdtinkerbackwindow
15
+
16
+
17
+ begin
18
+ testasserts = 0
19
+ print "Starting rwdtinker tests!\n"
20
+ runrwdtinkerbackwindow
21
+
22
+ assert_equal("tinkerbackwindow",@rwd_window) ; testasserts += 1
23
+ runselectiontab
24
+ assert_equal("selectiontab",@rwd_tab) ; testasserts += 1
25
+ showjumplinkoptions
26
+ @a_jumplinkinput = "returntomain"
27
+ runjumplinkcommand
28
+ assert_equal("main",@rwd_window) ; testasserts += 1
29
+ @a_jumplinkinput = "helpscreen"
30
+ runjumplinkcommand
31
+
32
+ assert_equal("rwdtinkerhelpwindow",@rwd_window) ; testasserts += 1
33
+ returntomain
34
+ assert_equal("main",@rwd_window) ; testasserts += 1
35
+ runtinkerdocuments
36
+ assert_equal("documentsrwdtinkerone",@rwd_tab) ; testasserts += 1
37
+ runrwdtinkerbackwindow
38
+
39
+ assert_equal("tinkerbackwindow",@rwd_window) ; testasserts += 1
40
+ @a_installapplet="/usr/src/rwdapplets/rwdtinker/zips/rwdahelloworld-0.5"
41
+ viewgemappletcontents
42
+ assert_not_nil(@appletcontentstext) ; testasserts += 1
43
+ runrwdtinkerwin2version
44
+ assert_equal("applicationversion",@rwd_window) ; testasserts += 1
45
+ returntomain
46
+ assert_equal("main",@rwd_window) ; testasserts += 1
47
+ runrwdtinkerbackwindow
48
+
49
+ assert_equal("tinkerbackwindow",@rwd_window) ; testasserts += 1
50
+ runremotezipsinstall
51
+ assert_equal("superantcomremotezipsinstall",@rwd_tab) ; testasserts += 1
52
+ runeditconfiguration
53
+ assert_equal("editconfigurationfile",@rwd_tab) ; testasserts += 1
54
+
55
+
56
+ $stderr.print "tests completed succesfully!\n"
57
+ $stderr.print testasserts, " asserts performed\n"
58
+
59
+ rescue NotImplementedError, Exception
60
+ $stderr.print $!
61
+
62
+ end
63
+
64
+ end
65
+
66
+
67
+
68
+ def teststobedown
69
+ runtinkerhelpabout
70
+ assert_equal("rwdtinkerhelpwindow",@rwd_tab) ; testasserts += 1
71
+ raise NotImplementedError, 'Need to write test_choosenewhelptopic'
72
+ raise NotImplementedError, 'Need to write test_listinstalledfiles'
73
+ raise NotImplementedError, 'Need to write test_listzipfilestoinstall'
74
+ raise NotImplementedError, 'Need to write test_loadconfigurationrecord'
75
+ raise NotImplementedError, 'Need to write test_loadconfigurationvariables'
76
+
77
+ raise NotImplementedError, 'Need to write test_main'
78
+
79
+ raise NotImplementedError, 'Need to write test_network_demon'
80
+
81
+ raise NotImplementedError, 'Need to write test_network_start'
82
+
83
+ raise NotImplementedError, 'Need to write test_openappletname'
84
+
85
+ raise NotImplementedError, 'Need to write test_removeapplet'
86
+
87
+ raise NotImplementedError, 'Need to write test_returntomain'
88
+
89
+ raise NotImplementedError, 'Need to write test_runcontrolcommand'
90
+
91
+ raise NotImplementedError, 'Need to write test_runhelpwindow'
92
+
93
+ raise NotImplementedError, 'Need to write test_runrwdtinkerversion'
94
+
95
+ raise NotImplementedError, 'Need to write test_runrwdtinkerwin2version'
96
+
97
+ raise NotImplementedError, 'Need to write test_runviewplatform'
98
+
99
+ raise NotImplementedError, 'Need to write test_rwdtinkerversiondiagnostic'
100
+
101
+ raise NotImplementedError, 'Need to write test_rwdwindowreturn'
102
+ raise NotImplementedError, 'Need to write test_saveconfigurationrecord'
103
+
104
+ raise NotImplementedError, 'Need to write test_viewappletcontents'
105
+ end
106
+
107
+
108
+
109
+
@@ -0,0 +1,13 @@
1
+ # this to start the test harness
2
+ def rwdtest_harness
3
+
4
+ print "in test harness\n"
5
+
6
+ $testharnessarray.each { |x|
7
+ print "calling #{x}\n"
8
+ eval("#{x}")
9
+
10
+ }
11
+
12
+ end
13
+
@@ -0,0 +1,62 @@
1
+ def uploadreturnsfile
2
+ require 'net/ftp'
3
+ BasicSocket.do_not_reverse_lookup = true
4
+ @returnsftpdisplays = ""
5
+ randomnumber = rand(9999) + 1000
6
+ puts randomnumber.to_i
7
+
8
+
9
+ returns_ftpsite = "ftp.superant.com"
10
+ returns_ftplogin = "anonymous@superant.com"
11
+ returns_ftppassword = "anonymous@superant.com"
12
+ returns_ftpdirectory = "/incoming/returns/"
13
+
14
+ begin
15
+ platformdisplay = "Platform is " + RUBY_PLATFORM + "\n"
16
+ platformdisplay = platformdisplay + "Ruby Version " + VERSION + "\n"
17
+ platformdisplay = platformdisplay + "rwdtinker version " + RwdTinkerVersion + "\n"
18
+ platformdisplay = platformdisplay + "application name " + $rwdapplicationidentity + "\n"
19
+ platformdisplay = platformdisplay + "program directory " + $progdir + "\n"
20
+ platformdisplay = platformdisplay + "hostname " + Resolv.getname(Resolv.getaddress("localhost")) + "\n"
21
+ platformdisplay = platformdisplay + "Date " + Date.today().to_s + "\n"
22
+ if ! @a_emailupload.empty?
23
+ platformdisplay = platformdisplay + @a_emailupload + "\n"
24
+ end
25
+ if ! @a_emailupload.empty?
26
+ platformdisplay = platformdisplay + @a_commentupload + "\n"
27
+ end
28
+ updatefile = Date.today().to_s + Resolv.getname(Resolv.getaddress("localhost")) + randomnumber.to_s
29
+
30
+ tmpdir = ENV['TMP']
31
+ if tmpdir.to_s.empty?
32
+ tmpdir = "/tmp"
33
+ end
34
+ fileName = File.join( tmpdir, updatefile)
35
+ fd = File.open(fileName,"w")
36
+ fd.print(platformdisplay) # save the record info to the file
37
+ fd.close
38
+ ftp = Net::FTP::new(returns_ftpsite)
39
+ @returnsftpdisplay = "data uploaded" + "\n"
40
+
41
+ filedirname = File.join(tmpdir,updatefile)
42
+
43
+ ftp.debug_mode = false
44
+ ftp.login(returns_ftplogin, returns_ftppassword)
45
+ ftp.chdir(returns_ftpdirectory)
46
+ print "I'm in the directory ", ftp.pwd(), "\n"
47
+
48
+ puts filedirname
49
+ ftp.puttextfile(filedirname , updatefile)
50
+ @returnsftpdisplay = @returnsftpdisplay + platformdisplay
51
+
52
+
53
+ ftp.close
54
+
55
+ rescue
56
+ @returnsftpdisplay = "upload error"
57
+ if ftp
58
+ ftp.close
59
+ end
60
+ print "ftp error"
61
+ end
62
+ end
@@ -0,0 +1,3 @@
1
+ def viewphoto
2
+ @rwd_window = "photo"
3
+ end
@@ -0,0 +1,19 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # This application is a framework for writing programs from RubyWebDialogs
3
+ # For information see http://www.rubyforge.net/projects/rwdapplications
4
+
5
+ require 'resolv'
6
+ require 'date'
7
+
8
+ # return the platform information
9
+ def runviewplatform
10
+ @platformdisplay = "Platform is " + RUBY_PLATFORM + "\n"
11
+ @platformdisplay = @platformdisplay + "Ruby Version " + VERSION + "\n"
12
+ @platformdisplay = @platformdisplay + "rwdtinker version " + RwdTinkerVersion + "\n"
13
+ @platformdisplay = @platformdisplay + "program directory " + $progdir + "\n"
14
+ @platformdisplay = @platformdisplay + "hostname " + Resolv.getname(Resolv.getaddress("localhost")) + "\n"
15
+ @platformdisplay = @platformdisplay + "application name " + $rwdapplicationidentity + "\n"
16
+ @platformdisplay = @platformdisplay + "Date " + Date.today().to_s
17
+
18
+ end
19
+
@@ -0,0 +1,61 @@
1
+ # help text files used by context sensitive help
2
+
3
+ Helptext.update( :tinkerwin2_help => " You can view the list of applets you can install
4
+ by clicking on the list files button
5
+
6
+ You can download an applet created by someone else
7
+
8
+ put the file in the zips directory
9
+
10
+ rwdtinker applets packaged as RubyGems can be used if you have RubyGems installed.
11
+ You can download rwdtinker gems at the 'Install Remote Applets' tab
12
+ to install applets you need the ruby zlib library installed
13
+ ",
14
+ :applet_viewing => "You can get a list of all installed applets by clicking the 'listfiles button'
15
+ To see the text of a install file
16
+ Type in the name of the file you want.
17
+
18
+ type it without the inf ending
19
+ rwdapplet-0.1
20
+
21
+ Then click the 'View Installed File' button
22
+
23
+ If it finds the file it will open it. It displays the text the search box.
24
+
25
+ You can uninstall applets on this screen",
26
+
27
+ :applet_installation => " You can download an applet created by someone else\n
28
+ put the file in the zips directory\n
29
+
30
+ click on the 'list zips' tab\n
31
+ click on 'list applets available for installing'\n
32
+
33
+ chose the applet you want\n
34
+ click on 'install applet'\n
35
+ If all goes well the applet should be installed.\n
36
+ You will need to restart rwdtinker to see the new screens
37
+ to install applets you need the ruby zlib library installed",
38
+
39
+ :applet_tinkerbackeditconfiguration => " You can edit the configuration
40
+
41
+ Remember to reload the configuration variables if you want your
42
+ changes used.",
43
+ :remotegemapplet_install => " To download and install use the 'Install Remote Applets'
44
+
45
+ First click on 'List applets in the Remote GEM Repository available for downloading'
46
+ then go to the very bottom to click on the applet you want
47
+ then on the top click 'install remote Gem applet package'
48
+
49
+ This installs the package in the Gem system
50
+ You still need to install it into rwdtinker - do that in the 'List Zips' tab
51
+
52
+ For this feature to work, you need
53
+ RubyGems installed
54
+ Variables set correctly in the tinerwin2.cnf file
55
+ $xpcommand, $gemdirectory_withgemfiles and $geminstalled_directory
56
+ the defaults as shipped will normally be for a Debian Linux system
57
+ On Debian Linux, you would usually need to be running rwdtinker as root in order to install RubyGems
58
+
59
+ You can view the list of rwdtinker applets you have installed already by clicking 'view already installed GEM applets'
60
+ "
61
+ )
@@ -0,0 +1,240 @@
1
+
2
+ #***********************************************************************
3
+ #* Rwd/Tinker -- A Ruby program for the RudyWebDialog.
4
+ #* Copyright (c) 2004 - 2005 by Steven Gibson. All Rights Reserved.
5
+ #*
6
+ #* This library is free software; you can redistribute it and/or
7
+ #* modify it under the terms of the GNU General Public
8
+ #* License as published by the Free Software Foundation; either
9
+ #* .
10
+ #*
11
+ #* These files are distributed in the hope that they will be useful,
12
+ #* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ #* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ #* General Public License for more details.
15
+ #*
16
+ #* You should have received a copy of the GNU General Public
17
+ #* License along with these files; if not, write to the Free Software
18
+ #* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
+ #*
20
+ #* For further information please contact the author by e-mail
21
+ #* at "smalllinux@gmail.com".
22
+ #***********************************************************************/
23
+
24
+
25
+
26
+ # integrate the new configuration files
27
+ def initiateapplet(nametextlocal)
28
+
29
+ debuginitiate = 0
30
+
31
+ if $DEBUG
32
+ $stderr.puts "starting config load with: #{nametextlocal}"
33
+ end
34
+
35
+
36
+ Dir.chdir($progdir ) #changes the current working directory
37
+
38
+ @confignew = "configuration/" + "#{nametextlocal}.cnf"
39
+ @configdist = "configuration/" + "#{nametextlocal}.dist"
40
+ Rconftool::install(@configdist,@confignew)
41
+
42
+ begin
43
+
44
+ configfileload = File.open(@configdist){|f| f.read}
45
+
46
+ eval configfileload #load config file
47
+
48
+
49
+
50
+ rescue
51
+
52
+ if $DEBUG
53
+ $stderr.puts "error in initiateapplets - config load"
54
+ end
55
+ debuginitiate += 1
56
+ end
57
+ $tempdoc = " "
58
+
59
+ Dir.chdir($progdir) # change back to top program directory
60
+
61
+ # build the English Language hash file from the parts
62
+ languagehashvariable = 'Message.update('
63
+ startlangdir = File.join(LangDir,"en")
64
+ #get a list of the files and subdirectories on the starting directory only
65
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
66
+ #loop through the list, ignore the files and add all new directories found
67
+ alanghash.each do |x|
68
+ #if a directory...
69
+ if(test(?d,x))
70
+ # add to the original list of directories
71
+ @@tmproot = x + "/**"
72
+ #adds the new ones to the array
73
+ blanghash = Dir[@@tmproot].entries.sort
74
+ blanghash.each do |x|
75
+ if(test(?d,x))
76
+ alanghash.push(x) #appends to the end of the array...
77
+ end
78
+ end
79
+ end
80
+ end
81
+ alanghash.each do |x|
82
+ #if it is a file...
83
+ if(!test(?d,x))
84
+ alanghash.delete(x)
85
+ else #it is a directory...
86
+ findfiles(x + "/**")
87
+ end
88
+ end
89
+
90
+
91
+ #writes the contents of doc into the languagehashvariable
92
+
93
+
94
+ languagehashvariable = languagehashvariable + $tempdoc + ' :rwdtinker => "Rwdtinker" ) ;'
95
+
96
+ # END of en Lang building
97
+ $tempdoc = " "
98
+ Dir.chdir($progdir) # change back to top program directory
99
+
100
+ # build the local Language hash file from the parts
101
+ startlangdir = File.join(LangDir,$lang)
102
+ #get a list of the files and subdirectories on the starting directory only
103
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
104
+ #loop through the list, ignore the files and add all new directories found
105
+ alanghash.each do |x|
106
+ #if a directory...
107
+ if(test(?d,x))
108
+ # add to the original list of directories
109
+ @@tmproot = x + "/**"
110
+ #adds the new ones to the array
111
+ blanghash = Dir[@@tmproot].entries.sort
112
+ blanghash.each do |x|
113
+ if(test(?d,x))
114
+ alanghash.push(x) #appends to the end of the array...
115
+ end
116
+ end
117
+ end
118
+ end
119
+ alanghash.each do |x|
120
+ #if it is a file...
121
+ if(!test(?d,x))
122
+ alanghash.delete(x)
123
+ else #it is a directory...
124
+ findfiles(x + "/**")
125
+ end
126
+ end
127
+
128
+
129
+ #writes the contents of doc into the variable
130
+
131
+ languagehashvariable = languagehashvariable + " Message.update(" + $tempdoc + ' :rwdtinker => "Rwdtinker" ) '
132
+
133
+
134
+
135
+ $tempdoc = " "
136
+
137
+ Dir.chdir($progdir) # change back to top program directory
138
+
139
+ temp = eval( languagehashvariable )
140
+
141
+
142
+ tempguistorage = $rwd_gui_tinker # if gui load fails restore old
143
+ begin # error trap
144
+
145
+ # build the actual GUI from the gui parts
146
+ $tempdoc = " "
147
+ #get a list of the files and subdirectories on the starting directory only
148
+ a = Array.new(Dir[GuiDir].entries.sort)
149
+ #loop through the list, ignore the files and add all new directories found
150
+ a.each do |x|
151
+ #if a directory...
152
+ if(test(?d,x))
153
+ #use this new dir find to add to the original list of directories
154
+ @@root = x + "/**"
155
+ #adds the new ones to the array
156
+ b = Dir[@@root].entries.sort
157
+ b.each do |x|
158
+ if(test(?d,x))
159
+ a.push(x) #appends to the end of the array...
160
+ end
161
+ end
162
+ end
163
+ end
164
+ a.each do |x|
165
+ #if it is a file...
166
+ if(!test(?d,x))
167
+ a.delete(x)
168
+
169
+ else #it is a directory...
170
+ loadguifile(x + "/**")
171
+
172
+
173
+ end
174
+ end
175
+
176
+ $rwd_gui_tinker = $tempdoc
177
+
178
+
179
+ rescue
180
+ $rwd_gui_tinker = tempguistorage # restore old gui
181
+ if $DEBUG
182
+ $stderr.puts "error in initiateapplets - gui building"
183
+ end
184
+
185
+ debuginitiate += 1
186
+ end
187
+
188
+ begin # error trap
189
+ # now load in the code files
190
+
191
+ $tempdoc = ""
192
+ tempcodeinstallline = ""
193
+
194
+ @fileName = "installed/" + nametextlocal + ".inf"
195
+
196
+ tmpfilearray = File.readlines(@fileName)
197
+
198
+ tmpfilearray.each do |line|
199
+
200
+ tempcodeinstallline = line.chomp
201
+ if tempcodeinstallline.include?('code/')
202
+ findfiles(tempcodeinstallline + "/**")
203
+ tempcoderesult = eval( $tempdoc ) # read the program code and evaluate
204
+ end
205
+ end
206
+
207
+
208
+ rescue
209
+ if $DEBUG
210
+ $stderr.puts "error in initiateapplets - code building"
211
+ end
212
+ debuginitiate += 1
213
+
214
+
215
+ end
216
+
217
+ setuphelpaboutoptions # update the help about list
218
+ setuptinkerdocuments # update the document pull down list
219
+ runhelpwindow # update the help menu
220
+ showjumplinkoptions # update the application link menu
221
+ runrwdtinkerbackwindow # back to applet window
222
+
223
+ # resultend = tempcodeinstallline .index("\n",resultstart)
224
+ tempresult = @fileName
225
+
226
+ return " applet loading successful " + tempresult
227
+
228
+
229
+
230
+ if debuginitiate > 0
231
+ return " initiateapplet .."
232
+ else
233
+ return " initiateapplet success"
234
+ end
235
+
236
+ end
237
+
238
+
239
+
240
+
@@ -0,0 +1,34 @@
1
+ # install rwdtinker applet from a long directory location
2
+ def installgemapplet
3
+ require 'fileutils'
4
+ require 'lib/zip/zip'
5
+ nametext = "%s" % [@a_installapplet]
6
+
7
+ begin # exception trapped block
8
+ fullname = nametext + ".zip"
9
+
10
+ zf = Zip::ZipFile.new(fullname)
11
+ zf.sort.each {
12
+ |entry|
13
+ zf.extract(entry.to_s, entry.to_s)
14
+ }
15
+
16
+ rescue
17
+
18
+ if $DEBUG
19
+ $stderr.puts "unzip error - applet may not be installed correctly"
20
+ end
21
+ @installapplettext = " .. "
22
+
23
+ end # exception rescue
24
+
25
+ @nametextbase = File.basename(nametext)
26
+ @returninitateresults = initiateapplet(@nametextbase)
27
+ @installapplettext = Message[:applet_installed] + " " + @returninitateresults
28
+
29
+
30
+ RWDWindow.new($rwd_gui_tinker, @rwd_window).render("DEFAULT")
31
+
32
+
33
+ end
34
+
@@ -0,0 +1,20 @@
1
+ # download gem of rwdtinker applet
2
+ def superantcominstallremotegemapplet
3
+ require 'fileutils'
4
+
5
+ tempnametext = "%s" % [@superantcominstallremoteappletinput]
6
+ temparray = tempnametext.split(/ /)
7
+ nametext = temparray[0]
8
+ begin # exception trapped block
9
+
10
+
11
+ commandline = $xpcommand + "gem install " + nametext
12
+
13
+ @superantcominstallremotegemappletresult = `#{commandline}`
14
+
15
+ rescue
16
+ @superantcominstallremotegemappletresult = "error during gem install!"
17
+ end # exception rescue
18
+
19
+ end
20
+
@@ -0,0 +1,12 @@
1
+ # this code is to list the gem directories that are installed
2
+ def superantcomshowgemfiledirs
3
+
4
+ fileList = Dir.new($gemdirectory_withgemfiles).entries.sort.delete_if { |x| ! (x =~ /\Arwdzip/) }
5
+ @superantcomshowgemappletdirsresult = fileList.rwd_method("superantcomshowgemappletdirsname")
6
+ end
7
+
8
+ def superantcomshowgemappletdirsname(inffile)
9
+ applet = inffile
10
+ @a_gemfiledirsinput = applet
11
+
12
+ end
@@ -0,0 +1,53 @@
1
+ # this code is to list the zips
2
+ def fillzipappletname(inffile)
3
+ applet = inffile.gsub(/\.zip$/, "")
4
+ @a_installapplet = applet
5
+
6
+ end
7
+
8
+ def findzipfiles(d)
9
+ a = Array.new(Dir[d].entries.sort)
10
+ #loop through and get the files names
11
+ a.each do |x|
12
+ #adjust the filters to the files you want to see...
13
+ if(!test(?d,x))
14
+ # only zip files
15
+ if x =~ /\.zip/
16
+ #opens the file thats in fileName as read only
17
+ $zipsarray = $zipsarray | ["#{x}"]
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ def listgemzips
24
+ startlangdir = $geminstalled_directory
25
+ #get a list of the files and subdirectories on the starting directory only
26
+ alanghash = Array.new(Dir[startlangdir].entries.sort)
27
+ p alanghash
28
+ #loop through the list, ignore the files and add all new directories found
29
+ alanghash.each do |x|
30
+ #if a directory...
31
+ if(test(?d,x))
32
+ # add to the original list of directories
33
+ @@tmproot = x + "/**"
34
+ #adds the new ones to the array
35
+ blanghash = Dir[@@tmproot].entries.sort
36
+ blanghash.each do |x|
37
+ if(test(?d,x))
38
+ alanghash.push(x) #appends to the end of the array...
39
+ end
40
+ end
41
+ end
42
+ end
43
+ alanghash.each do |x|
44
+ #if it is a file...
45
+ if(!test(?d,x))
46
+ alanghash.delete(x)
47
+ else #it is a directory...
48
+ findzipfiles(x + "/**")
49
+ end
50
+ end
51
+ @zipslistresult = $zipsarray.rwd_method("fillzipappletname")
52
+ end
53
+
@@ -0,0 +1,12 @@
1
+ # this code is to list the applets that are installed
2
+ def listinstalledfiles
3
+ fileList = Dir.new("installed").entries.sort.reverse.delete_if { |x| ! (x =~ /inf$/) }
4
+ @filesresult = fileList.rwd_method("fillappletname")
5
+ end
6
+
7
+ def fillappletname(inffile)
8
+ applet = inffile.gsub(/\.inf$/, "")
9
+ @a_installlist = applet
10
+ @a_removeapplet = applet
11
+ end
12
+