litestream 0.5.5-x86_64-linux → 0.6.0-x86_64-linux

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: 648805a3cffb477ea03431e8c2732d4d720535d89c025c32984d0f84208f7b4e
4
- data.tar.gz: '058d838e90983b0a5c6ededcba5a8f7f6a8dd8e394ff41867256bf7140612178'
3
+ metadata.gz: 7eb881ff50053fb9bd6f426a2266a8b4234e1f782cbe716b2f3bcc7a34c87ed4
4
+ data.tar.gz: ed2bf4087f36d6148955f434cbe22649fa477540502ae733fb33daad6606b8c0
5
5
  SHA512:
6
- metadata.gz: 1ec46d29aee555a7d172cb8085920bf4935d5f4cc887d247498f27217c6be50021ab8866d67e942f8ff837088580ef9c938a399dc012b4ac1b33bc4db48f5a84
7
- data.tar.gz: bc9e0fbdf41d79dbba29e43ab3b50c031edea6bf9f4b0fe63892968e3fa355ef2249940c95110a8d2b56369836ebcb76c2e30a17ed64ccb3f652f8cc4fd5851a
6
+ metadata.gz: 90af11f5fc279c7b6e61c55f40a17f9c1e72a7e8edd4fed6d6929e7d46a6695bd4770880c288420d11dc1ece67f4c1a0abaebe06ff22b8fb4ee5feac173e6f0a
7
+ data.tar.gz: 27580dfa663cece6a956e5b18f069d615bbbd2f337e0637f6fc472f701f84bd0d8b04b817d02b403fe2f54e7c5ffa2f490db0ac105f9dacec6679a5aad831cc7
@@ -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: x86_64-linux
6
6
  authors:
7
7
  - Stephen Margheim