cache_box 0.0.1.pre.preview4 → 0.0.1.pre.preview5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/cache_box.gemspec +1 -1
  3. data/lib/cache_box.rb +7 -8
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e7a45edfdfa06cb3d977c5329ac5510a4c5a9a8baa56246f74afe7c33ec5f987
4
- data.tar.gz: fbfca06a3ec00307db2e79428f38e8ba2b92b70853ad8df067c39cb916430664
3
+ metadata.gz: e2696a6649dcad9e95fd86414bda8423a5616be25bf26d305a453f2b51e451b6
4
+ data.tar.gz: fa0a66aa95e7fe7f22cfd4b432f17fd7f6fb803ad48ad4c867a0069da511ff21
5
5
  SHA512:
6
- metadata.gz: 357b4f7e1a1792adf8366b97e58048b2acd102d3d6fbf5628f57eceb89e336ebbbad50d8dab335d34a15b1e88458c73e6c502542a6005c7549233a0e154c1c96
7
- data.tar.gz: 9fad5c9ee9fa09ee7688904d7e03e1d4fd30c10229b2401ff711cf24437c51e30653d60dcaef30722199ff60c8e23cd42aaeb159d13e7e4baec4c7d359f5c31e
6
+ metadata.gz: 187afed6548e4184dd5b8468f4f12bc4de6a7ded494e17dca21429097054c9b57f362a4ad4ddc0e07e849f95c61641826b8f4920417791da6d22e59c063f5eea
7
+ data.tar.gz: c0a15319d4d63e135d216fe50cefc4256ccb0b465d642a7595b75c021733fee554c45d704cc3ecfe2d18f819e887c268fcaa9557d2ae1b59df110253f5b7d895
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'cache_box'
5
- spec.version = '0.0.1-preview4'
5
+ spec.version = '0.0.1-preview5'
6
6
  spec.authors = ['Codruț Constantin Gușoi']
7
7
  spec.email = ['codrut.gusoi+git-commit@gmail.com']
8
8
 
@@ -159,9 +159,9 @@ class CacheBox
159
159
  if File.exist?(file)
160
160
  data = Marshal.load(File.read(file))
161
161
 
162
- @state[:complete][name] = data[:complete]
163
- @state[:result][name] = data[:result]
164
- @state[:storage][name] = data[:storage] unless data[:complete]
162
+ @state[:complete][name] = data[:complete] if data.key?(:complete)
163
+ @state[:result][name] = data[:result] if data.key?(:result)
164
+ @state[:storage][name] = data[:storage] if data.key?(:storage)
165
165
  end
166
166
  end
167
167
 
@@ -183,11 +183,10 @@ class CacheBox
183
183
  #
184
184
  # Output: N/A
185
185
  def store!(name, file)
186
- data = {
187
- complete: @state[:complete][name],
188
- result: @state[:result][name],
189
- }
190
- data[:storage] = @state[:storage][name] unless @state[:complete][name]
186
+ data = {}
187
+ data[:complete] = @state[:complete][name] if @state[:complete][name]
188
+ data[:result] = @state[:result][name] if @state[:result][name]
189
+ data[:storage] = @state[:storage][name] if @state[:complete][name]
191
190
 
192
191
  content = Marshal.dump(data)
193
192
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cache_box
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1.pre.preview4
4
+ version: 0.0.1.pre.preview5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codruț Constantin Gușoi