snapshot_archive 0.16.0 → 0.18.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: 6e85e9702884bba227f834ba3ca4c7d347803bd063b245d22b85bae0808285b4
4
- data.tar.gz: f961470cf8cf6f94be884bb5a52962088cacd6d0c6905685381c295ec0cfaeea
3
+ metadata.gz: 5ab6c5f3227409541f5e84472355b4294413a5074d6b9b90042e4c37bd6990b3
4
+ data.tar.gz: 49a0bfb40395b586976a9e61d24584b874c29aa9d34a1c6a0d92214bc6bb5af7
5
5
  SHA512:
6
- metadata.gz: dc227fea293c769b9af048f23eeb98e4bcfe95a109ec8608a9f06a58576a76cafe3c9004cceb73181c3cf701c0026769c008141bc4c7e08b0f31cfad093c7497
7
- data.tar.gz: 639891a32eff28125d49c070a8cd4251046cb01230c4f672d5cc27370b0d923e7aebef7903590c48639f97340cd7b2d0e1e0e56ef68d4220baf499f522573dc1
6
+ metadata.gz: 0e4915590bcb1db0c17d2d79a19dc90e06d54357b175cdfdce97120ca2c290068eef50c21767bb158cd5c324f386aa77fda7c9a4fe6b5f5d279c9150cda6bb7b
7
+ data.tar.gz: ee565bed9843a017dd8ee3fc3f044699c93087e6a7d5354ba934e773ff0cc203948408b89d2178240ec273cf70879611c7279ed93e7d83ba38b58016d28b1110
@@ -62,7 +62,7 @@ module SnapshotArchive
62
62
  metadata.fetch("stores").each do |store_metadata|
63
63
  store = Cfg.instance.store(store_metadata.fetch("type"))
64
64
  if store.respond_to?(:delete)
65
- store.delete(store_metadata)
65
+ store.delete(metadata: store_metadata)
66
66
  end
67
67
  end
68
68
  end
@@ -67,9 +67,9 @@ module SnapshotArchive
67
67
  end
68
68
 
69
69
  def delete(id)
70
- md_path = File.read(File.join(path, id, "metadata.json"))
70
+ md_path = File.join(path, id, "metadata.json")
71
71
  raise ArgumentError.new("unknown snapshot: #{id}") unless File.exist?(md_path)
72
- metadata = JSON.parse(md_path)
72
+ metadata = JSON.parse(File.read(md_path))
73
73
 
74
74
  Cfg.shell.info("Running delete hooks: #{id}")
75
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.16.0"
4
+ VERSION = "0.18.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.16.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Kinnecom