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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/workspace-archive.rb +4 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5398e2b28d36c3f01e5d93efb145b0814e65e315
4
- data.tar.gz: 5eec156427a21216f3808a850f40be1a9babccd4
3
+ metadata.gz: 2e63e7df9be4b58ab35063dcc1091736a0b53445
4
+ data.tar.gz: 5049ff286b2a81c1361f90f80d6582f78433e4ea
5
5
  SHA512:
6
- metadata.gz: 7afedf5502da7500d51fa91f212e3b300e4516a956e8faec71fc172e718e42ed401f6421a0fbbc7e4469c012c6e86a3c6bd86865ed3eec419ccf5c9513b9d320
7
- data.tar.gz: 8c84e3e905db16f58ad096bb9a8cd043316572fe6ce8865e520d7edaa31777710c0e2512af52fc2c852ae9f6c233e0de136c768a5629ad12ffbc3b78f6d0f986
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.9
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-02-03 00:00:00.000000000 Z
11
+ date: 2018-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workspace