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 +4 -4
- data/lib/snapshot_archive/archives.rb +1 -1
- data/lib/snapshot_archive/repositories.rb +2 -2
- data/lib/snapshot_archive/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ab6c5f3227409541f5e84472355b4294413a5074d6b9b90042e4c37bd6990b3
|
4
|
+
data.tar.gz: 49a0bfb40395b586976a9e61d24584b874c29aa9d34a1c6a0d92214bc6bb5af7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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"))
|