thrifty_file_applier 0.1.4 → 0.1.5

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: b2b182ac8ec44b18363dd385c06ecb2be25a59ee4739843a5a50acaf991b50cb
4
- data.tar.gz: e10c9c36a3edd194e307cd0d4596f3bce1810fe4fcc13a46167795821687c6b8
3
+ metadata.gz: 4b56156ca6b54a4a9caa64b78d68786e6228a0a568b066fab4dd1ad30e9491f0
4
+ data.tar.gz: ee5cec60536d69c3a83556a10bbc8c31d59f8938d8b4263c08c975dda4724d0a
5
5
  SHA512:
6
- metadata.gz: 83c1ca72d170b537be81f24f7d10f36fe9e3b24c69b0ee9edc45842cd4d7cc255a1976635cf90768454234f9d25571218783ee4bf105b45ef3f54357e21e5d26
7
- data.tar.gz: 3a558bf863bcc064820c899c95c2dd9f4287c8c75eeb56492ccdb46ca11d9cb7341a068e6c4b97fd4ee4630c869960cdb8c15bab0610cbe184f280c86957d0ef
6
+ metadata.gz: 94380f9dc0658562320350a1422724d6855a51d882c8e9eacb3affce88fba98052e5adaea11a907eed0ceab4b82bcfbab4f2ebd0cb28deb92d63cc175351150d
7
+ data.tar.gz: 63b7e5562d9997c0a91f3a055cb645d856a998ea1f7d3c6c9799d874566f0687276167b26181dac74fa6554972b8e529c0b3803af612e07d280005d2e5a25619
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- thrifty_file_applier (0.1.3)
4
+ thrifty_file_applier (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ThriftyFileApplier
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
@@ -50,11 +50,7 @@ module ThriftyFileApplier
50
50
  def last_update_time_in(path)
51
51
  return Time.at 0 unless path.exist?
52
52
 
53
- if path.directory? && path.children.size.positive?
54
- newest_mtime path
55
- else
56
- path.mtime
57
- end
53
+ newest_mtime path
58
54
  end
59
55
 
60
56
  def last_execution_time
@@ -67,8 +63,11 @@ module ThriftyFileApplier
67
63
  end
68
64
 
69
65
  def newest_mtime(path)
70
- path.each_child
71
- .map { File.mtime(_1) }
66
+ return path.mtime if !path.directory? ||
67
+ (path.directory? && path.children.size.zero?)
68
+
69
+ path.children
70
+ .map { newest_mtime(_1) }
72
71
  .max
73
72
  end
74
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thrifty_file_applier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yudai Tanaka