avo 3.25.2 → 3.25.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3223a56f5fca280eb259b1f647003e9c1d63c94d4a4191582de761a500a81b64
4
- data.tar.gz: 7c47330986881508779c883464bc1f6946e7860729a8d6d6960cd702c14de0f4
3
+ metadata.gz: d4814779e30a3d00f68d38681f284220d36a7bbb3f65e4adbf0d31f9631d48b0
4
+ data.tar.gz: f86f0f961a1bd060347ec01334d54794f33abba3c64aacd4516296e52f56d755
5
5
  SHA512:
6
- metadata.gz: 9eb4fbfd68e452ef6851ff980c1a6e8763ad7344e5873052d5da11e732845ef3877a2b6026a837b5ce748e956a4e1abff642b4c4027a48389553bcf7a91f0d0e
7
- data.tar.gz: f2bea7cd32e83024a2c33469386a795111750eb8f014ae4ec6459d3aad04584c771f48ac4f3106ddda0fd800057d39bbd2bc5e127bc1d14912e6835a822edfa7
6
+ metadata.gz: bd566e5ba27e10b43f8a4ba4551d660ec36ad29cae45622eca9889c23fc544cbc6b0e34b1dfc16833b43df9ddf4ad306cde4986868d8d3c90d9a580970b65d27
7
+ data.tar.gz: b9b0603d2e0320e8da0244c3f98d21d7cdde7f97502442a3d82a72afa3d16de52b50ebbe9982ee508e8f3d02e1f06fea7d7aff7d49ca08b5a00680ee81b4ca0d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (3.25.2)
4
+ avo (3.25.3)
5
5
  actionview (>= 6.1)
6
6
  active_link_to
7
7
  activerecord (>= 6.1)
@@ -7765,6 +7765,10 @@ tag.tagify__tag{
7765
7765
  margin-top:0.375rem
7766
7766
  }
7767
7767
 
7768
+ .mt-11{
7769
+ margin-top:2.75rem
7770
+ }
7771
+
7768
7772
  .mt-12{
7769
7773
  margin-top:3rem
7770
7774
  }
@@ -8157,6 +8161,10 @@ tag.tagify__tag{
8157
8161
  max-width:6rem
8158
8162
  }
8159
8163
 
8164
+ .max-w-2xl{
8165
+ max-width:42rem
8166
+ }
8167
+
8160
8168
  .max-w-4xl{
8161
8169
  max-width:56rem
8162
8170
  }
@@ -9105,6 +9113,11 @@ tag.tagify__tag{
9105
9113
  background-color:rgb(227 229 232 / var(--tw-bg-opacity, 1))
9106
9114
  }
9107
9115
 
9116
+ .bg-gray-200{
9117
+ --tw-bg-opacity:1;
9118
+ background-color:rgb(200 203 208 / var(--tw-bg-opacity, 1))
9119
+ }
9120
+
9108
9121
  .bg-gray-25{
9109
9122
  --tw-bg-opacity:1;
9110
9123
  background-color:rgb(246 246 247 / var(--tw-bg-opacity, 1))
@@ -9582,6 +9595,10 @@ tag.tagify__tag{
9582
9595
  padding-left:0.25rem
9583
9596
  }
9584
9597
 
9598
+ .pl-6{
9599
+ padding-left:1.5rem
9600
+ }
9601
+
9585
9602
  .pr-0{
9586
9603
  padding-right:0px
9587
9604
  }
@@ -58,7 +58,6 @@ module Avo
58
58
  attr_accessor :associations_lookup_list_limit
59
59
  attr_accessor :column_names_mapping
60
60
  attr_accessor :column_types_mapping
61
- attr_accessor :clear_license_response_on_deploy
62
61
  attr_accessor :model_generator_hook
63
62
 
64
63
  def initialize
@@ -129,7 +128,6 @@ module Avo
129
128
  @column_names_mapping = {}
130
129
  @column_types_mapping = {}
131
130
  @resource_row_controls_config = {}
132
- @clear_license_response_on_deploy = true
133
131
  @model_generator_hook = true
134
132
  end
135
133
 
@@ -207,6 +205,12 @@ module Avo
207
205
  end
208
206
  end
209
207
 
208
+ def clear_license_response_on_deploy=(value)
209
+ if Rails.env.development?
210
+ puts "[Avo DEPRECATION WARNING]: The `config.clear_license_response_on_deploy` configuration option is deprecated and will be removed in future versions. Please discontinue its use, no extra action is needed."
211
+ end
212
+ end
213
+
210
214
  def license
211
215
  gems = Gem::Specification.map {|gem| gem.name}
212
216
 
@@ -230,12 +234,11 @@ module Avo
230
234
  ).handle
