gitlab-client-cache 0.0.7 → 0.0.8

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: 999178d96e82fa7361f4b53ac02ea117a76f0e715f86fc2304079459982d5fbc
4
- data.tar.gz: 0b46a658ecd634397f139cb9bf8f03796622c7a359f53d3913b0750d38372a61
3
+ metadata.gz: 9b0e82dfc66ede983af9394fcd775e1fd5b1bd2449c3142b2424e321ca912ba9
4
+ data.tar.gz: 56091a27ca44807c8ccfcc5ac5452c324bb0990e95a32d1585a7b5f5853c9117
5
5
  SHA512:
6
- metadata.gz: b2353df47081425afa586134a46f2c43be5ee621ec4e21409cac10f40b7e82ec565cbde24b84ed0f1e18d329909fc2475e69160979d707aa7681054adfe15bdf
7
- data.tar.gz: 0614f2fc366d1136e282782aaae0cf849584682e988cb4b09792ba9c69f39f5be58e425cfebb4bcdd0bdde52e041fa4554eec7ac8ec2339d47be31add073b2c0
6
+ metadata.gz: 418150f965dcabfaa90855fca348f5399ab0fa15d014e26493eacefe5199e9265104edf43eab99fd7cf948333562e4c39646b0f948545523bc3125eb0f1d6bea
7
+ data.tar.gz: fcebb8176e19624554ea146860634d24a190817e5be70acd27e3a04218c8b43cee981e5b6744dd9bced5d8651858be0272688b22b9afb2d898d571ab0598ed78
@@ -69,6 +69,13 @@ class Gitlab::Client::Cache::Caching
69
69
  return if result == :skip_caching
70
70
 
71
71
  path.dirname.mkpath
72
+
73
+ content = deflate(Marshal.dump(result))
74
+ # Write atomatically
75
+ temp = path.sub_ext(".#{rand(2 << 32)}")
76
+ temp.write(content)
77
+ temp.rename(path)
78
+
72
79
  path.write(deflate(Marshal.dump(value)))
73
80
  end
74
81
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GitlabClientCache
4
- VERSION = "0.0.7"
4
+ VERSION = "0.0.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-client-cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Leitzen