bunpack 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70a8ec457d444d58f01466e1f72d0de6a768caa8
4
- data.tar.gz: 50e619202702c2106b00284dae7cc3995c54ab8f
3
+ metadata.gz: e036947e0d4d56005e97bc887aea79788e31b154
4
+ data.tar.gz: af436a991d9dca7bc87960d204060fe48076f987
5
5
  SHA512:
6
- metadata.gz: 454bda717784003a04889eeac83fc2add730230e8fd321a4bb54b9b2177d6ba1613a112209993f3b061bea274745e396c2003848bab72eca724618d0565e234b
7
- data.tar.gz: 492b991aaf5322720b4aba5907c22195fb05c03f8c11291bc5ab100e791c3e6c01c1ff89b1dbd24f6af1cec894996593e40f26000ac88c016084fca267aca0fc
6
+ metadata.gz: 1d00441e238319c1b75beda932bf81232d25605ada960356356d3bf12f3e6b923c367cdef0471c8c7be98ff02bb4b7068a0889d28530b4eca3f13f3d533c262b
7
+ data.tar.gz: 00edc65bb7fbcb215e376903f1e4af301746593681a1a21f9e454143a38af4ead40854db538231a6e560581180366005a69e3aef8edcf47e9bf64ea5eb671337
@@ -1 +1,6 @@
1
1
  language: ruby
2
+
3
+ before_install:
4
+ - sudo apt-get update -qq
5
+ - sudo apt-get install atool
6
+
data/README.md CHANGED
@@ -1,7 +1,15 @@
1
- bunpack
1
+ bunpack [![Gem Version](https://badge.fury.io/rb/bunpack.svg)](http://badge.fury.io/rb/bunpack) [![Build Status](https://travis-ci.org/blendle/bunpack.svg?branch=master)](https://travis-ci.org/blendle/bunpack)
2
2
  =======
3
3
 
4
- Removes __MACOSX folder from zip archives
4
+ Removes __MACOSX folder from zip archives.
5
+
6
+ ## Usage
7
+
8
+ `bunpack /path/to/archive.{tar,tgz,zip}`
9
+
10
+ The archive is extracted in `pwd`.
5
11
 
6
12
  ## Dependencies
13
+
7
14
  * atool
15
+ * zip
@@ -15,11 +15,15 @@ begin
15
15
  archive = TMP_DIR + File.basename(ORIG_ARCHIVE)
16
16
  FileUtils.cp ORIG_ARCHIVE, archive
17
17
 
18
- if archive.extname == '.zip' && `unzip -l #{archive}` =~ /__MACOSX/
19
- system "zip --delete '#{archive}' '__MACOSX/*'"
18
+ if archive.extname == '.zip'
19
+ archive_contents = `unzip -l "#{archive}"`
20
+
21
+ if archive_contents.include? '__MACOSX'
22
+ system %{zip --delete "#{archive}" "__MACOSX/*"}
23
+ end
20
24
  end
21
25
 
22
- system "aunpack '#{archive}'"
26
+ system %{aunpack "#{archive}"}
23
27
  ensure
24
28
  FileUtils.rm_rf TMP_DIR
25
29
  end
@@ -2,14 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'bunpack'
5
- spec.version = '1.0.0'
5
+ spec.version = '1.0.1'
6
6
  spec.licenses = ['MIT']
7
7
  spec.authors = ["Pepijn Looije"]
8
8
  spec.email = ["pepijn@blendle.nl"]
9
9
  spec.homepage = "http://blendle.nl"
10
- spec.summary = %q{The best way to manage your application's dependencies}
11
- spec.description = %q{Bundler manages an application's dependencies through its entire life, across many machines, systematically and repeatably}
10
+ spec.summary = %q{Removes __MACOSX folder from zip archives}
11
+ spec.description = %q{Removes __MACOSX folder from zip archives}
12
12
 
13
+ spec.add_development_dependency 'rake', '>= 10.0.0'
13
14
  spec.add_development_dependency 'aruba', '>= 0.5.0'
14
15
 
15
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -9,7 +9,7 @@ Feature: Extraction
9
9
  Then the file "archive/__MACOSX" should not exist
10
10
  And a file named "archive/hello_world" should exist
11
11
 
12
- Scenario: Extracting a tar archive without __MACOSX directory
12
+ Scenario: Extracting a tgz archive without __MACOSX directory
13
13
  Given the following base64 encoded tgz archive:
14
14
  """
15
15
  H4sIACO4VlMAA+3RTQ6CMBCGYY7SGzi0HTyOIQoB0wipf9e3AXSlJiawIL7P5ttM2mm/Mu6b9lZtsgWJyFbVDFmMKdaPOTG5dVbVebFqJHe5k8zokks9Xc+XMqZV+qpvj6fPc2msrr+cM73jlStRTv03VQjd7t7FcJj9jvQfhfe/9K9OXWZk9k3e+PP+AQAAAAAAAAAAAAAAAKzXAxSLKCkAKAAA
@@ -1,8 +1,6 @@
1
1
  require 'base64'
2
2
 
3
3
  Given /^the following base64 encoded (.*) archive:$/ do |extension, data|
4
- File.open "tmp/aruba/archive.#{extension}", 'w' do |file|
5
- file.write Base64.decode64 data
6
- end
4
+ write_file "archive." + extension, Base64.decode64(data)
7
5
  end
8
6
 
metadata CHANGED
@@ -1,31 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bunpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pepijn Looije
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-22 00:00:00.000000000 Z
11
+ date: 2014-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 10.0.0
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 10.0.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: aruba
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
- - - '>='
31
+ - - ">="
18
32
  - !ruby/object:Gem::Version
19
33
  version: 0.5.0
20
34
  type: :development
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
- - - '>='
38
+ - - ">="
25
39
  - !ruby/object:Gem::Version
26
40
  version: 0.5.0
27
- description: Bundler manages an application's dependencies through its entire life,
28
- across many machines, systematically and repeatably
41
+ description: Removes __MACOSX folder from zip archives
29
42
  email:
30
43
  - pepijn@blendle.nl
31
44
  executables:
@@ -33,8 +46,8 @@ executables:
33
46
  extensions: []
34
47
  extra_rdoc_files: []
35
48
  files:
36
- - .gitignore
37
- - .travis.yml
49
+ - ".gitignore"
50
+ - ".travis.yml"
38
51
  - Gemfile
39
52
  - LICENSE
40
53
  - README.md
@@ -54,12 +67,12 @@ require_paths:
54
67
  - lib
55
68
  required_ruby_version: !ruby/object:Gem::Requirement
56
69
  requirements:
57
- - - '>='
70
+ - - ">="
58
71
  - !ruby/object:Gem::Version
59
72
  version: '0'
60
73
  required_rubygems_version: !ruby/object:Gem::Requirement
61
74
  requirements:
62
- - - '>='
75
+ - - ">="
63
76
  - !ruby/object:Gem::Version
64
77
  version: '0'
65
78
  requirements: []
@@ -67,7 +80,7 @@ rubyforge_project:
67
80
  rubygems_version: 2.2.2
68
81
  signing_key:
69
82
  specification_version: 4
70
- summary: The best way to manage your application's dependencies
83
+ summary: Removes __MACOSX folder from zip archives
71
84
  test_files:
72
85
  - features/extraction.feature
73
86
  - features/step_definitions/application_steps.rb