litestream 0.5.5-x86_64-darwin → 0.6.0-x86_64-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: 9701c394feffc41856c8d3eca0be99b46e62f060364aa6528e4b846b580a8dcd
4
- data.tar.gz: 496356e06e47836728df8c544e5a3fc99c362bec14513a30a2ef3e37e6c091aa
3
+ metadata.gz: 2f1eb2bab212bb5bc65bace83d1b9d529e5a12bdbd239c4f7682e6e7cb25f469
4
+ data.tar.gz: 2ef146420dede9306f234aa4e5ceba9dfbf54a3dc4bf4d3da8105b5e1efc02fd
5
5
  SHA512:
6
- metadata.gz: 14013166c35a2693cec923a725d6dd475c3014ac34777ad7ea85ee30ca45c1d6d81ca27d1a694f762a7065f607ba310fb5979ba1c9b706d6a0ae4fbb280b842b
7
- data.tar.gz: b2c7978d65d8e9315118aff425008431223160be85daad121cfb480868e2cfdfeadf8195bcff73a03976ac32b556fdefab4714b9c1e5bc436af9632f22cd19d5
6
+ metadata.gz: 658408fabff862b286b2deabdc8d70168d4f271c5a61f18b0c452f5cd689dd9875607f938ed624c4870eff76058be0ec5b5dfe7194b8c89fc3f9515479cb76cd
7
+ data.tar.gz: 7dead1f3dbee576dbe99675584e38ef2623270fa5e3465d8aef808165a114aced962e776d84b3d5580b3b3765820d7fecd7fa8666914d2cee76ebd9ec92680e7
@@ -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-darwin
6
6
  authors:
7
7
  - Stephen Margheim