avo 1.25.0 → 1.25.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +4 -4
- data/app/helpers/avo/url_helpers.rb +6 -2
- data/app/views/avo/partials/_profile_dropdown.html.erb +1 -1
- data/lib/avo/base_resource.rb +5 -1
- data/lib/avo/fields/date_field.rb +1 -1
- data/lib/avo/version.rb +1 -1
- data/public/avo-assets/avo.js +5 -7
- data/public/avo-assets/avo.js.map +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbaf39a3e7e7d5bd9ed2e5fc7f61cdacf70387c5f943c8ccc4405378c67dd6a7
|
4
|
+
data.tar.gz: 97359bfa2572ad00f84b3cf21582406eaa0bf3205a61ef503f02d4a15e234c39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aa49a22c165ca4ec0638603e1fdda8649ca612b99e847fa015e20edf81b64527d408e47e2af19d0cac3b8fb5389e5608423305334090918c2cb6ff382d37634
|
7
|
+
data.tar.gz: c79b94df66a4910bddd53d7fa2a3a4c2a904919e4781a30e82053b8ff65559b48eef0d778f561ac11c845f461bf544d205c193168d7b890365490518f419788b
|
data/Gemfile
CHANGED
@@ -39,7 +39,7 @@ gem "puma", "~> 5.6.2"
|
|
39
39
|
# gem 'bcrypt', '~> 3.1.7'
|
40
40
|
|
41
41
|
# Use Active Storage variant
|
42
|
-
gem "image_processing", "~> 1.
|
42
|
+
gem "image_processing", "~> 1.2"
|
43
43
|
|
44
44
|
# Reduces boot times through caching; required in config/boot.rb
|
45
45
|
gem "bootsnap", ">= 1.4.2", require: false
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
avo (1.25.
|
4
|
+
avo (1.25.1)
|
5
5
|
active_link_to
|
6
6
|
addressable
|
7
7
|
breadcrumbs_on_rails
|
@@ -187,7 +187,7 @@ GEM
|
|
187
187
|
concurrent-ruby (~> 1.0)
|
188
188
|
i18n_data (0.15.0)
|
189
189
|
simple_po_parser (~> 1.1)
|
190
|
-
image_processing (1.12.
|
190
|
+
image_processing (1.12.1)
|
191
191
|
mini_magick (>= 4.9.5, < 5)
|
192
192
|
ruby-vips (>= 2.0.17, < 3)
|
193
193
|
io-wait (0.2.1)
|
@@ -370,7 +370,7 @@ GEM
|
|
370
370
|
tzinfo (2.0.4)
|
371
371
|
concurrent-ruby (~> 1.0)
|
372
372
|
unicode-display_width (2.1.0)
|
373
|
-
view_component (2.
|
373
|
+
view_component (2.48.0)
|
374
374
|
activesupport (>= 5.0.0, < 8.0)
|
375
375
|
method_source (~> 1.0)
|
376
376
|
warden (1.2.9)
|
@@ -425,7 +425,7 @@ DEPENDENCIES
|
|
425
425
|
hotwire-rails
|
426
426
|
htmlbeautifier
|
427
427
|
httparty
|
428
|
-
image_processing (~> 1.
|
428
|
+
image_processing (~> 1.2)
|
429
429
|
iso
|
430
430
|
jsbundling-rails
|
431
431
|
launchy
|
@@ -12,8 +12,12 @@ module Avo
|
|
12
12
|
rescue
|
13
13
|
end
|
14
14
|
|
15
|
-
#
|
16
|
-
|
15
|
+
# Create the `route_key` from the model key so the namespaced models get the proper path (SomeModule::Post -> some_module_post).
|
16
|
+
# Add the `_index` suffix for the uncountable models so they get the correct path (`fish_index`)
|
17
|
+
route_key = resource.model_key
|
18
|
+
route_key << "_index" if resource.model_name.singular == resource.model_name.plural
|
19
|
+
|
20
|
+
avo.send :"resources_#{route_key}_path", **existing_params, **args
|
17
21
|
end
|
18
22
|
|
19
23
|
def resource_path(
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
<% if main_app.respond_to?(destroy_user_session_path) %>
|
21
21
|
<div class="hidden absolute inset-auto right-0 mr-6 mt-0 py-4 bg-white rounded-xl min-w-[200px] shadow-context" data-toggle-panel-target="panel">
|
22
|
-
<%= button_to t('avo.sign_out'), main_app.send(
|
22
|
+
<%= button_to t('avo.sign_out'), main_app.send(destroy_user_session_path), method: :delete, form: { "data-turbo" => "false" }, class: "appearance-none bg-white text-left cursor-pointer text-green-600 font-semibold hover:text-white hover:bg-green-500 block px-4 py-1 w-full" %>
|
23
23
|
</div>
|
24
24
|
<% end %>
|
25
25
|
</div>
|
data/lib/avo/base_resource.rb
CHANGED
@@ -406,11 +406,15 @@ module Avo
|
|
406
406
|
# This is used as the model class ID
|
407
407
|
# We use this instead of the route_key to maintain compatibility with uncountable models
|
408
408
|
# With uncountable models route key appends an _index suffix (Fish->fish_index)
|
409
|
-
# Example: User->users, MediaItem->
|
409
|
+
# Example: User->users, MediaItem->media_items, Fish->fish
|
410
410
|
def model_key
|
411
411
|
model_class.model_name.plural
|
412
412
|
end
|
413
413
|
|
414
|
+
def model_name
|
415
|
+
model_class.model_name
|
416
|
+
end
|
417
|
+
|
414
418
|
def singular_model_key
|
415
419
|
model_class.model_name.singular
|
416
420
|
end
|
data/lib/avo/version.rb
CHANGED
data/public/avo-assets/avo.js
CHANGED
@@ -17916,7 +17916,7 @@
|
|
17916
17916
|
function isInteger(value) {
|
17917
17917
|
return /^[0-9]+$/.test(value);
|
17918
17918
|
}
|
17919
|
-
URI3.version = "1.19.
|
17919
|
+
URI3.version = "1.19.7";
|
17920
17920
|
var p2 = URI3.prototype;
|
17921
17921
|
var hasOwn = Object.prototype.hasOwnProperty;
|
17922
17922
|
function escapeRegEx(string) {
|
@@ -18026,7 +18026,6 @@
|
|
18026
18026
|
trim: /[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,
|
18027
18027
|
parens: /(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g
|
18028
18028
|
};
|
18029
|
-
URI3.leading_whitespace_expression = /^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/;
|
18030
18029
|
URI3.defaultPorts = {
|
18031
18030
|
http: "80",
|
18032
18031
|
https: "443",
|
@@ -18224,7 +18223,6 @@
|
|
18224
18223
|
preventInvalidHostname: URI3.preventInvalidHostname
|
18225
18224
|
};
|
18226
18225
|
}
|
18227
|
-
string = string.replace(URI3.leading_whitespace_expression, "");
|
18228
18226
|
pos = string.indexOf("#");
|
18229
18227
|
if (pos > -1) {
|
18230
18228
|
parts.fragment = string.substring(pos + 1) || null;
|
@@ -18235,7 +18233,7 @@
|
|
18235
18233
|
parts.query = string.substring(pos + 1) || null;
|
18236
18234
|
string = string.substring(0, pos);
|
18237
18235
|
}
|
18238
|
-
string = string.replace(/^(https?|ftp|wss?)
|
18236
|
+
string = string.replace(/^(https?|ftp|wss?)?:[/\\]*/, "$1://");
|
18239
18237
|
if (string.substring(0, 2) === "//") {
|
18240
18238
|
parts.protocol = null;
|
18241
18239
|
string = string.substring(2);
|
@@ -88689,7 +88687,7 @@
|
|
88689
88687
|
/*!
|
88690
88688
|
* URI.js - Mutating URLs
|
88691
88689
|
*
|
88692
|
-
* Version: 1.19.
|
88690
|
+
* Version: 1.19.7
|
88693
88691
|
*
|
88694
88692
|
* Author: Rodney Rehm
|
88695
88693
|
* Web: http://medialize.github.io/URI.js/
|
@@ -88702,7 +88700,7 @@
|
|
88702
88700
|
* URI.js - Mutating URLs
|
88703
88701
|
* IPv6 Support
|
88704
88702
|
*
|
88705
|
-
* Version: 1.19.
|
88703
|
+
* Version: 1.19.7
|
88706
88704
|
*
|
88707
88705
|
* Author: Rodney Rehm
|
88708
88706
|
* Web: http://medialize.github.io/URI.js/
|
@@ -88715,7 +88713,7 @@
|
|
88715
88713
|
* URI.js - Mutating URLs
|
88716
88714
|
* Second Level Domain (SLD) Support
|
88717
88715
|
*
|
88718
|
-
* Version: 1.19.
|
88716
|
+
* Version: 1.19.7
|
88719
88717
|
*
|
88720
88718
|
* Author: Rodney Rehm
|
88721
88719
|
* Web: http://medialize.github.io/URI.js/
|