avo 2.28.2.pre.pr1642 → 2.28.3.pre.pr1646

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: 2afd7fab61f56b5df63d0776f412e50efbf64bb0e45f9d011ec03f21978581c3
4
- data.tar.gz: 69ea4d9a6097b88268f6058f0978a9ff938876d0c6837f41e5896411a2447db0
3
+ metadata.gz: 527b4a8adeef6e5f6833c8329a66e2c5ced407a38f78956c4927f42af9967e93
4
+ data.tar.gz: e90ddb57665013a527f4cf1fe815578e3126af4b1225f96687b37386131cb9c5
5
5
  SHA512:
6
- metadata.gz: 3a324a98e38853c7b2cb4339f6c8d8c84efd7d4668248c1fd6e360f0fe7827a537108909c965241a080491fb6b18ac2d39c6b4e536de35708a495eb0484c0927
7
- data.tar.gz: 0ddeccf56e54a0cd30214d69c1a02182d909b8731bf98ee95b4548ab1734ee1ff6c5b7d361b64e05a163a2cb0e957dfdcef88b3c156b7bc129ff06a452c4d90a
6
+ metadata.gz: ab734f7daa2221975ef03005c5b7a94e75db330055de4e90efc540d91e2d9816ee3c89013f13b7d195010df224569849f449e3460010991ed1ec59c1a5bdabb6
7
+ data.tar.gz: a6b2a63cfdba2692203888b799c4e3c12414ece3cfc5017ce26a2dc453477c7e0f3d3065780add4232af92343915e3a8d98faa65f9ae07b4b5ab45d40d74360a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.28.2.pre.pr1642)
4
+ avo (2.28.3.pre.pr1646)
5
5
  actionview (>= 6.0)
6
6
  active_link_to
7
7
  activerecord (>= 6.0)
@@ -43,7 +43,6 @@
43
43
  title: t('avo.delete_file', item: file.filename),
44
44
  data: {
45
45
  turbo_method: :delete,
46
- turbo_frame: 'destroy_attachment_form',
47
46
  turbo_confirm: t('avo.are_you_sure'),
48
47
  tippy: :tooltip
49
48
  } %>
@@ -102,15 +102,16 @@ module Avo
102
102
  end
103
103
 
104
104
  def root_path_without_url
105
- "#{Avo.configuration.prefix_path}#{mount_path}"
105
+ Avo::App.root_path
106
+ .to_s
107
+ .delete_prefix(request.base_url.to_s)
108
+ .delete_suffix("/")
109
+ .gsub("/?", "?")
110
+ .query = ""
106
111
  rescue
107
112
  Avo.configuration.root_path
108
113
  end
109
114
 
110
- def mount_path
111
- Avo::Engine.routes.find_script_name(params.permit!.to_h.symbolize_keys)
112
- end
113
-
114
115
  private
115
116
 
116
117
  # Taken from the original library
@@ -46,7 +46,6 @@
46
46
  </div>
47
47
  <%= turbo_frame_tag 'actions_show' %>
48
48
  <%= turbo_frame_tag 'attach_modal' %>
49
- <%= turbo_frame_tag 'destroy_attachment_form' %>
50
49
  <%= turbo_frame_tag 'alerts', class: "fixed inset-0 bottom-0 flex flex-col space-y-4 items-end justify-right px-4 py-6 sm:p-6 justify-end z-[100] pointer-events-none" do %>
51
50
  <%= render Avo::FlashAlertsComponent.new flashes: flash %>
52
51
  <% # In case we have other general error messages %>
@@ -42,7 +42,6 @@ module Avo
42
42
  attr_accessor :field_wrapper_layout
43
43
  attr_accessor :sign_out_path_name
44
44
  attr_accessor :resources
45
- attr_accessor :prefix_path
46
45
  attr_writer :branding
47
46
 
48
47
  def initialize
@@ -95,7 +94,6 @@ module Avo
95
94
  @authorization_client = :pundit
96
95
  @field_wrapper_layout = :inline
97
96
  @resources = nil
98
- @prefix_path = nil
99
97
  end
100
98
 
101
99
  def current_user_method(&block)
@@ -119,8 +117,8 @@ module Avo
119
117
  end
120
118
 
121
119
  def namespace
122
- if Avo.configuration.root_path.present?
123
- Avo.configuration.root_path.delete "/"
120
+ if computed_root_path.present?
121
+ computed_root_path.delete "/"
124
122
  else
125
123
  root_path.delete "/"
126
124
  end
@@ -132,6 +130,10 @@ module Avo
132
130
  @root_path
133
131
  end
134
132
 
133
+ def computed_root_path
134
+ Avo.configuration.root_path
135
+ end
136
+
135
137
  def feature_enabled?(feature)
136
138
  !@disabled_features.map(&:to_sym).include?(feature.to_sym)
137
139
  end
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.28.2.pre.pr1642" unless const_defined?(:VERSION)
2
+ VERSION = "2.28.3.pre.pr1646" unless const_defined?(:VERSION)
3
3
  end
@@ -2,8 +2,6 @@
2
2
  Avo.configure do |config|
3
3
  ## == Routing ==
4
4
  config.root_path = '/<%= options[:path] %>'
5
- # used only when you have custom `map` configuration in your config.ru
6
- # config.prefix_path = "/internal"
7
5
 
8
6
  # Where should the user be redirected when visting the `/<%= options[:path] %>` url
9
7
  # config.home_path = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avo
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.28.2.pre.pr1642
4
+ version: 2.28.3.pre.pr1646
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin