rwdgutenberg 0.07 → 0.08

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/Books/Mariposa.gut +0 -0
  2. data/Books/Shannon.gut +0 -0
  3. data/Books/marip10.txt +0 -0
  4. data/Readme.txt +3 -0
  5. data/bin/rwdgutenberg +0 -0
  6. data/code/01rwdcore/01rwdcore.rb +0 -0
  7. data/code/01rwdcore/02helptexthashbegin.rb +0 -0
  8. data/code/01rwdcore/03helptexthash.rb +20 -20
  9. data/code/01rwdcore/04helptextend.rb +0 -0
  10. data/code/01rwdcore/jumplinkcommand.rb +0 -0
  11. data/code/01rwdcore/openhelpwindow.rb +0 -0
  12. data/code/01rwdcore/returntomain.rb +0 -0
  13. data/code/01rwdcore/rundocuments.rb +0 -0
  14. data/code/01rwdcore/runeditconfiguration.rb +0 -0
  15. data/code/01rwdcore/runhelpabout.rb +0 -0
  16. data/code/01rwdcore/runopentinkerdocument.rb +0 -0
  17. data/code/01rwdcore/rwdtinkerversion.rb +0 -0
  18. data/code/01rwdcore/rwdwindowreturn.rb +0 -0
  19. data/code/01rwdcore/selectiontab.rb +0 -0
  20. data/code/01rwdcore/setuphelpaboutoptions.rb +0 -0
  21. data/code/01rwdcore/setuptinkerdocuments.rb +0 -0
  22. data/code/01rwdcore/test_cases.rb +0 -0
  23. data/code/01rwdcore/test_harness.rb +0 -0
  24. data/code/01rwdcore/uploadreturns.rb +0 -0
  25. data/code/dd0viewphoto/dd0viewphoto.rb +3 -0
  26. data/code/superant.com.gutenberg/changegutenbergname.rb +0 -0
  27. data/code/superant.com.gutenberg/clearbookscreendisplay.rb +0 -0
  28. data/code/superant.com.gutenberg/cleargutenbergfiles.rb +0 -0
  29. data/code/superant.com.gutenberg/cleargutrecordfiles.rb +0 -0
  30. data/code/superant.com.gutenberg/copyfilename.rb +0 -0
  31. data/code/superant.com.gutenberg/deletegutenbergrecord.rb +0 -0
  32. data/code/superant.com.gutenberg/gutenbergcreatefile.rb +0 -0
  33. data/code/superant.com.gutenberg/helptexthashrwdgutenberg.rb +0 -0
  34. data/code/superant.com.gutenberg/jumplinkupdate.rb +0 -0
  35. data/code/superant.com.gutenberg/listnamerecord.rb +0 -0
  36. data/code/superant.com.gutenberg/listtextfilesgutenberg.rb +0 -0
  37. data/code/superant.com.gutenberg/loadbookrecord.rb +0 -0
  38. data/code/superant.com.gutenberg/loadconfigurationrecord.rb +0 -0
  39. data/code/superant.com.gutenberg/loadconfigurationvariables.rb +0 -0
  40. data/code/superant.com.gutenberg/openhelpwindowgutenberg.rb +0 -0
  41. data/code/superant.com.gutenberg/returntomain.rb +0 -0
  42. data/code/superant.com.gutenberg/runbackwindow.rb +0 -0
  43. data/code/superant.com.gutenberg/rungutenbergwindow.rb +0 -0
  44. data/code/superant.com.gutenberg/rwdgutenbergbackward.rb +0 -0
  45. data/code/superant.com.gutenberg/rwdhypernotehelpabout.rb +0 -0
  46. data/code/superant.com.gutenberg/rwdtinkerversion.rb +0 -0
  47. data/code/superant.com.gutenberg/saveconfigurationrecord.rb +0 -0
  48. data/code/superant.com.gutenberg/savegutenbergrecord.rb +0 -0
  49. data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +0 -0
  50. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -0
  51. data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +0 -0
  52. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +0 -0
  53. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +0 -0
  54. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +0 -0
  55. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +0 -0
  56. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +0 -0
  57. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +0 -0
  58. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +0 -0
  59. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +0 -0
  60. data/code/superant.com.rwdtinkerbackwindow/network.rb +0 -0
  61. data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +0 -0
  62. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +1 -5
  63. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +0 -0
  64. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +0 -0
  65. data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +0 -0
  66. data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +0 -0
  67. data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +0 -0
  68. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +0 -0
  69. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +0 -0
  70. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +0 -0
  71. data/code/zz0applicationend/zz0end.rb +0 -0
  72. data/configuration/language.dist +2 -1
  73. data/configuration/rwdapplicationidentity.dist +1 -1
  74. data/configuration/rwdgutenberg.dist +3 -3
  75. data/configuration/rwdtinker.dist +3 -3
  76. data/configuration/tinkerwin2variables.dist +3 -3
  77. data/ev/browser.rb +24 -10
  78. data/ev/ftools.rb +23 -19
  79. data/ev/mime.rb +328 -0
  80. data/ev/net.rb +154 -38
  81. data/ev/ruby.rb +96 -26
  82. data/ev/rwd.rb +162 -89
  83. data/ev/sgml.rb +1 -1
  84. data/ev/thread.rb +0 -0
  85. data/ev/tree.rb +33 -5
  86. data/ev/xml.rb +97 -0
  87. data/extras/rconftool.rb +0 -0
  88. data/extras/zip/ioextras.rb +0 -0
  89. data/extras/zip/stdrubyext.rb +0 -0
  90. data/extras/zip/tempfile_bugfixed.rb +0 -0
  91. data/extras/zip/zip.rb +0 -0
  92. data/extras/zip/zipfilesystem.rb +0 -0
  93. data/extras/zip/ziprequire.rb +0 -0
  94. data/gui/00coreguibegin/applicationguitop.rwd +1 -1
  95. data/gui/frontwindow0/superant.com.gutenberg/10viewnote.rwd +0 -0
  96. data/gui/frontwindow0/superant.com.gutenberg/20listfiles.rwd +0 -0
  97. data/gui/frontwindow0/superant.com.gutenberg/30booklistutilities.rwd +0 -0
  98. data/gui/frontwindow0/superant.com.gutenberg/35displaytab.rwd +0 -0
  99. data/gui/frontwindow0/superant.com.gutenberg/36displaytab.rwd +0 -0
  100. data/gui/frontwindow0/superant.com.gutenberg/40rwdgutenberg.rwd +0 -0
  101. data/gui/frontwindow0/superant.com.gutenberg/40rwdgutenberghtml.rwd +0 -0
  102. data/gui/frontwindow0/superant.com.gutenberg/67viewconfiguration.rwd +0 -0
  103. data/gui/frontwindowselectionbegin/selectiontabbegin/00selectiontabbegin.rwd +1 -1
  104. data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd +2 -2
  105. data/gui/frontwindowselectionzend/viewselectionzend/wwselectionend.rwd +0 -0
  106. data/gui/frontwindowselectionzend/viewselectionzend/zzdocumentbegin.rwd +0 -0
  107. data/gui/frontwindowtdocuments/superant.com.documents/tinkerdocuments.rwd +2 -2
  108. data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzdocumentend.rwd +1 -1
  109. data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzzrwdlasttab.rwd +0 -0
  110. data/gui/helpaboutbegin/superant.com.helpaboutbegin/zzzzhelpscreenstart.rwd +1 -1
  111. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/helpabouttab.rwd +2 -2
  112. data/gui/helpaboutzend/superant.com.helpaboutend/helpscreenend.rwd +0 -0
  113. data/gui/helpaboutzend/superant.com.helpaboutend/zhelpscreenstart2.rwd +1 -1
  114. data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpabout2.rwd +2 -2
  115. data/gui/helpaboutzend/superant.com.helpaboutend/zzzzhelpscreen2end.rwd +0 -0
  116. data/gui/tinkerbackwindows/superant.com.gutenberg/10viewnote.rwd +0 -0
  117. data/gui/tinkerbackwindows/superant.com.gutenberg/20listfiles.rwd +0 -0
  118. data/gui/tinkerbackwindows/superant.com.gutenberg/30booklistutilities.rwd +0 -0
  119. data/gui/tinkerbackwindows/superant.com.gutenberg/35displaytab.rwd +0 -0
  120. data/gui/tinkerbackwindows/superant.com.gutenberg/36displaytab.rwd +0 -0
  121. data/gui/tinkerbackwindows/superant.com.gutenberg/40rwdgutenberg.rwd +0 -0
  122. data/gui/tinkerbackwindows/superant.com.gutenberg/40rwdgutenberghtml.rwd +0 -0
  123. data/gui/tinkerbackwindows/superant.com.gutenberg/67viewconfiguration.rwd +0 -0
  124. data/gui/tinkerbackwindows/superant.com.gutendisplay/gutendisplayhtmlwindow.rwd +0 -0
  125. data/gui/tinkerbackwindows/superant.com.gutendisplay/gutendisplaywindow.rwd +0 -0
  126. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +1 -1
  127. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +9 -10
  128. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +5 -5
  129. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +9 -9
  130. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +2 -2
  131. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +1 -1
  132. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +3 -3
  133. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +0 -0
  134. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +1 -1
  135. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +0 -0
  136. data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +2 -2
  137. data/gui/tinkerbackwindows/superant.com.versionwindow/helpaboutwindow.rwd +3 -3
  138. data/gui/zzcoreguiend/tinkerapplicationguiend/yy9rwdend.rwd +0 -0
  139. data/init.rb +0 -0
  140. data/installed/gutenbergdata02.inf +5 -0
  141. data/installed/rwdwgutenberg-0.06.inf +7 -0
  142. data/lang/en/rwdcore/languagefile.rb +63 -15
  143. data/lang/es/rwdcore/languagefile-es.rb +67 -13
  144. data/lang/fr/rwdcore/languagefile.rb +64 -0
  145. data/lang/jp/rwdcore/languagefile.rb +69 -6
  146. data/lang/nl/rwdcore/languagefile.rb +62 -0
  147. data/lib/temp.rb +0 -0
  148. data/rwd_files/HowTo_Gutenberg.txt +0 -6
  149. data/rwd_files/HowTo_Tinker.txt +6 -0
  150. data/rwd_files/HowTo_TinkerWin2.txt +0 -0
  151. data/rwd_files/Readme.txt +0 -0
  152. data/rwd_files/RubyWebDialogs.html +0 -0
  153. data/rwd_files/favicon.ico +0 -0
  154. data/rwd_files/rdoc-style.css +0 -0
  155. data/rwd_files/rwdapplications.html +0 -0
  156. data/rwd_files/tinker.png +0 -0
  157. data/rwdconfig.dist +1 -1
  158. data/tests/checkdepends.sh +0 -0
  159. data/tests/cleancnf.sh +0 -0
  160. data/tests/makedist.rb +1 -1
  161. data/tests/rdep.rb +0 -0
  162. data/tests/totranslate.lang +0 -0
  163. data/zips/temp.rb +1 -0
  164. metadata +221 -204
  165. data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +0 -96
  166. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdcontrol.rwd +0 -33
  167. data/installed/rwdviewlogo-0.4.inf +0 -4
