rwdruby 1.05
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.
- data/Readme.txt +462 -0
- data/bin/rwdruby +19 -0
- data/code/01rwdcore/01rwdcore.rb +29 -0
- data/code/01rwdcore/02helptexthashbegin.rb +4 -0
- data/code/01rwdcore/03helptexthash.rb +23 -0
- data/code/01rwdcore/04helptextend.rb +6 -0
- data/code/01rwdcore/jumplinkcommand.rb +26 -0
- data/code/01rwdcore/openhelpwindow.rb +31 -0
- data/code/01rwdcore/returntomain.rb +10 -0
- data/code/01rwdcore/rundocuments.rb +10 -0
- data/code/01rwdcore/runeditconfiguration.rb +10 -0
- data/code/01rwdcore/runhelpabout.rb +10 -0
- data/code/01rwdcore/runopentinkerdocument.rb +7 -0
- data/code/01rwdcore/rwdtinkerversion.rb +22 -0
- data/code/01rwdcore/rwdwindowreturn.rb +9 -0
- data/code/01rwdcore/selectiontab.rb +9 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
- data/code/01rwdcore/test_cases.rb +109 -0
- data/code/01rwdcore/test_harness.rb +13 -0
- data/code/01rwdcore/uploadreturns.rb +62 -0
- data/code/dd0viewphoto/dd0viewphoto.rb +3 -0
- data/code/superant.com.rwdshell/0runrefreshacpi.rb +7 -0
- data/code/superant.com.rwdshell/0uninstallapplet.rb +16 -0
- data/code/superant.com.rwdshell/changescriptname.rb +16 -0
- data/code/superant.com.rwdshell/clearrubyscreendisplay.rb +7 -0
- data/code/superant.com.rwdshell/clearscriptscreendisplay.rb +9 -0
- data/code/superant.com.rwdshell/deletescriptrecord.rb +20 -0
- data/code/superant.com.rwdshell/helptexthashshell.rb +31 -0
- data/code/superant.com.rwdshell/listrubyscripts.rb +13 -0
- data/code/superant.com.rwdshell/listscripts.rb +13 -0
- data/code/superant.com.rwdshell/loadconfigurationrecord.rb +26 -0
- data/code/superant.com.rwdshell/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.rwdshell/loadrubyscriptrecord.rb +20 -0
- data/code/superant.com.rwdshell/loadscriptrecord.rb +20 -0
- data/code/superant.com.rwdshell/openhelpwindowshell.rb +33 -0
- data/code/superant.com.rwdshell/playrubyscript.rb +23 -0
- data/code/superant.com.rwdshell/playscript.rb +23 -0
- data/code/superant.com.rwdshell/refresh.rb +19 -0
- data/code/superant.com.rwdshell/refreshacpi.rb +16 -0
- data/code/superant.com.rwdshell/rubyeval.rb +28 -0
- data/code/superant.com.rwdshell/runrwdshellbackwindow.rb +10 -0
- data/code/superant.com.rwdshell/runrwdshellwindow.rb +12 -0
- data/code/superant.com.rwdshell/rwdtinkerversion.rb +10 -0
- data/code/superant.com.rwdshell/savechangedscript.rb +19 -0
- data/code/superant.com.rwdshell/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.rwdshell/saverubyrecord.rb +19 -0
- data/code/superant.com.rwdshell/shelleval.rb +20 -0
- data/code/superant.com.rwdshell/test_cases.rb +45 -0
- data/code/superant.com.rwdshell/viewrubyscript.rb +18 -0
- data/code/superant.com.rwdshell/viewscript.rb +18 -0
- data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +61 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +240 -0
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +34 -0
- data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +20 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +53 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +12 -0
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +27 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +22 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +14 -0
- data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
- data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +38 -0
- data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +24 -0
- data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +46 -0
- data/code/superant.com.rwdtinkerbackwindow/removeappletvariables.rb +52 -0
- data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
- data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +15 -0
- data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +13 -0
- data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +19 -0
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +22 -0
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +24 -0
- data/code/zz0applicationend/zz0end.rb +4 -0
- data/configuration/language.dist +8 -0
- data/configuration/rwdapplicationidentity.dist +3 -0
- data/configuration/rwdtinker.dist +18 -0
- data/configuration/rwdwruby-1.05.dist +24 -0
- data/configuration/tinkerwin2variables.dist +17 -0
- data/gui/00coreguibegin/applicationguitop.rwd +4 -0
- data/gui/frontwindow0/cc0openphoto.rwd +22 -0
- data/gui/frontwindowselections/00selectiontabbegin.rwd +11 -0
- data/gui/frontwindowselections/jumplinkcommands.rwd +15 -0
- data/gui/frontwindowselections/wwselectionend.rwd +3 -0
- data/gui/frontwindowtdocuments/00documentbegin.rwd +6 -0
- data/gui/frontwindowtdocuments/tinkerdocuments.rwd +14 -0
- data/gui/frontwindowtdocuments/zzdocumentend.rwd +8 -0
- data/gui/helpaboutbegin/zzzrwdlasttab.rwd +6 -0
- data/gui/helpaboutbegin/zzzzhelpscreenstart.rwd +3 -0
- data/gui/helpaboutbegin/zzzzzzhelpabouttab.rwd +15 -0
- data/gui/helpaboutzend/helpscreenend.rwd +3 -0
- data/gui/helpaboutzend/zhelpscreenstart2.rwd +3 -0
- data/gui/helpaboutzend/zzzzhelpabout2.rwd +15 -0
- data/gui/helpaboutzend/zzzzhelpscreen2end.rwd +3 -0
- data/gui/tinkerbackwindows/superant.com.ashellscripts/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.ashellscripts/1rwdrubyeval.rwd +14 -0
- data/gui/tinkerbackwindows/superant.com.ashellscripts/2listplayscripts.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.ashellscripts/2listscripts.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.ashellscripts/3editscripts.rwd +26 -0
- data/gui/tinkerbackwindows/superant.com.ashellscripts/4scriptutilities.rwd +24 -0
- data/gui/tinkerbackwindows/superant.com.ashellscripts/6rwdshelleval.rwd +15 -0
- data/gui/tinkerbackwindows/superant.com.ashellscripts/98jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.ashellscripts/zbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.refreshacpi/1appname.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.refreshacpi/2rwdrefresh.rwd +14 -0
- data/gui/tinkerbackwindows/superant.com.refreshacpi/3rwdacpirefresh.rwd +14 -0
- data/gui/tinkerbackwindows/superant.com.refreshacpi/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.refreshacpi/z9end.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.refreshwindow/rwdrefresh.rwd +13 -0
- data/gui/tinkerbackwindows/superant.com.refreshwindow/rwdrefreshacpi.rwd +11 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/44listplayscripts.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/45listscripts.rwd +25 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/46editscriptrecord.rwd +30 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/92viewconfiguration.rwd +32 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/94rwddiagnostics.rwd +16 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/98jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/zbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +5 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +41 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +44 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +30 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +29 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +4 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +19 -0
- data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
- data/gui/zzcoreguiend/yy9rwdend.rwd +4 -0
- data/init.rb +277 -0
- data/installed/rwdrubydata1.inf +6 -0
- data/installed/rwdwruby-1.05.inf +13 -0
- data/installed/temp.rb +1 -0
- data/lang/en/rwdcore/languagefile.rb +58 -0
- data/lang/es/rwdcore/languagefile-es.rb +62 -0
- data/lang/fr/rwdcore/languagefile.rb +64 -0
- data/lang/jp/rwdcore/languagefile.rb +72 -0
- data/lang/nl/rwdcore/languagefile.rb +75 -0
- data/lib/rconftool.rb +380 -0
- data/lib/rwd/browser.rb +123 -0
- data/lib/rwd/ftools.rb +174 -0
- data/lib/rwd/mime.rb +328 -0
- data/lib/rwd/net.rb +866 -0
- data/lib/rwd/ruby.rb +889 -0
- data/lib/rwd/rwd.rb +1942 -0
- data/lib/rwd/sgml.rb +236 -0
- data/lib/rwd/thread.rb +63 -0
- data/lib/rwd/tree.rb +371 -0
- data/lib/rwd/xml.rb +101 -0
- data/lib/zip/ioextras.rb +114 -0
- data/lib/zip/stdrubyext.rb +111 -0
- data/lib/zip/tempfile_bugfixed.rb +195 -0
- data/lib/zip/zip.rb +1378 -0
- data/lib/zip/zipfilesystem.rb +558 -0
- data/lib/zip/ziprequire.rb +61 -0
- data/rwd_files/HowTo_Ruby.txt +311 -0
- data/rwd_files/HowTo_Tinker.txt +471 -0
- data/rwd_files/HowTo_TinkerWin2.txt +202 -0
- data/rwd_files/Readme.txt +57 -0
- data/rwd_files/RubyWebDialogs.html +6 -0
- data/rwd_files/favicon.ico +0 -0
- data/rwd_files/rdoc-style.css +175 -0
- data/rwd_files/rwdapplications.html +54 -0
- data/rwd_files/tinker.png +0 -0
- data/rwdconfig.dist +21 -0
- data/rwdruby.rb +1 -0
- data/tests/RubyGauge.rb +179 -0
- data/tests/checkdepends.sh +4 -0
- data/tests/cleancnf.sh +6 -0
- data/tests/makedist-rwdwruby.rb +56 -0
- data/tests/makedist.rb +66 -0
- data/tests/rdep.rb +354 -0
- data/tests/totranslate.lang +93 -0
- data/zips/rwdwaddresses-1.05.zip +0 -0
- data/zips/rwdwcalc-0.61.zip +0 -0
- data/zips/rwdwfoldeditor-0.02.zip +0 -0
- data/zips/rwdwgutenberg-0.09.zip +0 -0
- data/zips/rwdwruby-1.05.zip +0 -0
- data/zips/rwdwschedule-1.04.zip +0 -0
- data/zips/temp.rb +1 -0
- data/zips/wrubyslippers-1.06.zip +0 -0
- metadata +245 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# uninstall
|
|
2
|
+
|
|
3
|
+
def rwdwruby_1_05()
|
|
4
|
+
|
|
5
|
+
$tinkerdocumentsarray.delete_if {|x| x == "HowTo_Ruby.txt"}
|
|
6
|
+
$tinkerhelpaboutarray.delete_if {|x| x == "RwdRuby"}
|
|
7
|
+
Helptext.delete_if {|key, value| key == :rwdruby_help }
|
|
8
|
+
Helptext.delete_if {|key, value| key == :ShellEnvironment_help }
|
|
9
|
+
Helptext.delete_if {|key, value| key == :shelledit_help }
|
|
10
|
+
$rwdjumplink.delete_if {|x| x == "RwdRubyBackWindow"}
|
|
11
|
+
$rwdjumplink.delete_if {|x| x == "RunRuby" }
|
|
12
|
+
$rwdjumplink.delete_if {|x| x == "RefreshAcpi" }
|
|
13
|
+
|
|
14
|
+
@rwd_window = "main"
|
|
15
|
+
|
|
16
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# this code is to change the contact name
|
|
2
|
+
def changescriptname
|
|
3
|
+
begin
|
|
4
|
+
oldName = $shellscript_directory + "/" + @a_scriptfilename + ".sh"
|
|
5
|
+
newName = $shellscript_directory + "/" + @a_changescriptname + ".sh"
|
|
6
|
+
|
|
7
|
+
File.rename(oldName, newName)
|
|
8
|
+
@scriptfilechangeresult = "File Renamed!"
|
|
9
|
+
$currentscriptname = @a_changescriptname
|
|
10
|
+
rescue
|
|
11
|
+
@scriptfilechangeresult = "rename error"
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# this method views an existing address record
|
|
2
|
+
def deletescriptrecord
|
|
3
|
+
|
|
4
|
+
require 'fileutils'
|
|
5
|
+
|
|
6
|
+
if @a_scriptfilename
|
|
7
|
+
$currentscriptname = @a_scriptfilename
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
begin # exception trapped block
|
|
12
|
+
fileName = $shellscript_directory + "/" + $currentscriptname + ".sh"
|
|
13
|
+
File.delete(fileName)
|
|
14
|
+
@eventfilechangeresult = "File Deleted!"
|
|
15
|
+
$currentscriptname = ""
|
|
16
|
+
rescue
|
|
17
|
+
@eventfilechangeresult = "File Deletion error"
|
|
18
|
+
end # exception rescue
|
|
19
|
+
|
|
20
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
Helptext.update( :rwdshell_help => " You can get a list of all scripts by clicking the listfiles button
|
|
4
|
+
|
|
5
|
+
To see the text of a script
|
|
6
|
+
Type in the name of the script you want.
|
|
7
|
+
|
|
8
|
+
type it without the sh ending
|
|
9
|
+
myscript
|
|
10
|
+
|
|
11
|
+
Then click the 'ViewScript' button
|
|
12
|
+
|
|
13
|
+
If it finds the script it will open it.
|
|
14
|
+
It displays the text the search box.",
|
|
15
|
+
:ShellEnvironment_help => "You can view the setup that
|
|
16
|
+
is on your system.
|
|
17
|
+
|
|
18
|
+
Click on Fill
|
|
19
|
+
This will show your setup
|
|
20
|
+
|
|
21
|
+
You can edit the commands or comment
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
'Save Changes' will save the changes you have made - BE CERTAIN YOUR CHANGES ARE CORRECT
|
|
25
|
+
'Reload Variables' will load the changes you have made - otherwise your changes will be lost next reboot",
|
|
26
|
+
|
|
27
|
+
:shelledit_help => "You can edit scripts here
|
|
28
|
+
'Fill Record' will load the file selected on the script run tab
|
|
29
|
+
'Save Changes' will save the changes you have made -
|
|
30
|
+
'Clear' will clear the screen "
|
|
31
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# this code is to list the scripts
|
|
2
|
+
def listrubyscripts
|
|
3
|
+
fileList = Dir.new($shellscript_directory).entries.sort.delete_if { |x| ! (x =~ /rb$/) }
|
|
4
|
+
@listrubyscriptresult = fileList.rwd_method("fillrubyscriptname")
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def fillrubyscriptname(inffile)
|
|
8
|
+
applet = inffile.gsub(/\.rb$/, "")
|
|
9
|
+
@a_rubyscriptfilename = applet
|
|
10
|
+
$currentrubyscriptname = applet
|
|
11
|
+
@a_rubyscriptcmd = applet
|
|
12
|
+
end
|
|
13
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# this code is to list the scripts
|
|
2
|
+
def listscripts
|
|
3
|
+
fileList = Dir.new($shellscript_directory).entries.sort.delete_if { |x| ! (x =~ /sh$/) }
|
|
4
|
+
@listscriptresult = fileList.rwd_method("fillscriptname")
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def fillscriptname(inffile)
|
|
8
|
+
applet = inffile.gsub(/\.sh$/, "")
|
|
9
|
+
@a_scriptfilename = applet
|
|
10
|
+
$currentscriptname = applet
|
|
11
|
+
@a_scriptcmd = applet
|
|
12
|
+
end
|
|
13
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# this method puts the configuration rexord on the screen
|
|
2
|
+
def loadrwdshellconfiguration
|
|
3
|
+
|
|
4
|
+
require 'fileutils'
|
|
5
|
+
|
|
6
|
+
rwdrubyname = "rwdwruby-" + RwdRubyVersion + ".cnf"
|
|
7
|
+
@a_rshellconfigurationfilename = rwdrubyname
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
begin # exception trapped block
|
|
11
|
+
|
|
12
|
+
Dir.chdir($progdir)
|
|
13
|
+
fileName = File.join(ConfigurationDir, rwdrubyname)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
fd = File.open(fileName,"r")
|
|
17
|
+
@a_rshellconfiguration= fd.read
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
fd.close
|
|
22
|
+
rescue SystemCallError, StandardError
|
|
23
|
+
$stderr.print "system call error: " + $!
|
|
24
|
+
end # exception rescue
|
|
25
|
+
|
|
26
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# this method loads the on screen variables into the running class
|
|
2
|
+
def loadrwdshellconfigurationvariables
|
|
3
|
+
rwdrubyname = "rwdwruby-" + RwdrubyVersion + ".cnf"
|
|
4
|
+
|
|
5
|
+
configfiletoload = File.join(ConfigurationDir, rwdrubyname )
|
|
6
|
+
begin
|
|
7
|
+
load configfiletoload
|
|
8
|
+
@extrarshellconfigdatadisplay = ""
|
|
9
|
+
@newrshellconfigurationresult = "Config Variables loaded"
|
|
10
|
+
rescue
|
|
11
|
+
@extrarsconfigdatadisplay = ""
|
|
12
|
+
@newrshellconfigurationresult = "loading error"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# this method views an existing address record
|
|
2
|
+
def loadrubyscriptrecord
|
|
3
|
+
|
|
4
|
+
require 'fileutils'
|
|
5
|
+
currentscriptname = @a_rubyscriptfilename
|
|
6
|
+
|
|
7
|
+
begin # exception trapped block
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
fileName = $shellscript_directory + "/" + currentscriptname + ".rb"
|
|
11
|
+
|
|
12
|
+
fd = File.open(fileName,"r")
|
|
13
|
+
@a_rubyscriptrecord = fd.read
|
|
14
|
+
|
|
15
|
+
fd.close
|
|
16
|
+
rescue SystemCallError, StandardError
|
|
17
|
+
$stderr.print "system call error: " + $!
|
|
18
|
+
end # exception rescue
|
|
19
|
+
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# this method views an existing address record
|
|
2
|
+
def loadscriptrecord
|
|
3
|
+
|
|
4
|
+
require 'fileutils'
|
|
5
|
+
@a_tmpscriptfilename = $currentscriptname
|
|
6
|
+
|
|
7
|
+
begin # exception trapped block
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
fileName = $shellscript_directory + "/" + $currentscriptname + ".sh"
|
|
11
|
+
|
|
12
|
+
fd = File.open(fileName,"r")
|
|
13
|
+
@a_scriptfirstline = fd.readline.chomp
|
|
14
|
+
@a_scriptcommentline = fd.readline.chomp
|
|
15
|
+
fd.close
|
|
16
|
+
rescue SystemCallError, StandardError
|
|
17
|
+
$stderr.print "system call error: " + $!
|
|
18
|
+
end # exception rescue
|
|
19
|
+
|
|
20
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# this code is to call the help window
|
|
2
|
+
def runhelpwindowrwdshell
|
|
3
|
+
|
|
4
|
+
$help_topic = "rwdshell_help"
|
|
5
|
+
if @rwd_tab == "scriptlister"
|
|
6
|
+
$help_topic = "rwdshell_help"
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
if @rwd_tab == "viewrwdshellconfiguration"
|
|
10
|
+
$help_topic = "ShellEnvironment_help"
|
|
11
|
+
end
|
|
12
|
+
if @rwd_tab == "EditScriptsrwdshell"
|
|
13
|
+
$help_topic = "shelledit_help"
|
|
14
|
+
end
|
|
15
|
+
if @rwd_tab == "editrubyrecordfile"
|
|
16
|
+
$help_topic = "shelledit_help"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
$helptopicsarray = $helptopicsarray | ["rwdshell_help", "ShellEnvironment_help"]
|
|
22
|
+
$previouswindow = @rwd_window
|
|
23
|
+
$previoustab = @rwd_tab
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
if @rwd_window != "rwdtinkerhelpwindow"
|
|
27
|
+
$previouswindow = @rwd_window
|
|
28
|
+
$previoustab = @rwd_tab
|
|
29
|
+
end
|
|
30
|
+
runhelpwindow
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
def playrubyscript
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
nametext = "%s" % [@a_rubyscriptcmd]
|
|
5
|
+
|
|
6
|
+
begin # exception trapped block
|
|
7
|
+
|
|
8
|
+
fileName = $shellscript_directory + "/" + nametext + ".rb"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
rubyfile_contents = File.read( fileName)
|
|
12
|
+
temp = eval( rubyfile_contents)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
rescue SystemCallError, StandardError
|
|
21
|
+
$stderr.print "system call error: " + $!
|
|
22
|
+
end # exception rescue
|
|
23
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
def playscript
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
nametext = "%s" % [@a_scriptcmd]
|
|
5
|
+
|
|
6
|
+
begin # exception trapped block
|
|
7
|
+
|
|
8
|
+
fileName = $shellscript_directory + "/" + nametext + ".sh"
|
|
9
|
+
|
|
10
|
+
fd = File.open(fileName,"r")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
commandtext = fd.read
|
|
14
|
+
fd.close
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@playscript_display = `#{commandtext}`
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
rescue SystemCallError, StandardError
|
|
21
|
+
$stderr.print "system call error: " + $!
|
|
22
|
+
end # exception rescue
|
|
23
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
def refreshrun
|
|
2
|
+
|
|
3
|
+
refreshwindowtwo
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
$tempnumber = 0
|
|
7
|
+
|
|
8
|
+
def refreshwindowtwo
|
|
9
|
+
@rwd_window = "refreshwindowtwo"
|
|
10
|
+
|
|
11
|
+
t = Time.now
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
$tempnumber += 1
|
|
15
|
+
@refreshnumber = $tempnumber
|
|
16
|
+
@refreshresult1 = t.strftime("date: %m/%d/%Y")
|
|
17
|
+
@refreshresult2 = t.strftime("time: %I:%M%p")
|
|
18
|
+
|
|
19
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
def refreshrunacpi
|
|
2
|
+
|
|
3
|
+
refreshwindowthree
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
$tempnumber = 0
|
|
7
|
+
|
|
8
|
+
def refreshwindowthree
|
|
9
|
+
@rwd_window = "refreshwindowthree"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
$tempnumber += 1
|
|
13
|
+
@refreshnumber = $tempnumber
|
|
14
|
+
@refreshresult = `#{DateCommand}`
|
|
15
|
+
@acpitracking = `#{AcpiCommand}`
|
|
16
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
$buffer = ''
|
|
2
|
+
def $buffer.write(str) # create a variable to use in rubyeval
|
|
3
|
+
self << str
|
|
4
|
+
end
|
|
5
|
+
def rubyeval
|
|
6
|
+
|
|
7
|
+
require 'English'
|
|
8
|
+
# $tmpout = $stdout # save the original STDOUT
|
|
9
|
+
# $stdout = $buffer
|
|
10
|
+
begin # begin rescue monitored block
|
|
11
|
+
|
|
12
|
+
commandtextruby = "%s " % [@a_rubyeval]
|
|
13
|
+
|
|
14
|
+
# @rubydisplay = "hello"
|
|
15
|
+
|
|
16
|
+
@rubydisplay = eval( commandtextruby ).to_s
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
rescue # process exeption
|
|
22
|
+
# $stdout = $tmpout # restore STDOUT to normal
|
|
23
|
+
@rubydisplay = "\n" + "error in eval"
|
|
24
|
+
end # end of rescue process # of rescure monitored block
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
end
|
|
28
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Application RwdAddresses orginally (c) 2004 Steven Gibson under GPL.
|
|
2
|
+
#
|
|
3
|
+
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
|
4
|
+
|
|
5
|
+
# call the window
|
|
6
|
+
def runrwdrubybackwindow
|
|
7
|
+
@rwd_window = "rwdrubybackwindow"
|
|
8
|
+
@rwd_tab = "viewrwdrubyconfiguration"
|
|
9
|
+
end
|
|
10
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Application Rwdtinker orginally (c) 2004 Steven Gibson under GPL.
|
|
2
|
+
# This application is a contact book
|
|
3
|
+
# For more information about see http://www.rubyforge.net/projects/rwdapplications
|
|
4
|
+
|
|
5
|
+
# call the window
|
|
6
|
+
def runrwdrubywindow
|
|
7
|
+
|
|
8
|
+
@rwd_window = "rwdrubywindow"
|
|
9
|
+
@rwd_tab="rwdshellruby"
|
|
10
|
+
|
|
11
|
+
end
|
|
12
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
# return the version constant defined in the config file
|
|
6
|
+
def rwdrubyhelpaboutsetup
|
|
7
|
+
return ["RwdRuby","(c) 2004-2008 Steven Gibson ","Version #{RwdRubyVersion}"]
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
def savescriptrecord # this method adds a new script file
|
|
3
|
+
require 'fileutils'
|
|
4
|
+
if @a_tmpscriptfilename
|
|
5
|
+
newdata =@a_scriptfirstline.to_s + "\n #" + @a_scriptcommentline.to_s + "\n"
|
|
6
|
+
fullnewname = @a_tmpscriptfilename.to_s + ".sh"
|
|
7
|
+
begin # exception trapped block
|
|
8
|
+
fileName = File.join( $shellscript_directory, fullnewname )
|
|
9
|
+
fd = File.open(fileName,"w")
|
|
10
|
+
fd.print(newdata) # save the record info to the file
|
|
11
|
+
fd.close
|
|
12
|
+
@newdisplay=newdata # show the record info in the browser
|
|
13
|
+
$currentscriptname = "%s" % [@a_tmpscriptfilename] # grab the new filename to create
|
|
14
|
+
|
|
15
|
+
rescue
|
|
16
|
+
@newdisplay = "\n" + "system error in createnew method"
|
|
17
|
+
end # exception rescue
|
|
18
|
+
end
|
|
19
|
+
end # end of createnew
|