tinkerbell 0.03 → 0.04

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/code/01rwdcore/01rwdcore.rb +6 -6
  2. data/code/01rwdcore/02helptexthashbegin.rb +13 -11
  3. data/code/01rwdcore/jumplinkcommand.rb +1 -0
  4. data/code/01rwdcore/openhelpwindow.rb +7 -0
  5. data/code/01rwdcore/runhelpabout.rb +6 -1
  6. data/code/01rwdcore/selectiontab.rb +2 -0
  7. data/code/01rwdcore/setuphelpaboutoptions.rb +2 -0
  8. data/code/01rwdcore/setuptinkerdocuments.rb +1 -0
  9. data/code/01rwdcore/test_cases.rb +100 -51
  10. data/code/01rwdcore/test_harness.rb +8 -1
  11. data/code/01rwdcore/uploadreturns.rb +3 -0
  12. data/code/dd0viewphoto/dd0viewphoto.rb +2 -0
  13. data/code/superant.com.rwdtinkerbackwindow/changelocale.rb +84 -0
  14. data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +0 -1
  15. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +2 -0
  16. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +2 -0
  17. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +3 -1
  18. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +2 -0
  19. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +3 -1
  20. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +3 -1
  21. data/code/superant.com.rwdtinkerbackwindow/showlocaleoptions.rb +9 -0
  22. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +1 -0
  23. data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +8 -5
  24. data/code/superant.com.sandbox/tabthree.rb +0 -4
  25. data/code/superant.com.tinkerbell/addzipfiles.rb +66 -0
  26. data/code/superant.com.tinkerbell/helptexthashload.rb +22 -0
  27. data/code/superant.com.tinkerbell/loadviewfiles.rb +19 -0
  28. data/code/superant.com.tinkerbell/openhelpwindow.rb +11 -17
  29. data/code/superant.com.tinkerbell/runrwdapplet.rb +1 -1
  30. data/code/zz0applicationend/zz0end.rb +2 -1
  31. data/configuration/rwdtinker.dist +3 -3
  32. data/configuration/sandbox.dist +7 -0
  33. data/configuration/tinkerbellw.dist +3 -3
  34. data/configuration/tinkerwin2variables.dist +1 -1
  35. data/gui/tinkerbackwindows/superant.com.sandbox/33tabthree.rwd +2 -2
  36. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80localechanger.rwd +17 -0
  37. data/gui/tinkerbackwindows/superant.com.tinkerbell/60zipfoldfiles.rwd +31 -0
  38. data/gui/tinkerbackwindows/superant.com.tinkerbellback/1rwdrubyeval.rwd +1 -1
  39. data/gui/tinkerbackwindows/superant.com.tinkerbellback/81jumplinkcommands.rwd +17 -0
  40. data/init.rb +7 -1
  41. data/installed/sandbox.inf +4 -0
  42. data/installed/tinkerbellw.inf +7 -4
  43. data/lang/en/rwdcore/en.po +28 -0
  44. data/lang/en/tinkerbell/en.po +17 -0
  45. data/lang/es/rwdcore/es.po +22 -13
  46. data/lang/es/tinkerbell/en.po +16 -0
  47. data/lang/fr/rwdcore/fr.po +4 -1
  48. data/lang/fr/tinkerbell/en.po +7 -0
  49. data/lang/hi/rwdcore/hi.po +39 -36
  50. data/lang/hi/tinkerbell/en.po +6 -0
  51. data/lang/ja/rwdcore/ja.po +3 -0
  52. data/lang/ja/tinkerbell/en.po +6 -0
  53. data/lang/nl/rwdcore/nl.po +4 -1
  54. data/lang/nl/tinkerbell/en.po +6 -0
  55. data/lib/zip/ioextras.rb +43 -2
  56. data/lib/zip/stdrubyext.rb +5 -5
  57. data/lib/zip/tempfile_bugfixed.rb +2 -2
  58. data/lib/zip/zip.rb +618 -149
  59. data/lib/zip/zipfilesystem.rb +59 -8
  60. data/lib/zip/ziprequire.rb +32 -3
  61. data/rwd_files/HowTo_Tinker.txt +9 -0
  62. data/rwd_files/HowTo_TinkerBell.txt +4 -1
  63. data/rwd_files/Tinkerhelptexthash.txt +5 -2
  64. data/rwd_files/log/rwdtinker.log +1338 -0
  65. data/rwd_files/rwdapplications.html +23 -1
  66. data/{code/superant.com.tinkerbell/helptexthashrwdhypernote.rb → rwd_files/tinkerbellhelpfiles.txt} +21 -5
  67. data/rwdconfig.dist +1 -1
  68. data/tests/makedist-tinkerbellw.rb +1 -1
  69. data/tests/makedist.rb +1 -1
  70. data/{rwdtinker.rb → tinkerbell.rb} +0 -0
  71. data/zips/rwdwfoldeditor-0.07.zip +0 -0
  72. data/zips/rwdwhypernote-0.16.zip +0 -0
  73. data/zips/rwdwschedule-1.07.zip +0 -0
  74. data/zips/tinkerbellw-0.04.zip +0 -0
  75. metadata +24 -8
  76. data/gui/tinkerbackwindows/superant.com.tinkerbellback/77jumplinkcommands.rwd +0 -17
  77. data/zips/rwdwfoldeditor-0.05.zip +0 -0
  78. data/zips/rwdwhypernote-0.15.zip +0 -0
  79. data/zips/tinkerbellw-0.03.zip +0 -0
