rubyslippers 1.03 → 1.04

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. data/Readme.txt +3 -0
  2. data/bin/rubyslippers +0 -0
  3. data/code/01rwdcore/01rwdcore.rb +0 -0
  4. data/code/01rwdcore/02helptexthashbegin.rb +0 -0
  5. data/code/01rwdcore/03helptexthash.rb +0 -0
  6. data/code/01rwdcore/04helptextend.rb +0 -0
  7. data/code/01rwdcore/jumplinkcommand.rb +0 -0
  8. data/code/01rwdcore/openhelpwindow.rb +0 -0
  9. data/code/01rwdcore/returntomain.rb +0 -0
  10. data/code/01rwdcore/rundocuments.rb +0 -0
  11. data/code/01rwdcore/runeditconfiguration.rb +0 -0
  12. data/code/01rwdcore/runhelpabout.rb +0 -0
  13. data/code/01rwdcore/rwdtinkerversion.rb +0 -0
  14. data/code/01rwdcore/rwdwindowreturn.rb +0 -0
  15. data/code/01rwdcore/selectiontab.rb +0 -0
  16. data/code/01rwdcore/test_cases.rb +0 -0
  17. data/code/01rwdcore/test_harness.rb +0 -0
  18. data/code/01rwdcore/uploadreturns.rb +0 -0
  19. data/code/superant.com.rubyslippers/execgemserve.rb +0 -0
  20. data/code/superant.com.rubyslippers/gemcommands.rb +0 -0
  21. data/code/superant.com.rubyslippers/gemenvironment.rb +0 -0
  22. data/code/superant.com.rubyslippers/gemfilesinstalled.rb +0 -0
  23. data/code/superant.com.rubyslippers/gemserve.rb +0 -0
  24. data/code/superant.com.rubyslippers/gemwhich.rb +0 -0
  25. data/code/superant.com.rubyslippers/helptexthashrubyslippers.rb +0 -0
  26. data/code/superant.com.rubyslippers/installgem.rb +0 -0
  27. data/code/superant.com.rubyslippers/jumplinkupdate.rb +0 -0
  28. data/code/superant.com.rubyslippers/listgemdirs.rb +0 -0
  29. data/code/superant.com.rubyslippers/listgemrecord.rb +0 -0
  30. data/code/superant.com.rubyslippers/listgemremote.rb +0 -0
  31. data/code/superant.com.rubyslippers/listgemzips.rb +0 -0
  32. data/code/superant.com.rubyslippers/listinstalledgemsfiles.rb +0 -0
  33. data/code/superant.com.rubyslippers/loadconfigurationrecord.rb +0 -0
  34. data/code/superant.com.rubyslippers/loadconfigurationvariables.rb +0 -0
  35. data/code/superant.com.rubyslippers/openhelpwindowrubyslippers.rb +0 -0
  36. data/code/superant.com.rubyslippers/returntomain.rb +0 -0
  37. data/code/superant.com.rubyslippers/rubyslippershelpabout.rb +0 -0
  38. data/code/superant.com.rubyslippers/runrubyslippersmenu1.rb +0 -0
  39. data/code/superant.com.rubyslippers/runrubyslipperswindow.rb +0 -0
  40. data/code/superant.com.rubyslippers/saveconfigurationrecord.rb +0 -0
  41. data/code/superant.com.rubyslippers/test_cases.rb +0 -0
  42. data/code/superant.com.rubyslippers/viewgemdata.rb +0 -0
  43. data/code/superant.com.rubyslippers/viewrubyslippersconfiguration.rb +0 -0
  44. data/code/superant.com.rubyslippersbackwindow/changegemspecdata.rb +0 -0
  45. data/code/superant.com.rubyslippersbackwindow/clearscreendisplay.rb +0 -0
  46. data/code/superant.com.rubyslippersbackwindow/copygemspecdata.rb +0 -0
  47. data/code/superant.com.rubyslippersbackwindow/creategem.rb +0 -0
  48. data/code/superant.com.rubyslippersbackwindow/creategemspecrecord.rb +0 -0
  49. data/code/superant.com.rubyslippersbackwindow/deletegemspecrecord.rb +0 -0
  50. data/code/superant.com.rubyslippersbackwindow/listgemdir.rb +0 -0
  51. data/code/superant.com.rubyslippersbackwindow/listgemdirectories.rb +0 -0
  52. data/code/superant.com.rubyslippersbackwindow/listgemspecrecord.rb +0 -0
  53. data/code/superant.com.rubyslippersbackwindow/loadgemspecrecord.rb +0 -0
  54. data/code/superant.com.rubyslippersbackwindow/viewgemspecdata.rb +0 -0
  55. data/code/superant.com.rwdtinkerbackwindow/controlclient.rb +0 -0
  56. data/code/superant.com.rwdtinkerbackwindow/diagnostictab.rb +0 -0
  57. data/code/superant.com.rwdtinkerbackwindow/helptexthashtinkerwin2.rb +0 -0
  58. data/code/superant.com.rwdtinkerbackwindow/installapplet.rb +0 -0
  59. data/code/superant.com.rwdtinkerbackwindow/installgemapplet.rb +0 -0
  60. data/code/superant.com.rwdtinkerbackwindow/installremotegem.rb +0 -0
  61. data/code/superant.com.rwdtinkerbackwindow/listgemdirs.rb +0 -0
  62. data/code/superant.com.rwdtinkerbackwindow/listgemzips.rb +0 -0
  63. data/code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb +0 -0
  64. data/code/superant.com.rwdtinkerbackwindow/listzips.rb +0 -0
  65. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb +0 -0
  66. data/code/superant.com.rwdtinkerbackwindow/loadconfigurationvariables.rb +0 -0
  67. data/code/superant.com.rwdtinkerbackwindow/network.rb +0 -0
  68. data/code/superant.com.rwdtinkerbackwindow/openappletname.rb +0 -0
  69. data/code/superant.com.rwdtinkerbackwindow/openhelpwindowtinkerwin2.rb +0 -0
  70. data/code/superant.com.rwdtinkerbackwindow/remotegemlist.rb +0 -0
  71. data/code/superant.com.rwdtinkerbackwindow/removeapplet.rb +0 -0
  72. data/code/superant.com.rwdtinkerbackwindow/runremoteinstall.rb +0 -0
  73. data/code/superant.com.rwdtinkerbackwindow/runrwdtinkerbackwindow.rb +0 -0
  74. data/code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb +0 -0
  75. data/code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb +0 -0
  76. data/code/superant.com.rwdtinkerbackwindow/viewappletcontents.rb +0 -0
  77. data/code/superant.com.rwdtinkerbackwindow/viewgemappletcontents.rb +0 -0
  78. data/code/zz0applicationend/zz0end.rb +0 -0
  79. data/configuration/language.dist +0 -0
  80. data/configuration/rubyslippers.dist +2 -2
  81. data/configuration/rwdapplicationidentity.dist +0 -0
  82. data/configuration/rwdtinker.dist +2 -2
  83. data/configuration/tinkerwin2variables.dist +0 -0
  84. data/ev/browser.rb +24 -10
  85. data/ev/ftools.rb +23 -19
  86. data/ev/mime.rb +328 -0
  87. data/ev/net.rb +154 -38
  88. data/ev/ruby.rb +96 -26
  89. data/ev/rwd.rb +162 -89
  90. data/ev/sgml.rb +1 -1
  91. data/ev/thread.rb +0 -0
  92. data/ev/tree.rb +33 -5
  93. data/ev/xml.rb +97 -0
  94. data/extras/rconftool.rb +0 -0
  95. data/extras/zip/ioextras.rb +0 -0
  96. data/extras/zip/stdrubyext.rb +0 -0
  97. data/extras/zip/tempfile_bugfixed.rb +0 -0
  98. data/extras/zip/zip.rb +0 -0
  99. data/extras/zip/zipfilesystem.rb +0 -0
  100. data/extras/zip/ziprequire.rb +0 -0
  101. data/gui/00coreguibegin/applicationguitop.rwd +0 -0
  102. data/gui/frontwindow0/superant.com.rubyslippers/25gemcommands.rwd +0 -0
  103. data/gui/frontwindow0/superant.com.rubyslippers/30viewgemdata.rwd +0 -0
  104. data/gui/frontwindow0/superant.com.rubyslippers/40listgemrecordfiles.rwd +0 -0
  105. data/gui/frontwindow0/superant.com.rubyslippers/60installgem.rwd +0 -0
  106. data/gui/frontwindow0/superant.com.rubyslippers/70listgemsremote.rwd +0 -0
  107. data/gui/frontwindow0/superant.com.rubyslippers/75gemwhich.rwd +0 -0
  108. data/gui/frontwindow0/superant.com.rubyslippers/85gemfilesinstalled.rwd +0 -0
  109. data/gui/frontwindow0/superant.com.rubyslippers/90gemserverscan.rwd +0 -0
  110. data/gui/frontwindowselectionbegin/selectiontabbegin/selectiontabbegin.rwd +0 -0
  111. data/gui/frontwindowselections/superant.com.rwdtinkerwin2selectiontab/jumplinkcommands.rwd +0 -0
  112. data/gui/frontwindowselectionzend/viewselectionzend/viewselectionend.rwd +0 -0
  113. data/gui/frontwindowtdocumentbegin/superant.com.documentsbegin/tt0documentbegin.rwd +0 -0
  114. data/gui/frontwindowtdocuments/superant.com.documents/uu5documents.rwd +0 -0
  115. data/gui/frontwindowtdocuments/superant.com.rubyslippersdocument/ui3rubyslippers.rwd +0 -0
  116. data/gui/frontwindowtdocuments/superant.com.rubyslippersdocument/ui4rubyslippers.rwd +0 -0
  117. data/gui/frontwindowtdocuments/superant.com.tinkerwin2documents/uu5documents.rwd +0 -0
  118. data/gui/frontwindowtdocumentzend/superant.com.documentsend/ww0documentend.rwd +0 -0
  119. data/gui/frontwindowz1end/frontwindowend/xx0rwdfirsttab.rwd +0 -0
  120. data/gui/helpaboutbegin/superant.com.helpaboutbegin/ya0helpscreenstart.rwd +0 -0
  121. data/gui/helpaboutinstalled/superant.com.rubyslippershelpabout/1rubyslippers.rwd +0 -0
  122. data/gui/helpaboutinstalled/superant.com.rubyslippershelpabout/2rubyslippers.rwd +0 -0
  123. data/gui/helpaboutinstalled/superant.com.rubyslippershelpabout/5version.rwd +0 -0
  124. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/1appname.rwd +0 -0
  125. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/3copyright.rwd +0 -0
  126. data/gui/helpaboutinstalled/superant.com.tinkerhelpabout/5version.rwd +0 -0
  127. data/gui/helpaboutzend/superant.com.helpaboutend/helpscreenend.rwd +0 -0
  128. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/1appname.rwd +0 -0
  129. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/3viewgemspec.rwd +0 -0
  130. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/4listgemspecrecord.rwd +0 -0
  131. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/5editgemspecrecord.rwd +0 -0
  132. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/6buildgem.rwd +0 -0
  133. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/7viewgemdir.rwd +0 -0
  134. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/8gemcommands.rwd +0 -0
  135. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/92viewconfiguration.rwd +0 -0
  136. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/94rwddiagnostics.rwd +0 -0
  137. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m90selectiontab.rwd +0 -0
  138. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m95jumplinkcommands.rwd +0 -0
  139. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/m99selection.rwd +0 -0
  140. data/gui/tinkerbackwindows/superant.com.rubyslippersbackwindow/zbackend.rwd +0 -0
  141. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd +0 -0
  142. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/40rwdlistzips.rwd +0 -0
  143. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd +0 -0
  144. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/50rwdlistapplets.rwd +0 -0
  145. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/60editconfiguration.rwd +0 -0
  146. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd +0 -0
  147. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/75rwdcontrol.rwd +0 -0
  148. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/81jumplinkcommands.rwd +0 -0
  149. data/gui/tinkerbackwindows/superant.com.tinkerbackwindow/9backend.rwd +0 -0
  150. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd +0 -0
  151. data/gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd +0 -0
  152. data/gui/tinkerbackwindows/superant.com.versionwindow/1appname.rwd +0 -0
  153. data/gui/zzcoreguiend/tinkerapplicationguiend/yy9rwdend.rwd +0 -0
  154. data/init.rb +0 -0
  155. data/installed/rwdviewlogo-0.4.inf +0 -0
  156. data/lang/en/rubyslippers/languagefile.rb +0 -0
  157. data/lang/en/rwdcore/languagefile.rb +0 -0
  158. data/lang/es/rubyslippers/languagefile.rb +0 -0
  159. data/lang/es/rwdcore/languagefile-es.rb +0 -0
  160. data/lang/jp/rubyslippers/languagefile.rb +0 -0
  161. data/lang/jp/rwdcore/languagefile.rb +0 -0
  162. data/lang/nl/rubyslippers/languagefile.rb +0 -0
  163. data/lang/nl/rwdcore/languagefile.rb +0 -0
  164. data/lib/temp.rb +0 -0
  165. data/rwd_files/GemDocuments.html +0 -0
  166. data/rwd_files/HowTo_RubySlippers.txt +3 -0
  167. data/rwd_files/HowTo_Tinker.txt +0 -0
  168. data/rwd_files/HowTo_TinkerWin2.txt +0 -0
  169. data/rwd_files/Readme.txt +0 -0
  170. data/rwd_files/favicon.ico +0 -0
  171. data/rwd_files/rdoc-style.css +0 -0
  172. data/rwd_files/remotegemlist.txt +0 -0
  173. data/rwd_files/rwdapplications.html +0 -0
  174. data/rwd_files/rwdindex.html +0 -0
  175. data/rwd_files/tinker.png +0 -0
  176. data/rwdconfig.dist +1 -1
  177. data/tests/RubyGauge.rb +0 -0
  178. data/tests/checkdepends.sh +0 -0
  179. data/tests/cleancnf.sh +0 -0
  180. data/tests/makedist.rb +0 -0
  181. data/tests/rdep.rb +0 -0
  182. data/tests/totranslate.lang +0 -0
  183. data/zips/rwdahelloworld-0.5.zip +0 -0
  184. metadata +244 -229
