rwdtinker 1.83 → 1.84

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,9 +1,42 @@
1
- require 'zip/zip'
1
+ require 'lib/zip/zip'
2
2
 
3
3
  module Zip
4
+
5
+ # The ZipFileSystem API provides an API for accessing entries in
6
+ # a zip archive that is similar to ruby's builtin File and Dir
7
+ # classes.
8
+ #
9
+ # Requiring 'zip/zipfilesystem' includes this module in ZipFile
10
+ # making the methods in this module available on ZipFile objects.
11
+ #
12
+ # Using this API the following example creates a new zip file
13
+ # <code>my.zip</code> containing a normal entry with the name
14
+ # <code>first.txt</code>, a directory entry named <code>mydir</code>
15
+ # and finally another normal entry named <code>second.txt</code>
16
+ #
17
+ # require 'zip/zipfilesystem'
18
+ #
19
+ # Zip::ZipFile.open("my.zip", Zip::ZipFile::CREATE) {
20
+ # |zipfile|
21
+ # zipfile.file.open("first.txt", "w") { |f| f.puts "Hello world" }
22
+ # zipfile.dir.mkdir("mydir")
23
+ # zipfile.file.open("mydir/second.txt", "w") { |f| f.puts "Hello again" }
24
+ # }
25
+ #
26
+ # Reading is as easy as writing, as the following example shows. The
27
+ # example writes the contents of <code>first.txt</code> from zip archive
28
+ # <code>my.zip</code> to standard out.
29
+ #
30
+ # require 'zip/zipfilesystem'
31
+ #
32
+ # Zip::ZipFile.open("my.zip") {
33
+ # |zipfile|
34
+ # puts zipfile.file.read("first.txt")
35
+ # }
36
+
4
37
  module ZipFileSystem
5
38
 
6
- def initialize
39
+ def initialize # :nodoc:
7
40
  mappedZip = ZipFileNameMapper.new(self)
8
41
  @zipFsDir = ZipFsDir.new(mappedZip)
9
42
  @zipFsFile = ZipFsFile.new(mappedZip)
@@ -11,14 +44,26 @@ module Zip
11
44
  @zipFsFile.dir = @zipFsDir
12
45
  end
13
46
 
47
+ # Returns a ZipFsDir which is much like ruby's builtin Dir (class)
48
+ # object, except it works on the ZipFile on which this method is
49
+ # invoked
14
50
  def dir
15
51
  @zipFsDir
16
52
  end
17
53
 
54
+ # Returns a ZipFsFile which is much like ruby's builtin File (class)
55
+ # object, except it works on the ZipFile on which this method is
56
+ # invoked
18
57
  def file
19
58
  @zipFsFile
20
59
  end
21
-
60
+
61
+ # Instances of this class are normally accessed via the accessor
62
+ # ZipFile::file. An instance of ZipFsFile behaves like ruby's
63
+ # builtin File (class) object, except it works on ZipFile entries.
64
+ #
65
+ # The individual methods are not documented due to their
66
+ # similarity with the methods in File
22
67
  class ZipFsFile
23
68
 
24
69
  attr_writer :dir
@@ -198,7 +243,7 @@ module Zip
198
243
  @mappedZip.get_entry(fileName).size
199
244
  end
200
245
 
201
- # nil for not found and nil for directories
246
+ # Returns nil for not found and nil for directories
202
247
  def size?(fileName)
203
248
  entry = @mappedZip.find_entry(fileName)
204
249
  return (entry == nil || entry.directory?) ? nil : entry.size
@@ -367,6 +412,12 @@ module Zip
367
412
  end
368
413
  end
369
414
 
415
+ # Instances of this class are normally accessed via the accessor
416
+ # ZipFile::dir. An instance of ZipFsDir behaves like ruby's
417
+ # builtin Dir (class) object, except it works on ZipFile entries.
418
+ #
419
+ # The individual methods are not documented due to their
420
+ # similarity with the methods in Dir
370
421
  class ZipFsDir
371
422
 
372
423
  def initialize(mappedZip)
@@ -431,7 +482,7 @@ module Zip
431
482
  alias rmdir delete
