archive-tar-external 1.3.0 → 1.4.1

Sign up to get free protection for your applications and to get access to all the features.
metadata.gz.sig ADDED
Binary file
data/MANIFEST DELETED
@@ -1,8 +0,0 @@
1
- * MANIFEST
2
- * CHANGES
3
- * INSTALL
4
- * Rakefile
5
- * archive-tar-external.gemspec
6
- * doc/tar_external.txt
7
- * lib/archive/tar_external.rb
8
- * test/test_archive_tar_external.rb
data/README DELETED
@@ -1,47 +0,0 @@
1
- == Description
2
- A simple tar & compress library that nicely wraps external system calls.
3
-
4
- == Installation
5
- gem install archive-tar-external
6
-
7
- == Synopsis
8
- require 'archive/tar/external'
9
- include Archive
10
-
11
- # The long way
12
- t = Tar::External.new('test.tar')
13
- t.create_archive('*.rb')
14
- t.compress_archive('gzip')
15
-
16
- # The short way
17
- t = Tar::External.new('test.tar', '*.rb', 'gzip')
18
-
19
- == Prerequisites
20
- The win32-open3 library (MS Windows only).
21
- The 'tar' command line program.
22
- At least one compression program, e.g. gzip, bzip2, zip, etc.
23
-
24
- == Known Issues
25
- The tar program that comes with Solaris will not raise an error if you
26
- try to expand a file from an archive that does not contain that file.
27
-
28
- If you come across any other issues, please report them on the project
29
- page at http://www.rubyforge.org/projects/shards.
30
-
31
- == Future Plans
32
- Anything folks are looking for?
33
-
34
- == License
35
- Artistic 2.0
36
-
37
- == Warranty
38
- This package is provided "as is" and without any express or
39
- implied warranties, including, without limitation, the implied
40
- warranties of merchantability and fitness for a particular purpose.
41
-
42
- == Copyright
43
- (C) 2003 - 2010 Daniel J. Berger
44
- All Rights Reserved
45
-
46
- == Author
47
- Daniel J. Berger
data/doc/tar_external.txt DELETED
@@ -1,109 +0,0 @@
1
- == Description
2
- A simple tar interface using external system calls.
3
-
4
- == Synopsis
5
- # Assuming we have three .txt files, t1.txt, t2.txt, t3.txt ...
6
- require 'archive/tar/external'
7
- include Archive
8
-
9
- t = Tar::External.new("myfile.tar")
10
-
11
- t.create_archive("*.txt")
12
- t.compress_archive("bzip2") # 'myfile.tar.bz2' now exists
13
-
14
- t.uncompress_archive("bunzip2")
15
-
16
- t.archive_name # "myfile.tar"
17
- t.archive_info # ["t1.txt","t2.txt","t3.txt"]
18
-
19
- t.add_to_archive("t4.txt","t5.txt")
20
- t.expand_archive
21
-
22
- == Constants
23
- VERSION
24
- Current version number of this library. This is a string.
25
-
26
- == Class Methods
27
- Archive::Tar::External.new(archive_name, pattern=nil, program=nil)
28
- Creates an instance of an Archive::Tar::External object. The +archive_name+ is
29
- the name of the tarball. While a '.tar' extension is recommended based on
30
- years of convention, it is not enforced.
31
-
32
- If +pattern+ is provided, then the Archive#create_archive method is called
33
- internally.
34
-
35
- If +program+ is provided, then the Archive#compress_archive method is
36
- called internally.
37
-
38
- Note that +archive_name+ name must be a String, or a TypeError is raised.
39
-
40
- Archive::Tar::External.expand_archive(archive_name, *files)
41
- Identical to the instance method of the same name, except that you must
42
- specify the +archive_name+, and the tar program is hard coded to 'tar xf'.
43
-
44
- Archive::Tar::External.uncompress_archive(archive_name, program='gunzip')
45
- Identical to the instance method of the same name, except that you must
46
- specify the +archive_name+ as the first argument.
47
-
48
- == Instance Methods
49
- Archive;:Tar#add(file1 [, file2, ...])
50
- Archive::Tar::External#add_to_archive(file1 [, file2, ...])
51
- Adds a list of files to the current archive. At least one file must be
52
- provided or a Tar::Error is raised.
53
-
54
- Archive::Tar::External#archive_info
55
- Archive::Tar::External#info
56
- Returns an array of file names that are included within the tarball.
57
-
58
- Archive::Tar::External#archive_name
59
- Returns the current archive name.
60
-
61
- Archive::Tar::External#archive_name=
62
- Sets the current archive name.
63
-
64
- Archive::Tar::External#compress(program="gzip")
65
- Archive::Tar::External#compress_archive(program="gzip")
66
- Compresses the tarball using the program you pass to this method. The
67
- default is "gzip".
68
-
69
- Note that any arguments you want to be passed along with the program can
70
- simply be included as part of the program, e.g. "gzip -f".
71
-
72
- Archive::Tar::External#create(file_pattern)
73
- Archive::Tar::External#create_archive(file_pattern)
74
- Creates a new tarball, including those files which match 'file_pattern'.
75
-
76
- Archive::Tar::External#expand_archive(files=nil)
77
- Archive::Tar::External#extract_archive(files=nil)
78
- Expands the contents of the tarball. Note that this method does NOT delete
79
- the tarball.
80
-
81
- If file names are provided, then only those files are extracted.
82
-
83
- Archive::Tar::External#tar_program
84
- Returns the name of the tar program used. The default is "tar".
85
-
86
- Archive::Tar::External#tar_program=(program_name)
87
- Sets the name of the tar program to be used.
88
-
89
- Archive::Tar::External#uncompress(program="gunzip")
90
- Archive::Tar::External#uncompress_archive(program="gunzip")
91
- Uncompresses the tarball using the program you pass to this method. The
92
- default is "gunzip".
93
-
94
- As for compress_archive(), you can pass arguments along as part of the
95
- argument.
96
-
97
- Archive::Tar::External#update(files)
98
- Archive::Tar::External#update_archive(files)
99
- Updates the given +files+ in the archive, i.e they are added if they
100
- are not already in the archive or have been modified.
101
-
102
- == Exceptions
103
- Tar::Error
104
- Raised if something goes wrong during the execution of any methods that
105
- use the tar command internally.
106
-
107
- Tar::CompressError
108
- Raised if something goes wrong during the Tar#compress_archive or
109
- Tar#uncompress_archive methods.