make_dirs_from_list 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b09fa570c02fb41f2e75e94c4954956e2aa8eb4b
4
- data.tar.gz: ffbdd41e7966f9d534f7032920518e6d0c8b2a23
3
+ metadata.gz: bfd384e1a8819380685bdd3af212bc502a13540b
4
+ data.tar.gz: 57b60c9cabed39a85f0456574a624e545c3a6f0b
5
5
  SHA512:
6
- metadata.gz: 68147e5088a87de3b405bfb1497240a0bd7d41b9f9cc56a44e8e83e2b58438309f30cb7653c3956fc83ba7bcfd6f298a6397c7ec7bc1fc6466e50d86d5a3172d
7
- data.tar.gz: 519dbe8e558efc388e685d4bcbcd3363e0268e03a75c89fa6f22b08eed0d49a505fe01b913edd03fb4d659c2ace9ab54ae53249db093e39ca799e21018ad34f8
6
+ metadata.gz: 87a33051d23ace04eeb7c0150c3ebaaed29f27f3b2b2718600fb5c5ee0a319f3fc7c99bf1b04d47cc45ea8b6eb55e7d123cfa3bdb1a4506bcbe6fc0e176da4bc
7
+ data.tar.gz: 5e67436275fcb19fa193c4ae5c7e7ff3f357de455ed111e1ee78a2698c2f62b3a4716627e79b5361bbf154c29c012548e43bd4e10c5a7fb63f0bd220bddb0d47
@@ -3,7 +3,7 @@ require "bundler/setup"
3
3
  require "make_dirs_from_list"
4
4
 
5
5
  unless ARGV.size == 3
6
- puts "Usage: make_dirs_from_list path/to/list.xlsx /target/dir \"F1-F2-or_whatever\""
6
+ puts MakeDirsFromList::USAGE
7
7
  exit 1
8
8
  end
9
9
 
@@ -1,3 +1,3 @@
1
1
  module MakeDirsFromList
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -1,8 +1,10 @@
1
1
  require "make_dirs_from_list/version"
2
- require "roo"
3
2
  require "fileutils"
3
+ require "roo"
4
4
 
5
5
  module MakeDirsFromList
6
+ USAGE = "Usage: make_dirs_from_list path/to/list.xlsx /target/dir \"F1-F2-or_whatever\""
7
+
6
8
  def self.make!(file_name, target_dir, title_template)
7
9
  columns = get_column_indices title_template
8
10
  title_placeholders = get_placeholders title_template
@@ -21,7 +23,7 @@ module MakeDirsFromList
21
23
 
22
24
  puts "Making #{dir_names.size} dirs in #{target_dir} from text in columns #{columns}."
23
25
 
24
- dir_names.each_with_index do |dir_name|
26
+ dir_names.each do |dir_name|
25
27
  next if File.exists? dir_name
26
28
  FileUtils.mkdir dir_name
27
29
  print "."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: make_dirs_from_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Salazar