dir-archiver 0.1.3 → 0.1.4

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: 87c04ae7ebe44d1e845c781af0f534bcc29de206
4
- data.tar.gz: 321a35e0c780f89535795a050e2c04a34d063496
3
+ metadata.gz: e20f03db4bdccb404829b1a47b9c0b868b6dca4a
4
+ data.tar.gz: 043a0d7b9eed2929ac99ba5f320f9d741c7dde4f
5
5
  SHA512:
6
- metadata.gz: 0212fd67647f1dbcbc109104fb3556b1c1d858c83a164f501c5612cf257df7822b71161944f396f3ed1cce24cce1117cfc96bef77469d5ad0368732a137c99b4
7
- data.tar.gz: feead8d6344d286ec4661262e0c2e62d119a774c6b7a2fc48245e84d94e267750521e2e81f0769cece2862e710d3ea18ed05371cb5596ad9d6b71b95a79cc10c
6
+ metadata.gz: d263c5cdcf67ffb8dd4eeb5d98729f28ce44f43110acdafb156842e857a29976fc6f08ed05f17fa06c477e73bb3d54cc0eb9acd27def547767a6547163fc8dbf
7
+ data.tar.gz: 02234448c622e1ed6a50a5c6fa8b74e04de9cbad73afab6abbebf11260e9214033370fea38cfe9f8414cf69afe69ffbfc52769f2a76a4de968d6179ab0eb4102
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ### Changelogs
2
2
 
3
+ #### 0.1.4
4
+
5
+ - Improve the sample usage to make it more clear
6
+ - Make double dashes `__` the default seperator
7
+
3
8
  #### 0.1.3
4
9
 
5
10
  - Make it work with the directory that contain spaces
data/README.md CHANGED
@@ -25,7 +25,6 @@ github_archiver
25
25
  You should see something like
26
26
 
27
27
  ```
28
-
29
28
  Usage: dir-archiver [options]
30
29
 
31
30
  Specific options:
@@ -34,7 +33,7 @@ Specific options:
34
33
  -d, --depth NUMBER where NUMBER is depth of the directory from the starting directory
35
34
  If not specified, 1 will be used
36
35
  -s, --seperator [SEP] The seperator string to be used
37
- If not specified, '--' will be used
36
+ If not specified, '__' will be used
38
37
  -o, --output-dir OUTPUT_DIR where OUTPUT_DIR is output directory
39
38
  If not specified, current directory will be used
40
39
  -c, --[no-]commit Commit your action
@@ -42,13 +41,21 @@ Specific options:
42
41
 
43
42
  Common options:
44
43
  -h, --help Show this message
45
- Example Usage:
46
44
 
47
- a) archive all directory 2 level depth (dry-run)
48
- dir-archiver -i ~/inputs/projects -i . -d 2 -s '__' -o ~/outputs/archives
45
+ Example Usage:
46
+
47
+ a) archive all immediate directories from the given directory (default to 1 level)
48
+
49
+ $cd ~/inputs/projects
50
+ $dir-archiver --commit
51
+
52
+ b) archive all directory 2 level depth (dry-run)
53
+
54
+ $dir-archiver -i ~/inputs/projects -d 2 -s '__' -o ~/outputs/archives
55
+
56
+ c) archive all directory 2 level depth (commit action)
49
57
 
50
- b) archive all directory 2 level depth (commit action)
51
- dir-archiver -i ~/inputs/projects -i . -d 2 -s '__' -o ~/outputs/archives
58
+ $dir-archiver -i ~/inputs/projects -d 2 -s '__' -o ~/outputs/archives
52
59
  ```
53
60
 
54
61
  ### Contributing
@@ -10,7 +10,7 @@ module DirArchiver
10
10
  # Set the sensible default for the options explicitly
11
11
  options.input_dir = "."
12
12
  options.depth = 1
13
- options.seperator = "--"
13
+ options.seperator = "__"
14
14
  options.output_dir = "."
15
15
  options.commit = false
16
16
 
@@ -36,7 +36,7 @@ module DirArchiver
36
36
 
37
37
  opts.on("-s", "--seperator [SEP]",
38
38
  "The seperator string to be used",
39
- "If not specified, '--' will be used") do |sep|
39
+ "If not specified, '__' will be used") do |sep|
40
40
  options.seperator = sep
41
41
  end
42
42
 
@@ -58,14 +58,23 @@ module DirArchiver
58
58
  # No argument, shows at tail. This will print an options summary.
59
59
  opts.on_tail("-h", "--help", "Show this message") do
60
60
  puts opts
61
- puts "Example Usage:"
62
- puts ""
63
- puts "a) archive all directory 2 level depth (dry-run)"
64
- puts "dir-archiver -i ~/inputs/projects -d 2 -s '__' -o ~/outputs/archives"
65
- puts ""
66
- puts "b) archive all directory 2 level depth (commit action)"
67
- puts "dir-archiver -i ~/inputs/projects -d 2 -s '__' -o ~/outputs/archives"
68
- puts ""
61
+ puts <<-EOT.gsub(/^\s+\|/, "")
62
+ |
63
+ | Example Usage:
64
+ |
65
+ | a) archive all immediate directories from the given directory (default to 1 level)
66
+ |
67
+ | $cd ~/inputs/projects
68
+ | $dir-archiver --commit
69
+ |
70
+ | b) archive all directory 2 level depth (dry-run)
71
+ |
72
+ | $dir-archiver -i ~/inputs/projects -d 2 -s '__' -o ~/outputs/archives
73
+ |
74
+ | c) archive all directory 2 level depth (commit action)
75
+ |
76
+ | $dir-archiver -i ~/inputs/projects -d 2 -s '__' -o ~/outputs/archives
77
+ EOT
69
78
  exit
70
79
  end
71
80
  end
@@ -1,3 +1,3 @@
1
1
  module DirArchiver
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dir-archiver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burin Choomnuan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-05 00:00:00.000000000 Z
11
+ date: 2016-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print