snapshot_archive 0.14.0 → 0.15.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: 980e40563a31fda449526df407ff72c4a6e5ffdbd6f0e0cff9b69eab414fa195
4
- data.tar.gz: e7582633c0c5e9d9d5811da112dc49ee66d5556eb1773c633434a8872e96deb2
3
+ metadata.gz: 2101a4e57a0fb12ea5f1ad776ff655cbaf243ef925ad1c9776bff513c1d43ba6
4
+ data.tar.gz: 559d50debc8b3b5ddaafc8a6e7143535799a9c3aee97b1f91ccebe388346ec51
5
5
  SHA512:
6
- metadata.gz: 265c065142b8d3db6048623456394dda63fd03172e5a53dd22551c389296228a56c762d66612a67b4edfcdb9606a263f41a32fe1722c515f9fc37fe5ba169da9
7
- data.tar.gz: 9192e94cb6a62bda59a0b21c393cd080e8ce829bb2244a71fbdd21daea4299d5c6392974bd9078f3d4a7ab2b811cccb7fdbf9e8a54be485087ec13f906773ea0
6
+ metadata.gz: 9986ea730b81f33751a3b5fb6ac1a665c8c598d88383f20fd4742422d63e510f54316f82059d38bea2c91bfe4f0568a1ccedba62278e6b8e44ae2b23e4402f20
7
+ data.tar.gz: 2d2b9e2be0bb3934ee5347302452812b818e1e8278e1da0cb96be0b449814208f0fec346e3ff86cb0922aa5992e2c1b317f9b51d34b121052cb6d100361df87f
data/README.md CHANGED
@@ -130,7 +130,7 @@ SnapshotArchive.configure do |config|
130
130
  # Using an object:
131
131
 
132
132
  class MyCustomStore
133
- def backup(dir:, id:, args: [])
133
+ def backup(dir:, id:, name:, args: [])
134
134
  path = File.join(dir, "my_custom_store.txt")
135
135
  File.write(path, "received args: #{args}")
136
136
 
@@ -148,7 +148,7 @@ SnapshotArchive.configure do |config|
148
148
  # Using the store builder:
149
149
 
150
150
  config.register_store("my_custom_store") do |store|
151
- store.backup do |dir:, id:, args: []|
151
+ store.backup do |dir:, id:, name:, args: []|
152
152
  path = File.join(dir, "my_custom_store.txt")
153
153
  File.write(path, "received args: #{args}")
154
154
 
@@ -19,7 +19,7 @@ module SnapshotArchive
19
19
  File
20
20
  .join(dir, name)
21
21
  .tap { FileUtils.mkdir(_1) }
22
- .then { store.backup(dir: _1, id: id)&.merge(type: name) }
22
+ .then { store.backup(dir: _1, id: id, name: name)&.merge(type: name) }
23
23
  }
24
24
  .compact
25
25
  )
@@ -9,8 +9,8 @@ module SnapshotArchive
9
9
  @args = args
10
10
  end
11
11
 
12
- def backup(dir:, id:)
13
- store.backup(dir: dir, id: id, args: args)
12
+ def backup(**opts)
13
+ store.backup(args: args, **opts)
14
14
  end
15
15
 
16
16
  def restore(...)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SnapshotArchive
4
- VERSION = "0.14.0"
4
+ VERSION = "0.15.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.14.0
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Kinnecom