data/Readme.txt CHANGED
@@ -157,6 +157,9 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
157
157
  Thanks, Steven Gibson
158
158
 
159
159
  =Changelog
160
+ Version 1.04
161
+ updated for rwdtinker 1.68
162
+
160
163
  Version 1.03
161
164
  wrapped directory lists with if clauses
162
165
  updated for rwdtinker 1.64
data/bin/rubyslippers CHANGED
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
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
@@ -1,4 +1,4 @@
1
- ##VERSION:1.03
1
+ ##VERSION:1.04
2
2
  ##NAME:$gemdirectory:0
3
3
  #$gemdirectory = "c:\\ruby\\lib\\ruby\\gems\\1.8" # XP machine
4
4
  $gemdirectory = "/usr/lib/ruby/gems/1.8" # Linux machine
@@ -14,4 +14,4 @@ $gemspec_directory = "/usr/src/rubygems"
14
14
  $gembuild_directory = "/usr/src/rubygems"
15
15
  ##NAME:$testharnessarray:0
16
16
  $testharnessarray += ["rubyslippers_all_tests"]
17
- RubySlippersVersion = "1.03"
17
+ RubySlippersVersion = "1.04"
File without changes
@@ -1,4 +1,4 @@
1
- ##VERSION:1.64
1
+ ##VERSION:1.68
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"
@@ -12,4 +12,4 @@ LangDir = "lang"
12
12
  $rwdcontrolports =["13713","13714","13715","13716","13717","13718"]
