avo 3.13.4 → 3.13.5

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: f020bdf5b3ddc3019da8115697a94b6f03cff4c9490eb4854056d20fe9a4d0b1
4
- data.tar.gz: 305db86be684e09b6de43fa7455e85b602569a53ca2f725af73d7c28ec27de82
3
+ metadata.gz: d9c4eb2698e3f5ee29c5b2c6dd833de301452c210e1deb444fce7d32f856fbaf
4
+ data.tar.gz: 161cf6eb2ecf4779f95427134a5f950eb7821ec4774171964449ad53b0168cda
5
5
  SHA512:
6
- metadata.gz: 29d918d8f35d930d0b1e8f5a2ac3096a8247ead87d5d05b6d8fe870a3bdb113a1f9806246cbbe30e015a1b1640c5fc47587dee53d01f0eb96542f90fcfd69eda
7
- data.tar.gz: 984d4356d3a6308e9a7f5fd322e85fbddb899d2bdea66842c76b4b391215b353af4b4dcb32352b48e3c54341e29b74bd34cfd5bfe95e47de371d533da83baf5b
6
+ metadata.gz: 983c4f7f9d83480658bafe2f9f8bfee6372e45d9e59637f69bfc4f5aefc7ecb6d48d5ed3aa38127dbfa2e684bfdb499eef2e552913413d034094fb0fff6ee98d
7
+ data.tar.gz: b8ff6292ccb2e822031cac857273ea9b37565e6973935408aabad71551f32a7a641b19283a26cf792f15f49f9ba66106d33eef6751bad7b1814b8c59340281cb
data/Gemfile.lock CHANGED
@@ -107,7 +107,7 @@ GIT
107
107
  PATH
108
108
  remote: .
109
109
  specs:
110
- avo (3.13.4)
110
+ avo (3.13.5)
111
111
  actionview (>= 6.1)
112
112
  active_link_to
113
113
  activerecord (>= 6.1)
@@ -36,7 +36,7 @@ module Avo
36
36
  attr_accessor :display_license_request_timeout_error
37
37
  attr_accessor :current_user_resource_name
38
38
  attr_accessor :raise_error_on_missing_policy
39
- attr_accessor :disabled_features
39
+ attr_writer :disabled_features
40
40
  attr_accessor :buttons_on_form_footers
41
41
  attr_accessor :main_menu
42
42
  attr_accessor :profile_menu
@@ -155,8 +155,12 @@ module Avo
155
155
  @root_path
156
156
  end
157
157
 
158
+ def disabled_features
159
+ Avo::ExecutionContext.new(target: @disabled_features).handle
160
+ end
161
+
158
162
  def feature_enabled?(feature)
159
- !@disabled_features.map(&:to_sym).include?(feature.to_sym)
163
+ !disabled_features.map(&:to_sym).include?(feature.to_sym)
160
164
  end
161
165
 
162
166
  def branding
data/lib/avo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Avo
2
- VERSION = "3.13.4" unless const_defined?(:VERSION)
2
+ VERSION = "3.13.5" unless const_defined?(:VERSION)
3
3
  end
@@ -40,13 +40,14 @@ module Generators
40
40
  # bin/rails generate avo:tool lolo
41
41
  # will generate the avo.lolo_path helper
42
42
  # THe fact that it will always generate the definded? and Avo::Engine.routes.draw wraps is unfortunate. We'd love a PR to fix that.
43
- route_contents = <<-ROUTE
44
-
45
- if defined? ::Avo
46
- Avo::Engine.routes.draw do
47
- get "#{file_name}", to: "tools##{file_name}", as: :#{file_name}
48
- end
49
- end
43
+ route_contents = <<~ROUTE
44
+
45
+ if defined? ::Avo
46
+ Avo::Engine.routes.draw do
47
+ # This route is not protected, secure it with authentication if needed.
48
+ get "#{file_name}", to: "tools##{file_name}", as: :#{file_name}
49
+ end
50
+ end
50
51
  ROUTE
51
52
  append_to_file "config/routes.rb", route_contents
52
53
 
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.13.4
4
+ version: 3.13.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian Marin