data/Books/Mariposa.gut CHANGED
File without changes
data/Books/Shannon.gut CHANGED
File without changes
data/Books/marip10.txt CHANGED
File without changes
data/Readme.txt CHANGED
@@ -81,6 +81,9 @@ Steven Gibson
81
81
  steven@superant.com
82
82
 
83
83
  == Changelog
84
+ Version 0.07
85
+ updated to tinker 1.69
86
+
84
87
  Version 0.06
85
88
  Add html viewing tab
86
89
  added reset button
data/bin/rwdgutenberg CHANGED
File without changes
File without changes
File without changes
@@ -1,31 +1,31 @@
1
1
  # Help files for RwdTinker core
2
2
 
3
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
4
+ :general_help => "You can work with Applets: go to 'Selection tab', <br>
5
+ On that back screen you will find:<br>
6
+ List Applets: you can see and delete installed applets<br>
7
+ List Zips: you can see lists of applets that you can install<br>
8
+ Edit Configuration: You can view the rwdtinker configuration and change it<br>
9
+ Diagnostic Tab: You can view the environments variables that rwdtinker is running with<br>
10
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
11
+ :network_help => "Using over a Network: To serve the application over your local LAN,change the last line in the<br>
12
+ init.rb file to something like:\n<br>
13
+ RwdTinker.file(RWDFile).serve(8080, '-r' ? '.rwduids' : nil)\n<br>
14
14
  Then you should be able to login at: http://yourhostname:8080",
