rwdaddresses 1.02 → 1.03

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. data/code/01rwdcore/01rwdcore.rb +1 -1
  2. data/code/01rwdcore/jumplinkcommand.rb +26 -0
  3. data/code/01rwdcore/rundocuments.rb +10 -0
  4. data/code/01rwdcore/runeditconfiguration.rb +10 -0
  5. data/code/01rwdcore/runhelpabout.rb +10 -0
  6. data/code/01rwdcore/selectiontab.rb +9 -0
  7. data/code/01rwdcore/test_cases.rb +53 -59
  8. data/code/01rwdcore/test_harness.rb +1 -0
  9. data/code/superant.com.rwdaddresses/downloadrwdaddressfiles.rb +6 -6
  10. data/code/superant.com.rwdaddresses/jumplinkupdate.rb +11 -0
  11. data/code/superant.com.rwdaddresses/test_cases.rb +46 -0
  12. data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +11 -0
  13. data/configuration/rwdaddresses.dist +3 -3
  14. data/configuration/rwdapplicationidentity.dist +2 -2
  15. data/configuration/rwdtinker.dist +3 -3
  16. data/configuration/tinkerwin2variables.dist +1 -1
  17. data/gui/00coreguibegin/applicationguitop.rwd +1 -1
  18. data/gui/frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd +2 -7
  19. data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd +15 -0
  20. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/94selectiontab.rwd +11 -0
  21. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/95jumplink.rwd +15 -0
  22. data/gui/{frontwindow0/superant.com.rwdaddresses/m99menuend.rwd → tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/97selectionend.rwd} +0 -0
  23. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +17 -0
  24. data/rwd_files/HowTo_Addresses.txt +5 -0
  25. data/rwd_files/HowTo_Tinker.txt +9 -0
  26. data/rwd_files/tinker.png +0 -0
  27. data/rwdconfig.dist +4 -2
  28. data/tests/RubyGauge.rb +179 -0
  29. data/tests/makedist.rb +1 -0
  30. metadata +18 -21
  31. data/gui/frontwindow0/superant.com.rwdaddresses/m01menubegin.rwd +0 -10
  32. data/gui/frontwindow0/superant.com.rwdaddresses/m02menu.rwd +0 -36
  33. data/gui/frontwindow0/superant.com.rwdaddresses/m03menu.rwd +0 -12
  34. data/gui/frontwindow0/superant.com.rwdaddresses/m85menu.rwd +0 -21
  35. data/gui/frontwindow0/superant.com.rwdaddresses/m88menu.rwd +0 -12
  36. data/gui/frontwindowselections/superant.com.rwdaddressessyncselectiontab/rwdaddressessyncselectiontab.rwd +0 -12
  37. data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/rwdwin2selectiontab.rwd +0 -12
  38. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/m01menubegin.rwd +0 -10
  39. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/m02menu.rwd +0 -36
  40. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/m03menu.rwd +0 -12
  41. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/m85menu.rwd +0 -21
  42. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/m88menu.rwd +0 -18
  43. data/gui/tinkerbackwindows/superant.com.rwdaddressessyncbackwindow/m99menuend.rwd +0 -3
  44. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/80tab1.rwd +0 -11
  45. data/tests/rwdtinkertestEN.rb +0 -163
  46. data/tests/test.result +0 -32
@@ -17,6 +17,6 @@ class RwdTinker < RWDialog
17
17
  end
18
18
 
19
19
  def inspect
20
- "Rwdtinker Application "
20
+ "#{$rwdapplicationidentity}"
21
21
  end
22
22
 