432
483
  alias unlink delete
433
484
 
434
- def mkdir(entryName, permissionInt = 0)
485
+ def mkdir(entryName, permissionInt = 0755)
435
486
  @mappedZip.mkdir(entryName, permissionInt)
436
487
  end
437
488
 
@@ -441,7 +492,7 @@ module Zip
441
492
 
442
493
  end
443
494
 
444
- class ZipFsDirIterator
495
+ class ZipFsDirIterator # :nodoc:all
445
496
  include Enumerable
446
497
 
447
498
  def initialize(arrayOfFileNames)
@@ -481,7 +532,7 @@ module Zip
481
532
 
482
533
  # All access to ZipFile from ZipFsFile and ZipFsDir goes through a
483
534
  # ZipFileNameMapper, which has one responsibility: ensure
484
- class ZipFileNameMapper
535
+ class ZipFileNameMapper # :nodoc:all
485
536
  include Enumerable
486
537
 
487
538
  def initialize(zipFile)
@@ -520,7 +571,7 @@ module Zip
520
571
  &continueOnExistsProc)
521
572
  end
522
573
 
523
- def mkdir(fileName, permissionInt = 0)
574
+ def mkdir(fileName, permissionInt = 0755)
524
575
  @zipFile.mkdir(expand_to_entry(fileName), permissionInt)
525
576
  end
526
577
 
@@ -1,6 +1,35 @@
1
- require 'zip/zip'
1
+ # With ziprequire you can load ruby modules from a zip file. This means
2
+ # ruby's module include path can include zip-files.
3
+ #
4
+ # The following example creates a zip file with a single entry
5
+ # <code>log/simplelog.rb</code> that contains a single function
6
+ # <code>simpleLog</code>:
7
+ #
8
+ # require 'zip/zipfilesystem'
9
+ #
10
+ # Zip::ZipFile.open("my.zip", true) {
11
+ # |zf|
12
+ # zf.file.open("log/simplelog.rb", "w") {
13
+ # |f|
14
+ # f.puts "def simpleLog(v)"
15
+ # f.puts ' Kernel.puts "INFO: #{v}"'
16
+ # f.puts "end"
17
+ # }
18
+ # }
19
+ #
20
+ # To use the ruby module stored in the zip archive simply require
21
+ # <code>zip/ziprequire</code> and include the <code>my.zip</code> zip
22
+ # file in the module search path. The following command shows one
23
+ # way to do this:
24
+ #
25
+ # ruby -rzip/ziprequire -Imy.zip -e " require 'log/simplelog'; simpleLog 'Hello world' "
2
26
 
3
- class ZipList
27
+ #$: << 'data/rubycode.zip' << 'data/rubycode2.zip'
28
+
29
+
30
+ require 'lib/zip/zip'
31
+
32
+ class ZipList #:nodoc:all
4
33
  def initialize(zipFileList)
5
34
  @zipFileList = zipFileList
6
35
  end
@@ -23,7 +52,7 @@ class ZipList
23
52
  end
24
53
 
25
54
 
26
- module Kernel
55
+ module Kernel #:nodoc:all
27
56
  alias :oldRequire :require
28
57
 
29
58
  def require(moduleName)
@@ -228,8 +228,13 @@ http://www.erikveen.dds.nl/rubywebdialogs/index.html
228
228
  Thanks, Steven Gibson
229
229
 
230
230
  == Changelog
231
+ version 1.84
232
+ added locale changer tab (have: en,es,ja,hi,nl,fr)
233
+ updated to newer Rubyzip library
234
+
231
235
  version 1.83
232
236
  adding more Spanish and Hindu po strings
237
+ changed handling of log file
233
238
 
234
239
  version 1.82
235
240
  switch to po files for translation files
@@ -1,4 +1,5 @@
1
- # Help files for RwdTinker core Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
1
+
2
+ # Help files for RwdTinker core Application RwdTinker orginally (c) 2004 Steven Gibson under GPL.
2
3
 
3
4
 