15
15
 
16
16
 
17
- :documents_rwdtinker => "Documents:
17
+ :documents_rwdtinker => "<b>Documents:
18
+ <p>
18
19
 
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
-
20
+ when you click on a document name, the document should pop up in a <br>
21
+ browser window, or in another browser tab.</b>",
22
+ :remote_control => "<b>Remote control gives you a way to determine what applications are running on which ports
23
+ <p>
24
+ The name of the application is set in the config file<br>
25
+ You need to click the show remote command choices first - this will show the port and query choices<br>
26
+ Then you can click in 'Run Command' to see if other applications are running.<br>
27
+ <p>
28
28
  The remote ports daemon will not be running unless you start it.
29
-
29
+ </b>
30
30
  "
31
31
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ def viewphoto
2
+ @rwd_window = "photo"
3
+ end
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -18,11 +18,7 @@ def runhelpwindowtinkerwin2
18
18
  end
19
19
  if @rwd_tab == "editconfigurationfile"
20
20
  $help_topic = "applet_tinkerbackeditconfiguration"
21
-
22
- end
23
- if @rwd_tab == "rwdremotecontrol"
24
- $help_topic = "remote_control"
25
-
21
+
26
22
  end
27
23
  if @rwd_tab == "superantcomremotezipsinstall"
