Skip to content

Commit 0db7029

Browse files
committed
chore: update to avo 0.5.0.beta1 (first hotwire release)
1 parent 2c41d26 commit 0db7029

23 files changed

+343
-204
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,7 @@ yarn-debug.log*
4040

4141
latest-avo
4242
avo-*.gem
43-
latest-avo.gem
43+
latest-avo.gem
44+
45+
public/avo-packs
46+
avo-components

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ gem 'aws-sdk-s3', require: false
6464

6565
gem 'dotenv-rails', groups: [ :development, :test ]
6666

67-
gem 'avo'
67+
gem 'avo', '~> 0.5.0.beta1'
6868

6969
gem 'newrelic_rpm'

Gemfile.lock

+93-79
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,78 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (6.0.3.4)
5-
actionpack (= 6.0.3.4)
4+
actioncable (6.0.3.5)
5+
actionpack (= 6.0.3.5)
66
nio4r (~> 2.0)
77
websocket-driver (>= 0.6.1)
8-
actionmailbox (6.0.3.4)
9-
actionpack (= 6.0.3.4)
10-
activejob (= 6.0.3.4)
11-
activerecord (= 6.0.3.4)
12-
activestorage (= 6.0.3.4)
13-
activesupport (= 6.0.3.4)
8+
actionmailbox (6.0.3.5)
9+
actionpack (= 6.0.3.5)
10+
activejob (= 6.0.3.5)
11+
activerecord (= 6.0.3.5)
12+
activestorage (= 6.0.3.5)
13+
activesupport (= 6.0.3.5)
1414
mail (>= 2.7.1)
15-
actionmailer (6.0.3.4)
16-
actionpack (= 6.0.3.4)
17-
actionview (= 6.0.3.4)
18-
activejob (= 6.0.3.4)
15+
actionmailer (6.0.3.5)
16+
actionpack (= 6.0.3.5)
17+
actionview (= 6.0.3.5)
18+
activejob (= 6.0.3.5)
1919
mail (~> 2.5, >= 2.5.4)
2020
rails-dom-testing (~> 2.0)
21-
actionpack (6.0.3.4)
22-
actionview (= 6.0.3.4)
23-
activesupport (= 6.0.3.4)
21+
actionpack (6.0.3.5)
22+
actionview (= 6.0.3.5)
23+
activesupport (= 6.0.3.5)
2424
rack (~> 2.0, >= 2.0.8)
2525
rack-test (>= 0.6.3)
2626
rails-dom-testing (~> 2.0)
2727
rails-html-sanitizer (~> 1.0, >= 1.2.0)
28-
actiontext (6.0.3.4)
29-
actionpack (= 6.0.3.4)
30-
activerecord (= 6.0.3.4)
31-
activestorage (= 6.0.3.4)
32-
activesupport (= 6.0.3.4)
28+
actiontext (6.0.3.5)
29+
actionpack (= 6.0.3.5)
30+
activerecord (= 6.0.3.5)
31+
activestorage (= 6.0.3.5)
32+
activesupport (= 6.0.3.5)
3333
nokogiri (>= 1.8.5)
34-
actionview (6.0.3.4)
35-
activesupport (= 6.0.3.4)
34+
actionview (6.0.3.5)
35+
activesupport (= 6.0.3.5)
3636
builder (~> 3.1)
3737
erubi (~> 1.4)
3838
rails-dom-testing (~> 2.0)
3939
rails-html-sanitizer (~> 1.1, >= 1.2.0)
40-
activejob (6.0.3.4)
41-
activesupport (= 6.0.3.4)
40+
active_link_to (1.0.5)
41+
actionpack
42+
addressable
43+
activejob (6.0.3.5)
44+
activesupport (= 6.0.3.5)
4245
globalid (>= 0.3.6)
43-
activemodel (6.0.3.4)
44-
activesupport (= 6.0.3.4)
45-
activerecord (6.0.3.4)
46-
activemodel (= 6.0.3.4)
47-
activesupport (= 6.0.3.4)
48-
activestorage (6.0.3.4)
49-
actionpack (= 6.0.3.4)
50-
activejob (= 6.0.3.4)
51-
activerecord (= 6.0.3.4)
46+
activemodel (6.0.3.5)
47+
activesupport (= 6.0.3.5)
48+
activerecord (6.0.3.5)
49+
activemodel (= 6.0.3.5)
50+
activesupport (= 6.0.3.5)
51+
activestorage (6.0.3.5)
52+
actionpack (= 6.0.3.5)
53+
activejob (= 6.0.3.5)
54+
activerecord (= 6.0.3.5)
5255
marcel (~> 0.3.1)
53-
activesupport (6.0.3.4)
56+
activesupport (6.0.3.5)
5457
concurrent-ruby (~> 1.0, >= 1.0.2)
5558
i18n (>= 0.7, < 2)
5659
minitest (~> 5.1)
5760
tzinfo (~> 1.1)
5861
zeitwerk (~> 2.2, >= 2.2.2)
5962
addressable (2.7.0)
6063
public_suffix (>= 2.0.2, < 5.0)
61-
avo (0.4.2)
64+
avo (0.5.0.beta1)
65+
active_link_to
6266
countries
67+
hotwire-rails
6368
httparty
6469
i18n-js
70+
image_processing
6571
inline_svg
66-
kaminari
72+
pagy
6773
pundit
6874
rails (>= 6.0)
75+
view_component
6976
webpacker
7077
zeitwerk
7178
aws-eventstream (1.1.0)
@@ -99,7 +106,7 @@ GEM
99106
regexp_parser (~> 1.5)
100107
xpath (~> 3.2)
101108
childprocess (3.0.0)
102-
concurrent-ruby (1.1.7)
109+
concurrent-ruby (1.1.8)
103110
countries (3.0.1)
104111
i18n_data (~> 0.10.0)
105112
sixarm_ruby_unaccent (~> 1.1)
@@ -126,36 +133,31 @@ GEM
126133
ffi (1.13.1)
127134
globalid (0.4.2)
128135
activesupport (>= 4.2.0)
136+
hotwire-rails (0.1.3)
137+
rails (>= 6.0.0)
138+
stimulus-rails
139+
turbo-rails
129140
httparty (0.18.1)
130141
mime-types (~> 3.0)
131142
multi_xml (>= 0.5.2)
132-
i18n (1.8.5)
143+
i18n (1.8.9)
133144
concurrent-ruby (~> 1.0)
134-
i18n-js (3.8.0)
145+
i18n-js (3.8.1)
135146
i18n (>= 0.6.6)
136147
i18n_data (0.10.0)
137-
inline_svg (1.7.1)
148+
image_processing (1.12.1)
149+
mini_magick (>= 4.9.5, < 5)
150+
ruby-vips (>= 2.0.17, < 3)
151+
inline_svg (1.7.2)
138152
activesupport (>= 3.0)
139153
nokogiri (>= 1.6)
140154
jbuilder (2.10.1)
141155
activesupport (>= 5.0.0)
142156
jmespath (1.4.0)
143-
kaminari (1.2.1)
144-
activesupport (>= 4.1.0)
145-
kaminari-actionview (= 1.2.1)
146-
kaminari-activerecord (= 1.2.1)
147-
kaminari-core (= 1.2.1)
148-
kaminari-actionview (1.2.1)
149-
actionview
150-
kaminari-core (= 1.2.1)
151-
kaminari-activerecord (1.2.1)
152-
activerecord
153-
kaminari-core (= 1.2.1)
154-
kaminari-core (1.2.1)
155157
listen (3.2.1)
156158
rb-fsevent (~> 0.10, >= 0.10.3)
157159
rb-inotify (~> 0.9, >= 0.9.10)
158-
loofah (2.8.0)
160+
loofah (2.9.0)
159161
crass (~> 1.0.2)
160162
nokogiri (>= 1.5.9)
161163
mail (2.7.1)
@@ -165,63 +167,69 @@ GEM
165167
method_source (1.0.0)
166168
mime-types (3.3.1)
167169
mime-types-data (~> 3.2015)
168-
mime-types-data (3.2020.1104)
170+
mime-types-data (3.2021.0225)
169171
mimemagic (0.3.5)
172+
mini_magick (4.11.0)
170173
mini_mime (1.0.2)
171-
mini_portile2 (2.4.0)
172-
minitest (5.14.2)
174+
mini_portile2 (2.5.0)
175+
minitest (5.14.4)
173176
msgpack (1.3.3)
174177
multi_xml (0.6.0)
175178
newrelic_rpm (6.15.0)
176-
nio4r (2.5.4)
177-
nokogiri (1.10.10)
178-
mini_portile2 (~> 2.4.0)
179+
nio4r (2.5.7)
180+
nokogiri (1.11.1)
181+
mini_portile2 (~> 2.5.0)
182+
racc (~> 1.4)
179183
orm_adapter (0.5.0)
184+
pagy (3.11.0)
180185
pg (1.2.3)
181186
public_suffix (4.0.6)
182187
puma (4.3.6)
183188
nio4r (~> 2.0)
184189
pundit (2.1.0)
185190
activesupport (>= 3.0.0)
191+
racc (1.5.2)
186192
rack (2.2.3)
187193
rack-proxy (0.6.5)
188194
rack
189195
rack-test (1.1.0)
190196
rack (>= 1.0, < 3)
191-
rails (6.0.3.4)
192-
actioncable (= 6.0.3.4)
193-
actionmailbox (= 6.0.3.4)
194-
actionmailer (= 6.0.3.4)
195-
actionpack (= 6.0.3.4)
196-
actiontext (= 6.0.3.4)
197-
actionview (= 6.0.3.4)
198-
activejob (= 6.0.3.4)
199-
activemodel (= 6.0.3.4)
200-
activerecord (= 6.0.3.4)
201-
activestorage (= 6.0.3.4)
202-
activesupport (= 6.0.3.4)
197+
rails (6.0.3.5)
198+
actioncable (= 6.0.3.5)
199+
actionmailbox (= 6.0.3.5)
200+
actionmailer (= 6.0.3.5)
201+
actionpack (= 6.0.3.5)
202+
actiontext (= 6.0.3.5)
203+
actionview (= 6.0.3.5)
204+
activejob (= 6.0.3.5)
205+
activemodel (= 6.0.3.5)
206+
activerecord (= 6.0.3.5)
207+
activestorage (= 6.0.3.5)
208+
activesupport (= 6.0.3.5)
203209
bundler (>= 1.3.0)
204-
railties (= 6.0.3.4)
210+
railties (= 6.0.3.5)
205211
sprockets-rails (>= 2.0.0)
206212
rails-dom-testing (2.0.3)
207213
activesupport (>= 4.2.0)
208214
nokogiri (>= 1.6)
209215
rails-html-sanitizer (1.3.0)
210216
loofah (~> 2.3)
211-
railties (6.0.3.4)
212-
actionpack (= 6.0.3.4)
213-
activesupport (= 6.0.3.4)
217+
railties (6.0.3.5)
218+
actionpack (= 6.0.3.5)
219+
activesupport (= 6.0.3.5)
214220
method_source
215221
rake (>= 0.8.7)
216222
thor (>= 0.20.3, < 2.0)
217-
rake (13.0.1)
223+
rake (13.0.3)
218224
rb-fsevent (0.10.4)
219225
rb-inotify (0.10.1)
220226
ffi (~> 1.0)
221227
regexp_parser (1.8.0)
222228
responders (3.0.1)
223229
actionpack (>= 5.0)
224230
railties (>= 5.0)
231+
ruby-vips (2.1.0)
232+
ffi (~> 1.12)
225233
rubyzip (2.3.0)
226234
sass-rails (6.0.0)
227235
sassc-rails (~> 2.1, >= 2.1.1)
@@ -248,15 +256,21 @@ GEM
248256
actionpack (>= 4.0)
249257
activesupport (>= 4.0)
250258
sprockets (>= 3.0.0)
251-
thor (1.0.1)
259+
stimulus-rails (0.2.3)
260+
rails (>= 6.0.0)
261+
thor (1.1.0)
252262
thread_safe (0.3.6)
253263
tilt (2.0.10)
264+
turbo-rails (0.5.9)
265+
rails (>= 6.0.0)
254266
turbolinks (5.2.1)
255267
turbolinks-source (~> 5.2)
256268
turbolinks-source (5.2.0)
257-
tzinfo (1.2.8)
269+
tzinfo (1.2.9)
258270
thread_safe (~> 0.1)
259271
unicode_utils (1.4.0)
272+
view_component (2.26.1)
273+
activesupport (>= 5.0.0, < 7.0)
260274
warden (1.2.9)
261275
rack (>= 2.0.9)
262276
web-console (4.0.4)
@@ -283,7 +297,7 @@ PLATFORMS
283297
ruby
284298

285299
DEPENDENCIES
286-
avo
300+
avo (~> 0.5.0.beta1)
287301
aws-sdk-s3
288302
bootsnap (>= 1.4.2)
289303
byebug

app/avo/actions/mark_inactive.rb

-25
This file was deleted.

app/avo/actions/toggle_inactive.rb

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module Avo
2+
module Actions
3+
class ToggleInactive < Action
4+
def name
5+
'Toggle inactive'
6+
end
7+
8+
def handle(request, models, fields)
9+
models.each do |model|
10+
if model.active
11+
model.update active: false
12+
else
13+
model.update active: true
14+
end
15+
16+
model.notify fields['message'] if fields['notify_user']
17+
end
18+
19+
succeed 'Perfect!'
20+
end
21+
22+
def fields(request)
23+
f.boolean :notify_user
24+
f.textarea :message, default: 'Your account has been marked as inactive.'
25+
end
26+
end
27+
end
28+
end

0 commit comments

Comments
 (0)