@@ -0,0 +1,26 @@
1
+ # Bind message passing socket to rwdtinker application
2
+ JumpLink = Hash.new { |hh, kk| hh[kk] = "ERROR: link not found: #{kk.inspect}."; hh[kk] }
3
+ locationlink = {
4
+ :helpscreen=> "runhelpwindow",
5
+ :tinkerbackwindow=>"runrwdtinkerbackwindow",
6
+ :returntomain=>"returntomain",
7
+ :opendocuments=>"runtinkerdocuments",
8
+ :editconfiguration=>"runeditconfiguration"
9
+ }
10
+ locationlink.each { |kk, vv| JumpLink[kk] = vv }
11
+
12
+ def runjumplinkcommand
13
+ if @a_jumplinkinput
14
+ runjumplocation = "#{JumpLink[:"#{@a_jumplinkinput}"]}"
15
+
16
+ self.send(runjumplocation)
17
+ end
18
+ end
19
+
20
+
21
+ # list the remote control options on the screen
22
+ def showjumplinkoptions
23
+
24
+ @jumplinkoptions = $rwdjumplink.rwd_options
25
+
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,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
+
@@ -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,15 +13,15 @@ def downloadrwdaddressfiles
13
13
  schfiles = ftp.nlst($rwdaddresses_ftpdirectory)
14
14
  schfiles.each do |x|
15
15
  #adjust the filters to the files you want to see...
16
- if(!test(?d,x))
16
+
17
17
  if x =~ /nam/
18
- lastslash = x.rindex('/')+1
19
- newstring = x.slice!(lastslash..256)
20
- localupdatefile = File.join($rwdaddresses_updatedirectory, "#{newstring}")
21
- ftp.getbinaryfile("#{newstring}" , localupdatefile )
18
+ newstring = x
19
+ localupdatefile = File.join($rwdaddresses_updatedirectory, "#{x}")
20
+ ftp.getbinaryfile("#{x}" , localupdatefile )
21
+
22
22
  @rwdaddressesftpdisplay = @rwdaddressesftpdisplay + newstring + "\n"
23
23
  end
24
- end
24
+
25
25
 
26
26
  end
27
27
  ftp.close
@@ -0,0 +1,11 @@
1
+ #jumplinkupdate
2
+
3
+ JumpLink.update(:RwdAddressesBackWindow=>"runrwdaddressessynbackwindow",
4
+ :RwdAddressesConfiguration=>"runrwdaddressesmenu10",
5
+ :ViewContactTab=>"runrwdaddressesmenu1",
6
+ :EditContactRecord=>"runrwdaddressesmenu2",
7
+ :ContactUtilitiesTab=>"runrwdaddressesmenu3",
8
+ :AddressesSyncTab=>"runrwdaddressesmenu4"
9
+
10
+ )
11
+ $rwdjumplink +=["RwdAddressesBackWindow","ContactUtilitiesTab","EditContactRecord","ViewContactTab","RwdAddressesConfiguration","AddressesSyncTab"]
@@ -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 rwdaddresses_all_tests
9
+ print "in rwdaddresses all tests\n"
10
+ $testrwdaddressestestcase = TestSuite.new
11
+ test_runrwdaddresses
12
+ end
13
+
14
+ def test_runrwdaddresses
15
+
16
+
17
+ begin
18
+ testasserts = 0
19
+ print "Starting rwdaddresses tests!\n"
20
+ runselectiontab
21
+ assert_equal("selectiontab",@rwd_tab) ; testasserts += 1
22
+ runrwdaddressesmenu10
23
+ assert_equal("viewaddressesconfiguration",@rwd_tab) ; testasserts += 1
24
+ loadrwdaddressesconfiguration
25
+ assert_equal("rwdaddresses.cnf",@a_adconfigurationfilename) ; 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
+
@@ -0,0 +1,11 @@
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
+ # call the rwdtinker helpwindow
6
+
7
+ def runremotezipsinstall
8
+ @rwd_window = "tinkerbackwindow"
9
+ @rwd_tab = "superantcomremotezipsinstall"
10
+ end
11
+
@@ -1,4 +1,4 @@
1
- ##VERSION:1.02
1
+ ##VERSION:1.03
2
2
  #rwdaddresses contact book
