rwdshell 0.99 → 1.00

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 (65) hide show
  1. data/Readme.txt +8 -1
  2. data/code/01rwdcore/01rwdcore.rb +4 -1
  3. data/code/01rwdcore/jumplinkcommand.rb +6 -10
  4. data/code/01rwdcore/rundocuments.rb +10 -0
  5. data/code/01rwdcore/runeditconfiguration.rb +10 -0
  6. data/code/01rwdcore/runhelpabout.rb +10 -0
  7. data/code/01rwdcore/runopentinkerdocument.rb +7 -0
  8. data/code/01rwdcore/rwdtinkerversion.rb +11 -3
  9. data/code/01rwdcore/selectiontab.rb +9 -0
  10. data/code/01rwdcore/setuphelpaboutoptions.rb +13 -0
  11. data/code/01rwdcore/setuptinkerdocuments.rb +6 -0
  12. data/code/01rwdcore/test_cases.rb +53 -59
  13. data/code/01rwdcore/test_harness.rb +1 -0
  14. data/code/superant.com.rwdshell/loadconfigurationrecord.rb +2 -10
  15. data/code/superant.com.rwdshell/loadconfigurationvariables.rb +5 -5
  16. data/code/superant.com.rwdshell/rwdtinkerversion.rb +10 -0
  17. data/code/superant.com.rwdshell/saveconfigurationrecord.rb +4 -4
  18. data/code/superant.com.rwdshell/test_cases.rb +46 -0
  19. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +1 -1
  20. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +1 -1
  21. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +1 -12
  22. data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
  23. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +2 -2
  24. data/configuration/rwdapplicationidentity.dist +1 -1
  25. data/configuration/rwdshell.dist +13 -2
  26. data/configuration/rwdtinker.dist +7 -3
  27. data/configuration/tinkerwin2variables.dist +1 -1
  28. data/gui/00coreguibegin/applicationguitop.rwd +1 -1
  29. data/gui/frontwindowselectionbegin/selectiontabbegin/{selectiontabbegin.rwd → 00selectiontabbegin.rwd} +1 -1
  30. data/gui/frontwindowselectionzend/viewselectionzend/{viewselectionend.rwd → wwselectionend.rwd} +0 -0
  31. data/gui/{frontwindowtdocumentbegin/superant.com.documentsbegin/tt0documentbegin.rwd → frontwindowselectionzend/viewselectionzend/zzdocumentbegin.rwd} +0 -0
  32. data/gui/frontwindowtdocuments/superant.com.documents/tinkerdocuments.rwd +14 -0
  33. data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzdocumentend.rwd +8 -0
  34. data/gui/{frontwindowz1end/frontwindowend/xx0rwdfirsttab.rwd → helpaboutbegin/superant.com.helpaboutbegin/zzzrwdlasttab.rwd} +0 -0
  35. data/gui/helpaboutbegin/superant.com.helpaboutbegin/{ya0helpscreenstart.rwd → zzzzhelpscreenstart.rwd} +0 -0
  36. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/helpabouttab.rwd +15 -0
  37. data/gui/helpaboutzend/superant.com.helpaboutend/zhelpscreenstart2.rwd +3 -0
  38. data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpabout2.rwd +15 -0
  39. data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpscreen2end.rwd +3 -0
  40. data/gui/tinkerbackwindows/superant.com.rwdshellbackwindow/92viewconfiguration.rwd +4 -10
  41. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +2 -10
  42. data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +1 -1
  43. data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +17 -0
  44. data/rwd_files/HowTo_Shell.txt +8 -1
  45. data/rwd_files/HowTo_Tinker.txt +18 -0
  46. data/rwd_files/{rwdindex.html → RubyWebDialogs.html} +0 -0
  47. data/rwdconfig.dist +11 -2
  48. data/tests/RubyGauge.rb +179 -0
  49. data/tests/makedist.rb +1 -0
  50. data/tests/makerwdwaddresses-1.04.rb +40 -0
  51. metadata +27 -28
  52. data/code/superant.com.rwdshell/rwdshellversion.rb +0 -14
  53. data/gui/frontwindowtdocuments/superant.com.documents/uu5documents.rwd +0 -15
  54. data/gui/frontwindowtdocuments/superant.com.rubyeval/rubyeval.rwd +0 -4
  55. data/gui/frontwindowtdocuments/superant.com.shelldocument/vvdocshellxp.rwd +0 -6
  56. data/gui/frontwindowtdocuments/superant.com.tinkerwin2documents/uu5documents.rwd +0 -6
  57. data/gui/frontwindowtdocumentzend/superant.com.documentsend/ww0documentend.rwd +0 -12
  58. data/gui/helpaboutinstalled/superant.com.shellhelpabout/1appname.rwd +0 -4
  59. data/gui/helpaboutinstalled/superant.com.shellhelpabout/3copyright.rwd +0 -3
  60. data/gui/helpaboutinstalled/superant.com.shellhelpabout/5version.rwd +0 -9
  61. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/1appname.rwd +0 -4
  62. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/3copyright.rwd +0 -3
  63. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/5version.rwd +0 -10
  64. data/tests/rwdtinkertestEN.rb +0 -163
  65. data/tests/test.result +0 -32