13
13
  $port = 7705
14
14
  $rwdjumplink = ["helpscreen","tinkerbackwindow","returntomain","opendocuments","editconfiguration"]
15
- RwdTinkerVersion = "1.64"
15
+ RwdTinkerVersion = "1.68"
File without changes
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)
data/ev/mime.rb ADDED
@@ -0,0 +1,328 @@
1
+ module EVMime
2
+ MimeType = {}
3
+
4
+ MimeType['123'] = 'application/vnd.lotus-1-2-3'
5
+ MimeType['3ds'] = 'image/x-3ds'
6
+ MimeType['a'] = 'application/x-unix-archive'
7
+ MimeType['abw'] = 'application/x-abiword'
8
+ MimeType['ac3'] = 'audio/ac3'
9
+ MimeType['afm'] = 'application/x-font-afm'
10
+ MimeType['ag'] = 'image/x-applix-graphic'
11
+ MimeType['aif'] = 'audio/x-aiff'
12
+ MimeType['aifc'] = 'audio/x-aiff'
13
+ MimeType['aiff'] = 'audio/x-aiff'
14
+ MimeType['ap'] = 'application/x-applix-presents'
15
+ MimeType['ape'] = 'application/x-ape'
16
+ MimeType['arj'] = 'application/x-arj'
17
+ MimeType['as'] = 'application/x-applix-spreadsheet'
18
+ MimeType['asc'] = 'text/plain'
19
+ MimeType['asf'] = 'video/x-ms-asf'
20
+ MimeType['asp'] = 'application/x-asp'
21
+ MimeType['asx'] = 'audio/x-ms-asx'
22
+ MimeType['au'] = 'audio/x-ulaw'
23
+ MimeType['avi'] = 'video/x-msvideo'
24
+ MimeType['aw'] = 'application/x-applix-word'
25
+ MimeType['bak'] = 'application/x-backup'
26
+ MimeType['bcpio'] = 'application/x-bcpio'
27
+ MimeType['bdf'] = 'application/x-font-bdf'
28
+ MimeType['bib'] = 'text/bib'
29
+ MimeType['bin'] = 'application/octet-stream'
30
+ MimeType['blend'] = 'application/x-blender'
31
+ MimeType['blender'] = 'application/x-blender'
32
+ MimeType['bmp'] = 'image/bmp'
33
+ MimeType['bz'] = 'application/x-bzip'
34
+ MimeType['bz2'] = 'application/x-bzip'
35
+ MimeType['c'] = 'text/x-c'
36
+ MimeType['c++'] = 'text/x-c++'
37
+ MimeType['cc'] = 'text/x-c++'
38
+ MimeType['cdf'] = 'application/x-netcdf'
39
+ MimeType['cdr'] = 'application/vnd.corel-draw'
40
+ MimeType['cgi'] = 'application/x-cgi'
41
+ MimeType['cgm'] = 'image/cgm'
42
+ MimeType['class'] = 'application/x-java-byte-code'
43
+ MimeType['cls'] = 'text/x-tex'
44
+ MimeType['cpio'] = 'application/x-cpio'
45
+ MimeType['cpp'] = 'text/x-c++'
46
+ MimeType['csh'] = 'text/x-csh'
47
+ MimeType['css'] = 'text/css'
48
+ MimeType['csv'] = 'text/x-comma-separated-values'
49
+ MimeType['dat'] = 'video/mpeg'
50
+ MimeType['dbf'] = 'application/x-xbase'
51
+ MimeType['dc'] = 'application/x-dc-rom'
52
+ MimeType['dcl'] = 'text/x-dcl'
53
+ MimeType['dcm'] = 'image/x-dcm'
54
+ MimeType['deb'] = 'application/x-deb'
55
+ MimeType['desktop'] = 'application/x-gnome-app-info'
56
+ MimeType['dia'] = 'application/x-dia-diagram'
57
+ MimeType['diff'] = 'text/x-patch'
58
+ MimeType['djv'] = 'image/vnd.djvu'
59
+ MimeType['djvu'] = 'image/vnd.djvu'
60
+ MimeType['doc'] = 'application/msword'
61
+ MimeType['dsl'] = 'text/x-dsl'
62
+ MimeType['dtd'] = 'text/x-dtd'
63
+ MimeType['dvi'] = 'application/x-dvi'
64
+ MimeType['dwg'] = 'image/vnd.dwg'
65
+ MimeType['dxf'] = 'image/vnd.dxf'
66
+ MimeType['el'] = 'text/x-emacs-lisp'
67
+ MimeType['emf'] = 'image/x-emf'
68
+ MimeType['eps'] = 'application/postscript'
69
+ MimeType['etheme'] = 'application/x-e-theme'
70
+ MimeType['etx'] = 'text/x-setext'
71
+ MimeType['exe'] = 'application/x-ms-dos-executable'
72
+ MimeType['ez'] = 'application/andrew-inset'
73
+ MimeType['f'] = 'text/x-fortran'
74
+ MimeType['fig'] = 'image/x-xfig'
75
+ MimeType['fits'] = 'image/x-fits'
76
+ MimeType['flac'] = 'audio/x-flac'
77
+ MimeType['flc'] = 'video/x-flc'
78
+ MimeType['fli'] = 'video/x-fli'
79
+ MimeType['gb'] = 'application/x-gameboy-rom'
80
+ MimeType['gchempaint'] = 'application/x-gchempaint'
81
+ MimeType['gcrd'] = 'text/x-vcard'
82
+ MimeType['gcrystal'] = 'application/x-gcrystal'
83
+ MimeType['gem'] = 'text/x-rubygem'
84
+ MimeType['gen'] = 'application/x-genesis-rom'
85
+ MimeType['gg'] = 'application/x-sms-rom'
86
+ MimeType['gif'] = 'image/gif'
87
+ MimeType['glade'] = 'application/x-glade'
88
+ MimeType['gnc'] = 'application/x-gnucash'
89
+ MimeType['gnucash'] = 'application/x-gnucash'
90
+ MimeType['gnumeric'] = 'application/x-gnumeric'
91
+ MimeType['gray'] = 'image/x-gray'
92
+ MimeType['gtar'] = 'application/x-gtar'
93
+ MimeType['gz'] = 'application/x-gzip'
94
+ MimeType['h'] = 'text/x-c-header'
95
+ MimeType['h++'] = 'text/x-c-header'
96
+ MimeType['hdf'] = 'application/x-hdf'
97
+ MimeType['hlls'] = 'text/x-hllapiscript'
98
+ MimeType['hpp'] = 'text/x-c-header'
99
+ MimeType['hs'] = 'text/x-haskell'
100
+ MimeType['htm'] = 'text/html'
101
+ MimeType['html'] = 'text/html'
102
+ MimeType['icb'] = 'image/x-icb'
103
+ MimeType['ico'] = 'image/x-ico'
104
+ MimeType['ics'] = 'text/calendar'
105
+ MimeType['idl'] = 'text/x-idl'
106
+ MimeType['ief'] = 'image/ief'
107
+ MimeType['iff'] = 'image/x-iff'
108
+ MimeType['ilbm'] = 'image/x-ilbm'
109
+ MimeType['iso'] = 'application/x-iso-image'
110
+ MimeType['it'] = 'audio/x-it'
111
+ MimeType['jar'] = 'application/x-java-archive'
112
+ MimeType['java'] = 'text/x-java'
113
+ MimeType['jpe'] = 'image/jpeg'
114
+ MimeType['jpeg'] = 'image/jpeg'
115
+ MimeType['jpg'] = 'image/jpeg'
116
+ MimeType['jpr'] = 'application/x-jbuilder-project'
117
+ MimeType['jpx'] = 'application/x-jbuilder-project'
118
+ MimeType['js'] = 'text/x-javascript'
119
+ MimeType['kdelnk'] = 'application/x-kde-app-info'
120
+ MimeType['kil'] = 'application/x-killustrator'
121
+ MimeType['kpr'] = 'application/x-kpresenter'
122
+ MimeType['ksp'] = 'application/x-kspread'
123
+ MimeType['kwd'] = 'application/x-kword'
124
+ MimeType['la'] = 'application/x-shared-library-la'
125
+ MimeType['lha'] = 'application/x-lha'
126
+ MimeType['lhs'] = 'text/x-literate-haskell'
127
+ MimeType['lhz'] = 'application/x-lhz'
128
+ MimeType['lo'] = 'application/x-object-file'
129
+ MimeType['ltx'] = 'text/x-tex'
130
+ MimeType['lwo'] = 'image/x-lwo'
131
+ MimeType['lwob'] = 'image/x-lwo'
132
+ MimeType['lws'] = 'image/x-lws'
133
+ MimeType['lyx'] = 'text/x-lyx'
134
+ MimeType['m'] = 'text/x-objc'
135
+ MimeType['m3u'] = 'audio/x-mpegurl'
136
+ MimeType['m4a'] = 'audio/x-m4a'
137
+ MimeType['man'] = 'text/x-troff-man'
138
+ MimeType['md'] = 'application/x-genesis-rom'
139
+ MimeType['me'] = 'text/x-troff-me'
140
+ MimeType['mgp'] = 'application/x-magicpoint'
141
+ MimeType['mid'] = 'audio/x-midi'
142
+ MimeType['midi'] = 'audio/x-midi'
143
+ MimeType['mif'] = 'application/x-mif'
144
+ MimeType['miff'] = 'image/x-miff'
145
+ MimeType['mm'] = 'text/x-troff-mm'
146
+ MimeType['mml'] = 'text/mathml'
147
+ MimeType['mod'] = 'audio/x-mod'
148
+ MimeType['mov'] = 'video/quicktime'
149
+ MimeType['movie'] = 'video/x-sgi-movie'
150
+ MimeType['mp1'] = 'audio/mpeg'
151
+ MimeType['mp2'] = 'video/mpeg'
152
+ MimeType['mp3'] = 'audio/mpeg'
153
+ MimeType['mpe'] = 'video/mpeg'
154
+ MimeType['mpeg'] = 'video/mpeg'
155
+ MimeType['mpg'] = 'video/mpeg'
156
+ MimeType['mrp'] = 'application/x-mrproject'
157
+ MimeType['mrproject'] = 'application/x-mrproject'
158
+ MimeType['ms'] = 'text/x-troff-ms'
159
+ MimeType['msx'] = 'application/x-msx-rom'
160
+ MimeType['n64'] = 'application/x-n64-rom'
161
+ MimeType['nc'] = 'application/x-netcdf'
162
+ MimeType['nes'] = 'application/x-nes-rom'
163
+ MimeType['nsv'] = 'video/x-nsv'
164
+ MimeType['o'] = 'application/x-object-file'
165
+ MimeType['oda'] = 'application/oda'
166
+ MimeType['ogg'] = 'application/ogg'
167
+ MimeType['oleo'] = 'application/x-oleo'
168
+ MimeType['p'] = 'text/x-pascal'
169
+ MimeType['palm'] = 'image/x-palm'
170
+ MimeType['pas'] = 'text/x-pascal'
171
+ MimeType['pascal'] = 'text/x-pascal'
172
+ MimeType['patch'] = 'text/x-patch'
173
+ MimeType['pbm'] = 'image/x-portable-bitmap'
174
+ MimeType['pcd'] = 'image/x-photo-cd'
175
+ MimeType['pcf'] = 'application/x-font-pcf'
176
+ MimeType['pct'] = 'image/x-pict'
177
+ MimeType['pcx'] = 'image/x-pcx'
178
+ MimeType['pdb'] = 'application/x-palm-database'
179
+ MimeType['pdf'] = 'application/pdf'
180
+ MimeType['perl'] = 'text/x-perl'
181
+ MimeType['pfa'] = 'application/x-font-type1'
182
+ MimeType['pfb'] = 'application/x-font-type1'
183
+ MimeType['pgm'] = 'image/x-portable-graymap'
184
+ MimeType['pgn'] = 'application/x-chess-pgn'
185
+ MimeType['pgp'] = 'application/pgp'
186
+ MimeType['php'] = 'application/x-php'
187
+ MimeType['php3'] = 'application/x-php'
188
+ MimeType['php4'] = 'application/x-php'
189
+ MimeType['pict'] = 'image/x-pict'
190
+ MimeType['pl'] = 'text/x-perl'
191
+ MimeType['pls'] = 'audio/x-scpls'
192
+ MimeType['pm'] = 'text/x-perl'
193
+ MimeType['png'] = 'image/png'
194
+ MimeType['pnm'] = 'image/x-portable-anymap'
195
+ MimeType['po'] = 'text/x-po'
196
+ MimeType['pp'] = 'text/x-pascal'
197
+ MimeType['ppm'] = 'image/x-portable-pixmap'
198
+ MimeType['pps'] = 'application/vnd.ms-powerpoint'
199
+ MimeType['ppt'] = 'application/vnd.ms-powerpoint'
200
+ MimeType['ps'] = 'application/postscript'
201
+ MimeType['psd'] = 'image/x-psd'
202
+ MimeType['psf'] = 'application/x-font-linux-psf'
203
+ MimeType['psid'] = 'audio/prs.sid'
204
+ MimeType['py'] = 'text/x-python'
205
+ MimeType['pyc'] = 'application/x-python-byte-code'
206
+ MimeType['qif'] = 'application/qif'
207
+ MimeType['qt'] = 'video/quicktime'
208
+ MimeType['ra'] = 'audio/x-real-audio'
209
+ MimeType['ram'] = 'audio/x-pn-realaudio'
210
+ MimeType['rar'] = 'application/x-rar'
211
+ MimeType['ras'] = 'image/x-cmu-raster'
212
+ MimeType['rb'] = 'text/x-ruby'
213
+ MimeType['rba'] = 'text/x-ruby'
214
+ MimeType['rbw'] = 'text/x-ruby'
215
+ MimeType['rej'] = 'application/x-reject'
216
+ MimeType['rgb'] = 'image/x-rgb'
217
+ MimeType['rm'] = 'audio/x-real-audio'
218
+ MimeType['roff'] = 'text/x-troff'
219
+ MimeType['rpm'] = 'application/x-rpm'
220
+ MimeType['rtf'] = 'application/rtf'
221
+ MimeType['rtx'] = 'text/richtext'
222
+ MimeType['ruby'] = 'text/x-ruby'
223
+ MimeType['rubyw'] = 'text/x-ruby'
224
+ MimeType['rv'] = 'audio/x-real-audio'
225
+ MimeType['s'] = 'text/x-asm'
226
+ MimeType['s3m'] = 'audio/x-s3m'
227
+ MimeType['scm'] = 'text/x-scheme'
228
+ MimeType['sda'] = 'application/vnd.stardivision.draw'
229
+ MimeType['sdc'] = 'application/vnd.stardivision.calc'
230
+ MimeType['sdd'] = 'application/vnd.stardivision.impress'
231
+ MimeType['sdp'] = 'application/vnd.stardivision.impress'
232
+ MimeType['sds'] = 'application/vnd.stardivision.chart'
233
+ MimeType['sdw'] = 'application/vnd.stardivision.writer'
234
+ MimeType['sgi'] = 'image/x-sgi'
235
+ MimeType['sgl'] = 'application/vnd.stardivision.writer'
236
+ MimeType['sgm'] = 'text/sgml'
237
+ MimeType['sgml'] = 'text/sgml'
238
+ MimeType['sh'] = 'text/x-sh'
239
+ MimeType['shar'] = 'application/x-shar'
240
+ MimeType['sid'] = 'audio/prs.sid'
241
+ MimeType['slk'] = 'text/spreadsheet'
242
+ MimeType['smd'] = 'application/vnd.stardivision.mail'
243
+ MimeType['smf'] = 'application/vnd.stardivision.math'
244
+ MimeType['smi'] = 'application/x-smil'
245
+ MimeType['smil'] = 'application/x-smil'
246
+ MimeType['sml'] = 'application/x-smil'
247
+ MimeType['sms'] = 'application/x-sms-rom'
248
+ MimeType['snd'] = 'audio/basic'
249
+ MimeType['so'] = 'application/x-shared-library'
250
+ MimeType['spd'] = 'application/x-font-speedo'
251
+ MimeType['sql'] = 'text/x-sql'
252
+ MimeType['src'] = 'application/x-wais-source'
253
+ MimeType['stc'] = 'application/vnd.sun.xml.calc.template'
254
+ MimeType['std'] = 'application/vnd.sun.xml.draw.template'
255
+ MimeType['sti'] = 'application/vnd.sun.xml.impress.template'
256
+ MimeType['stm'] = 'audio/x-stm'
257
+ MimeType['stw'] = 'application/vnd.sun.xml.writer.template'
258
+ MimeType['sty'] = 'text/x-tex'
259
+ MimeType['sun'] = 'image/x-sun-raster'
260
+ MimeType['sv4cpio'] = 'application/x-sv4cpio'
261
+ MimeType['sv4crc'] = 'application/x-sv4crc'
262
+ MimeType['svg'] = 'image/svg+xml'
263
+ MimeType['svgz'] = 'image/svg+xml'
264
+ MimeType['swf'] = 'application/x-shockwave-flash'
265
+ MimeType['sxc'] = 'application/vnd.sun.xml.calc'
266
+ MimeType['sxd'] = 'application/vnd.sun.xml.draw'
267
+ MimeType['sxg'] = 'application/vnd.sun.xml.writer.global'
268
+ MimeType['sxi'] = 'application/vnd.sun.xml.impress'
269
+ MimeType['sxm'] = 'application/vnd.sun.xml.math'
270
+ MimeType['sxw'] = 'application/vnd.sun.xml.writer'
271
+ MimeType['sylk'] = 'text/spreadsheet'
272
+ MimeType['t'] = 'text/x-troff'
273
+ MimeType['tar'] = 'application/x-tar'
274
+ MimeType['tcl'] = 'text/x-tcl'
275
+ MimeType['tex'] = 'text/x-tex'
276
+ MimeType['texi'] = 'text/x-texinfo'
277
+ MimeType['texinfo'] = 'text/x-texinfo'
278
+ MimeType['tga'] = 'image/x-tga'
279
+ MimeType['tgz'] = 'application/x-compressed-tar'
280
+ MimeType['theme'] = 'application/x-theme'
281
+ MimeType['tif'] = 'image/tiff'
282
+ MimeType['tiff'] = 'image/tiff'
283
+ MimeType['torrent'] = 'application/x-bittorrent'
284
+ MimeType['tr'] = 'text/x-troff'
285
+ MimeType['tsv'] = 'text/tab-separated-values'
286
+ MimeType['ttc'] = 'application/x-font-ttf'
287
+ MimeType['ttf'] = 'application/x-font-ttf'
288
+ MimeType['txt'] = 'text/plain'
289
+ MimeType['ustar'] = 'application/x-ustar'
290
+ MimeType['vcf'] = 'text/x-vcalendar'
291
+ MimeType['vcs'] = 'text/x-vcalendar'
292
+ MimeType['vi'] = 'text/x-vi'
293
+ MimeType['vim'] = 'text/x-vi'
294
+ MimeType['viv'] = 'video/vnd.vivo'
295
+ MimeType['vivo'] = 'video/vnd.vivo'
296
+ MimeType['vob'] = 'video/mpeg'
297
+ MimeType['voc'] = 'audio/x-voc'
298
+ MimeType['vor'] = 'application/vnd.stardivision.writer'
299
+ MimeType['wav'] = 'audio/x-wav'
300
+ MimeType['wax'] = 'audio/x-ms-asx'
301
+ MimeType['wk1'] = 'application/vnd.lotus-1-2-3'
302
+ MimeType['wk3'] = 'application/vnd.lotus-1-2-3'
303
+ MimeType['wk4'] = 'application/vnd.lotus-1-2-3'
304
+ MimeType['wks'] = 'application/vnd.lotus-1-2-3'
305
+ MimeType['wmf'] = 'image/x-wmf'
306
+ MimeType['wmv'] = 'video/x-ms-wmv'
307
+ MimeType['wrl'] = 'model/vrml'
308
+ MimeType['wvx'] = 'video/x-ms-wvx'
309
+ MimeType['xac'] = 'application/x-gnucash'
310
+ MimeType['xbel'] = 'application/xbel'
311
+ MimeType['xbm'] = 'image/x-xbitmap'
312
+ MimeType['xcf'] = 'image/x-xcf'
313
+ MimeType['xi'] = 'audio/x-xi'
314
+ MimeType['xla'] = 'application/vnd.ms-excel'
315
+ MimeType['xlc'] = 'application/vnd.ms-excel'
316
+ MimeType['xld'] = 'application/vnd.ms-excel'
317
+ MimeType['xls'] = 'application/vnd.ms-excel'
318
+ MimeType['xlt'] = 'application/vnd.ms-excel'
319
+ MimeType['xm'] = 'audio/x-xm'
320
+ MimeType['xml'] = 'text/xml'
321
+ MimeType['xpm'] = 'image/x-xpixmap'
322
+ MimeType['xwd'] = 'image/x-xwindowdump'
323
+ MimeType['y'] = 'text/x-yacc'
324
+ MimeType['yacc'] = 'text/x-yacc'
325
+ MimeType['z'] = 'application/x-compress'
326
+ MimeType['zip'] = 'application/zip'
327
+ MimeType['zoo'] = 'application/x-zoo'
328
+ end