3
3
  $photodelay = 1
4
4
  ##NAME:$addressfiles_directory:0
@@ -15,5 +15,5 @@ $rwdaddresses_ftppassword = "mypassword"
15
15
  $rwdaddresses_ftpdirectory = "/incoming/rwdnames/"
16
16
  ##NAME:$rwdaddresses_updatedirectory:0
17
17
  $rwdaddresses_updatedirectory = "updates"
18
-
19
- RwdAddressesVersion = "1.02"
18
+ $testharnessarray += ["rwdaddresses_all_tests"]
19
+ RwdAddressesVersion = "1.03"
@@ -1,3 +1,3 @@
1
- ##VERSION:1.59
2
- $rwdapplicationidentity = "rwdaddresses contact book"
1
+ ##VERSION:1.63
2
+ $rwdapplicationidentity = "rwdaddresses - Contact Book"
3
3
 
@@ -1,4 +1,4 @@
1
- ##VERSION:1.62
1
+ ##VERSION:1.64
2
2
  ConfigurationDir = "configuration" # for use in program - init.rb has this value without using this constant
3
3
  CodeName = "rwdtinker"
4
4
  CodeNameFile = CodeName + ".rb"
@@ -11,5 +11,5 @@ LangDir = "lang"
11
11
  $prevouswindow ="main"
12
12
  $rwdcontrolports =["13713","13714","13715","13716","13717","13718"]
13
13
  $port = 7705
14
-
15
- RwdTinkerVersion = "1.62"
14
+ $rwdjumplink = ["helpscreen","tinkerbackwindow","returntomain","opendocuments","editconfiguration"]
15
+ RwdTinkerVersion = "1.64"
@@ -1,4 +1,4 @@
1
- ##VERSION:1.62
1
+ ##VERSION:1.63
2
2
  TinkerWin2ConfigurationFileName = "tinkerwin2variables.cnf" # this file name - do not change
3
3
  ##NAME:$zipslocation:0
4
4
  $zipslocation = "zips" # location of applets to add
@@ -1,4 +1,4 @@
1
1
  $rwdguivar=
2
2
  "<application>
3
- <window name=\"main\" title=\"Tinker - RubyWebDialogs\">
3
+ <window name=\"main\" title=\"RwdAddresses - RubyWebDialogs\">
4
4
  <tabs>"
@@ -3,14 +3,9 @@ $rwdguivar=
3
3
  <tab name=\"selectiontab\" caption=#{Message[:selection_panel]}>
4
4
 
5
5
  <table>
6
- <row> <p align=\"right\">Open a new window with callable applets you have loaded</row>
6
+ <row> <p align=\"right\">Open a new location </row>
7
7
 
8
8
  </table>
9
- <horizontal>
10
-
11
- <button caption=#{Message[:rwdtinker_help_window]} action=\"runhelpwindow\"/>
12
-
13
-
14
- </horizontal>"
9
+ "
15
10
 
16
11
 
@@ -0,0 +1,15 @@
1
+ $rwdguivar=
2
+ "
3
+ <horizontal>
4
+ <button caption=\"Show Jump Links\" action=\"showjumplinkoptions\"/>
5
+
6
+ </horizontal>
7
+ <table>
8
+ <select name=\"a_jumplinkinput\"> %%jumplinkoptions%% </select>
9
+
10
+ </table>
11
+
12
+ <horizontal>
13
+ <button caption=\"Jump to Application Location\" action=\"runjumplinkcommand\"/>
14
+ </horizontal>
15
+ "
@@ -0,0 +1,11 @@
1
+ $rwdguivar=
2
+ "
3
+ <tab name=\"selectiontab\" caption=#{Message[:selection_panel]}>
4
+
5
+ <table>
6
+ <row> <p align=\"right\">Open a new location </row>
7
+
8
+ </table>
9
+ "
10
+
11
+