avo 2.21.1.pre.pr1484 → 2.21.3.pre.pr1489

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: 6b8cee2cababd0268d117574aafc0420608446a1b891eb1a8ff580d870c7e69d
4
- data.tar.gz: 7e9246ff3da0857334ac9b823524f6455572f894352b63cf42fc2d09a7c0e226
3
+ metadata.gz: 4d211e0aa9d5c3fe3f6a510f52911b5e7d24ea5963461da0f5b16a3c1feb39d7
4
+ data.tar.gz: 3fa4657c6abef8ce2dcf47f162337e4aa4595b4157c0b030a5569015914821ca
5
5
  SHA512:
6
- metadata.gz: 974f906c8484ff9126278cdf716f647ac6ebb9957fbbfe7537dc82873a3c20e2b132f53fe36e6cb1b80e86a862c811fae2a513d835bbd78bd60e852b31886ef4
7
- data.tar.gz: f2d62cbe19efe4ed1b4e062dfe44d3ec8ae338b69873af0eb59467cf20670cac85ede4bfaab7d19b3b86c3a7dfe0a23ba2a713f55f856364c5b4b7cb9df90f8a
6
+ metadata.gz: e1ce52d940902fcc78fc1303575742e25be9d8ac17985423a4a706dc38d44e3c72ebbe26acdea2dbc8cac24ae229eb43555da51cc62acb76c2b0cf33ab398719
7
+ data.tar.gz: a13952382661e3411c297507a5c4f950edfbe885ade1fb9dfffe308b0cc8134449642c78d6e22417f1d1e3aed66b97dc524d438c5007a3e6b9f7a04ff88a1e80
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.21.1.pre.pr1484)
4
+ avo (2.21.3.pre.pr1489)
5
5
  actionview (>= 6.0)
6
6
  active_link_to
7
7
  activerecord (>= 6.0)
@@ -24,7 +24,7 @@ module Avo
24
24
  @parent_model = @parent_resource.class.find_scope.find(params[:id])
25
25
  @parent_resource.hydrate(model: @parent_model)
26
26
  association_name = BaseResource.valid_association_name(@parent_model, params[:related_name])
27
- @query = @authorization.apply_policy @parent_model.send(association_name)
27
+ @query = @related_authorization.apply_policy @parent_model.send(association_name)
28
28
  @association_field = @parent_resource.get_field params[:related_name]
29
29
 
30
30
  if @association_field.present? && @association_field.scope.present?
@@ -46,7 +46,7 @@ module Avo
46
46
  @resource.hydrate(model: @model)
47
47
 
48
48
  if @field.present? && !@field.searchable
49
- query = @authorization.apply_policy @attachment_class
49
+ query = @related_authorization.apply_policy @attachment_class
50
50
 
51
51
  # Add the association scope to the query scope
52
52
  if @field.attach_scope.present?
data/bin/init CHANGED
@@ -26,6 +26,8 @@ app_root do
26
26
 
27
27
  header 'Installing Yarn packages'
28
28
  run! 'yarn'
29
+ run! '(cd spec/dummy; yarn)'
30
+ run! '(cp spec/dummy/.env.test.sample spec/dummy/.env.test)'
29
31
 
30
32
  if use_docker == 'y'
31
33
  header 'Creating the Docker volume'
data/lib/avo/app.rb CHANGED
@@ -59,10 +59,12 @@ module Avo
59
59
 
60
60
  # Set the current host for ActiveStorage
61
61
  begin
62
- if Rails::VERSION::MAJOR === 6
63
- ActiveStorage::Current.host = request.base_url
64
- elsif Rails::VERSION::MAJOR === 7
65
- ActiveStorage::Current.url_options = request.base_url
62
+ if defined?(ActiveStorage::Current)
63
+ if Rails::VERSION::MAJOR === 6
64
+ ActiveStorage::Current.host = request.base_url
65
+ elsif Rails::VERSION::MAJOR === 7
66
+ ActiveStorage::Current.url_options = request.base_url
67
+ end
66
68
  end
67
69
  rescue => exception
68
70
  Rails.logger.debug "[Avo] Failed to set ActiveStorage::Current.url_options, #{exception.inspect}"
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.21.1.pre.pr1484" unless const_defined?(:VERSION)
2
+ VERSION = "2.21.3.pre.pr1489" unless const_defined?(:VERSION)
3
3
  end
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.21.1.pre.pr1484
4
+ version: 2.21.3.pre.pr1489
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-12-07 00:00:00.000000000 Z
12
+ date: 2022-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord