litestream 0.5.5-arm64-darwin → 0.6.0-arm64-darwin

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: f4a5c5ae7fdeb51f926aa3d7e75310dac1f3b8cc9d4fb462d37cbb0135e1ad05
4
- data.tar.gz: e12caf009c5915e769b185638d4b3dae3a52ea7922711512f1203b984b1424fb
3
+ metadata.gz: 10b81241fd9899e8f5754d918117c11a7e0ca7c608885beb2e02050d33982816
4
+ data.tar.gz: 5e8e54ab1295285b5feec0c5da6d411cddd16193db58ef9af70d7c9cb8c907c8
5
5
  SHA512:
6
- metadata.gz: d415cd48549eb62928c83fcfbb845fc4ef248fd5f23b2ed98afed2b0a84bfa61a8a3766146c4965b6188a06d197242c45dac370644a466927c961113a36b680d
7
- data.tar.gz: 8f02d3d01c8cc5e703238dc2c8c8ba7a881b42daae13da13f540a21961ce0ecc45756981ee9739b8f12e2313bccc92559c6d5de31f9a3e84719fb52e54b80948
6
+ metadata.gz: 89894bc3bdd5e88a86bd005eb13dc1b2dcd6b5322b6b20d2e38e7f0daa156050261df64fdacd1164eadc3ca552be52314bd3633320811f503429b529e0e78df6
7
+ data.tar.gz: e6db3d75cb2abd4ae490bb09c436493cf97656722d071187c6549f35ba72a5d5406b506d349ddc78222213dc3ae61c2747cf3033caa2681a3f6dc3960a8bab28
@@ -82,26 +82,27 @@ module Litestream
82
82
 
83
83
  def restore(database, async: false, **argv)
84
84
  raise DatabaseRequiredException, "database argument is required for restore command, e.g. litestream:restore -- --database=path/to/database.sqlite" if database.nil?
85
+ argv.stringify_keys!
86
+
87
+ execute("restore", argv, database, async: async, hashify: false)
88
+
89
+ argv["-o"] || database
90
+ end
91
+
92
+ def verify(database, async: false, **argv)
93
+ raise DatabaseRequiredException, "database argument is required for verify command, e.g. litestream:verify -- --database=path/to/database.sqlite" if database.nil? || !File.exist?(database)
94
+ argv.stringify_keys!
85
95
 
86
96
  dir, file = File.split(database)
87
97
  ext = File.extname(file)
88
98
  base = File.basename(file, ext)
89
99
  now = Time.now.utc.strftime("%Y%m%d%H%M%S")
90
100
  backup = File.join(dir, "#{base}-#{now}#{ext}")
91
-
92
101
  args = {
93
102
  "-o" => backup
94
103
  }.merge(argv)
95
104
 
96
- execute("restore", args, database, async: async, hashify: false)
97
-
98
- backup
99
- end
100
-
101
- def verify(database, async: false, **argv)
102
- raise DatabaseRequiredException, "database argument is required for verify command, e.g. litestream:verify -- --database=path/to/database.sqlite" if database.nil? || !File.exist?(database)
103
-
104
- backup = restore(database, async: false, **argv)
105
+ backup = restore(database, async: false, **args)
105
106
 
106
107
  raise BackupFailedException, "Failed to create backup for validation" unless File.exist?(backup)
107
108
 
@@ -1,5 +1,4 @@
1
1
  module Litestream
2
- # constants describing the upstream tailwindcss project
3
2
  module Upstream
4
3
  VERSION = "v0.3.13"
5
4
 
@@ -1,3 +1,3 @@
1
1
  module Litestream
2
- VERSION = "0.5.5"
2
+ VERSION = "0.6.0"
3
3
  end
@@ -97,14 +97,14 @@ namespace :litestream do
97
97
  puts <<~TXT if result
98
98
 
99
99
  size
100
- original #{result[:size][:original]}
101
- restored #{result[:size][:restored]}
102
- delta #{result[:size][:original] - result[:size][:restored]}
100
+ original #{result["size"]["original"]}
101
+ restored #{result["size"]["restored"]}
102
+ delta #{result["size"]["original"] - result["size"]["restored"]}
103
103
 
104
104
  tables
105
- original #{result[:tables][:original]}
106
- restored #{result[:tables][:restored]}
107
- delta #{result[:tables][:original] - result[:tables][:restored]}
105
+ original #{result["tables"]["original"]}
106
+ restored #{result["tables"]["restored"]}
107
+ delta #{result["tables"]["original"] - result["tables"]["restored"]}
108
108
  TXT
109
109
  end
110
110
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: litestream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.6.0
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Stephen Margheim