file_crawler 0.5.0 → 0.5.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
  SHA256:
3
- metadata.gz: df450fdad5aebd14ecd141e4264d9057df597798173557a2739fe7a6776f3fb6
4
- data.tar.gz: 02d972b1d68d21fe2614f4bc46f717b5b064718a5c6369d1473567f53681586f
3
+ metadata.gz: 587d4ee607e4f6909cc5558542600cd93f5631c2155ed301c0abc189c2bfb18c
4
+ data.tar.gz: '09739910fe818b27144d7f6c0faee7e3dffa7aa25047ebb912a40e4e6b761adf'
5
5
  SHA512:
6
- metadata.gz: 3f218741b1df108a251c0c782724f4438b919017b8908f8394dd74a615a863036a586fd2e7a357a1fcccaefcdbe2224c6ce34781e9fa3a980642a7f0c149828f
7
- data.tar.gz: 0ffac33279d95fb1fa917be2b91afe188c2f0310808dd5cd8abc029eb27b8d2840d06a460be31dac713bfef991e62f1509282b80ac1512c86a753a97c8031932
6
+ metadata.gz: ce9f415e05b5f14d280c9b44dce493ebdaed839ad7f8c560b8b25810e30e0119c94f04933cc4af012caec4bcad66a9c29a90ce304789b622f9472da5a816996e
7
+ data.tar.gz: 87a77792973474e9c5d757ffbe30993ced57a7b471980baa733ecb09a4d4e503e2a4f4ed4a41d6a4deda0ae03afb1a27646c8a9198e43069812f87704a99af17
@@ -42,11 +42,13 @@ module FileCrawler::Finder::Command
42
42
 
43
43
  def make_mv(filepaths)
44
44
  cmds = []
45
+ mkdirs = []
45
46
  make_fixed_paths(filepaths).map {|file|
47
+ mkdirs << "mkdir -p #{File.dirname(file[1])}"
46
48
  cmds << "mv #{file[0]} #{file[1]}"
47
49
  }
48
50
 
49
- cmds
51
+ mkdirs.uniq + cmds
50
52
  end
51
53
 
52
54
  def make_fixed_paths(filepaths)
@@ -1,3 +1,3 @@
1
1
  module FileCrawler
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file_crawler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hirohisa Kawasaki