28
24
  $help_topic = "remotegemapplet_install"
File without changes
@@ -1,7 +1,8 @@
1
- ##VERSION:1.62
1
+ ##VERSION:1.68
2
2
  #language selection file
3
3
  ##NAME:$lang:0
4
4
  #$lang = "jp"
5
5
  $lang= "en"
6
6
  #$lang= "nl"
7
7
  #$lang= "es"
8
+ #$lang= "fr"
@@ -1,3 +1,3 @@
1
- ##VERSION:1.66
1
+ ##VERSION:1.69
2
2
  $rwdapplicationidentity = "rwdtinker main application"
3
3
 
@@ -1,4 +1,4 @@
1
- ##VERSION:0.07
1
+ ##VERSION:0.08
2
2
  ##NAME:$rwdgutenberg_directory:0
3
3
  $rwdgutenberg_directory = "Books"
4
4
  ##NAME:$gutenbergcommand:0
@@ -6,11 +6,11 @@ $gutenbergcommand = "openbook"
6
6
  ##NAME:$booklocation:0
7
7
  $booklocation = 0
8
8
  ##NAME:$booksteps:0
9
- $booksteps = 14
9
+ $booksteps = 12
10
10
  ##NAME:BookViewDisplay:0
11
11
  BookViewDisplay = 15
12
12
  $tinkerdocumentsarray += ["HowTo_Gutenberg.txt"]
13
13
  $tinkerhelpaboutarray += ["RwdGutenberg"]
14
14
  ##NAME:RwdGutenbergVersion:0
15
- RwdGutenbergVersion = "0.07"
15
+ RwdGutenbergVersion = "0.08"
16
16
 
@@ -1,4 +1,4 @@
1
- ##VERSION:1.66
1
+ ##VERSION:1.69
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"
@@ -13,7 +13,7 @@ LangDir = "lang"
13
13
  $port = 7705
14
14
  $rwdjumplink = ["helpscreen","tinkerbackwindow","returntomain","opendocuments","editconfiguration"]
15
15
  Browser_Exe = 'mozilla '
