auser-suitcase 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +57 -0
- data/VERSION.yml +1 -1
- data/lib/suitcase/unzipper.rb +2 -2
- data/lib/suitcase/zipper.rb +1 -1
- metadata +21 -12
data/Rakefile
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "suitcase"
|
8
|
+
gem.summary = %Q{TODO}
|
9
|
+
gem.email = "arilerner@mac.com"
|
10
|
+
gem.homepage = "http://github.com/auser/suitcase"
|
11
|
+
gem.authors = ["Ari Lerner"]
|
12
|
+
gem.add_dependency('tarruby')
|
13
|
+
|
14
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
|
+
end
|
16
|
+
rescue LoadError
|
17
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
18
|
+
end
|
19
|
+
|
20
|
+
require 'rake/testtask'
|
21
|
+
Rake::TestTask.new(:test) do |test|
|
22
|
+
test.libs << 'lib' << 'test'
|
23
|
+
test.pattern = 'test/**/*_test.rb'
|
24
|
+
test.verbose = false
|
25
|
+
end
|
26
|
+
|
27
|
+
begin
|
28
|
+
require 'rcov/rcovtask'
|
29
|
+
Rcov::RcovTask.new do |test|
|
30
|
+
test.libs << 'test'
|
31
|
+
test.pattern = 'test/**/*_test.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
rescue LoadError
|
35
|
+
task :rcov do
|
36
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
task :default => :test
|
42
|
+
|
43
|
+
require 'rake/rdoctask'
|
44
|
+
Rake::RDocTask.new do |rdoc|
|
45
|
+
if File.exist?('VERSION.yml')
|
46
|
+
config = YAML.load(File.read('VERSION.yml'))
|
47
|
+
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
|
48
|
+
else
|
49
|
+
version = ""
|
50
|
+
end
|
51
|
+
|
52
|
+
rdoc.rdoc_dir = 'rdoc'
|
53
|
+
rdoc.title = "suitcase #{version}"
|
54
|
+
rdoc.rdoc_files.include('README*')
|
55
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
56
|
+
end
|
57
|
+
|
data/VERSION.yml
CHANGED
data/lib/suitcase/unzipper.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require "zlib"
|
3
|
-
require 'archive/tar/minitar'
|
4
2
|
|
5
3
|
module Suitcase
|
6
4
|
class UnZipper
|
7
5
|
|
8
6
|
# TODO: Add a meaningful, portable unzip!
|
9
7
|
def self.unzip!(filepath, to=Dir.pwd)
|
8
|
+
require "zlib"
|
9
|
+
require 'archive/tar/minitar'
|
10
10
|
# tgz = Zlib::GzipReader.new(File.open(filepath, 'rb'))
|
11
11
|
# Archive::Tar::Minitar.unpack( tgz, to )
|
12
12
|
end
|
data/lib/suitcase/zipper.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require 'archive/tar/minitar'
|
3
2
|
|
4
3
|
module Suitcase
|
5
4
|
class Zipper
|
@@ -9,6 +8,7 @@ module Suitcase
|
|
9
8
|
end
|
10
9
|
|
11
10
|
def self.zip!(filepath)
|
11
|
+
require 'archive/tar/minitar'
|
12
12
|
filepath = filepath.include?(".tar.gz") ? filepath : "#{filepath}.tar.gz"
|
13
13
|
File.open(filepath,"w") do |tarfile|
|
14
14
|
Archive::Tar::Minitar::Writer.open(tarfile) do |tar|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auser-suitcase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ari Lerner
|
@@ -9,10 +9,19 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04-
|
12
|
+
date: 2009-04-12 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: tarruby
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
16
25
|
description:
|
17
26
|
email: arilerner@mac.com
|
18
27
|
executables: []
|
@@ -20,26 +29,24 @@ executables: []
|
|
20
29
|
extensions: []
|
21
30
|
|
22
31
|
extra_rdoc_files:
|
23
|
-
- README.rdoc
|
24
32
|
- LICENSE
|
33
|
+
- README.rdoc
|
25
34
|
files:
|
35
|
+
- LICENSE
|
26
36
|
- README.rdoc
|
37
|
+
- Rakefile
|
27
38
|
- VERSION.yml
|
28
|
-
- lib/suitcase
|
39
|
+
- lib/suitcase.rb
|
29
40
|
- lib/suitcase/unzipper.rb
|
30
41
|
- lib/suitcase/zipper.rb
|
31
|
-
- lib/suitcase.rb
|
32
42
|
- test/suitcase_test.rb
|
33
|
-
- test/test_dir
|
34
43
|
- test/test_dir/box.rb
|
35
44
|
- test/test_dir/test.txt
|
36
45
|
- test/test_helper.rb
|
37
|
-
- LICENSE
|
38
46
|
has_rdoc: true
|
39
47
|
homepage: http://github.com/auser/suitcase
|
40
48
|
post_install_message:
|
41
49
|
rdoc_options:
|
42
|
-
- --inline-source
|
43
50
|
- --charset=UTF-8
|
44
51
|
require_paths:
|
45
52
|
- lib
|
@@ -62,5 +69,7 @@ rubygems_version: 1.2.0
|
|
62
69
|
signing_key:
|
63
70
|
specification_version: 2
|
64
71
|
summary: TODO
|
65
|
-
test_files:
|
66
|
-
|
72
|
+
test_files:
|
73
|
+
- test/suitcase_test.rb
|
74
|
+
- test/test_dir/box.rb
|
75
|
+
- test/test_helper.rb
|