@@ -1,8 +1,5 @@
1
1
  # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
- # This application is a framework for writing programs from RubyWebDialogs
3
- # http://www.erikveen.dds.nl/rubywebdialogs/index.html
4
- # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
5
- # This class is the top class for the RwdTinker application
2
+
6
3
 
7
4
  $DEBUG=false
8
5
  $VERBOSE=false
@@ -15,8 +12,7 @@ class RwdTinker < RWDialog
15
12
 
16
13
  @display= "idle"
17
14
  if TestNow
18
-
19
- rwdtest_harness
15
+ rwdtest_harness
20
16
  end
21
17
  showjumplinkoptions
22
18
  setuptinkerdocuments
@@ -27,3 +23,7 @@ class RwdTinker < RWDialog
27
23
  "#{$rwdapplicationidentity}"
28
24
  end
29
25
 
26
+
27
+ # for original RWD work see: http://www.erikveen.dds.nl/rubywebdialogs/index.html
28
+ # For more information about RwdTinker see http://www.rubyforge.net/projects/rwdapplications
29
+ # This class is the top class for the RwdTinker application
@@ -1,14 +1,16 @@
1
-
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
2
 
3
- Helptext = Hash.new { |hh, kk| hh[kk] = "ERROR: Identificador de mensaje desconocido: #{kk.inspect}."; hh[kk] }
3
+ Helptext = Hash.new { |hh, kk| hh[kk] = "ERROR: Message-ID Unknown: #{kk.inspect}."; hh[kk] }
4
4
  helpmessage = {
5
- :general_help => "You can work with Applets: go to 'Selection tab', <br>
6
- On that back screen you will find:<br>
7
- List Applets: you can see and delete installed applets<br>
8
- List Zips: you can see lists of applets that you can install<br>
9
- Edit Configuration: You can view the rwdtinker configuration and change it<br>
10
- Diagnostic Tab: You can view the environments variables that rwdtinker is running with<br>
11
- "
12
-
5
+ :tinker_help => "rwdtinker is the core application for the
6
+ rwdapplications. "
7
+
13
8
  }
14
- helpmessage.each { |kk, vv| Helptext[kk] = vv }
9
+ helpmessage.each { |kk, vv| Helptext[kk] = vv }
10
+
11
+
12
+ =begin
13
+ this is to set up the help buttons
14
+ this uses a hash
15
+ =end
16
+
@@ -1,3 +1,4 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # Bind message passing socket to rwdtinker application
2
3
 
