dir-archiver 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -9
- data/bin/dir-archiver +0 -2
- data/dir_archiver.gemspec +1 -1
- data/lib/dir_archiver/dir_archiver.rb +4 -4
- data/lib/dir_archiver/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddb662e191c21c0358c775f7fae8d5efeec60e44
|
4
|
+
data.tar.gz: a41fef6dc805ef829862037530eb082db11b307a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c500f22fd18fac623fe844b3107f7393d93f39b57c4358bb5b27723c58632474db7ccfa525c61c5b32209934addaf2a71611876fa9b2689bfc5a44e3d2d9dcc
|
7
|
+
data.tar.gz: 69e6b2182e55ab9a326fbfcc1ccfeb46d5755376e709e2352fc8e0ea8bfbfea2cfc7ab860d77c2852d3aabdb952a948f8127f3e81af9b506516ba0a788368da7
|
data/CHANGELOG.md
CHANGED
@@ -1,15 +1,10 @@
|
|
1
1
|
### Changelogs
|
2
2
|
|
3
|
-
#### 0.
|
3
|
+
#### 0.1.1
|
4
4
|
|
5
|
-
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
- Add option to group output by language by default
|
10
|
-
- Show list of repositories in the dry-run mode (--no-clone) option
|
11
|
-
- Improve the gemspec to add more context for the user
|
12
|
-
- Add some example to default option when the user type no argument
|
5
|
+
- Fix the change log
|
6
|
+
- Minor bug fix to the message when running as --commit option
|
7
|
+
- Remove some debug information
|
13
8
|
|
14
9
|
#### 0.1.0
|
15
10
|
|
data/bin/dir-archiver
CHANGED
data/dir_archiver.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.summary = %q{Archive multiple directories having a given depth from a given starting directory}
|
11
11
|
spec.description = %q(
|
12
12
|
Archive all directories having the given depth from a given directory.
|
13
|
-
TL;DR: `dir-archiver --input-dir ~/projects --depth 2 --
|
13
|
+
TL;DR: `dir-archiver --input-dir ~/projects --depth 2 --seperator "__" -output-dir ~/archives --commit`
|
14
14
|
).gsub(/^\s+/, " ")
|
15
15
|
spec.homepage = 'https://github.com/agilecreativity/dir_archiver'
|
16
16
|
spec.required_ruby_version = ">= 2.0.0"
|
@@ -17,13 +17,13 @@ module DirArchiver
|
|
17
17
|
# Create one if the output directory is not exist!
|
18
18
|
FileUtils.mkdir_p(output_path) unless File.exists?(output_path) && File.directory?(output_path)
|
19
19
|
|
20
|
-
# Get the result from the
|
20
|
+
# Get the result from the result of `find` command
|
21
21
|
result = `find #{input_path} -type d -depth #{depth}`
|
22
22
|
return if result && result.empty?
|
23
23
|
|
24
24
|
files = result.split("\n").map { |i| i.gsub(input_path, ".") }
|
25
25
|
|
26
|
-
puts "
|
26
|
+
puts "DRY-RUN ONLY : No action taken!" unless commit
|
27
27
|
|
28
28
|
files.each_with_index do |path, index|
|
29
29
|
# Strip off the [".", "path", "to", "dir"]
|
@@ -36,11 +36,11 @@ module DirArchiver
|
|
36
36
|
Dir.chdir(input_path)
|
37
37
|
|
38
38
|
if commit
|
39
|
-
puts "
|
39
|
+
puts "tar zcvf #{output_name} #{path}"
|
40
40
|
# Perform the actual compress here!
|
41
41
|
`tar zcvf #{output_name} #{path} 2> /dev/null`
|
42
42
|
else
|
43
|
-
puts "
|
43
|
+
puts "tar zcvf #{output_name} #{path} (dry-run)"
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
data/lib/dir_archiver/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dir-archiver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burin Choomnuan
|
@@ -179,8 +179,8 @@ dependencies:
|
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0.8'
|
181
181
|
description: " Archive all directories having the given depth from a given directory.\n
|
182
|
-
TL;DR: `dir-archiver --input-dir ~/projects --depth 2 --
|
183
|
-
--commit`\n "
|
182
|
+
TL;DR: `dir-archiver --input-dir ~/projects --depth 2 --seperator \"__\" -output-dir
|
183
|
+
~/archives --commit`\n "
|
184
184
|
email:
|
185
185
|
- agilecreativity@gmail.com
|
186
186
|
executables:
|