rbbt-util 5.19.4 → 5.19.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/persist.rb +1 -0
- data/lib/rbbt/util/misc/lock.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd3d4ff5f05b6734ae126c4dfeb8827579d0220e
|
4
|
+
data.tar.gz: ce5286f2164fecbf3227f181cf5ce0a4db3e52eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34629b144ed7e6728259d0bf3ea3a02ca05d72472e04fcae4a7e00e5fe99e7977baec58a7cdad42c42e89a5732e1d54a0777944e6b8c7caf80402fbe3e1b2f73
|
7
|
+
data.tar.gz: 20aadfe7a744c2586df1dca7c9152b6afc2ca0bb9a2897eaa981dfd8092ffb5a9be265921f4c5f2cfa834736a32c9ef5a87a9ae99322fac0017818d25380428b
|
data/lib/rbbt/persist.rb
CHANGED
@@ -288,6 +288,7 @@ module Persist
|
|
288
288
|
lock_options = Misc.pull_keys persist_options, :lock
|
289
289
|
lock_options = lock_options[:lock] if Hash === lock_options[:lock]
|
290
290
|
Misc.lock lock_filename, lock_options do |lockfile|
|
291
|
+
iii lockfile
|
291
292
|
Misc.insist do
|
292
293
|
if is_persisted?(path, persist_options)
|
293
294
|
Log.low "Persist up-to-date (suddenly): #{ path } - #{Misc.fingerprint persist_options}"
|
data/lib/rbbt/util/misc/lock.rb
CHANGED
@@ -22,7 +22,8 @@ module Misc
|
|
22
22
|
unlock, options = true, unlock if Hash === unlock
|
23
23
|
return yield if file.nil? and not Lockfile === options[:lock]
|
24
24
|
|
25
|
-
|
25
|
+
file = file.find if Path === file
|
26
|
+
FileUtils.mkdir_p File.dirname(File.expand_path(file)) unless File.exists? File.dirname(File.expand_path(file))
|
26
27
|
|
27
28
|
|
28
29
|
case options[:lock]
|
@@ -33,7 +34,7 @@ module Misc
|
|
33
34
|
lockfile = nil
|
34
35
|
unlock = false
|
35
36
|
when Path, String
|
36
|
-
lock_path = options[:lock]
|
37
|
+
lock_path = options[:lock].find
|
37
38
|
lockfile = Lockfile.new(lock_path, options)
|
38
39
|
lockfile.lock
|
39
40
|
else
|