agile_utils 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6ca84c57cb8b91aa8cfc7e1d8fcc0ba97670342e
4
- data.tar.gz: fffb04a9c4e5473b7abd3fa9573dace4ce8574a4
3
+ metadata.gz: e7edd66e97351fd2273cf45b8cb446f49305bd33
4
+ data.tar.gz: 4e19895fa9e76b08a6cffc8acf8950d457f020e2
5
5
  SHA512:
6
- metadata.gz: e8423c9fb38e5919fe27a200dbee57bcf2462c2668d11bbc346947d8155c58625d10f54261b7e094fd81e105fda71a4b3b5ce9e4b2d12a5670f4bf13a224aaea
7
- data.tar.gz: 9bd850c5d5154b35d8756ed93d4022fa30a1ee821187a190d991dbdee5de0415a361d1578a057ba5f18a63bf84516d95ff9c9a610a478ccd41f6898bcfecd77f
6
+ metadata.gz: f64663b35fb0d7ccad3f7519617aabd4da8052d4a60b5112ec711030378880923fc1658039592d982845bd8b13226c68e69829009ac36102b3565a2b1debe2c2
7
+ data.tar.gz: 7c80ff9550be9669b3794438e82bb289b27aded3423a829b2be3c8e428dd1a20f103ded61fd82a457c3b0ad335919271568bffffc8d041c8a3b6c86ae720c37c
@@ -26,13 +26,13 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "awesome_print","~> 1.8"
27
27
  spec.add_development_dependency "bundler", "~> 1.16"
28
28
  spec.add_development_dependency "guard", "~> 2.14"
29
- spec.add_development_dependency "guard-minitest", "~> 2.3"
30
- spec.add_development_dependency "minitest", "~> 5.10"
29
+ spec.add_development_dependency "guard-minitest", "~> 2.4"
30
+ spec.add_development_dependency "minitest", "~> 5.11"
31
31
  spec.add_development_dependency "minitest-spec-context", "~> 0.0"
32
32
  spec.add_development_dependency "pry", "~> 0.11"
33
33
  spec.add_development_dependency "rake", "~> 12.3"
34
- spec.add_development_dependency "rubocop", "~> 0.52"
35
- spec.add_development_dependency "yard", "~> 0.9"
34
+ spec.add_development_dependency "rubocop", "~> 0.53"
35
+
36
36
  spec.add_runtime_dependency "minitar", "~> 0.6"
37
37
  spec.add_runtime_dependency "thor", "~> 0.20"
38
38
  end
@@ -4,7 +4,6 @@ require "zlib"
4
4
  require "stringio"
5
5
  require "find"
6
6
  require "fileutils"
7
- require "archive/tar/minitar"
8
7
  require "agile_utils/version"
9
8
  require "agile_utils/cli"
10
9
  require "agile_utils/helper"
@@ -1,7 +1,8 @@
1
1
  module AgileUtils
2
- include Archive::Tar
3
- include Archive::Tar::Minitar
4
2
  module FileUtil
3
+ require 'zlib'
4
+ require 'minitar'
5
+
5
6
  class << self
6
7
  CustomError = Class.new(StandardError)
7
8
  # Find list of files based on certain extension
@@ -20,20 +21,10 @@ module AgileUtils
20
21
  end
21
22
  # rubocop:enable All
22
23
 
23
- # Tar and gzip list of files
24
- #
25
24
  # @param [Array<String>] files list of input files
26
25
  # @param [String] output the output file in .tar.gz format
27
- # @todo rename to tar_gzip(..)
28
- def tar_gzip_files(files, output = "output.tar.gz")
29
- sgz = Zlib::GzipWriter.new(File.open(output, "wb"))
30
- tar = Archive::Tar::Minitar::Output.new(sgz)
31
- files.each do |file|
32
- Archive::Tar::Minitar.pack_file(file, tar)
33
- end
34
- ensure
35
- tar.close unless tar.nil?
36
- tar = nil
26
+ def tar_gzip_files(files, output="output.tgz")
27
+ Minitar.pack(files, Zlib::GzipWriter.new(File.open(output, 'wb')))
37
28
  end
38
29
 
39
30
  # Uncompress 'input.tar.gz' file
@@ -1,3 +1,3 @@
1
1
  module AgileUtils
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agile_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burin Choomnuan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-31 00:00:00.000000000 Z
11
+ date: 2018-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '2.3'
61
+ version: '2.4'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '2.3'
68
+ version: '2.4'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '5.10'
75
+ version: '5.11'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '5.10'
82
+ version: '5.11'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest-spec-context
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -128,28 +128,14 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0.52'
131
+ version: '0.53'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0.52'
139
- - !ruby/object:Gem::Dependency
140
- name: yard
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - "~>"
144
- - !ruby/object:Gem::Version
145
- version: '0.9'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - "~>"
151
- - !ruby/object:Gem::Version
152
- version: '0.9'
138
+ version: '0.53'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: minitar
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -230,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
216
  version: '0'
231
217
  requirements: []
232
218
  rubyforge_project:
233
- rubygems_version: 2.5.2
219
+ rubygems_version: 2.6.11
234
220
  signing_key:
235
221
  specification_version: 4
236
222
  summary: Collection of my ruby library that can be re-used across projects