workspace-archive 1.0.9 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/workspace-archive.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e63e7df9be4b58ab35063dcc1091736a0b53445
|
4
|
+
data.tar.gz: 5049ff286b2a81c1361f90f80d6582f78433e4ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 797ba93bc58d84ab3a6f41fae3443701c91b102f2222da56c43e0f5632289a71f383ca8dbaff711438e652f2b5dc1776414e97efdc04eba2ff4bc85e30ee0874
|
7
|
+
data.tar.gz: 6a9a2d1843944c52e1ce8a6ba82845267e863eccfc7bb2e312afa825967a407e639d5a70b8a8668aeee5e7b29234c5a51b734d420dba7d7fa70ac7feeb99d52e
|
data/workspace-archive.rb
CHANGED
@@ -3,12 +3,12 @@ require 'rubygems/package'
|
|
3
3
|
|
4
4
|
module Workspace
|
5
5
|
class Dir
|
6
|
-
def compress(target_file)
|
6
|
+
def compress(target_file, &block)
|
7
7
|
target_file.delete
|
8
8
|
if target_file.extension == "gz"
|
9
|
-
compress_gz(target_file)
|
9
|
+
compress_gz(target_file, &block)
|
10
10
|
else
|
11
|
-
compress_zip(target_file)
|
11
|
+
compress_zip(target_file, &block)
|
12
12
|
end
|
13
13
|
self
|
14
14
|
end
|
@@ -35,7 +35,7 @@ module Workspace
|
|
35
35
|
target_file
|
36
36
|
end
|
37
37
|
|
38
|
-
def compress_zip(target_file)
|
38
|
+
def compress_zip(target_file, &block)
|
39
39
|
Zip::File.open(target_file.to_s, 'w') do |zipfile|
|
40
40
|
::Dir["#{self}/**/**"].each do |file|
|
41
41
|
path = file.sub("#{self}/", '')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: workspace-archive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Strebitzer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: workspace
|