3
4
  locationlink = {
@@ -1,4 +1,7 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # this code is to call the help window
3
+ # for RwdTinker core
4
+
2
5
  def runhelpwindow
3
6
  $helptopicsarray = $helptopicsarray | ["applet_installation","applet_viewing","applet_tinkerbackeditconfiguration"]
4
7
 
@@ -29,3 +32,7 @@ def choosenewhelptopic(inffile)
29
32
  end
30
33
 
31
34
 
35
+
36
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
37
+ # this code is to call the help window
38
+ # for RwdTinker core
@@ -7,4 +7,9 @@
7
7
  @rwd_window = "rwdtinkerhelpwindow"
8
8
 
9
9
  end
10
-
10
+
11
+ =begin
12
+ This def runtinkerhelpabout
13
+ is to call the rwdtinkerhelpwindow
14
+ =end
15
+
@@ -1,4 +1,6 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # this code is to return to the window back from the help window
3
+
2
4
  def runselectiontab
3
5
 
4
6
 
@@ -1,4 +1,6 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # help about option setup for rwdtinker application
3
+
2
4
  def setuphelpaboutoptions
3
5
 
4
6
  @rwd_window = "tinkerhelpabout"
@@ -1,3 +1,4 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # Bind document names to rwdtinker document tab
2
3
  def setuptinkerdocuments
3
4
 
@@ -1,71 +1,120 @@
1
1
  # test harness
2
2
 
3
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
4
 
17
- begin
18
- testasserts = 0
19
- print "Starting rwdtinker tests!\n"
5
+ def rwdtinker_all_tests
6
+ $rwdtinkerlog.info "in rwdtinker all tests"
7
+
8
+ $rwdtinkerlog.info "Starting rwdtinker tests!\n"
20
9
  runrwdtinkerbackwindow
21
-
22
- assert_equal("tinkerbackwindow",@rwd_window) ; testasserts += 1
23
- runselectiontab
24
- assert_equal("selectiontab",@rwd_tab) ; testasserts += 1
10
+
11
+ if "tinkerbackwindow" == @rwd_window
12
+ $testasserts += 1
13
+ else
14
+ $testfailures += 1
15
+ $testerrorarray << "runrwdtinkerbackwindow"
16
+ end
17
+
18
+ runselectiontab
19
+
20
+ if "selectiontab" == @rwd_tab
21
+ $testasserts += 1
22
+ else
23
+ $testfailures += 1
24
+ $testerrorarray << "selectiontab"
25
+ end
26
+
25
27
  showjumplinkoptions
26
28
  @a_jumplinkinput = "returntomain"
27
29
  runjumplinkcommand
28
- assert_equal("main",@rwd_window) ; testasserts += 1
30
+ if "main" == @rwd_window
31
+ $testasserts += 1
32
+ else
33
+ $testfailures += 1
34
+ $testerrorarray << "returntomain"
35
+ end
29
36
  @a_jumplinkinput = "helpscreen"
30
37
  runjumplinkcommand
31
38
 
32
- assert_equal("rwdtinkerhelpwindow",@rwd_window) ; testasserts += 1
33
- returntomain
34
- assert_equal("main",@rwd_window) ; testasserts += 1
39
+ if "rwdtinkerhelpwindow" == @rwd_window
40
+ $testasserts += 1
41
+ else
42
+ $testfailures += 1
43
+ $testerrorarray << "helpscreen"
44
+ end
45
+
35
46
  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"
47
+ if "documentsrwdtinkerone" == @rwd_tab
48
+ $testasserts += 1
49
+ else
50
+ $testfailures += 1
51
+ $testerrorarray << "runtinkerdocuments"
52
+ end
58
53
 
59
- rescue NotImplementedError, Exception
60
- $stderr.print $!
61
54
 
62
- end
63
-
64
- end
55
+ runrwdtinkerwin2version
56
+ if "applicationversion" == @rwd_window
57
+ $testasserts += 1
58
+ else
59
+ $testfailures += 1
60
+ $testerrorarray << "runrwdtinkerwin2version"
61
+ end
65
62
 
63
+
64
+ runremotezipsinstall
65
+ if "superantcomremotezipsinstall" == @rwd_tab
66
+ $testasserts += 1
67
+ else
68
+ $testfailures += 1
69
+ $testerrorarray << "runremotezipsinstall"
70
+ end
66
71
 
72
+ runeditconfiguration
73
+ if "editconfigurationfile" == @rwd_tab
74
+ $testasserts += 1
75
+ else
76
+ $testfailures += 1
77
+ $testerrorarray << "runeditconfiguration"
78
+ end
79
+ runhelpwindowtinkerwin2
80
+
81
+ if @rwd_tab == "editconfigurationfile" && @rwdhelpdataoutput.include?("Remember to reload the configuration variables")
82
+ $testasserts += 1
83
+ else
84
+ $testfailures += 1
85
+ $testerrorarray << "applet_tinkerbackeditconfiguration"
86
+ end
87
+
88
+
89
+ rwd_jump("rwdlogfiletab", "rwd_tab_rwdlogfiletab")
90
+
91
+ if @rwd_tab == "rwdlogfiletab"
92
+ $testasserts += 1
93
+ else
94
+ $testfailures += 1
95
+ $testerrorarray << "rwdlogfiletab"
96
+ end
97
+
98
+ rwd_jump( "diagnostictab")
99
+ if @rwd_tab == "diagnostictab"
100
+ $testasserts += 1
101
+ else
102
+ $testfailures += 1
103
+ $testerrorarray << "diagnostictab"
104
+ end
105
+ end
106
+
107
+ def rwd_jump(tab, go="")
108
+ @rwd_tab = tab
109
+ @rwd_action = go
110
+ end
111
+
112
+ def teststobedown
113
+ runrwdtinkerbackwindow
114
+ @a_installapplet="/usr/src/rwdapplets/rwdtinker/zips/rwdahelloworld-0.5"
115
+ viewgemappletcontents
116
+ assert_not_nil(@appletcontentstext) ; testasserts += 1
67
117
 
68
- def teststobedown
69
118
  runtinkerhelpabout
70
119
  assert_equal("rwdtinkerhelpwindow",@rwd_tab) ; testasserts += 1
71
120
  raise NotImplementedError, 'Need to write test_choosenewhelptopic'
@@ -2,12 +2,19 @@
2
2
  def rwdtest_harness
3
3
 
4
4
  print "in test harness\n"
5
-
5
+ $testasserts = 0
6
+ $testerrorarray = [""]
7
+ $testfailures = 0
8
+
6
9
  $testharnessarray.each { |x|
7
10
  print "calling #{x}\n"
8
11
  eval("#{x}")
9
12
 
10
13
  }
14
+ $rwdtinkerlog.info "successes = #{$testasserts}"
15
+ $rwdtinkerlog.info "failures = #{$testfailures}"
16
+ $rwdtinkerlog.info "failed methods #{$testerrorarray}"
17
+ $rwdtinkerlog.info "tested methods #{$testharnessarray}"
11
18
 
12
19
  end
13
20
 
@@ -1,3 +1,6 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # return information to the author
3
+
1
4
  def uploadreturnsfile
2
5
  require 'net/ftp'
3
6
  BasicSocket.do_not_reverse_lookup = true
@@ -1,3 +1,5 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+
1
3
  def viewphoto
2
4
  @rwd_window = "photo"
3
5
  end
@@ -0,0 +1,84 @@
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
+ def runlocalechangercommand
25
+
26
+ $rwdtinkerlog.info "preparing to restart gui"
27
+
28
+ $lang = @a_localechooseinput # pick the language of choice
29
+
30
+ tempdoc = " "
31
+
32
+ Dir.chdir($progdir) # change back to top program directory
33
+
34
+
35
+ # build the English Language hash file from the parts
36
+
37
+
38
+ require 'lib/rwdtinker/rwdlangdir'
39
+
40
+ tempdoc = " "
41
+ #go get all the po language file files in english
42
+ tempdoc = RwdtinkerTools.findlanguagefiles(LangDir,"en")
43
+
44
+ #writes the contents of doc into the languagehashvariable
45
+ languagehashvariable = tempdoc
46
+
47
+ # END of en Lang building
48
+ tempdoc = " "
49
+ Dir.chdir($progdir) # change back to top program directory
50
+
51
+ # build the local Language hash file from the parts
52
+
53
+
54
+
55
+ # Go get all the po files for the language of choice
56
+ tempdoc = RwdtinkerTools.findlanguagefiles(LangDir,$lang)
57
+ # the contents of doc into the variable
58
+ languagehashvariable = languagehashvariable + tempdoc
59
+
60
+ Dir.chdir($progdir) # change back to top program directory
61
+
62
+ # lets read those po files, first english then the chosen language
63
+ temp = eval( languagehashvariable )
64
+
65
+
66
+
67
+
68
+ # build the actual GUI from the gui parts
69
+ require 'lib/rwdtinker/rwdguidir'
70
+
71
+ tempdoc = RwdtinkerTools.findguifiles(GuiDir)
72
+
73
+
74
+ # gui variable is done
75
+ guiRWD = ""
76
+ $rwd_gui_tinker = tempdoc
77
+
78
+ $rwdtinkerlog.info "restarting gui now"
79
+
80
+ RWDWindow.new($rwd_gui_tinker, @rwd_window).render("DEFAULT")
81
+
82
+ end
83
+
84
+
@@ -1,4 +1,3 @@
1
-
2
1
  #***********************************************************************
3
2
  #* Rwd/Tinker -- A Ruby program for the RudyWebDialog.
4
3
  #* Copyright (c) 2004 - 2005 by Steven Gibson. All Rights Reserved.
@@ -1,4 +1,6 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # install rwdtinker applet from a long directory location
3
+
2
4
  def installgemapplet
3
5
  require 'fileutils'
4
6
  require 'lib/zip/zip'
@@ -1,4 +1,6 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # this code is to list the zips
3
+
2
4
  def fillzipappletname(inffile)
3
5
  applet = inffile.gsub(/\.zip$/, "")
4
6
  @a_installapplet = applet
@@ -1,4 +1,6 @@
1
- # this code is to list the applets that are installed
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
+ # this code is to list the applets that are installed
3
+
2
4
  def listinstalledfiles
3
5
  fileList = Dir.new("installed").entries.sort.reverse.delete_if { |x| ! (x =~ /inf$/) }
4
6
  @filesresult = fileList.rwd_method("fillappletname")
@@ -1,4 +1,6 @@
1
+ # Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
2
  # this code is to list the zipped applets that can be installed
3
+
2
4
  def fillziptoinstallname(inffile)
3
5
  applet = inffile.gsub(/\.zip$/, "")
4
6
  @a_installapplet = applet