avo 2.33.0 → 2.33.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: bde2848589b8531552c9773d39da659c757d144eff828db6a851314508f95c9b
4
- data.tar.gz: afb5e42a6d5363fb28095311b13401ae36a6b9a657704fdd817265a523110ef3
3
+ metadata.gz: 7702d60d831cd5fbcb1f1b4f7eab70336d6e71e07c19fd6d25a2627d6569e122
4
+ data.tar.gz: 22d9fab7fd3ce81fb3c62165bd544822d001bbabd97ed380b53280eb0b2e1649
5
5
  SHA512:
6
- metadata.gz: f974408c7680082e17d1c5a6d5e0cff2cbd6fb4eb60a0546a1ad59286dd48295f4943845dc1d6845295b2f345ef1eedfdf397d34490e50a081af96c9d88b8428
7
- data.tar.gz: 2728f765058549dcceb8b15089fd3e4f2a5ca1e03587c146e2162338c862c14f1724366746c89b1fad471641bad74d312c1001a3fe100dabe6c2432326aab400
6
+ metadata.gz: 5612be2a2e685fb664841d6c9c69640a5c78ae61830f15571d5425c06b9b22cc902938a4f7fbd4d09d841fc47fde58545c127018fde4df774a0da5cc48811b0e
7
+ data.tar.gz: ad4df4eb5fd776e678a80432a42e25f04a67b6cbb3ed2e5d0b0f2ba557d50dc7f8ab253cd2456193227169b7b4f1c32b19fafc50549dcc13f054d9da3719fea1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- avo (2.33.0)
4
+ avo (2.33.1)
5
5
  actionview (>= 6.0)
6
6
  active_link_to
7
7
  activerecord (>= 6.0)
data/lib/avo/engine.rb CHANGED
@@ -72,6 +72,11 @@ module Avo
72
72
  require_relative "../generators/model_generator"
73
73
  end
74
74
 
75
+ initializer "avo.locales" do |app|
76
+ I18n.load_path += Dir[Avo::Engine.root.join("lib", "generators", "avo", "templates", "locales", "*.{rb,yml}")]
77
+ I18n.load_path += Dir[Rails.root.join("config", "locales", "*.{rb,yml}")]
78
+ end
79
+
75
80
  # After deploy we want to make sure the license response is being cleared.
76
81
  # We need a fresh license response.
77
82
  # This is disabled in development because the initialization process might be triggered more than once.
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "2.33.0" unless const_defined?(:VERSION)
2
+ VERSION = "2.33.1" unless const_defined?(:VERSION)
3
3
  end
@@ -13,7 +13,6 @@ module Generators
13
13
  route "mount Avo::Engine, at: Avo.configuration.root_path"
14
14
 
15
15
  template "initializer/avo.tt", "config/initializers/avo.rb"
16
- directory File.join(__dir__, "templates", "locales"), "config/locales"
17
16
  create_resources
18
17
  end
19
18
 
@@ -135,6 +135,9 @@ module Generators
135
135
  fields_string = "\n # Fields generated from the model"
136
136
 
137
137
  fields.each do |field_name, field_options|
138
+ # if field_options are not available (likely a missing resource for an association), skip the field
139
+ fields_string += "\n # Could not generate a field for #{field_name}" and next unless field_options
140
+
138
141
  options = ""
139
142
  field_options[:options].each { |k, v| options += ", #{k}: #{v}" } if field_options[:options].present?
140
143
 
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.33.0
4
+ version: 2.33.1
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: 2023-05-23 00:00:00.000000000 Z
12
+ date: 2023-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord