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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 371a5db5091d8aad3fd0109c8640a06b10ee5cb61d9b16c5a98d25e566b54787
4
- data.tar.gz: 8c15d927349aed0e15ccda76f656883e51ca8c3d33ba703c2646ff7a59695a1a
3
+ metadata.gz: fbaf39a3e7e7d5bd9ed2e5fc7f61cdacf70387c5f943c8ccc4405378c67dd6a7
4
+ data.tar.gz: 97359bfa2572ad00f84b3cf21582406eaa0bf3205a61ef503f02d4a15e234c39
5
5
  SHA512:
6
- metadata.gz: ab631914363eb8bd77a5f1053d9c568d6e36f2cdd8c05a84845e4726e3d069394afc1be9778dcc3ad051a91839cb1ef050b12711e165cf8140014cb844096c8c
7
- data.tar.gz: 8cbbe3db1bd3e0b77b548706eb696f0ee0bb455cdb2d5ccab6047e4747a0eeae9eff167456bd214ab392825b6c356d061be07c15c7732ef213bc4fa64753c3df
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.12"
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.0)
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.2)
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.49.1)
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.12)
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
- # This entry uses `route_key` instead of `model_key` because it's rails that needs `fish_index` to build the correct path
16
- avo.send :"resources_#{resource.route_key}_path", **existing_params, **args
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(: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" %>
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>
@@ -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->medie_items, Fish->fish
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
@@ -19,7 +19,7 @@ module Avo
19
19
  return if value.blank?
20
20
 
21
21
  if @format.is_a?(Symbol)
22
- value.to_s(@format)
22
+ value.to_formatted_s(@format)
23
23
  else
24
24
  value.strftime(@format)
25
25
  end
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "1.25.0"
2
+ VERSION = "1.25.1"
3
3
  end
@@ -17916,7 +17916,7 @@
17916
17916
  function isInteger(value) {
17917
17917
  return /^[0-9]+$/.test(value);
17918
17918
  }
17919
- URI3.version = "1.19.10";
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?)?:+[/\\]*/i, "$1://");
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.10
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.10
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.10
88716
+ * Version: 1.19.7
88719
88717
  *
88720
88718
  * Author: Rodney Rehm
88721
88719
  * Web: http://medialize.github.io/URI.js/