tinkerbell 0.03 → 0.04
Sign up to get free protection for your applications and to get access to all the features.
- data/code/01rwdcore/01rwdcore.rb +6 -6
- data/code/01rwdcore/02helptexthashbegin.rb +13 -11
- data/code/01rwdcore/jumplinkcommand.rb +1 -0
- data/code/01rwdcore/openhelpwindow.rb +7 -0
- data/code/01rwdcore/runhelpabout.rb +6 -1
- data/code/01rwdcore/selectiontab.rb +2 -0
- data/code/01rwdcore/setuphelpaboutoptions.rb +2 -0
- data/code/01rwdcore/setuptinkerdocuments.rb +1 -0
- data/code/01rwdcore/test_cases.rb +100 -51
- data/code/01rwdcore/test_harness.rb +8 -1
- data/code/01rwdcore/uploadreturns.rb +3 -0
- data/code/dd0viewphoto/dd0viewphoto.rb +2 -0
- data/code/superant.com.rwdtinkerbackwindow/changelocale.rb +84 -0
- data/code/superant.com.rwdtinkerbackwindow/initiateapplets.rb +0 -1
- data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +2 -0
- data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +2 -0
- data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +3 -1
- data/code/superant.com.rwdtinkerbackwindow/listzips.rb +2 -0
- data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +3 -1
- data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +3 -1
- data/code/superant.com.rwdtinkerbackwindow/showlocaleoptions.rb +9 -0
- data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +1 -0
- data/code/superant.com.rwdtinkerbackwindow/viewlogfile.rb +8 -5
- data/code/superant.com.sandbox/tabthree.rb +0 -4
- data/code/superant.com.tinkerbell/addzipfiles.rb +66 -0
- data/code/superant.com.tinkerbell/helptexthashload.rb +22 -0
- data/code/superant.com.tinkerbell/loadviewfiles.rb +19 -0
- data/code/superant.com.tinkerbell/openhelpwindow.rb +11 -17
- data/code/superant.com.tinkerbell/runrwdapplet.rb +1 -1
- data/code/zz0applicationend/zz0end.rb +2 -1
- data/configuration/rwdtinker.dist +3 -3
- data/configuration/sandbox.dist +7 -0
- data/configuration/tinkerbellw.dist +3 -3
- data/configuration/tinkerwin2variables.dist +1 -1
- data/gui/tinkerbackwindows/superant.com.sandbox/33tabthree.rwd +2 -2
- data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80localechanger.rwd +17 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbell/60zipfoldfiles.rwd +31 -0
- data/gui/tinkerbackwindows/superant.com.tinkerbellback/1rwdrubyeval.rwd +1 -1
- data/gui/tinkerbackwindows/superant.com.tinkerbellback/81jumplinkcommands.rwd +17 -0
- data/init.rb +7 -1
- data/installed/sandbox.inf +4 -0
- data/installed/tinkerbellw.inf +7 -4
- data/lang/en/rwdcore/en.po +28 -0
- data/lang/en/tinkerbell/en.po +17 -0
- data/lang/es/rwdcore/es.po +22 -13
- data/lang/es/tinkerbell/en.po +16 -0
- data/lang/fr/rwdcore/fr.po +4 -1
- data/lang/fr/tinkerbell/en.po +7 -0
- data/lang/hi/rwdcore/hi.po +39 -36
- data/lang/hi/tinkerbell/en.po +6 -0
- data/lang/ja/rwdcore/ja.po +3 -0
- data/lang/ja/tinkerbell/en.po +6 -0
- data/lang/nl/rwdcore/nl.po +4 -1
- data/lang/nl/tinkerbell/en.po +6 -0
- data/lib/zip/ioextras.rb +43 -2
- data/lib/zip/stdrubyext.rb +5 -5
- data/lib/zip/tempfile_bugfixed.rb +2 -2
- data/lib/zip/zip.rb +618 -149
- data/lib/zip/zipfilesystem.rb +59 -8
- data/lib/zip/ziprequire.rb +32 -3
- data/rwd_files/HowTo_Tinker.txt +9 -0
- data/rwd_files/HowTo_TinkerBell.txt +4 -1
- data/rwd_files/Tinkerhelptexthash.txt +5 -2
- data/rwd_files/log/rwdtinker.log +1338 -0
- data/rwd_files/rwdapplications.html +23 -1
- data/{code/superant.com.tinkerbell/helptexthashrwdhypernote.rb → rwd_files/tinkerbellhelpfiles.txt} +21 -5
- data/rwdconfig.dist +1 -1
- data/tests/makedist-tinkerbellw.rb +1 -1
- data/tests/makedist.rb +1 -1
- data/{rwdtinker.rb → tinkerbell.rb} +0 -0
- data/zips/rwdwfoldeditor-0.07.zip +0 -0
- data/zips/rwdwhypernote-0.16.zip +0 -0
- data/zips/rwdwschedule-1.07.zip +0 -0
- data/zips/tinkerbellw-0.04.zip +0 -0
- metadata +24 -8
- data/gui/tinkerbackwindows/superant.com.tinkerbellback/77jumplinkcommands.rwd +0 -17
- data/zips/rwdwfoldeditor-0.05.zip +0 -0
- data/zips/rwdwhypernote-0.15.zip +0 -0
- data/zips/tinkerbellw-0.03.zip +0 -0
data/code/01rwdcore/01rwdcore.rb
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
# Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
|
2
|
-
|
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:
|
3
|
+
Helptext = Hash.new { |hh, kk| hh[kk] = "ERROR: Message-ID Unknown: #{kk.inspect}."; hh[kk] }
|
4
4
|
helpmessage = {
|
5
|
-
:
|
6
|
-
|
7
|
-
|
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,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
|
@@ -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
|
-
|
18
|
-
|
19
|
-
|
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
|
-
|
23
|
-
|
24
|
-
|
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
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
39
|
+
if "rwdtinkerhelpwindow" == @rwd_window
|
40
|
+
$testasserts += 1
|
41
|
+
else
|
42
|
+
$testfailures += 1
|
43
|
+
$testerrorarray << "helpscreen"
|
44
|
+
end
|
45
|
+
|
35
46
|
runtinkerdocuments
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
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
|
-
|
63
|
-
|
64
|
-
|
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
|
|
@@ -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,6 @@
|
|
1
|
-
#
|
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")
|