16
- $tinkerdocumentsarray +=["COPYING","HowTo_Tinker.txt","rwdapplications.html","RubyWebDialogs.html"]
17
- RwdTinkerVersion = "1.66"
16
+ $tinkerdocumentsarray +=["HowTo_Tinker.txt","rwdapplications.html","RubyWebDialogs.html"]
17
+ RwdTinkerVersion = "1.69"
18
18
 
19
19
 
@@ -1,4 +1,4 @@
1
- ##VERSION:1.66
1
+ ##VERSION:1.69
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
@@ -7,11 +7,11 @@ $zipslocation = "zips" # location of applets to add
7
7
  $xpcommand = " " # Linux machines
8
8
  # $xpcommand = "cmd /C " # XP machines with cmd shell
9
9
  ##NAME:$gemdirectory_withgemfiles:0
10
- $gemdirectory_withgemfiles = "/usr/lib/ruby/gems/1.8/gems"
10
+ $gemdirectory_withgemfiles = "/var/lib/gems/1.8/gems"
11
11
  # $gemdirectory_withgemfiles = "c:\\ruby\\lib\\ruby\\gems\\1.8\\gems" # XP machine
12
12
  ##NAME:$geminstalled_directory:0
13
13
  # $geminstalled_directory = "/ruby/lib/ruby/gems/1.8/gems" # XP machine
14
- $geminstalled_directory = "/usr/lib/ruby/gems/1.8/gems" # Debian Linux
14
+ $geminstalled_directory = "/var/lib/gems/1.8/gems" # Debian Linux
15
15
 
16
16
  RwdTinkerWin2Version = "0.8"
17
17
 
data/ev/browser.rb CHANGED
@@ -16,20 +16,33 @@ def windowsbrowser
16
16
  application = nil
17
17
 
18
18
  begin
19
- Win32::Registry::HKEY_CLASSES_ROOT.open('.html') do |reg|
19
+ Win32::Registry::HKEY_CLASSES_ROOT.open(".html") do |reg|
20
20
  filetype = reg[""]
21
21
  end
22
22
 
23
- Win32::Registry::HKEY_CLASSES_ROOT.open(filetype + '\shell\open\command') do |reg|
23
+ Win32::Registry::HKEY_CLASSES_ROOT.open(filetype + "\\shell\\open\\command") do |reg|
24
24
  application = reg[""]
25
25
  end
26
26
  rescue NameError
27
- $stderr.puts "Only available for Windows."
27
+ $stderr.puts "Only available for Windows and Cygwin."
28
28
  end
29
29
 
30
30
  application
31
31
  end
32
32
 
33
+ def cygwinbrowser
34
+ browser, *args = windowsbrowser.splitwords
35
+ browser = browser.gsub(/\\/, "/")
36
+ #browser = browser
37
+
38
+ args.collect!{|a| a.gsub(/\\/, "/")}
39
+ #args.collect!{|a| "\"%s\"" % [a.gsub(/\\/, "/")]}
40
+ #args.collect!{|a| "\"%s\"" % [a]}
41
+
42
+ res = "\"%s\" %s" % [browser, args.join(" ")]
43
+ res
44
+ end
45
+
33
46
  def linuxbrowser
34
47
  application = ""
35
48
 
@@ -47,25 +60,26 @@ end
47
60
  def defaultbrowser
48
61
  res = nil
49
62
  res = windowsbrowser if windows?
63
+ res = cygwinbrowser if cygwin?
50
64
  res = linuxbrowser if linux?
51
65
  res
52
66
  end
53
67
 
68
+ def showurlinbrowser(url, browser=defaultbrowser)
69
+ command = "#{browser} \"#{url}\""
70
+
71
+ system(command) or $stderr.puts "Starting of the browser failed, or the browser terminated abnormally.\nCommand => #{command}"
72
+ end
73
+
54
74
  def showinbrowser(html, browser=defaultbrowser)
55
75
  port, io = TCPServer.freeport(7701, 7709)
56
76
 
57
77
  unless browser.nil?
58
78
  Thread.new do
59
79
  begin