data/Readme.txt CHANGED
@@ -192,8 +192,15 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
192
192
 
193
193
  Thanks, Steven Gibson
194
194
 
195
- == Changelog
195
+ ==
196
+ Version 1.00
197
+ corrected edit configuration screen
198
+ updated for rwdtinker 1.66
199
+ new helpabout
200
+ new documents list
201
+
196
202
  Version 0.99
203
+ corrected Ruby script edit
197
204
  added help to some shell tabs
198
205
  updated for rwdtinker 1.62 - improve distro release script
199
206
  changed selection screen to use new hash method
@@ -14,9 +14,12 @@ class RwdTinker < RWDialog
14
14
 
15
15
  rwdtest_harness
16
16
  end
17
+ showjumplinkoptions
18
+ setuptinkerdocuments
19
+ setuphelpaboutoptionspassive
17
20
  end
18
21
 
19
22
  def inspect
20
- "Rwdtinker Application "
23
+ "#{$rwdapplicationidentity}"
21
24
  end
22
25
 
@@ -3,28 +3,24 @@ JumpLink = Hash.new { |hh, kk| hh[kk] = "ERROR: link not found: #{kk.inspect}.";
3
3
  locationlink = {
4
4
  :helpscreen=> "runhelpwindow",
5
5
  :tinkerbackwindow=>"runrwdtinkerbackwindow",
6
- :returntomain=>"returntomain"
6
+ :returntomain=>"returntomain",
7
+ :opendocuments=>"runtinkerdocuments",
8
+ :editconfiguration=>"runeditconfiguration"
7
9
  }
8
10
  locationlink.each { |kk, vv| JumpLink[kk] = vv }
9
11
 
10
12
  def runjumplinkcommand
11
-
13
+ if @a_jumplinkinput
12
14
  runjumplocation = "#{JumpLink[:"#{@a_jumplinkinput}"]}"
13
15
 
14
16
  self.send(runjumplocation)
15
-
16
-
17
-
18
-
19
- end
17
+ end
18
+ end
20
19
 
21
-
22
20
 
23
21
  # list the remote control options on the screen
24
22
  def showjumplinkoptions
25
23
 
26
-
27
-
28
24
  @jumplinkoptions = $rwdjumplink.rwd_options
29
25
 
30
26
  end
@@ -0,0 +1,10 @@
1
+ # Application menu 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 runtinkerdocuments
7
+ @rwd_window = "main"
8
+ @rwd_tab = "documentsrwdtinkerone"
9
+ end
10
+
@@ -0,0 +1,10 @@
1
+ # Application menu 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 runeditconfiguration
7
+ @rwd_window = "tinkerbackwindow"
8
+ @rwd_tab = "editconfigurationfile"
9
+ end
10
+
@@ -0,0 +1,10 @@
1
+ # Application menu 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 runtinkerhelpabout
7
+ @rwd_window = "rwdtinkerhelpwindow"
8
+
9
+ end
10
+
@@ -0,0 +1,7 @@
1
+ # open document for rwdtinker application
2
+ def runopentinkerdocument
3
+
4
+ tinkerdocumenturl = "http://localhost:7705/" + @a_tinkerdocumentinput
5
+ Thread.new( tinkerdocumenturl){ |t| `#{Browser_Exe} #{tinkerdocumenturl}` }
6
+ end
7
+
@@ -3,11 +3,19 @@
3
3
  # For information see http://www.rubyforge.net/projects/rwdapplications
4
4
 
5
5
  # return the version constant defined in the config file
6
+ def tinkerhelpaboutsetup
7
+ return ["RwdTinker","(c) 2004 Steven Gibson ","Version #{RwdTinkerVersion}"]
8
+ end
9
+
6
10
  def runrwdtinkerversion
7
11
  @rwd_window = "applicationversion"
8
- @versionappnamedisplay = "RwdTinker"
9
- @versioncopyrightdisplay = "(c) 2004 Steven Gibson "
10
- @versionnumberdisplay = "Version " + RwdTinkerVersion
12
+ helpaboutinput = @a_helpaboutinput.downcase
13
+ versionarraysetup = "#{helpaboutinput}helpaboutsetup"
14
+ versionarray= self.send(versionarraysetup)
15
+
16
+ @versionappnamedisplay = versionarray[0].to_s
17
+ @versioncopyrightdisplay = versionarray[1].to_s
18
+ @versionnumberdisplay = versionarray[2].to_s
11
19
 
12
20
  end
13
21
 
@@ -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
+
@@ -1,112 +1,106 @@
1
1
  # test harness
2
+
3
+
4
+ require 'test/unit/testcase'
5
+ require 'test/unit/assertions'
6
+ include Test::Unit::Assertions
7
+ include Test::Unit
2
8
  def rwdtinker_all_tests
3
9
  print "in rwdtinker all tests\n"
10
+ $testrwdtinkertestcase = TestSuite.new
4
11
  test_runrwdtinkerbackwindow
5
12
  end
6
13
 
7
14
  def test_runrwdtinkerbackwindow
8
15
 
9
- require 'test/unit'
10
- begin
11
16
 
17
+ begin
18
+ testasserts = 0
19
+ print "Starting rwdtinker tests!\n"
12
20
  runrwdtinkerbackwindow
13
-
14
- raise NotImplementedError, 'Need to write test_runrwdtinkerbackwindow'
15
-
16
- rescue NotImplementedError
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
17
60
  $stderr.print $!
18
61
 
19
62
  end
63
+
20
64
  end
21
65
 
22
66
 
23
67
 
24
- def test_choosenewhelptopic
68
+ def teststobedown
69
+ runtinkerhelpabout
70
+ assert_equal("rwdtinkerhelpwindow",@rwd_tab) ; testasserts += 1
25
71
  raise NotImplementedError, 'Need to write test_choosenewhelptopic'
26
- end
27
-
28
-
29
- def test_listinstalledfiles
30
72
  raise NotImplementedError, 'Need to write test_listinstalledfiles'
31
- end
32
-
33
-
34
- def test_listzipfilestoinstall
35
73
  raise NotImplementedError, 'Need to write test_listzipfilestoinstall'
36
- end
37
-
38
- def test_loadconfigurationrecord
39
74
  raise NotImplementedError, 'Need to write test_loadconfigurationrecord'
40
- end
41
-
42
- def test_loadconfigurationvariables
43
75
  raise NotImplementedError, 'Need to write test_loadconfigurationvariables'
44
- end
45
-
46
76
 
47
-
48
- def test_main
49
77
  raise NotImplementedError, 'Need to write test_main'
50
- end
51
78
 
52
- def test_network_demon
53
79
  raise NotImplementedError, 'Need to write test_network_demon'
54
- end
55
80
 
56
- def test_network_start
57
81
  raise NotImplementedError, 'Need to write test_network_start'
58
- end
59
82
 
60
- def test_openappletname
61
83
  raise NotImplementedError, 'Need to write test_openappletname'
62
- end
63
84
 
64
- def test_removeapplet
65
85
  raise NotImplementedError, 'Need to write test_removeapplet'
66
- end
67
86
 
68
- def test_returntomain
69
87
  raise NotImplementedError, 'Need to write test_returntomain'
70
- end
71
88
 
72
- def test_runcontrolcommand
73
89
  raise NotImplementedError, 'Need to write test_runcontrolcommand'
74
- end
75
-
76
90
 
77
- def test_runhelpwindow
78
91
  raise NotImplementedError, 'Need to write test_runhelpwindow'
79
- end
80
-
81
-
82
92
 
83
-
84
- def test_runrwdtinkerversion
85
93
  raise NotImplementedError, 'Need to write test_runrwdtinkerversion'
86
- end
87
94
 
88
- def test_runrwdtinkerwin2version
89
95
  raise NotImplementedError, 'Need to write test_runrwdtinkerwin2version'
90
- end
91
96
 
92
- def test_runviewplatform
93
97
  raise NotImplementedError, 'Need to write test_runviewplatform'
94
- end
95
98
 
96
- def test_rwdtinkerversiondiagnostic
97
99
  raise NotImplementedError, 'Need to write test_rwdtinkerversiondiagnostic'
98
- end
99
100
 
100
- def test_rwdwindowreturn
101
101
  raise NotImplementedError, 'Need to write test_rwdwindowreturn'
102
- end
103
-
104
- def test_saveconfigurationrecord
105
102
  raise NotImplementedError, 'Need to write test_saveconfigurationrecord'
106
- end
107
-
108
103
 
109
- def test_viewappletcontents
110
104
  raise NotImplementedError, 'Need to write test_viewappletcontents'
111
105
  end
112
106
 
@@ -2,6 +2,7 @@
2
2
  def rwdtest_harness
3
3
 
4
4
  print "in test harness\n"
5
+
5
6
  $testharnessarray.each { |x|
6
7
  print "calling #{x}\n"
7
8
  eval("#{x}")
@@ -13,16 +13,8 @@
13
13
 
14
14
 
15
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
-
16
+ @a_rshellconfiguration= fd.read
17
+
26
18
 
27
19
 
28
20
  fd.close
@@ -1,13 +1,13 @@
1
1
  # this method loads the on screen variables into the running class
2
- def loadrubyslippersconfigurationvariables
2
+ def loadrwdshellconfigurationvariables
3
3
 
4
- configfiletoload = File.join(ConfigurationDir,"rubyslippers.cnf")
4
+ configfiletoload = File.join(ConfigurationDir,"rwdshell.cnf")
5
5
  begin
6
6
  load configfiletoload
7
- @extrarsconfigdatadisplay = ""
8
- @newrsconfigurationresult = "Config Variables loaded"
7
+ @extrarshellconfigdatadisplay = ""
8
+ @newrshellconfigurationresult = "Config Variables loaded"
9
9
  rescue
10
10
  @extrarsconfigdatadisplay = ""
11
- @newrsconfigurationresult = "loading error"
11
+ @newrshellconfigurationresult = "loading error"
12
12
  end
13
13
  end
@@ -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 rwdshellhelpaboutsetup
7
+ return ["RwdShell","(c) 2004,2005 Steven Gibson ","Version #{RwdShellVersion}"]
8
+ end
9
+
10
+
@@ -1,16 +1,16 @@
1
1
  # this method adds a new address record
2
- def saverubyslippersconfiguration
2
+ def saverwdshellconfiguration
3
3
  require 'fileutils'
4
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"
5
+ newname = "rwdshell.cnf" # grab the filename to create
6
+ newdata =@a_rshellconfiguration
7
7
 
8
8
  begin # exception trapped block
9
9
  fileName = File.join( ConfigurationDir, newname )
10
10
  fd = File.open(fileName,"w")
11
11
  fd.print(newdata) # save the record info to the file
12
12
  fd.close
13
- @newconfigurationresult=newdata # show the record info in the browser
13
+ @newrshellconfigurationresult=newdata # show the record info in the browser
14
14
  rescue SystemCallError, StandardError
15
15
  $stderr.print "system call error: " + $!
16
16
  end # exception rescue
@@ -0,0 +1,46 @@
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 rwdshell_all_tests
9
+ print "in rwdshell all tests\n"
10
+ $testrwdshelltestcase = TestSuite.new
11
+ test_runrwdshell
12
+ end
13
+
14
+ def test_runrwdshell
15
+
16
+
17
+ begin
18
+ testasserts = 0
19
+ print "Starting rwdshell tests!\n"
20
+ runselectiontab
21
+ assert_equal("selectiontab",@rwd_tab) ; testasserts += 1
22
+ runrwdschedulemenu10
23
+ assert_equal("viewrwdscheduleconfiguration",@rwd_tab) ; testasserts += 1
24
+ loadrwdscheduleconfiguration
25
+ assert_equal("rwdschedule.cnf",@a_schconfigurationfilename) ; testasserts += 1
26
+
27
+ $stderr.print "tests completed succesfully!\n"
28
+ $stderr.print testasserts, " asserts performed\n"
29
+
30
+ rescue NotImplementedError, Exception
31
+ $stderr.print $!
32
+
33
+ end
34
+
35
+ end
36
+
37
+
38
+
39
+ def teststobedown
40
+ runtinkerhelpabout
41
+ assert_equal("rwdtinkerhelpwindow",@rwd_tab) ; testasserts += 1
42
+ end
43
+
44
+
45
+
46
+