Skip to content

Commit 2aec3b1

Browse files
committed
fix: split async and sync commands
1 parent 050dd48 commit 2aec3b1

File tree

9 files changed

+267
-218
lines changed

9 files changed

+267
-218
lines changed

.standard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# For available configuration options, see:
22
# https://github.com/testdouble/standard
3-
ruby_version: 2.6
3+
ruby_version: 3.0

Gemfile.lock

Lines changed: 86 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -6,109 +6,107 @@ PATH
66
actionview (>= 7.0)
77
activejob (>= 7.0)
88
activesupport (>= 7.0)
9-
logfmt (>= 0.0.10)
109
railties (>= 7.0)
1110
sqlite3
1211

1312
GEM
1413
remote: https://rubygems.org/
1514
specs:
16-
actioncable (7.1.3.2)
17-
actionpack (= 7.1.3.2)
18-
activesupport (= 7.1.3.2)
15+
actioncable (8.0.2)
16+
actionpack (= 8.0.2)
17+
activesupport (= 8.0.2)
1918
nio4r (~> 2.0)
2019
websocket-driver (>= 0.6.1)
2120
zeitwerk (~> 2.6)
22-
actionmailbox (7.1.3.2)
23-
actionpack (= 7.1.3.2)
24-
activejob (= 7.1.3.2)
25-
activerecord (= 7.1.3.2)
26-
activestorage (= 7.1.3.2)
27-
activesupport (= 7.1.3.2)
28-
mail (>= 2.7.1)
29-
net-imap
30-
net-pop
31-
net-smtp
32-
actionmailer (7.1.3.2)
33-
actionpack (= 7.1.3.2)
34-
actionview (= 7.1.3.2)
35-
activejob (= 7.1.3.2)
36-
activesupport (= 7.1.3.2)
37-
mail (~> 2.5, >= 2.5.4)
38-
net-imap
39-
net-pop
40-
net-smtp
21+
actionmailbox (8.0.2)
22+
actionpack (= 8.0.2)
23+
activejob (= 8.0.2)
24+
activerecord (= 8.0.2)
25+
activestorage (= 8.0.2)
26+
activesupport (= 8.0.2)
27+
mail (>= 2.8.0)
28+
actionmailer (8.0.2)
29+
actionpack (= 8.0.2)
30+
actionview (= 8.0.2)
31+
activejob (= 8.0.2)
32+
activesupport (= 8.0.2)
33+
mail (>= 2.8.0)
4134
rails-dom-testing (~> 2.2)
42-
actionpack (7.1.3.2)
43-
actionview (= 7.1.3.2)
44-
activesupport (= 7.1.3.2)
35+
actionpack (8.0.2)
36+
actionview (= 8.0.2)
37+
activesupport (= 8.0.2)
4538
nokogiri (>= 1.8.5)
46-
racc
4739
rack (>= 2.2.4)
4840
rack-session (>= 1.0.1)
4941
rack-test (>= 0.6.3)
5042
rails-dom-testing (~> 2.2)
5143
rails-html-sanitizer (~> 1.6)
52-
actiontext (7.1.3.2)
53-
actionpack (= 7.1.3.2)
54-
activerecord (= 7.1.3.2)
55-
activestorage (= 7.1.3.2)
56-
activesupport (= 7.1.3.2)
44+
useragent (~> 0.16)
45+
actiontext (8.0.2)
46+
actionpack (= 8.0.2)
47+
activerecord (= 8.0.2)
48+
activestorage (= 8.0.2)
49+
activesupport (= 8.0.2)
5750
globalid (>= 0.6.0)
5851
nokogiri (>= 1.8.5)
59-
actionview (7.1.3.2)
60-
activesupport (= 7.1.3.2)
52+
actionview (8.0.2)
53+
activesupport (= 8.0.2)
6154
builder (~> 3.1)
6255
erubi (~> 1.11)
6356
rails-dom-testing (~> 2.2)
6457
rails-html-sanitizer (~> 1.6)
65-
activejob (7.1.3.2)
66-
activesupport (= 7.1.3.2)
58+
activejob (8.0.2)
59+
activesupport (= 8.0.2)
6760
globalid (>= 0.3.6)
68-
activemodel (7.1.3.2)
69-
activesupport (= 7.1.3.2)
70-
activerecord (7.1.3.2)
71-
activemodel (= 7.1.3.2)
72-
activesupport (= 7.1.3.2)
61+
activemodel (8.0.2)
62+
activesupport (= 8.0.2)
63+
activerecord (8.0.2)
64+
activemodel (= 8.0.2)
65+
activesupport (= 8.0.2)
7366
timeout (>= 0.4.0)
74-
activestorage (7.1.3.2)
75-
actionpack (= 7.1.3.2)
76-
activejob (= 7.1.3.2)
77-
activerecord (= 7.1.3.2)
78-
activesupport (= 7.1.3.2)
67+
activestorage (8.0.2)
68+
actionpack (= 8.0.2)
69+
activejob (= 8.0.2)
70+
activerecord (= 8.0.2)
71+
activesupport (= 8.0.2)
7972
marcel (~> 1.0)
80-
activesupport (7.1.3.2)
73+
activesupport (8.0.2)
8174
base64
75+
benchmark (>= 0.3)
8276
bigdecimal
83-
concurrent-ruby (~> 1.0, >= 1.0.2)
77+
concurrent-ruby (~> 1.0, >= 1.3.1)
8478
connection_pool (>= 2.2.5)
8579
drb
8680
i18n (>= 1.6, < 2)
81+
logger (>= 1.4.2)
8782
minitest (>= 5.1)
88-
mutex_m
89-
tzinfo (~> 2.0)
83+
securerandom (>= 0.3)
84+
tzinfo (~> 2.0, >= 2.0.5)
85+
uri (>= 0.13.1)
9086
ast (2.4.2)
9187
base64 (0.2.0)
88+
benchmark (0.4.0)
9289
bigdecimal (3.1.7)
9390
builder (3.2.4)
94-
concurrent-ruby (1.2.3)
91+
concurrent-ruby (1.3.5)
9592
connection_pool (2.4.1)
9693
crass (1.0.6)
97-
date (3.3.4)
94+
date (3.4.1)
9895
drb (2.2.1)
9996
erubi (1.12.0)
10097
globalid (1.2.1)
10198
activesupport (>= 6.1)
10299
i18n (1.14.4)
103100
concurrent-ruby (~> 1.0)
104101
io-console (0.7.2)
105-
irb (1.12.0)
106-
rdoc
102+
irb (1.15.2)
103+
pp (>= 0.6.0)
104+
rdoc (>= 4.0.0)
107105
reline (>= 0.4.2)
108106
json (2.7.2)
109107
language_server-protocol (3.17.0.3)
110108
lint_roller (1.1.0)
111-
logfmt (0.0.10)
109+
logger (1.7.0)
112110
loofah (2.22.0)
113111
crass (~> 1.0.2)
114112
nokogiri (>= 1.12.0)
@@ -120,25 +118,27 @@ GEM
120118
marcel (1.0.4)
121119
mini_mime (1.1.5)
122120
minitest (5.22.3)
123-
mutex_m (0.2.0)
124-
net-imap (0.4.10)
121+
net-imap (0.5.8)
125122
date
126123
net-protocol
127124
net-pop (0.1.2)
128125
net-protocol
129126
net-protocol (0.2.2)
130127
timeout
131-
net-smtp (0.5.0)
128+
net-smtp (0.5.1)
132129
net-protocol
133-
nio4r (2.7.1)
134-
nokogiri (1.16.4-arm64-darwin)
130+
nio4r (2.7.4)
131+
nokogiri (1.18.8-arm64-darwin)
135132
racc (~> 1.4)
136-
nokogiri (1.16.4-x86_64-linux)
133+
nokogiri (1.18.8-x86_64-linux-gnu)
137134
racc (~> 1.4)
138135
parallel (1.24.0)
139136
parser (3.3.0.5)
140137
ast (~> 2.4.1)
141138
racc
139+
pp (0.6.2)
140+
prettyprint
141+
prettyprint (0.2.0)
142142
psych (5.1.2)
143143
stringio
144144
racc (1.7.3)
@@ -150,31 +150,31 @@ GEM
150150
rackup (2.1.0)
151151
rack (>= 3)
152152
webrick (~> 1.8)
153-
rails (7.1.3.2)
154-
actioncable (= 7.1.3.2)
155-
actionmailbox (= 7.1.3.2)
156-
actionmailer (= 7.1.3.2)
157-
actionpack (= 7.1.3.2)
158-
actiontext (= 7.1.3.2)
159-
actionview (= 7.1.3.2)
160-
activejob (= 7.1.3.2)
161-
activemodel (= 7.1.3.2)
162-
activerecord (= 7.1.3.2)
163-
activestorage (= 7.1.3.2)
164-
activesupport (= 7.1.3.2)
153+
rails (8.0.2)
154+
actioncable (= 8.0.2)
155+
actionmailbox (= 8.0.2)
156+
actionmailer (= 8.0.2)
157+
actionpack (= 8.0.2)
158+
actiontext (= 8.0.2)
159+
actionview (= 8.0.2)
160+
activejob (= 8.0.2)
161+
activemodel (= 8.0.2)
162+
activerecord (= 8.0.2)
163+
activestorage (= 8.0.2)
164+
activesupport (= 8.0.2)
165165
bundler (>= 1.15.0)
166-
railties (= 7.1.3.2)
166+
railties (= 8.0.2)
167167
rails-dom-testing (2.2.0)
168168
activesupport (>= 5.0.0)
169169
minitest
170170
nokogiri (>= 1.6)
171171
rails-html-sanitizer (1.6.0)
172172
loofah (~> 2.21)
173173
nokogiri (~> 1.14)
174-
railties (7.1.3.2)
175-
actionpack (= 7.1.3.2)
176-
activesupport (= 7.1.3.2)
177-
irb
174+
railties (8.0.2)
175+
actionpack (= 8.0.2)
176+
activesupport (= 8.0.2)
177+
irb (~> 1.13)
178178
rackup (>= 1.0.0)
179179
rake (>= 12.2)
180180
thor (~> 1.0, >= 1.2.2)
@@ -205,8 +205,9 @@ GEM
205205
rubocop-ast (>= 1.30.0, < 2.0)
206206
ruby-progressbar (1.13.0)
207207
rubyzip (2.3.2)
208-
sqlite3 (1.7.3-arm64-darwin)
209-
sqlite3 (1.7.3-x86_64-linux)
208+
securerandom (0.4.1)
209+
sqlite3 (2.6.0-arm64-darwin)
210+
sqlite3 (2.6.0-x86_64-linux-gnu)
210211
standard (1.35.1)
211212
language_server-protocol (~> 3.17.0.2)
212213
lint_roller (~> 1.0)
@@ -221,12 +222,15 @@ GEM
221222
rubocop-performance (~> 1.20.2)
222223
stringio (3.1.0)
223224
thor (1.3.1)
224-
timeout (0.4.1)
225+
timeout (0.4.3)
225226
tzinfo (2.0.6)
226227
concurrent-ruby (~> 1.0)
227228
unicode-display_width (2.5.0)
229+
uri (1.0.3)
230+
useragent (0.16.11)
228231
webrick (1.8.1)
229-
websocket-driver (0.7.6)
232+
websocket-driver (0.8.0)
233+
base64
230234
websocket-extensions (>= 0.1.0)
231235
websocket-extensions (0.1.5)
232236
zeitwerk (2.6.13)
@@ -241,7 +245,6 @@ DEPENDENCIES
241245
rails
242246
rake (~> 13.0)
243247
rubyzip
244-
sqlite3
245248
standard (~> 1.3)
246249

247250
BUNDLED WITH

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ time=YYYY-MM-DDTHH:MM:SS level=INFO msg="replicating to" name=s3 type=s3 sync-in
493493

494494
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
495495

496-
To install this gem onto your local machine, run `bundle exec rake install`.
496+
To install this gem onto your local machine, run `bundle exec rake install`. To download the Litestream binaries run `bundle exec rake download`.
497497

498498
For maintainers, to release a new version, run `bin/release $VERSION`, which will create a git tag for the version, push git commits and tags, and push all of the platform-specific `.gem` files to [rubygems.org](https://rubygems.org).
499499

app/controllers/litestream/restorations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def create
99
now = Time.now.utc.strftime("%Y%m%d%H%M%S")
1010
backup = File.join(dir, "#{base}-#{now}#{ext}")
1111

12-
Litestream::Commands.restore(database, async: false, **{"-o" => backup})
12+
Litestream::Commands.restore(database, **{"-o" => backup})
1313

1414
redirect_to root_path, notice: "Restored to <code>#{backup}</code>."
1515
end

0 commit comments

Comments
 (0)