snapshot_archive 0.15.0 → 0.16.0

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: 2101a4e57a0fb12ea5f1ad776ff655cbaf243ef925ad1c9776bff513c1d43ba6
4
- data.tar.gz: 559d50debc8b3b5ddaafc8a6e7143535799a9c3aee97b1f91ccebe388346ec51
3
+ metadata.gz: 6e85e9702884bba227f834ba3ca4c7d347803bd063b245d22b85bae0808285b4
4
+ data.tar.gz: f961470cf8cf6f94be884bb5a52962088cacd6d0c6905685381c295ec0cfaeea
5
5
  SHA512:
6
- metadata.gz: 9986ea730b81f33751a3b5fb6ac1a665c8c598d88383f20fd4742422d63e510f54316f82059d38bea2c91bfe4f0568a1ccedba62278e6b8e44ae2b23e4402f20
7
- data.tar.gz: 2d2b9e2be0bb3934ee5347302452812b818e1e8278e1da0cb96be0b449814208f0fec346e3ff86cb0922aa5992e2c1b317f9b51d34b121052cb6d100361df87f
6
+ metadata.gz: dc227fea293c769b9af048f23eeb98e4bcfe95a109ec8608a9f06a58576a76cafe3c9004cceb73181c3cf701c0026769c008141bc4c7e08b0f31cfad093c7497
7
+ data.tar.gz: 639891a32eff28125d49c070a8cd4251046cb01230c4f672d5cc27370b0d923e7aebef7903590c48639f97340cd7b2d0e1e0e56ef68d4220baf499f522573dc1
@@ -67,8 +67,9 @@ module SnapshotArchive
67
67
  end
68
68
 
69
69
  def delete(id)
70
- metadata = JSON.parse(File.read(File.join(path, id, "metadata.json")))
71
- raise ArgumentError.new("unknown snapshot: #{id}") unless File.exist?(metadata)
70
+ md_path = File.read(File.join(path, id, "metadata.json"))
71
+ raise ArgumentError.new("unknown snapshot: #{id}") unless File.exist?(md_path)
72
+ metadata = JSON.parse(md_path)
72
73
 
73
74
  Cfg.shell.info("Running delete hooks: #{id}")
74
75
  Archives::Delete.call(metadata.dig("archive"))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SnapshotArchive
4
- VERSION = "0.15.0"
4
+ VERSION = "0.16.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapshot_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Kinnecom