snapshot_archive 0.1.0 → 0.5.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: 4da07dc7efc8fc705adf5c30458fc478990ce8becbb21341929532726bfcf866
4
- data.tar.gz: 55ab36863f972707168fd6a9f4066dae5f63502a29f88d8ab7e0fc3ca14eb905
3
+ metadata.gz: c72888304530ecfac2227fce9eb2698273c8347812e11b69d7b2c0aac9ec306d
4
+ data.tar.gz: f4d008a447a1a51d70b7cffe66e94aa4d08c3d50ab23eefb111ed495de7913b3
5
5
  SHA512:
6
- metadata.gz: 8758443c01473fa6111e37cba9cc4963e9e68470d4b8a352c9df11a4d0e36254cd65ec7b6fe3415ba471b2554da9384211734096fb704d27a25095714bd4611f
7
- data.tar.gz: 79aca3b6538fe7e57ff2147fbcb0bd734d28ff3bb1b2e4f879c11e8e532f62cf3d8bdc7ac5f3d3f299dc8bd6a7de4c7fff5abd4c1878c9d475ead5cab227c824
6
+ metadata.gz: b336220dacb18e3fb5baf2d54ef4bc2c1cf51af03cc4990acbba58dc6c883ad8d9898305d65924335a08040f536a26e1401ca80f038266009f4598ffe10125c9
7
+ data.tar.gz: d305586dfa5669d60909a9703490f77eb64fb544035424c4c10668cbf1e926f9001c24cc6690d98f15fa2f50a0da76bfbc09116d873007d62fefebe9cf6374ef
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snapshot_archive (0.1.0)
4
+ snapshot_archive (0.5.0)
5
5
  commander (~> 4.5)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -133,7 +133,7 @@ SnapshotArchive.configure do |config|
133
133
 
134
134
  # Using the store builder:
135
135
 
136
- config.register_store("my_customer_store") do |store|
136
+ config.register_store("my_custom_store") do |store|
137
137
  store.backup do |dir, args=[]|
138
138
  path = File.join(dir, "my_custom_store.txt")
139
139
  File.write(path, "received args: #{args}")
data/exe/snap CHANGED
@@ -23,6 +23,7 @@ module SnapshotArchive
23
23
 
24
24
  command(:backup) do |c|
25
25
  c.syntax = "snap backup [store(s)]"
26
+ c.summary = "Save a snapshot that can be restored later"
26
27
  c.description = <<~TXT
27
28
  Save a snapshot that can be restored later.
28
29
 
@@ -44,6 +44,7 @@ module SnapshotArchive
44
44
  :pwd,
45
45
  :repository,
46
46
  :shell,
47
+ :store,
47
48
  :stores,
48
49
  ].each do |meth|
49
50
  define_method(meth) do |*args|
@@ -26,11 +26,11 @@ SnapshotArchive.configure do |config|
26
26
 
27
27
  next if db_names.empty?
28
28
 
29
- Cfg.bind_backup("mysql", db_names).backup(dir)
29
+ SnapshotArchive::Cfg.bind_backup("mysql", db_names).backup(dir)
30
30
  end
31
31
 
32
32
  store.restore do |metadata|
33
- Cfg.store("mysql").restore(metadata)
33
+ SnapshotArchive::Cfg.store("mysql").restore(metadata)
34
34
  end
35
35
  end
36
36
 
@@ -42,6 +42,9 @@ module SnapshotArchive
42
42
  path: #{dir}
43
43
  ----------------------
44
44
  #{message}
45
+
46
+ Full metadata:
47
+ #{JSON.pretty_generate(metadata.dig("archive", "stores"))}
45
48
  TXT
46
49
  end
47
50
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SnapshotArchive
4
- VERSION = "0.1.0"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snapshot_archive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Kinnecom
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-15 00:00:00.000000000 Z
11
+ date: 2022-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander