minizip 0.0.5 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md ADDED
@@ -0,0 +1,45 @@
1
+ ## INSTALLATION
2
+
3
+ ### Unix/Mac OSX
4
+
5
+ $ gem install minizip
6
+
7
+ or if you're using bundler, add this to your Gemfile
8
+
9
+ gem 'minizip'
10
+
11
+ ### Windows
12
+
13
+ In windows, there's an additional step. After installing the gem(or before), download the 7zip command line version here:
14
+
15
+ http://www.7-zip.org/download.html
16
+
17
+ Extract that into any folder that's in your path already or if you want to use a custom folder, make sure you add it to your path. Check your installation by restarting your command prompt and typing 7za. It should show you a list of options for 7zip.
18
+
19
+ ## USAGE
20
+
21
+ ### Zipping
22
+
23
+ To zip up some files manually:
24
+
25
+ $ minizip zip_files zip_name file1 file2 file3
26
+
27
+ To zip up a folder:
28
+
29
+ $ minizip zip_dir zip_name directory_you_want_to_zip
30
+
31
+ Note: In Windows, you'll have to add a .zip to your zip_name, otherwise, will create your zip file with a .7z extension
32
+
33
+ ### Extracting
34
+
35
+ To unzip to your current directory, just do:
36
+
37
+ $ minizip extract zip_name
38
+
39
+ If you want to unzip in a directory:
40
+
41
+ $ minizip extract zip_name directory_you_want_to_unzip_to
42
+
43
+ ## CONTRIBUTING
44
+
45
+ All push requests are welcome provided they are properly tested(at least for Unix). We are still trying to fix the tests for Windows(some help here would be great also). We use Aruba for testing.
@@ -0,0 +1,14 @@
1
+ Feature: User uses minizip to zip up some files
2
+ In order to zip some files properly
3
+ As a user
4
+ I want to be able to use minizip
5
+
6
+ Scenario: Zip some files
7
+ When I run `minizip files test_files ../../features/support/examples/test_files/test.txt ../../features/support/examples/test_files/test2.txt`
8
+ Then a file named "test_files.zip" should exist
9
+ And the exit status should be 0
10
+
11
+ Scenario: Zip some files including a file that doesn't exist
12
+ When I run `minizip files test_files ../../features/support/examples/test_files/test.txt ../../features/support/examples/test_files/test2.txt`
13
+ Then a file named "test_files.zip" should exist
14
+ And the exit status should be 0
File without changes
File without changes
data/lib/minizip/cli.rb CHANGED
@@ -3,7 +3,13 @@ require 'minizip/zip'
3
3
 
4
4
  module Minizip
5
5
  class CLI < Thor
6
- desc "dir", "dir zip_name (automatically appends .zip) directory_to_zip"
6
+
7
+ desc "files", "files zip_name (add .zip if using windows) files_to_zip"
8
+ def files(zip_name, *files_to_zip)
9
+ Minizip::Zip.zip_files(zip_name, files_to_zip.join(" "))
10
+ end
11
+
12
+ desc "dir", "dir zip_name (autoiaticilly appends .zip) directory_to_zip"
7
13
  def dir(zip_name, dir_name)
8
14
  Minizip::Zip.zip_dir(zip_name, dir_name)
9
15
  end
@@ -1,3 +1,3 @@
1
1
  module Minizip
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minizip
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Radamanthus Batnag and Eumir Gaspar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-12 00:00:00 Z
18
+ date: 2011-08-15 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: aruba
@@ -58,12 +58,15 @@ files:
58
58
  - .gitignore
59
59
  - .rvmrc
60
60
  - Gemfile
61
+ - README.md
61
62
  - Rakefile
62
63
  - bin/minizip
63
64
  - features/compress_a_directory.feature
65
+ - features/compress_files.feature
64
66
  - features/extract_zip_file.feature
65
67
  - features/support/env.rb
66
- - features/support/examples/.DS_Store
68
+ - features/support/examples/test_files/test.txt
69
+ - features/support/examples/test_files/test2.txt
67
70
  - features/support/examples/zip_file.zip
68
71
  - features/support/examples/zoho_sikuli_demo_mac.sikuli/1308784515564.png
69
72
  - features/support/examples/zoho_sikuli_demo_mac.sikuli/1308784583378.png
@@ -130,15 +133,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
133
  requirements: []
131
134
 
132
135
  rubyforge_project: minizip
133
- rubygems_version: 1.8.6
136
+ rubygems_version: 1.8.8
134
137
  signing_key:
135
138
  specification_version: 3
136
139
  summary: A Ruby wrapper for the zip/unzip command line tools(for UNIX) and 7zip(for Windows)
137
140
  test_files:
138
141
  - features/compress_a_directory.feature
142
+ - features/compress_files.feature
139
143
  - features/extract_zip_file.feature
140
144
  - features/support/env.rb
141
- - features/support/examples/.DS_Store
145
+ - features/support/examples/test_files/test.txt
146
+ - features/support/examples/test_files/test2.txt
142
147
  - features/support/examples/zip_file.zip
143
148
  - features/support/examples/zoho_sikuli_demo_mac.sikuli/1308784515564.png
144
149
  - features/support/examples/zoho_sikuli_demo_mac.sikuli/1308784583378.png
Binary file