231
235
  end
232
236
 
233
- # When not in production or test we'll just use the MemoryStore which is good enough.
237
+ # When not in production or test we'll just use the FileStore which is good enough.
234
238
  # When running in production we'll use Rails.cache if it's not ActiveSupport::Cache::MemoryStore or ActiveSupport::Cache::NullStore.
235
239
  # If it's one of rejected cache stores, we'll use the FileStore.
236
240
  # We decided against the MemoryStore in production because it will not be shared between multiple processes (when using Puma).
237
241
  def computed_cache_store
238
- memory_store_instance = ActiveSupport::Cache.lookup_store(:memory_store)
239
242
  file_store_instance = ActiveSupport::Cache.lookup_store(:file_store, Rails.root.join("tmp", "cache"))
240
243
 
241
244
  -> {
@@ -248,7 +251,7 @@ module Avo
248
251
  elsif Rails.env.test?
249
252
  Rails.cache
250
253
  else
251
- memory_store_instance
254
+ file_store_instance
252
255
  end
253
256
  }
254
257
  end
data/lib/avo/engine.rb CHANGED
@@ -28,17 +28,6 @@ module Avo
28
28
 
29
29
  # Boot Avo
30
30
  ::Avo.boot
31
-
32
- # After deploy we want to make sure the license response is being cleared.
33
- # We need a fresh license response.
34
- # This is disabled in development because the initialization process might be triggered more than once.
35
- if !Rails.env.development? && Avo.configuration.clear_license_response_on_deploy
36
- begin
37
- Licensing::HQ.new.clear_response
38
- rescue => exception
39
- Avo.logger.info "Failed to clear Avo HQ response: #{exception.message}"
40
- end
41
- end
42
31
  end
43
32
 
44
33
  # Ensure we reboot the app when something changes
@@ -11,7 +11,20 @@ module Avo
11
11
 
12
12
  class << self
13
13
  def cache_key
14
- "avo.hq-#{Avo::VERSION.parameterize}.response"
14
+ "avo.hq-#{digested_attributes}-#{Avo::VERSION.parameterize}.response"
15
+ end
16
+
17
+ private
18
+
19
+ # Digest the attributes to a few character string. Ex: "j8q2"
20
+ def digested_attributes
21
+ # This list of attributes will make sure that the cached response is invalidated when any of them changes.
22
+ attributes_to_digest = [
23
+ Avo.configuration.license_key,
24
+ Avo.configuration.license,
25
+ ].join("-")
26
+
27
+ Digest::MD5.hexdigest(attributes_to_digest).yield_self { |h| "#{h[0, 2]}#{h[-2, 2]}" }
15
28
  end
16
29
  end
17
30
 
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.25.2" unless const_defined?(:VERSION)
2
+ VERSION = "3.25.3" unless const_defined?(:VERSION)
3
3
  end
@@ -11,7 +11,7 @@ class Avo::Resources::<%= resource_class %> < <%= parent_resource %><% if option
11
11
  }
12
12
  ]
13
13
  end
14
- <% elsif options["http"] %>
14
+ <% elsif options["http"] %>
15
15
  # self.http_adapter = {
16
16
  # endpoint: "https://api.openalex.org/authors",
17
17
  # parse_collection: -> {
@@ -36,13 +36,13 @@ class Avo::Resources::<%= resource_class %> < <%= parent_resource %><% if option
36
36
  # }
37
37
 
38
38
  # self.find_record_method = -> { query.find Base64.decode64(id) }
39
- <% else %>
39
+ <% else %>
40
40
  # self.includes = []
41
41
  # self.attachments = []<%= model_class_from_args %>
42
42
  # self.search = {
43
43
  # query: -> { query.ransack(id_eq: q, m: "or").result(distinct: false) }
44
44
  # }
45
- <% end %><% if options["array"] %>
45
+ <% end %><% if options["array"] %>
46
46
  def fields
47
47
  field :id, as: :id
48
48
  field :title
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: 3.25.2
4
+ version: 3.25.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2025-10-23 00:00:00.000000000 Z
13
+ date: 2025-10-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord