rwdshell 0.94 → 0.95
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 +8 -0
- data/code/{ag1core/aa0begin.rb → 01rwdcore/01rwdcore.rb} +2 -0
- data/code/01rwdcore/02helptexthashbegin.rb +4 -0
- data/code/01rwdcore/03helptexthash.rb +31 -0
- data/code/01rwdcore/04helptextend.rb +6 -0
- data/code/01rwdcore/openhelpwindow.rb +31 -0
- data/code/01rwdcore/returntomain.rb +10 -0
- data/code/01rwdcore/rwdwindowreturn.rb +11 -0
- data/code/superant.com.rwdshell/helptexthashrubyslippers.rb +81 -0
- data/code/superant.com.rwdshell/listrubyscripts.rb +13 -0
- data/code/superant.com.rwdshell/loadconfigurationrecord.rb +33 -0
- data/code/superant.com.rwdshell/loadconfigurationvariables.rb +13 -0
- data/code/superant.com.rwdshell/openhelpwindowrubyslippers.rb +50 -0
- data/code/superant.com.rwdshell/playrubyscript.rb +22 -0
- data/code/superant.com.rwdshell/returntomain.rb +10 -0
- data/code/superant.com.rwdshell/runrwdshellbackwindow.rb +10 -0
- data/code/superant.com.rwdshell/runrwdshellmenu1.rb +57 -0
- data/code/superant.com.rwdshell/saveconfigurationrecord.rb +18 -0
- data/code/superant.com.rwdshell/viewrubyscript.rb +18 -0
- data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +100 -0
- data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +37 -0
- data/code/{xb1rwdtinkerbackwindow → superant.com.rwdtinkerbackwindow}/installapplet.rb +8 -8
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +21 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +54 -0
- data/code/{xb1rwdtinkerbackwindow → superant.com.rwdtinkerbackwindow}/loadconfigurationrecord.rb +1 -1
- data/code/{xb1rwdtinkerbackwindow → superant.com.rwdtinkerbackwindow}/loadconfigurationvariables.rb +1 -1
- data/code/superant.com.rwdtinkerbackwindow/network.rb +87 -0
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +39 -0
- data/code/{xa5rwdtinkercallable/callable.rb → superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb} +2 -3
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +21 -0
- data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +21 -0
- data/configuration/rwdapplicationidentity.cnf +3 -0
- data/configuration/rwdshellversion.cnf +1 -1
- data/configuration/rwdtinker.cnf +6 -2
- data/configuration/rwdtinkerversion.cnf +1 -1
- data/configuration/tinkerwin2variables.cnf +3 -3
- data/configuration/tinkerwin2version.cnf +1 -1
- data/ev/rwd.rb +4 -3
- data/gui/00coreguibegin/applicationguitop.rwd +1 -1
- data/gui/frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd +1 -1
- data/gui/frontwindowselections/superant.com.rwdshellselectiontab/rwdshellbackwindowselectiontab.rwd +12 -0
- data/gui/frontwindowtdocumentbegin/superant.com.documentsbegin/tt0documentbegin.rwd +1 -1
- data/gui/frontwindowtdocumentzend/superant.com.documentsend/ww0documentend.rwd +5 -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 +38 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/v9returntab.rwd +11 -0
- data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/zbackend.rwd +6 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +43 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +38 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +33 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdcontrol.rwd +33 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +31 -0
- data/init.rb +38 -2
- data/lang/templangfile.rb +15 -15
- data/lang/xlocallangfile.rb +15 -15
- data/rwd_files/HowTo_Shell.txt +8 -0
- data/rwd_files/HowTo_Tinker.txt +56 -7
- data/scripts/test02.rb +2 -0
- data/zips/rwdwcalc-0.50.zip +0 -0
- metadata +86 -50
- data/gui/tinkerbackwindows/superant.com.tinercallablewindow/1appname.rwd +0 -17
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40editconfiguration.rwd +0 -36
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistzips.rwd +0 -35
- data/installed/rwdtinkerwin2-0.5.inf +0 -8
- data/installed/rwdviewlogo-0.4.inf +0 -4
- data/tests/rwdtinkertestEN.rb +0 -163
- data/tests/test.result +0 -32
- data/zips/rwdcalc-0.4.zip +0 -0
- /data/code/{ag1core → 01rwdcore}/rwdtinkerversion.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/changescriptname.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/clearscriptscreendisplay.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/deletescriptrecord.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/listscripts.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/loadscriptrecord.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/playscript.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/rubyeval.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/runrwdshellwindow.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/rwdshellversion.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/savechangedscript.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/shelleval.rb +0 -0
- /data/code/{dd0shelleval → superant.com.rwdshell}/viewscript.rb +0 -0
- /data/code/{xb1rwdtinkerbackwindow → superant.com.rwdtinkerbackwindow}/diagnostictab.rb +0 -0
- /data/code/{xb1rwdtinkerbackwindow → superant.com.rwdtinkerbackwindow}/listinstalledfiles.rb +0 -0
- /data/code/{xb1rwdtinkerbackwindow → superant.com.rwdtinkerbackwindow}/listzips.rb +0 -0
- /data/code/{xb1rwdtinkerbackwindow → superant.com.rwdtinkerbackwindow}/openappletname.rb +0 -0
- /data/code/{xb1rwdtinkerbackwindow → superant.com.rwdtinkerbackwindow}/removeapplet.rb +0 -0
- /data/code/{xb1rwdtinkerbackwindow → superant.com.rwdtinkerbackwindow}/rwdtinkerwin2version.rb +0 -0
- /data/code/{xb1rwdtinkerbackwindow → superant.com.rwdtinkerbackwindow}/saveconfigurationrecord.rb +0 -0
- /data/gui/tinkerbackwindows/{superant.com.tinkerbackwindow/3arwddiagnostics.rwd → superant.com.rwdshellbackwindow/94rwddiagnostics.rwd} +0 -0
- /data/gui/tinkerbackwindows/{superant.com.tinercallablewindow → superant.com.tinkerhelpwindow}/9end.rwd +0 -0
- /data/installed/{rwdshell-0.93.inf → rwdshell-0.95.inf} +0 -0
data/Readme.txt
CHANGED
|
@@ -193,6 +193,14 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
|
|
|
193
193
|
Thanks, Steven Gibson
|
|
194
194
|
|
|
195
195
|
== Changelog
|
|
196
|
+
version 0.95
|
|
197
|
+
added ruby script running
|
|
198
|
+
add back window for more control tabs
|
|
199
|
+
beginning of context sensitive help
|
|
200
|
+
wider text boxes for configuration information
|
|
201
|
+
updated for rwdtinker 1.51 - finds available port and remote control
|
|
202
|
+
updated for rwdtinker 1.52 - cam install applets from Gems
|
|
203
|
+
|
|
196
204
|
version 0.94
|
|
197
205
|
updated for rwdtinker 1.44 - refactor gui directory structure
|
|
198
206
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Help files for RwdTinker core
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
:general_help => "You can work with Applets: go to 'Selection tab',
|
|
5
|
+
On that back screen you will find:
|
|
6
|
+
List Applets: you can see and delete installed applets
|
|
7
|
+
List Zips: you can see lists of applets that you can install
|
|
8
|
+
Edit Configuration: You can view the rwdtinker configuration and change it
|
|
9
|
+
Diagnostic Tab: You can view the environments variables that rwdtinker is running with
|
|
10
|
+
",
|
|
11
|
+
:network_help => "Using over a Network: To serve the application over your local LAN,change the last line in the
|
|
12
|
+
init.rb file to something like:\n
|
|
13
|
+
RwdTinker.file(RWDFile).serve(8080, '-r' ? '.rwduids' : nil)\n
|
|
14
|
+
Then you should be able to login at: http://yourhostname:8080",
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
:documents_rwdtinker => "Documents:
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
when you click on a document name, the document should pop up in a
|
|
21
|
+
browser window, or in another browser tab.",
|
|
22
|
+
:remote_control => "Remote control gives you a way to determine what applications are running on which ports
|
|
23
|
+
|
|
24
|
+
The name of the application is set in the config file
|
|
25
|
+
You need to click the show remote command choices first - this will show the port and query choices
|
|
26
|
+
Then you can click in 'Run Command' to see if other applications are running.
|
|
27
|
+
|
|
28
|
+
The remote ports daemon will not be running unless you start it.
|
|
29
|
+
|
|
30
|
+
"
|
|
31
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# this code is to call the help window
|
|
2
|
+
def runhelpwindow
|
|
3
|
+
$helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing","applet_tinkerbackeditconfiguration","remote_control"]
|
|
4
|
+
|
|
5
|
+
if @rwd_window == "main"
|
|
6
|
+
if @rwd_tab == "documentsrwdtinkerone"
|
|
7
|
+
$help_topic = "documents_rwdtinker"
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
if @rwd_window == "rwdtinkerhelpwindow"
|
|
13
|
+
puts "in help window processing"
|
|
14
|
+
else
|
|
15
|
+
$previouswindow = @rwd_window
|
|
16
|
+
$previoustab = @rwd_tab
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@rwdhelptopic = $help_topic
|
|
21
|
+
@rwdhelpdataoutput = "#{Helptext[:"#{$help_topic}"]}"
|
|
22
|
+
@rwdhelpsubchoicesoutput = $helptopicsarray.rwd_method("choosenewhelptopic")
|
|
23
|
+
@rwd_window = "rwdtinkerhelpwindow"
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def choosenewhelptopic(inffile)
|
|
27
|
+
$help_topic = inffile
|
|
28
|
+
runhelpwindow
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
Helptext.update( :rubyslippers_generalhelp => " You can view the list of gems you have installed
|
|
4
|
+
by clicking on the list files button
|
|
5
|
+
|
|
6
|
+
You can view the contents of the gemspec file by typing or pasting a name in.
|
|
7
|
+
|
|
8
|
+
When you are finished press the open button (leave off the .gemspec ending) ",
|
|
9
|
+
:Install_Gem => "You can list the Gems available in the repository
|
|
10
|
+
Click on the button.
|
|
11
|
+
It will take several seconds then should show the list.
|
|
12
|
+
|
|
13
|
+
To install a gem, enter the name into to textbox and
|
|
14
|
+
click on the install Gem button
|
|
15
|
+
You should see the result of the command on the screen
|
|
16
|
+
|
|
17
|
+
You can check in the first tab if it is installed.",
|
|
18
|
+
:GemCommands_help => "You can view the setup that Gem has on your system.
|
|
19
|
+
|
|
20
|
+
Click on Show Environment
|
|
21
|
+
This will show your setup
|
|
22
|
+
|
|
23
|
+
You can run a Gem command or a shell command
|
|
24
|
+
|
|
25
|
+
Click on the 'Show Gem Command Choices' this will bringup the command that will be added to 'gem'
|
|
26
|
+
you can choose the blank choice or:
|
|
27
|
+
help,--version,list --local,check -a,check --test,search,search --remote,specification,uninstall
|
|
28
|
+
|
|
29
|
+
Enter the command in the box and press the
|
|
30
|
+
Run Command button
|
|
31
|
+
|
|
32
|
+
It displays the result of the command on the screen.
|
|
33
|
+
|
|
34
|
+
Click 'List Installed Gem Files' to bring up a list at the bottom of the page.
|
|
35
|
+
You can click on one to fill in the second command box. You will probably need to remove the version on the end
|
|
36
|
+
of the file name for the gem command to properly work.
|
|
37
|
+
the commands that can take a file name are: list --local,check --test,search,search --remote,specification,uninstall
|
|
38
|
+
|
|
39
|
+
",
|
|
40
|
+
:gemfiles_help => "You can view the files that are installed for applications
|
|
41
|
+
|
|
42
|
+
Click on Show Gem Dirs
|
|
43
|
+
This will show your list of Gems installed
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
Click on Show Application Files
|
|
47
|
+
This will show your list of files installed",
|
|
48
|
+
:gemdocs_help => "You can scan for the Gem doc server.
|
|
49
|
+
|
|
50
|
+
If the gem doc server is running you can click and view the docs
|
|
51
|
+
The docs for installed Gems should be visible ",
|
|
52
|
+
:gemfilesinstalled => "You can see a list of gems that are installed on your system",
|
|
53
|
+
:gemconfiguration_help => "You can view the configuration file for Rubyslippers and edit it
|
|
54
|
+
'Fill Record' will load the configuration file rubyslippers.cnf into the screen input boxes
|
|
55
|
+
'Save Changes' will save the changes you have made - BE CERTAIN YOUR CHANGES ARE CORRECT
|
|
56
|
+
'Reload Variables' will load the changes you have made - otherwise your changes will be load next reboot
|
|
57
|
+
|
|
58
|
+
",
|
|
59
|
+
:gemspecdata_help => "You can view gemspecs
|
|
60
|
+
|
|
61
|
+
The directory searched in is in the rubyslippers.cnf
|
|
62
|
+
",
|
|
63
|
+
:editgemspec_help => "You can edit gemspec
|
|
64
|
+
You need to open a gemspec in the 'View Gemspec' tab first
|
|
65
|
+
|
|
66
|
+
The directory searched in is in the rubyslippers.cnf
|
|
67
|
+
",
|
|
68
|
+
:buildgem_help => "gem utilities are available as well as the gem build command
|
|
69
|
+
|
|
70
|
+
You can rename a gemspec, copy a gemspec or delete a gemspec
|
|
71
|
+
|
|
72
|
+
You can select a gemspec by clicking on 'list gemspecs'
|
|
73
|
+
|
|
74
|
+
You need to select a directory for the gem to be built in by clicking on 'list Gem Directories'
|
|
75
|
+
|
|
76
|
+
The directory searched in is in the rubyslippers.cnf",
|
|
77
|
+
:viewgemdir_help => "you can view the files in the gem directory before you build it
|
|
78
|
+
You can select a directory for the gem to be built in by clicking on 'list Gem Directories'
|
|
79
|
+
"
|
|
80
|
+
|
|
81
|
+
)
|
|
@@ -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,33 @@
|
|
|
1
|
+
# this method puts the configuration rexord on the screen
|
|
2
|
+
def loadrwdshellconfiguration
|
|
3
|
+
|
|
4
|
+
require 'fileutils'
|
|
5
|
+
|
|
6
|
+
@a_rshellconfigurationfilename = "playscripts.cnf"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
begin # exception trapped block
|
|
10
|
+
|
|
11
|
+
Dir.chdir($progdir)
|
|
12
|
+
fileName = File.join(ConfigurationDir, "playscripts.cnf")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
fd = File.open(fileName,"r")
|
|
16
|
+
@a_rshellconfigline1= fd.readline.chomp
|
|
17
|
+
@a_rshellconfigline2 = fd.readline.chomp
|
|
18
|
+
@a_rshellconfigline3 = fd.readline.chomp
|
|
19
|
+
@a_rshellconfigline4 = fd.readline.chomp
|
|
20
|
+
@a_rshellconfigline5 = fd.readline.chomp
|
|
21
|
+
@a_rshellconfigline6 = fd.readline.chomp
|
|
22
|
+
@a_rshellconfigline7 =fd.readline.chomp
|
|
23
|
+
@a_rshellconfigline8 = fd.readline.chomp
|
|
24
|
+
@a_rshellconfigline9 = fd.readline.chomp
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
fd.close
|
|
29
|
+
rescue SystemCallError, StandardError
|
|
30
|
+
$stderr.print "system call error: " + $!
|
|
31
|
+
end # exception rescue
|
|
32
|
+
|
|
33
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# this method loads the on screen variables into the running class
|
|
2
|
+
def loadrubyslippersconfigurationvariables
|
|
3
|
+
|
|
4
|
+
configfiletoload = File.join(ConfigurationDir,"rubyslippers.cnf")
|
|
5
|
+
begin
|
|
6
|
+
load configfiletoload
|
|
7
|
+
@extrarsconfigdatadisplay = ""
|
|
8
|
+
@newrsconfigurationresult = "Config Variables loaded"
|
|
9
|
+
rescue
|
|
10
|
+
@extrarsconfigdatadisplay = ""
|
|
11
|
+
@newrsconfigurationresult = "loading error"
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# this code is to call the help window
|
|
2
|
+
def runhelpwindowrubyslippers
|
|
3
|
+
|
|
4
|
+
$help_topic = "GemCommands_help"
|
|
5
|
+
if @rwd_tab == "Viewgemdata"
|
|
6
|
+
$help_topic = "rubyslippers_generalhelp"
|
|
7
|
+
end
|
|
8
|
+
if @rwd_tab == "geminstall"
|
|
9
|
+
$help_topic = "Install_Gem"
|
|
10
|
+
end
|
|
11
|
+
if @rwd_tab == "gemcommands"
|
|
12
|
+
$help_topic = "GemCommands_help"
|
|
13
|
+
end
|
|
14
|
+
if @rwd_tab == "gemfilesinstalled"
|
|
15
|
+
$help_topic = "gemfiles_help"
|
|
16
|
+
end
|
|
17
|
+
if @rwd_tab == "gemservescan"
|
|
18
|
+
$help_topic = "gemdocs_help"
|
|
19
|
+
end
|
|
20
|
+
if @rwd_tab == "viewrubyslippersconfiguration"
|
|
21
|
+
$help_topic = "gemconfiguration_help"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
if @rwd_tab == "Viewgemspecdata"
|
|
25
|
+
$help_topic = "gemspecdata_help"
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
if @rwd_tab == "editgemspecrecordfile"
|
|
29
|
+
$help_topic = "editgemspec_help"
|
|
30
|
+
end
|
|
31
|
+
if @rwd_tab == "gemutilitiesrubyslippers"
|
|
32
|
+
$help_topic = "buildgem_help"
|
|
33
|
+
end
|
|
34
|
+
if @rwd_tab == "viewgemdir"
|
|
35
|
+
$help_topic = "viewgemdir_help"
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
$helptopicsarray = $helptopicsarray | ["rubyslippers_generalhelp", "Install_Gem","GemCommands_help", "gemfilesinstalled","gemdocs_help","gemconfiguration_help","gemspecdata_help","editgemspec_help","buildgem_help","viewgemdir_help"]
|
|
39
|
+
$previouswindow = @rwd_window
|
|
40
|
+
$previoustab = @rwd_tab
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if @rwd_window != "rwdtinkerhelpwindow"
|
|
44
|
+
$previouswindow = @rwd_window
|
|
45
|
+
$previoustab = @rwd_tab
|
|
46
|
+
end
|
|
47
|
+
runhelpwindow
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
def playrubyscript
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
nametext = "%s" % [@a_rubyscriptcmd]
|
|
5
|
+
|
|
6
|
+
begin # exception trapped block
|
|
7
|
+
fileName = "scripts/" + nametext + ".rb"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
rubyfile_contents = File.read( fileName)
|
|
11
|
+
temp = eval( rubyfile_contents)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
rescue SystemCallError, StandardError
|
|
20
|
+
$stderr.print "system call error: " + $!
|
|
21
|
+
end # exception rescue
|
|
22
|
+
end
|
|
@@ -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 runrwdshellbackwindow
|
|
7
|
+
@rwd_window = "rwdshellbackwindow"
|
|
8
|
+
@rwd_tab = "viewrwdshellconfiguration"
|
|
9
|
+
end
|
|
10
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
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 runrubyslippersmenu1
|
|
7
|
+
@rwd_window = "main"
|
|
8
|
+
@rwd_tab = "gemcommands"
|
|
9
|
+
end
|
|
10
|
+
def runrubyslippersmenu2
|
|
11
|
+
@rwd_window = "main"
|
|
12
|
+
@rwd_tab = "Viewgemdata"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def runrubyslippersmenu3
|
|
17
|
+
@rwd_window = "main"
|
|
18
|
+
@rwd_tab = "geminstall"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def runrubyslippersmenu4
|
|
22
|
+
@rwd_window = "main"
|
|
23
|
+
@rwd_tab = "gemfilesinstalled"
|
|
24
|
+
end
|
|
25
|
+
def runrubyslippersmenu5
|
|
26
|
+
@rwd_window = "main"
|
|
27
|
+
@rwd_tab = "gemservescan"
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def runrubyslippersmenu6
|
|
31
|
+
@rwd_window = "rubyslippersbackwindow"
|
|
32
|
+
@rwd_tab = "Viewgemspecdata"
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def runrubyslippersmenu7
|
|
36
|
+
@rwd_window = "rubyslippersbackwindow"
|
|
37
|
+
@rwd_tab = "editgemspecrecordfile"
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def runrubyslippersmenu8
|
|
41
|
+
@rwd_window = "rubyslippersbackwindow"
|
|
42
|
+
@rwd_tab = "gemutilitiesrubyslippers"
|
|
43
|
+
end
|
|
44
|
+
def runrubyslippersmenu9
|
|
45
|
+
@rwd_window = "rubyslippersbackwindow"
|
|
46
|
+
@rwd_tab = "viewgemdir"
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def runrubyslippersmenu10
|
|
50
|
+
@rwd_window = "rubyslippersbackwindow"
|
|
51
|
+
@rwd_tab = "viewrubyslippersconfiguration"
|
|
52
|
+
end
|
|
53
|
+
def runrubyslippersmenu11
|
|
54
|
+
@rwd_window = "main"
|
|
55
|
+
@rwd_tab = "documentsrwdtinkerone"
|
|
56
|
+
end
|
|
57
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# this method adds a new address record
|
|
2
|
+
def saverubyslippersconfiguration
|
|
3
|
+
require 'fileutils'
|
|
4
|
+
|
|
5
|
+
newname = "rubyslippers.cnf" # grab the filename to create
|
|
6
|
+
newdata =@a_rsconfigline1.to_s + "\n" + @a_rsconfigline2.to_s + "\n" + @a_rsconfigline3.to_s + "\n" + @a_rsconfigline4.to_s + "\n" + @a_rsconfigline5.to_s + "\n" + @a_rsconfigline6.to_s + "\n" + @a_rsconfigline7.to_s + "\n" + @a_rsconfigline8.to_s + "\n" + @a_rsconfigline9.to_s + "\n"
|
|
7
|
+
|
|
8
|
+
begin # exception trapped block
|
|
9
|
+
fileName = File.join( ConfigurationDir, newname )
|
|
10
|
+
fd = File.open(fileName,"w")
|
|
11
|
+
fd.print(newdata) # save the record info to the file
|
|
12
|
+
fd.close
|
|
13
|
+
@newconfigurationresult=newdata # show the record info in the browser
|
|
14
|
+
rescue SystemCallError, StandardError
|
|
15
|
+
$stderr.print "system call error: " + $!
|
|
16
|
+
end # exception rescue
|
|
17
|
+
|
|
18
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
def viewrubyscript
|
|
2
|
+
require 'fileutils'
|
|
3
|
+
$currentscriptname = "%s" % [@a_rubyscriptfilename]
|
|
4
|
+
|
|
5
|
+
begin # exception trapped block
|
|
6
|
+
fileName = $shellscript_directory+ "/" + $currentrubyscriptname + ".rb"
|
|
7
|
+
|
|
8
|
+
fd = File.open(fileName,"r")
|
|
9
|
+
@displayrubyscripttext = " "
|
|
10
|
+
while ! fd.eof?
|
|
11
|
+
@displayrubyscripttext = fd.read
|
|
12
|
+
end
|
|
13
|
+
fd.close
|
|
14
|
+
rescue
|
|
15
|
+
@displayrubyscripttext = "\n" + "error"
|
|
16
|
+
end # exception rescue
|
|
17
|
+
|
|
18
|
+
end
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#
|
|
2
|
+
|
|
3
|
+
def runcontrolcommand
|
|
4
|
+
require 'socket'
|
|
5
|
+
|
|
6
|
+
# Change this line...
|
|
7
|
+
ip = '127.0.0.1'
|
|
8
|
+
# And this one...
|
|
9
|
+
port = $rwdcontrolport1
|
|
10
|
+
if @a_remoteportinput
|
|
11
|
+
port = @a_remoteportinput.to_i
|
|
12
|
+
end
|
|
13
|
+
# Done!
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
commandtext = @a_remotecommandinput.to_s
|
|
17
|
+
|
|
18
|
+
remotehostnotfound = true
|
|
19
|
+
|
|
20
|
+
client = UDPSocket::new()
|
|
21
|
+
client.send(commandtext, 0, ip, port)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
if (commandtext == "stop")
|
|
25
|
+
begin
|
|
26
|
+
@socket = UDPSocket::new()
|
|
27
|
+
@socket.bind(ip, port)
|
|
28
|
+
# Rescue the "Address in use" error
|
|
29
|
+
rescue Errno::EADDRINUSE
|
|
30
|
+
|
|
31
|
+
databack, info = client.recv(128)
|
|
32
|
+
@remotecommandresult = databack
|
|
33
|
+
@lastremotecommand = "rwdtinker remote:: Port #{port} on host #{ip} ."
|
|
34
|
+
remotehostnotfound = false
|
|
35
|
+
|
|
36
|
+
# Rescue the "Address not available" error
|
|
37
|
+
rescue Errno::EADDRNOTAVAIL
|
|
38
|
+
puts "Network plugin: Address #{host} is not available to bind."
|
|
39
|
+
|
|
40
|
+
# Rescue "permission denied errors
|
|
41
|
+
rescue Errno::EACCES
|
|
42
|
+
puts "Network plugin: Access denied when binding interface addresses. Did you try to bind a port under 1024 as a regular user?"
|
|
43
|
+
|
|
44
|
+
# Rescue all other errors
|
|
45
|
+
rescue
|
|
46
|
+
puts "Network plugin: An error occured."
|
|
47
|
+
|
|
48
|
+
# Rescue all other errors
|
|
49
|
+
end
|
|
50
|
+
if remotehostnotfound
|
|
51
|
+
@remotecommandresult = "Remote Host not running"
|
|
52
|
+
end
|
|
53
|
+
@socket.close
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
remotehostnotfound = true
|
|
57
|
+
if (commandtext == "query")
|
|
58
|
+
begin
|
|
59
|
+
@socket = UDPSocket::new()
|
|
60
|
+
@socket.bind(ip, port)
|
|
61
|
+
# Rescue the "Address in use" error
|
|
62
|
+
rescue Errno::EADDRINUSE
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
databack, info = client.recv(128)
|
|
66
|
+
@remotecommandresult = databack
|
|
67
|
+
@lastremotecommand = "rwdtinker remote: Port #{port} on host #{ip} "
|
|
68
|
+
remotehostnotfound = false
|
|
69
|
+
|
|
70
|
+
# Rescue the "Address not available' error
|
|
71
|
+
rescue Errno::EADDRNOTAVAIL
|
|
72
|
+
puts "Network plugin: Address #{host} is not available to bind."
|
|
73
|
+
|
|
74
|
+
# Rescue "permission denied errors
|
|
75
|
+
rescue Errno::EACCES
|
|
76
|
+
puts "Network plugin: Access denied when binding interface addresses. Did you try to bind a port under 1024 as a regular user?"
|
|
77
|
+
|
|
78
|
+
# Rescue all other errors
|
|
79
|
+
rescue
|
|
80
|
+
puts "Network plugin: An error occured."
|
|
81
|
+
|
|
82
|
+
# Rescue all other errors
|
|
83
|
+
end
|
|
84
|
+
@socket.close
|
|
85
|
+
end
|
|
86
|
+
if remotehostnotfound
|
|
87
|
+
@remotecommandresult = "Remote Host not running"
|
|
88
|
+
end
|
|
89
|
+
# Close the socket after use
|
|
90
|
+
client.close()
|
|
91
|
+
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def showremoteportoptions
|
|
95
|
+
|
|
96
|
+
@remoteportoptions = $rwdcontrolports.rwd_options
|
|
97
|
+
@remotecommandoptions = ["query","stop"].rwd_options
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
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
|
+
:applet_viewing => "You can get a list of all installed applets by clicking the 'listfiles button'
|
|
10
|
+
To see the text of a install file
|
|
11
|
+
Type in the name of the file you want.
|
|
12
|
+
|
|
13
|
+
type it without the inf ending
|
|
14
|
+
rwdapplet-0.1
|
|
15
|
+
|
|
16
|
+
Then click the 'View Installed File' button
|
|
17
|
+
|
|
18
|
+
If it finds the file it will open it. It displays the text the search box.
|
|
19
|
+
|
|
20
|
+
You can uninstall applets on this screen",
|
|
21
|
+
|
|
22
|
+
:applet_installation => " You can download an applet created by someone else\n
|
|
23
|
+
put the file in the zips directory\n
|
|
24
|
+
|
|
25
|
+
click on the 'list zips' tab\n
|
|
26
|
+
click on 'list applets available for installing'\n
|
|
27
|
+
|
|
28
|
+
chose the applet you want\n
|
|
29
|
+
click on 'install applet'\n
|
|
30
|
+
If all goes well the applet should be installed.\n
|
|
31
|
+
You will need to restart rwdtinker to see the new screens",
|
|
32
|
+
:applet_tinkerbackeditconfiguration => " You can edit the configuration
|
|
33
|
+
|
|
34
|
+
Remember to reload the configuration variables if you want your
|
|
35
|
+
changes used."
|
|
36
|
+
|
|
37
|
+
)
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
def installapplet
|
|
2
2
|
require 'fileutils'
|
|
3
|
+
require 'extras/zip/zip'
|
|
3
4
|
nametext = "%s" % [@a_installapplet]
|
|
4
5
|
|
|
5
6
|
begin # exception trapped block
|
|
6
7
|
fullname = nametext + ".zip"
|
|
7
8
|
fileName = File.join($zipslocation,fullname)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
system(commandline)
|
|
9
|
+
|
|
10
|
+
zf = Zip::ZipFile.new(fileName)
|
|
11
|
+
zf.sort.each {
|
|
12
|
+
|entry|
|
|
13
|
+
zf.extract(entry.to_s, entry.to_s)
|
|
14
|
+
}
|
|
15
15
|
@installapplettext = Message[:applet_installed]
|
|
16
16
|
|
|
17
17
|
rescue
|
|
18
|
-
@installapplettext = "
|
|
18
|
+
@installapplettext = "unzip error - applet may not be installed correctly"
|
|
19
19
|
end # exception rescue
|
|
20
20
|
|
|
21
21
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
def installgemapplet
|
|
2
|
+
require 'fileutils'
|
|
3
|
+
require 'extras/zip/zip'
|
|
4
|
+
nametext = "%s" % [@a_installapplet]
|
|
5
|
+
|
|
6
|
+
begin # exception trapped block
|
|
7
|
+
fullname = nametext + ".zip"
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
zf = Zip::ZipFile.new(fullname)
|
|
11
|
+
zf.sort.each {
|
|
12
|
+
|entry|
|
|
13
|
+
zf.extract(entry.to_s, entry.to_s)
|
|
14
|
+
}
|
|
15
|
+
@installapplettext = Message[:applet_installed]
|
|
16
|
+
|
|
17
|
+
rescue
|
|
18
|
+
@installapplettext = "unzip error - applet may not be installed correctly"
|
|
19
|
+
end # exception rescue
|
|
20
|
+
|
|
21
|
+
end
|