4
5
  Helptext.update( :network_help => "Using over a Network: To serve the application over your local LAN,change the last line in the<br>
@@ -80,3 +81,4 @@ Then you should be able to login at: http://yourhostname:8080")
80
81
  You can view the list of rwdtinker applets you have installed already by clicking 'view already installed GEM applets'
81
82
  "
82
83
  )
84
+ Helptext.update( :localechanger_help => "#{Message[:locale_changer_help] }" )
data/rwdconfig.dist CHANGED
@@ -7,7 +7,7 @@ ConfigLocation=""
7
7
  ##NAME: ($testharnessarray):(1.78)
8
8
  $testharnessarray = ["rwdtinker_all_tests"]
9
9
  ##NAME: (TestNow):(1.78)
10
- TestNow=false # turning this on will run the unit tests
10
+ TestNow= false # turning this on will run the unit tests
11
11
  ##NAME: ($testharness):(1.78)
12
12
  $testharness=true
13
13
  ##NAME: ($tinkerhelpaboutarray):(1.78)
data/tests/makedist.rb CHANGED
@@ -15,7 +15,7 @@ require 'fileutils'
15
15
 
16
16
  DistroName = "rwdtinker"
17
17
 
18
- DistroVersion="1.83"
18
+ DistroVersion="1.84"
19
19
 
20
20
  DistroTitle="#{DistroName}.dist"
21
21
  load "configuration/#{DistroTitle}"
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rwdtinker
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.83"
4
+ version: "1.84"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Gibson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-15 00:00:00 -07:00
12
+ date: 2008-10-19 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -52,9 +52,11 @@ files:
52
52
  - code/superant.com.rwdtinkerbackwindow/listgemdirs.rb
53
53
  - code/superant.com.rwdtinkerbackwindow/viewlogfile.rb
54
54
  - code/superant.com.rwdtinkerbackwindow/diagnostictab.rb
55
+ - code/superant.com.rwdtinkerbackwindow/showlocaleoptions.rb
55
56
  - code/superant.com.rwdtinkerbackwindow/listgemzips.rb
56
57
  - code/superant.com.rwdtinkerbackwindow/saveconfigurationrecord.rb
57
58
  - code/superant.com.rwdtinkerbackwindow/installremotegem.rb
59
+ - code/superant.com.rwdtinkerbackwindow/changelocale.rb
58
60
  - code/superant.com.rwdtinkerbackwindow/rwdtinkerwin2version.rb
59
61
  - code/superant.com.rwdtinkerbackwindow/listinstalledfiles.rb
60
62
  - code/superant.com.rwdtinkerbackwindow/loadconfigurationrecord.rb
@@ -107,6 +109,7 @@ files:
107
109
  - gui/tinkerbackwindows/superant.com.tinkerhelpwindow/1appname.rwd
108
110
  - gui/tinkerbackwindows/superant.com.tinkerhelpwindow/9end.rwd
109
111
  - gui/tinkerbackwindows/superant.com.tinkerbackwindow
112
+ - gui/tinkerbackwindows/superant.com.tinkerbackwindow/80localechanger.rwd
110
113
  - gui/tinkerbackwindows/superant.com.tinkerbackwindow/45installremotezip.rwd
111
114
  - gui/tinkerbackwindows/superant.com.tinkerbackwindow/70rwddiagnostics.rwd
112
115
  - gui/tinkerbackwindows/superant.com.tinkerbackwindow/1appname.rwd
@@ -145,11 +148,11 @@ files:
145
148
  - zips/tinkerbellw-0.03.zip
146
149
  - zips/rwdwmovies-0.98.zip
147
150
  - zips/temp.rb
148
- - zips/rwdwfoldeditor-0.05.zip
151
+ - zips/rwdwfoldeditor-0.07.zip
149
152
  - zips/rwdwcalc-0.63.zip
150
153
  - zips/rwdwruby-1.08.zip
151
154
  - zips/wrubyslippers-1.08.zip
152
- - zips/rwdwmpd-0.07.zip
155
+ - zips/rwdwhypernote-0.16.zip
153
156
  - tests/rdep.rb
154
157
  - tests/cleancnf.sh
155
158
  - tests/makedist.rb
Binary file
Binary file