60
- #command = "1234 \"http://localhost:#{port}\"" if linux?
61
- #command = "L:/prog/MozillaFirefox/firefox.exe \"http://localhost:#{port}\"" if cygwin?
62
- #command = Win32::Registry::HKEY_CLASSES_ROOT.open('htmlfile\shell\open\command')[0] + " \"http://localhost:#{port}/\"" if windows?
63
-
64
- command = "#{browser} \"http://localhost:#{port}\""
65
-
66
80
  Thread.pass
67
81
 
68
- system(command)
82
+ showurlinbrowser("http://localhost:#{port}/", browser)
69
83
  rescue
70
84
  end
71
85
  end
data/ev/ftools.rb CHANGED
@@ -1,22 +1,12 @@
1
1
  require "ftools"
2
2
 
3
3
  class Dir
4
- def self.mkdirrec(dir)
5
- pdir = File.dirname(dir)
6
-
7
- if not pdir.empty? and not File.directory?(pdir)
8
- Dir.mkdirrec(pdir)
9
- end
10
-
11
- Dir.mkdir(dir) rescue nil
12
- end
13
-
14
4
  def self.copy(from, to)
15
5
  if File.directory?(from)
16
6
  pdir = Dir.pwd
17
7
  todir = File.expand_path(to)
18
8
 
19
- mkdirrec(todir)
9
+ File.mkpath(todir)
20
10
 
21
11
  Dir.chdir(from)
22
12
  Dir.new(".").each do |e|
@@ -26,7 +16,7 @@ class Dir
26
16
  else
27
17
  todir = File.dirname(File.expand_path(to))
28
18
 
29
- mkdirrec(todir)
19
+ File.mkpath(todir)
30
20
 
31
21
  File.copy(from, to)
32
22
  end
@@ -38,6 +28,8 @@ class Dir
38
28
  end
39
29
 
40
30
  def self.rm_rf(entry)
31
+ File.chmod(0755, entry)
32
+
41
33
  if File.ftype(entry) == "directory"
42
34
  pdir = Dir.pwd
43
35
 
@@ -47,16 +39,24 @@ class Dir
47
39
  end
48
40
  Dir.chdir(pdir)
49
41
 
50
- Dir.delete(entry)
42
+ begin
43
+ Dir.delete(entry)
44
+ rescue => e
45
+ $stderr.puts e.message
46
+ end
51
47
  else
52
- File.delete(entry)
48
+ begin
49
+ File.delete(entry)
50
+ rescue => e
51
+ $stderr.puts e.message
52
+ end
53
53
  end
54
54
  end
55
55
 
56
56
  def self.find(entry=nil, mask=nil)
57
57
  entry = "." if entry.nil?
58
58
 
59
- entry = entry.gsub!(/[\/\\]*$/, "") unless entry.nil?
59
+ entry = entry.gsub(/[\/\\]*$/, "") unless entry.nil?
60
60
 
61
61
  mask = /^#{mask}$/i if mask.kind_of?(String)
62
62
 
@@ -77,8 +77,8 @@ class Dir
77
77
  ensure
78
78
  Dir.chdir(pdir)
79
79
  end
80
- rescue Errno::EACCES => error
81
- puts error
80
+ rescue Errno::EACCES => e
81
+ $stderr.puts e.message
82
82
  end
83
83
  else
84
84
  res += [entry] if mask.nil? or entry =~ mask
@@ -99,7 +99,7 @@ class File
99
99
  # Rollback
100
100
 
101
101
  if File.file?(backupfile) and File.file?(controlfile)
102
- $stdout.puts "Restoring #{file}..."
102
+ $stderr.puts "Restoring #{file}..."
103
103
 
104
104
  File.copy(backupfile, file) # Rollback from phase 3
105
105
  end
@@ -139,7 +139,11 @@ class File
139
139
  end
140
140
 
141
141
  def self.touch(file)
142
- File.open(file, "a"){|f|}
142
+ if File.exists?(file)
143
+ File.utime(Time.now, File.mtime(file), file)
144
+ else
145
+ File.open(file, "a"){|f|}
146
+ end
143
147
  end
144
148
 
145
149
  def self.which(file)